Ejemplo n.º 1
0
 private void buttOutInfo_Click(object sender, EventArgs e)
 {
     try
     {
         DataTable conn = new DataTable();
         conn = CsvDataTableHelp.conn.Copy();
         string CSVInfo = CsvDataTableHelp.RouteCSV();//路径
         if (!string.IsNullOrEmpty(CSVInfo))
         {
             conn.Columns["ID"].ColumnName        = "ID";
             conn.Columns["WriteTime"].ColumnName = "采集时间";
             conn.Columns["Door"].ColumnName      = "门号";
             conn.Columns["UpperLimitOfTemperature"].ColumnName       = "上限温度";
             conn.Columns["LowerTemperatureLimit"].ColumnName         = "温度下限";
             conn.Columns["SetValueMonitoringTemperature"].ColumnName = "设定温度";
             conn.Columns["MonitoringTemperature"].ColumnName         = "监控温度";
             conn.Columns["RunTime"].ColumnName = "运行时间";
             conn.Columns["SetTime"].ColumnName = "设定时间";
             Common.CSVHelper.SaveCSV(conn, CSVInfo);
         }
     }
     catch (Exception)
     {
         Common.Msg.Warning("导出报警日志失败");
     }
 }
Ejemplo n.º 2
0
 private void buttOutInfo_Click(object sender, EventArgs e)
 {
     try
     {
         DataTable conn = new DataTable();
         conn = CsvDataTableHelp.connError.Copy();
         string CSVInfo = CsvDataTableHelp.RouteCSV();//路径
         if (!string.IsNullOrEmpty(CSVInfo))
         {
             conn.Columns["ID"].ColumnName           = "ID";
             conn.Columns["ErrorTime"].ColumnName    = "报警时间";
             conn.Columns["ErrorContent"].ColumnName = "报警内容";
             Common.CSVHelper.SaveCSV(conn, CSVInfo);
         }
     }
     catch (Exception)
     {
         Common.Msg.Warning("导出报警日志失败");
     }
 }