private Object[] DisplayData(string testCaseId, DataTable table)
{
ArrayList list;
ArrayList superList = new ArrayList();
ArrayList superArray = new ArrayList();
foreach (DataRow row in table.Rows)
{
list = new ArrayList();
if (row[0].ToString().Equals(testCaseId))
{
for (int count = 0; count < table.Columns.Count; count++)
{
//if the test case id does not matches with the current TCId
//Do not add to list
list.Add(row[count].ToString());
}
}
//If the list is not empty do not add the row
if (list.Count > 0)
{
superList.Add(list);
}
}
foreach (ArrayList colList in superList)
{
Object[] myArr = (Object[])colList.ToArray(typeof(string));
superArray.Add(myArr);
}
Object[] finalArray = (Object[])superArray.ToArray(typeof(object));
return finalArray;
}