|
From: <sv...@de...> - 2005-05-27 19:07:55
|
Author: pcamacho
Date: 2005-05-27 15:07:53 -0400 (Fri, 27 May 2005)
New Revision: 1175
Modified:
humano2/trunk/core/db/absComplex.cs
humano2/trunk/core/db/mssql/mssqlComplex.cs
humano2/trunk/core/db/pgsql/pgsqlComplex.cs
humano2/trunk/web/builder/site/foldermanagement.aspx.cs
Log:
FIX: in the creation of folder, when updating the name of folder parent w=
as not getted back into the interface.
Modified: humano2/trunk/core/db/absComplex.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/core/db/absComplex.cs 2005-05-27 19:07:09 UTC (rev 1174=
)
+++ humano2/trunk/core/db/absComplex.cs 2005-05-27 19:07:53 UTC (rev 1175=
)
@@ -396,6 +396,9 @@
///</summary>
abstract public int [] GetChildsOfFolder(int folderId);
=20
+ ///<summary>Returns the id of the parent of a folder</summary>
+ abstract public int GetParentOfFolder(int folderId);
+ =20
#endregion
=20
public object doScalar(string query)
Modified: humano2/trunk/core/db/mssql/mssqlComplex.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/core/db/mssql/mssqlComplex.cs 2005-05-27 19:07:09 UTC (=
rev 1174)
+++ humano2/trunk/core/db/mssql/mssqlComplex.cs 2005-05-27 19:07:53 UTC (=
rev 1175)
@@ -1239,5 +1239,14 @@
return res;
}
=20
+ public override int GetParentOfFolder(int folderId)
+ {
+ string req =3D "select \"folderParent\" from folder where \"=
id_entity\" =3D " + folderId;
+ DataTable dt =3D doSelect(req);
+ int res;
+ res =3D Convert.ToInt32(dt.Rows[0]["folderParent"]);
+ =20
+ return res;
+ }
}
}
Modified: humano2/trunk/core/db/pgsql/pgsqlComplex.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/core/db/pgsql/pgsqlComplex.cs 2005-05-27 19:07:09 UTC (=
rev 1174)
+++ humano2/trunk/core/db/pgsql/pgsqlComplex.cs 2005-05-27 19:07:53 UTC (=
rev 1175)
@@ -1255,5 +1255,15 @@
=20
return res;
}
+ =20
+ public override int GetParentOfFolder(int folderId)
+ {
+ string req =3D "select \"folderParent\" from folder where \"=
id_entity\" =3D " + folderId;
+ DataTable dt =3D doSelect(req);
+ int res;
+ res =3D Convert.ToInt32(dt.Rows[0]["folderParent"]);
+ =20
+ return res;
+ }
}
}
Modified: humano2/trunk/web/builder/site/foldermanagement.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/foldermanagement.aspx.cs 2005-05-27 19=
:07:09 UTC (rev 1174)
+++ humano2/trunk/web/builder/site/foldermanagement.aspx.cs 2005-05-27 19=
:07:53 UTC (rev 1175)
@@ -509,7 +509,14 @@
if(!dbAdapter.IsDescendantOfFolder(folderId, Convert.ToInt32(row["id=
_entity"]))
&& folderId !=3D Convert.ToInt32(row["id_entity"]) )=
=20
{
- strHtml +=3D String.Format("<option value=3D\"{0}\" =
selected>{1}</option>",row["id_entity"],row["folderName"]);
+ absCrud crud =3D Factory.Crud();
+ absComplex complex =3D crud.GetCore().Complex;
+ string selected =3D "";
+ if(complex.GetParentOfFolder(folderId) =3D=3D Conver=
t.ToInt32(row["id_entity"])) //Preselected option
+ {
+ selected =3D "selected=3D\"\"";
+ }
+ strHtml +=3D "<option value=3D\"" + row["id_entity"]=
+ "\" " + selected +">" + row["folderName"] + "</option>";
}
}
Response.Write(strHtml);
|