|
From: <sv...@de...> - 2005-06-23 19:58:11
|
Author: pcamacho
Date: 2005-06-23 15:58:17 -0400 (Thu, 23 Jun 2005)
New Revision: 1409
Modified:
humano2/trunk/components/webTools/interfacetools.cs
Log:
FIX: in the interface for creation of views, not all pertinence attribute=
s where getted.=20
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-23 19:11:=
47 UTC (rev 1408)
+++ humano2/trunk/components/webTools/interfacetools.cs 2005-06-23 19:58:=
17 UTC (rev 1409)
@@ -260,8 +260,6 @@
string salida=3D"";
string className =3D "";
=20
- DataTable dt =3D userCred.CoreAdapter.GetAttributesFromClass(classId)=
;
-
adapter dbAdapter =3D new adapter();
className =3D dbAdapter.GetClassNameById(classId);
//className =3D dt.Rows[0]["name"].ToString();
@@ -271,45 +269,6 @@
salida +=3D "<name>" + className + "</name>";
salida +=3D "<attributes>";
=09
- /*
- =20
- foreach(DataRow row in dt.Rows)=20
- {
- string attName =3D Convert.ToString(row["attName"]);
- string attType =3D Convert.ToString(row["attType"]);
- if((attType=3D=3D"pertinence") && fullPert)
- {
- idatt =3D Convert.ToInt32(row["id_entity"]);
- dtpert =3D userCred.CoreAdapter.GetClassesFromPertinence(idatt);
- DataRow dr2 =3D dtpert.Rows[0];
- idClassRel =3D Convert.ToInt32(dr2["to"].ToString());
- =09
- =20
- //For each attribute of pertinence put the id with t=
ogo and=20
- // the pertname.attname
- int [] listAttId =3D GetAttributeIdListForClass(idCl=
assRel,userCred);
- string [] listAttName =3D getAttributeNameListForCla=
ss(idClassRel,userCred);
- int size =3D listAttId.Length;
- for(int i=3D0;i<size;i++)
- {
- attlogin =3D listAttId[i];
- salida +=3D "<attribute>";
- salida +=3D "<id>" + idatt + "^" + attlogin + "<=
/id>";
- salida +=3D "<name>" + attName + "." + listAttN=
ame[i]+ "</name>";
- salida +=3D "</attribute>";
- }
- }
- else
- {
- salida +=3D "<attribute>";
- salida +=3D "<id>" + row["id_entity"].ToString() + "</id>";
- salida +=3D "<name>" + attName + "</name>";
- salida +=3D "</attribute>";
- }
- }
- =20
- */
- =20
DataTable DtListAtt =3D GetAttribListForClass(classId, userC=
red,fullPert);
foreach(DataRow row in DtListAtt.Rows)
{
@@ -320,7 +279,6 @@
salida +=3D "<name>";
salida +=3D Convert.ToString(row["name"]);
salida +=3D "</name>";
- =20
salida +=3D "</attribute>";
}
=20
@@ -349,7 +307,6 @@
=20
foreach(DataRow row in dt.Rows)=20
{
- DataRow resRow =3D res.NewRow();
string attName =3D Convert.ToString(row["attName"]);
string attType =3D Convert.ToString(row["attType"]);
if((attType=3D=3D"pertinence") && fullPert)
@@ -366,17 +323,21 @@
int size =3D listAttId.Length;
for(int i=3D0;i<size;i++)
{
+ DataRow resRow =3D res.NewRow();
attlogin =3D listAttId[i];
resRow["id"] =3D idatt + "^" + attlogin;
resRow["name"] =3D attName + "." + listAttName[=
i];
+ res.Rows.Add(resRow);
}
}
else
{
+ DataRow resRow =3D res.NewRow();
resRow["id"] =3D row["id_entity"].ToString();
resRow["name"] =3D attName;
+ res.Rows.Add(resRow);
} =20
- res.Rows.Add(resRow);
+ =20
}
return res;
}
|