示例#1
0
 protected void SaveToCSV(bool start, string name, string column1, string column2)
 {
     //MessageBox.Show(start.ToString() + " ; " + dataTable.Rows.Count.ToString());
     if (start && dataTable.Rows.Count > 2)
     {
         ReadWriteCSV readWriteCSV = new ReadWriteCSV(CreatePath.CreateReportPath(name, fileEnding));
         readWriteCSV.WriteToCSV(column1, column2);
         for (int i = 0; i < dataTable.Rows.Count; i++)
         {
             readWriteCSV.WriteToCSV(dataTable.Rows[i][0].ToString(), dataTable.Rows[i][1].ToString());
         }
     }
 }
示例#2
0
 protected void SaveToCSV(bool start, string name, string column1, string column2)
 {
     //MessageBox.Show(start.ToString() + " ; " + dataTable.Rows.Count.ToString());
     if (start && dataTable.Rows.Count > 2)
     {
         string       year         = System.DateTime.Now.Year.ToString();
         string       month        = System.DateTime.Now.Month.ToString();
         string       day          = System.DateTime.Now.Day.ToString();
         string       hour         = System.DateTime.Now.Hour.ToString();
         string       minute       = System.DateTime.Now.Minute.ToString();
         ReadWriteCSV readWriteCSV = new ReadWriteCSV(@"D:\Chart\" + hour + "_" + minute + "_" + day + "_" + month + "_" + year + "_" + name + ".csv");
         readWriteCSV.WriteToCSV(column1, column2);
         for (int i = 0; i < dataTable.Rows.Count; i++)
         {
             readWriteCSV.WriteToCSV(dataTable.Rows[i][0].ToString(), dataTable.Rows[i][1].ToString());
         }
     }
 }
示例#3
0
 protected void SaveToCSV(bool start, string name, string column1, string column2, string column3, string column4)
 {
     if (start && ValuesAfter1.Count > 2)
     {
         ReadWriteCSV readWriteCSV = new ReadWriteCSV(CreatePath.CreateReportPath(name, fileEnding));
         readWriteCSV.WriteToCSV("Height", column1, column2, column3, column4);
         for (int i = 0; i < ValuesBefore1.Count; i++)
         {
             if ((i < ValuesAfter1.Count))
             {
                 readWriteCSV.WriteToCSV(i.ToString(), ValuesBefore1[i].ToString(), ValuesBefore2[i].ToString(), ValuesAfter1[i].ToString(), ValuesAfter2[i].ToString());
             }
             else
             {
                 readWriteCSV.WriteToCSV(i.ToString(), ValuesBefore1[i].ToString(), ValuesBefore2[i].ToString());
             }
         }
     }
 }