|
From: <sv...@de...> - 2005-06-15 15:25:45
|
Author: pcamacho
Date: 2005-06-15 11:25:49 -0400 (Wed, 15 Jun 2005)
New Revision: 1331
Modified:
humano2/trunk/components/webTools/interfacetools.cs
humano2/trunk/web/builder/site/viewmain.aspx.cs
Log:
FIX: bug #207.
Modified: humano2/trunk/components/webTools/interfacetools.cs
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- humano2/trunk/components/webTools/interfacetools.cs 2005-06-15 14:34:=
11 UTC (rev 1330)
+++ humano2/trunk/components/webTools/interfacetools.cs 2005-06-15 15:25:=
49 UTC (rev 1331)
@@ -218,7 +218,6 @@
res.Rows.InsertAt(startRow, 0);
=20
//Parse the table and build the xml string
- =20
foreach(DataRow row in res.Rows)
{
//int classId =3D Convert.ToInt32(row["id_entity"]);
@@ -235,6 +234,18 @@
//Logger.Log("ReportMain getClassList: " + xmlString, LogLev=
el.Trace);
return xmlString;
}
- =20
+ =20
+ ///<summary>
+ ///returns the first column in a string getted from the js inter=
face of creation of view/report, that is
+ /// of the form: col1,col2,col3... concatened with |0 meaning fo=
r viewtools: order by this column asc
+ ///<param name=3D"receivedColumn">The string from which we want =
to extract the first column</param>
+ ///<returns></returns>
+ ///</summary>
+ public static string GetFirstColumnForOrder(string receivedColum=
n)
+ {
+ string [] columns =3D receivedColumn.Split(",".ToCharArray()=
);
+ string res =3D columns[1] + "|0";=20
+ return res; =20
+ }
}
}
Modified: humano2/trunk/web/builder/site/viewmain.aspx.cs
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- humano2/trunk/web/builder/site/viewmain.aspx.cs 2005-06-15 14:34:11 U=
TC (rev 1330)
+++ humano2/trunk/web/builder/site/viewmain.aspx.cs 2005-06-15 15:25:49 U=
TC (rev 1331)
@@ -392,7 +392,16 @@
dr["columns"] =3D receivedColumnsStr; //If a column is a per=
tinence, change it
//Special case for IN filter
dr["where"] =3D Interface.ParseWhere(receivedWhereStr);=20
- dr["order"] =3D Interface.ParseOrder(receivedOrderStr);
+ =20
+ if(receivedOrderStr !=3D "")
+ {
+ dr["order"] =3D Interface.ParseOrder(receivedOrderStr);
+ }
+ else //Add a order by default with the first column
+ {
+ dr["order"] =3D Interface.GetFirstColumnForOrder(receive=
dColumnsStr);
+ }
+ =20
Logger.Log("receivedOrderStr" + receivedOrderStr, LogLevel.T=
race);
Logger.Log("receivedWhereStr" + receivedWhereStr, LogLevel.T=
race);
=09
|