Пример #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, 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());
             }
         }
     }
 }