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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
DATASET.ReadXml(new PathFile().file_log,XmlReadMode.Auto);
for (int i = 0; i < DATASET.Tables["FILE"].Rows.Count; i++)
{
try
{
DATAGRIDVIEW.Rows.Add();
DATAGRIDVIEW.Rows[i].Cells[0].Value = ImageList.Images[(string)DATASET.Tables["RUN"].Rows[i].ItemArray.GetValue(10)];
DATAGRIDVIEW.Rows[i].Cells[0].ToolTipText = (string)DATASET.Tables["RUN"].Rows[i].ItemArray.GetValue(10);
//Account (text)
DATAGRIDVIEW.Rows[i].Cells[1].Value = DATASET.Tables["RUN"].Rows[i].ItemArray.GetValue(1);
//Start Date (text)
DATAGRIDVIEW.Rows[i].Cells[2].Value = FormatDate((string)DATASET.Tables["RUN"].Rows[i].ItemArray.GetValue(4));
//StartHour (text)
DATAGRIDVIEW.Rows[i].Cells[3].Value = FormatHour((string)DATASET.Tables["RUN"].Rows[i].ItemArray.GetValue(5));
//End Date (text)
DATAGRIDVIEW.Rows[i].Cells[4].Value = FormatDate((string)DATASET.Tables["RUN"].Rows[i].ItemArray.GetValue(6));
//End Hour (text)
DATAGRIDVIEW.Rows[i].Cells[5].Value = FormatHour((string)DATASET.Tables["RUN"].Rows[i].ItemArray.GetValue(7));
//Filename (link)
DATAGRIDVIEW.Rows[i].Cells[6].Value = DATASET.Tables["FILE"].Rows[i].ItemArray.GetValue(1);
DATAGRIDVIEW.Rows[i].Cells[6].ToolTipText = FormatFileInfoTooltip(DATASET.Tables["FILE"].Rows[i]);
//Transmission status (text)
DATAGRIDVIEW.Rows[i].Cells[7].Value =((string)DATASET.Tables["RUN"].Rows[i].ItemArray.GetValue(8)!="")?DATASET.Tables["RUN"].Rows[i].ItemArray.GetValue(8):"---";
//Error (link)
if(!DATASET.Tables["error"].Rows[i].ItemArray.GetValue(0).GetType().Equals(typeof(System.DBNull)))
{
DATAGRIDVIEW.Rows[i].Cells[8].Value = (string)DATASET.Tables["error"].Rows[i].ItemArray.GetValue(0);
DATAGRIDVIEW.Rows[i].Cells[8].Value = "error";
}
}
catch {}
} |
Partager