This commit is contained in:
@@ -468,9 +468,8 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
|
|
||||||
//RETURN OBJECTS
|
//RETURN OBJECTS
|
||||||
//todo: need exact rowcount so can set up array on each row
|
//get the return row object count (number of items in each return row)
|
||||||
//need to know which index of each row is going to need the id of the next row
|
int returnRowCount = AyaObjectFields.Count();
|
||||||
|
|
||||||
List<List<AyaFieldData>> rows = new List<List<AyaFieldData>>();
|
List<List<AyaFieldData>> rows = new List<List<AyaFieldData>>();
|
||||||
long totalRecordCount = 0;
|
long totalRecordCount = 0;
|
||||||
|
|
||||||
@@ -484,10 +483,21 @@ namespace AyaNova.Biz
|
|||||||
{
|
{
|
||||||
while (dr.Read())
|
while (dr.Read())
|
||||||
{
|
{
|
||||||
object[] row = new object[dr.FieldCount];
|
List<AyaFieldData> row = new List<AyaFieldData>(returnRowCount);
|
||||||
dr.GetValues(row);
|
|
||||||
|
//Iterate object fields, build return row list as required
|
||||||
//INSERT INTO THE RETURN ROWS LIST
|
//INSERT INTO THE RETURN ROWS LIST
|
||||||
items.Add(row);
|
foreach (AyaObjectFieldDefinition f in AyaObjectFields)
|
||||||
|
{
|
||||||
|
AyaFieldData d = new AyaFieldData();
|
||||||
|
d.v = dr.GetValue(dr.GetOrdinal(f.SqlDisplayColumnName));
|
||||||
|
if (f.SqlIdColumnName != null)
|
||||||
|
{
|
||||||
|
d.Id = dr.GetInt64(dr.GetOrdinal(f.SqlIdColumnName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rows.Add(row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user