<summary>
Get Records of table type tables
</summary>
<param name= "Relationcheckclass" ></param>
<returns></returns>
Private list<string> getallrecordformttable (Relationcheckclass relationcheckclass)
{
list<string> recordlist = new list<string> ();
ITable table = ((ifeatureworkspace) m_workspace). OpenTable (Relationcheckclass.tablename);
if (table!=null)
{
string fieldName = Relationcheckclass.tabelfield;
int fieldindex = table. FindField (Name:fieldname);
String fieldvalue = "";
for (int i = 0; i < table. RowCount (NULL); i++)
{
Fieldvalue = table. GetRow (i). Get_value (Fieldindex). ToString ();
Recordlist.add (Fieldvalue);
}
}
return recordlist;
}
<summary>
Get records for a feature type table
</summary>
<param name= "Relationcheckclass" ></param>
<returns></returns>
Private list<string> getallrecordformfeaturetable (Relationcheckclass relationcheckclass)
{
list<string> recordlist = new list<string> ();
Ifeatureclass Pfeatureclass = ((ifeatureworkspace) m_workspace). Openfeatureclass (Relationcheckclass.tablename);
Ifeaturecursor pfeaturecursor = null;
IFeature pfeature = null;
if (pfeatureclass!=null)
{
string fieldName = Relationcheckclass.tabelfield;
int fieldindex = Pfeatureclass.findfield (name:fieldname);
int fieldobjectid = Pfeatureclass.findfield (Name: "Objectid");
Pfeaturecursor = Pfeatureclass.search (null, TRUE);
Pfeature = Pfeaturecursor.nextfeature ();
if (pfeature==null)
{
return null;
}
String fieldvalue = "";
while (Pfeature!=null)
{
Fieldvalue = Pfeature.get_value (Fieldindex). ToString ();
Recordlist.add (Fieldvalue);
Pfeature = Pfeaturecursor.nextfeature ();
}
}
return recordlist;
}
Ao how to get data from the SDE database