|
From: <sv...@de...> - 2005-06-22 20:55:18
|
Author: marcelo
Date: 2005-06-22 16:55:20 -0400 (Wed, 22 Jun 2005)
New Revision: 1395
Modified:
humano2/trunk/core/schema/pgsql/pgsql-Beta6patch.sql
humano2/trunk/web/portal/site/showView.aspx.cs
Log:
* Modified SQL Patch file, added ; so it does not crash
* Modified showView to add concept of views of type "My things"
Modified: humano2/trunk/core/schema/pgsql/pgsql-Beta6patch.sql
=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/core/schema/pgsql/pgsql-Beta6patch.sql 2005-06-22 20:32=
:50 UTC (rev 1394)
+++ humano2/trunk/core/schema/pgsql/pgsql-Beta6patch.sql 2005-06-22 20:55=
:20 UTC (rev 1395)
@@ -1,4 +1,4 @@
-update "view" set "where" =3D '34|8|{(''[DomainId]'',''10'')}|0|0' wher=
e id_entity =3D 1405
+update "view" set "where" =3D '34|8|{(''[DomainId]'',''10'')}|0|0' wher=
e id_entity =3D 1405;
=20
-- For the pertinence properties width and height
alter table pertinence add column widthPertinence Integer;
Modified: humano2/trunk/web/portal/site/showView.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/portal/site/showView.aspx.cs 2005-06-22 20:32:50 UT=
C (rev 1394)
+++ humano2/trunk/web/portal/site/showView.aspx.cs 2005-06-22 20:55:20 UT=
C (rev 1395)
@@ -21,6 +21,8 @@
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
=20
+using System.Reflection;
+using System.Reflection.Emit;
using System.Text.RegularExpressions;
=20
using Humano2.Components.WebTools;
@@ -123,7 +125,23 @@
{
viewTable =3D getViewForSearch(iniClass,idAttributes,idOperators,val=
uesToSearch);
}
- =20
+
+ //replaces dynamic session variables
+ Type myType =3D typeof(SessionCredencial);
+ string whereStr =3D viewTable.Rows[0]["where"].ToString();
+
+ FieldInfo[] myFieldInfo =3D myType.GetFields();
+ for(int i=3D0;i<myFieldInfo.Length;i++)
+ {
+ FieldInfo myPropInfo =3D (FieldInfo)myFieldInfo[i];
+ string fieldName =3D myPropInfo.Name;=09
+ whereStr =3D whereStr.Replace("[currrentUser." + fieldName + "]",myP=
ropInfo.GetValue(userCred).ToString());
+ }
+=20
+ =09
+ =09
+ viewTable.Rows[0]["where"] =3D whereStr;
+
// If there are multiple "order" arguments, they should be s=
eperated by ",";
// The framework already puts a "," between multiple "order =
arguments.
Logger.Log("Before ExecViewFromDataTabe. iniClass=3D " + Con=
vert.ToString(iniClass),LogLevel.Trace);
|