|
From: <sv...@de...> - 2005-05-27 22:00:13
|
Author: pcamacho
Date: 2005-05-27 18:00:10 -0400 (Fri, 27 May 2005)
New Revision: 1184
Modified:
humano2/trunk/web/builder/site/foldermanagement.aspx.cs
Log:
FIX: When trying to create a new folder (builder) the list of existing fo=
lders was not appearing.
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 21=
:32:51 UTC (rev 1183)
+++ humano2/trunk/web/builder/site/foldermanagement.aspx.cs 2005-05-27 22=
:00:10 UTC (rev 1184)
@@ -465,7 +465,7 @@
string strHtml =3D "";
=09
=09
- if(action =3D=3D CNS_CREATE && action =3D=3D CNS_NOTHING)
+ if(action =3D=3D CNS_CREATE || action =3D=3D CNS_NOTHING)
{
strHtml =3D String.Format("<option value=3D\"0\" selected>---No Fold=
er---</option>");
}
@@ -483,10 +483,12 @@
=20
foreach(DataRow row in dtResult.Rows)
{
- //Don't allow a folder to be a child of one of its desce=
ndants and himself
+ //Don't allow a folder to be a child of one of its desce=
ndants and himself or (case of update only)
adapter dbAdapter =3D userCred.CoreAdapter;
- if(!dbAdapter.IsDescendantOfFolder(folderId, Convert.ToInt32(row["id=
_entity"]))
- && folderId !=3D Convert.ToInt32(row["id_entity"]) )=
=20
+ if( (!dbAdapter.IsDescendantOfFolder(folderId, Convert.ToInt32(r=
ow["id_entity"]))
+ && folderId !=3D Convert.ToInt32(row["id_ent=
ity"])
+ && action =3D=3D CNS_UPDATE)=20
+ )=20
{
absCrud crud =3D Factory.Crud();
absComplex complex =3D crud.GetCore().Complex;
@@ -497,6 +499,11 @@
}
strHtml +=3D "<option value=3D\"" + row["id_entity"]=
+ "\" " + selected +">" + row["folderName"] + "</option>";
}
+ =20
+ if (action !=3D CNS_UPDATE) //Creation no filter
+ {
+ strHtml +=3D "<option value=3D\"" + row["id_entity"]=
+ "\">" + row["folderName"] + "</option>";
+ }
}
Response.Write(strHtml);
}
|