Exemple #1
0
        private void exceloutclass(string savename)
        {
            string sql = "select para_title,details,ref_value,flag,'',para_type,para_level,'' from Status_Now";

            Tool_Class.IO_tool tool = new Tool_Class.IO_tool();
            DataTable          dt   = tool.DbToDatatable(sql);
            StringBuilder      sb1  = history("syslog_warn");
            StringBuilder      sb2  = history("instrument_connection");
            StringBuilder      sb3  = history("disk_size");
            StringBuilder      sb4  = history("cpu_running");
            StringBuilder      sb5  = history("memory_running");
            StringBuilder      sb6  = history("table_count");
            StringBuilder      sb7  = history("db_size");
            StringBuilder      sb8  = history("para_check");
            StringBuilder      sb9  = history("log_error");
            StringBuilder      sb10 = history("db_backup");

            dt.Rows[0][7] = sb1;
            dt.Rows[1][7] = sb2;
            dt.Rows[2][7] = sb3;
            dt.Rows[3][7] = sb4;
            dt.Rows[4][7] = sb5;
            dt.Rows[5][7] = sb6;
            dt.Rows[6][7] = sb7;
            dt.Rows[7][7] = sb8;
            dt.Rows[8][7] = sb9;
            dt.Rows[9][7] = sb10;
            tool.DataTableToExcel(dt, savename);
        }
Exemple #2
0
 private void exceloutclass(string savename)
 {
     string sql = "select para_title,details,ref_value,flag,'',para_type,para_level,'' from Status_Now";
     Tool_Class.IO_tool tool = new Tool_Class.IO_tool();
     DataTable dt = tool.DbToDatatable(sql);
     StringBuilder sb1 = history("syslog_warn");
     StringBuilder sb2 = history("instrument_connection");
     StringBuilder sb3 = history("disk_size");
     StringBuilder sb4 = history("cpu_running");
     StringBuilder sb5 = history("memory_running");
     StringBuilder sb6 = history("table_count");
     StringBuilder sb7 = history("db_size");
     StringBuilder sb8 = history("para_check");
     StringBuilder sb9 = history("log_error");
     StringBuilder sb10 = history("db_backup");
     StringBuilder sb11 = history("check_option");
     dt.Rows[0][7] = sb1;
     dt.Rows[1][7] = sb2;
     dt.Rows[2][7] = sb3;
     dt.Rows[3][7] = sb4.Append(sb5);
     dt.Rows[4][7] = sb6;
     dt.Rows[5][7] = sb7;
     dt.Rows[6][7] = sb8;
     dt.Rows[7][7] = sb9;
     dt.Rows[8][7] = sb10;
     dt.Rows[9][7] = sb11;
     tool.DataTableToExcel(dt,savename);
 }