|
From: <sv...@de...> - 2005-06-13 14:27:15
|
Author: pcamacho
Date: 2005-06-13 10:27:13 -0400 (Mon, 13 Jun 2005)
New Revision: 1311
Modified:
humano2/trunk/components/webTools/basePage.cs
Log:
FIX: bug #195. This was happening only in case of a class with attribute =
file. After the upload when redoing an
update, all the params were not sent to the crud.
Modified: humano2/trunk/components/webTools/basePage.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/basePage.cs 2005-06-13 04:35:00 UTC=
(rev 1310)
+++ humano2/trunk/components/webTools/basePage.cs 2005-06-13 14:27:13 UTC=
(rev 1311)
@@ -152,17 +152,19 @@
foreach(string attributeId in AllKeys)
{
string shortPathName =3D Path.GetFileName(Request.Files[=
attributeId].FileName); //Get only the file name (without path)
- if (shortPathName !=3D "")
- {
- Html.UploadFile(Request.Files[attributeId],idEntity,attributeId,Res=
ponse,userCred);
- InstanceParams.Add(attributeId,shortPathName);
- }
+ Html.UploadFile(Request.Files[attributeId],idEntity,attr=
ibuteId,Response,userCred);
+ InstanceParams.Add(attributeId,shortPathName);
}
+ =20
+ //Add all params of Requets.Params to InstanceParams
+ foreach(string key in Request.Params.AllKeys)
+ {
+ string value =3D Request.Params.GetValues(key)[0]; //Onl=
y the first value because each key is unique
+ InstanceParams.Add(key,value); =20
+ }
+ =20
//Update the instance with the names of files
- if(InstanceParams.Count !=3D 0)
- {
- dbAdapter.UpdateInstance(idEntity, domainId, InstancePar=
ams);
- } =20
+ dbAdapter.UpdateInstance(idEntity, domainId, InstanceParams)=
;
}
=20
=20
|