1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25:
| DataSet ShiftStat = new DataSet(); DataTable shiftTable = ShiftStat.Tables.Add();
shiftTable.Columns.Add("Typecode", typeof(string)); shiftTable.Columns.Add("Typinfo", typeof(string)); shiftTable.Columns.Add("Passresult", typeof(int)); shiftTable.Columns.Add("Failresult", typeof(int)); shiftTable.Columns.Add("Noresult", typeof(int));
shiftTable.Rows.Add("Test1", "abc", 2,3,0); shiftTable.Rows.Add("Test2", "dfhdh", 5,3,4); shiftTable.Rows.Add("Test3", "hgfhhgr", 6,3,4); shiftTable.Rows.Add("Test4", "gfhh", 5,5,0); shiftTable.Rows.Add("Test5", "hggf", 5,2,1);
foreach (DataTable table in ShiftStat.Tables) { foreach (DataRow row in table.Rows) { dgvData.DataSource = table; } } |