public static string GetCompanyData()
        {
            string    connString = ConnectionStringFactory.NXJCConnectionString; //填写链接字符串
            DataTable dt         = new DataTable();

            using (SqlConnection conn = new SqlConnection(connString))
            {
                //conn.Open();
                SqlCommand cmd = conn.CreateCommand();
                cmd.CommandText = @"SELECT KeyID,ClinkerAmountto,ClinkerFirstTeam,ClinkerSecondTeam,ClinkerThirdTeam,CoalDustAmountto,CoalDustFirstTeam,CoalDustSecondTeam,CoalDustThirdTeam,
                                    PowerGenerationAmountto,PowerGenerationFirstTeam,PowerGenerationhSecondTeam,PowerGenerationThirdTeam,RawBatchAmountto,RawBatchFirstTeam,RawBatchSecondTeam,
                                   RawBatchThirdTeam,vDate from table_ClinkerProductionLineMonthlyOutput";                          //填写查询语句
                SqlDataAdapter da = new SqlDataAdapter(cmd);

                da.Fill(dt);
            }

            DataGridColumnType columnType = new DataGridColumnType
            {
                ColumnText  = new string[] { "ID", "日期", "甲班生料生产", "乙班生料生产", "丙班生料生产", "合计生料生产", "甲班熟料生产", "乙班熟料生产", "丙班熟料生产", "合计熟料生产", "甲班发电量", "乙班发电量", "丙班发电量", "合计发电量", "甲班煤粉产量", "乙班煤粉产量", "丙班煤粉产量", "合计煤粉产量" },                            //填写表头及宽度
                ColumnWidth = new int[] { 10, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 },
                ColumnType  = new string[] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }
            };

            string result = ReportTemplateHelper.GetDataGridTemplate(dt, columnType);

            return(result);
        }
        public static string GetCompanyData()
        {
            string    connString = ConnectionStringFactory.GetNXJCConnectionString(); //填写链接字符串
            DataTable dt         = new DataTable();

            using (SqlConnection conn = new SqlConnection(connString))
            {
                //conn.Open();
                SqlCommand cmd = conn.CreateCommand();
                cmd.CommandText = "SELECT [key_id],VMonth,CementTypes,Output,ElectricityConsumption,DistributionPowerConsumption,ConversionDistributionPowerConsumption FROM [CementYeldPerUnitDistributionPowerConsumptionYearly]";
                SqlDataAdapter da = new SqlDataAdapter(cmd);

                da.Fill(dt);
            }

            DataGridColumnType columnType = new DataGridColumnType
            {
                ColumnText  = new string[] { "ID", "月份", "水泥品种", "产量", "用电量", "分步电耗", "折算P.O42.5分布电耗", },
                ColumnWidth = new int[] { 10, 40, 60, 40, 50, 60, 140 },
                ColumnType  = new string[] { "", "", "", "", "", "", "" }
            };

            string result = DataGridTemplateHelper.GetDataGridTemplate(dt, columnType);

            return(result);
        }
        public static string GetCompanyData()
        {
            string    connString = ConnectionStringFactory.NXJCConnectionString; //填写链接字符串
            DataTable dt         = new DataTable();

            using (SqlConnection conn = new SqlConnection(connString))
            {
                //conn.Open();
                SqlCommand cmd = conn.CreateCommand();
                cmd.CommandText = "SELECT [key_id],[vDate],[CementFirstTeam],[CementSecondTeam],[CementThirdTeam],[CementAmountto],[PackagingTransportationFirstTeam],[PackagingTransportationSecondTeam],[PackagingTransportationThirdTeam],[PackagingTransportationAmountto],[DailyFirstTeam],[DailySecondTeam],[DailyThirdTeam],[DailyAmountto] FROM [CementMillProductionLineMonthlyElectricityConsumption]";                          //填写查询语句
                SqlDataAdapter da = new SqlDataAdapter(cmd);

                da.Fill(dt);
            }

            DataGridColumnType columnType = new DataGridColumnType
            {
                ColumnText  = new string[] { "ID", "日期", "水泥制备甲班", "水泥制备乙班", "水泥制备丙班", "水泥制备合计", "水泥包装与输送甲班", "水泥包装与输送乙班", "水泥包装与输送丙班", "水泥包装与输送合计", "合计电量甲班", "合计电量乙班", "合计电量丙班", "合计电量合计" },                                //填写表头及宽度
                ColumnWidth = new int[] { 10, 60, 80, 80, 80, 80, 120, 120, 120, 120, 80, 80, 80, 80 },
                ColumnType  = new string[] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }
            };

            string result = DataGridTemplateHelper.GetDataGridTemplate(dt, columnType);

            return(result);
        }
Exemplo n.º 4
0
        public static string GetCompanyData()
        {
            string    connString = ConnectionStringFactory.NXJCConnectionString; //填写链接字符串
            DataTable dt         = new DataTable();

            using (SqlConnection conn = new SqlConnection(connString))
            {
                //conn.Open();
                SqlCommand cmd = conn.CreateCommand();
                cmd.CommandText = "SELECT KeyID,StartTime,[TimeSpan],Name,StandardValue,ActualValue,Superscale, Reason FROM [EnergyConsumptionAlarm]";
                SqlDataAdapter da = new SqlDataAdapter(cmd);

                da.Fill(dt);
            }

            DataGridColumnType columnType = new DataGridColumnType
            {
                ColumnText  = new string[] { "ID", "报警起始时间", "报警范围", "报警设备名称", "标准值", "实际值", "超出范围", "报警原因" },
                ColumnWidth = new int[] { 10, 130, 220, 80, 80, 80, 80, 80 },
                ColumnType  = new string[] { "", "", "", "", "", "", "", "" }
            };

            string result = ReportTemplateHelper.GetDataGridTemplate(dt, columnType);

            return(result);
        }
        public static string GetCompanyData()
        {
            string    connString = ConnectionStringFactory.NXJCConnectionString; //填写链接字符串
            DataTable dt         = new DataTable();

            using (SqlConnection conn = new SqlConnection(connString))
            {
                //conn.Open();
                SqlCommand cmd = conn.CreateCommand();
                cmd.CommandText = "SELECT  KeyId,编号,设备名,峰期电耗,谷期电耗,平期电耗,合计电耗 FROM table_AmmeterSummitLowFlatMonth";                          //填写查询语句
                SqlDataAdapter da = new SqlDataAdapter(cmd);

                da.Fill(dt);
            }

            DataGridColumnType columnType = new DataGridColumnType
            {
                ColumnText  = new string[] { "ID", "编号", "设备名", "峰期电耗", "谷期电耗", "平期电耗", "合计电耗" },                               //填写表头及宽度
                ColumnWidth = new int[] { 10, 100, 100, 100, 100, 100, 100 },
                ColumnType  = new string[] { "", "", "", "", "", "", "" }
            };

            string result = ReportTemplateHelper.GetDataGridTemplate(dt, columnType);

            return(result);
        }
        public static string GetCompanyData()
        {
            string    connString = ConnectionStringFactory.NXJCConnectionString; //填写链接字符串
            DataTable dt         = new DataTable();

            using (SqlConnection conn = new SqlConnection(connString))
            {
                //conn.Open();
                SqlCommand cmd = conn.CreateCommand();
                cmd.CommandText = @"SELECT KeyID,vDate,ClinkerFirstTeam,ClinkerSecondTeam,ClinkerThirdTeam,ClinkerAmountto,DailyFirstTeam,DailySecondTeam,DailyThirdTeam,
                            DailyAmountto,RawBatchFirstTeam,RawBatchSecondTeam,RawBatchThirdTeam,RawBatchAmountto FROM table_ClinkerProductionLineMonthlyElectricityConsumption";                          //填写查询语句
                SqlDataAdapter da = new SqlDataAdapter(cmd);

                da.Fill(dt);
            }

            DataGridColumnType columnType = new DataGridColumnType
            {
                ColumnText  = new string[] { "ID", "日期", "甲班生料制备", "乙班生料制备", "丙班生料制备", "合计生料制备", "甲班熟料制备", "乙班熟料制备", "丙班熟料制备", "合计熟料制备", "甲班合计电量", "乙班合计电量", "丙班合计电量", "合计电量" },                                //填写表头及宽度
                ColumnWidth = new int[] { 10, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100 },
                ColumnType  = new string[] { "", "", "", "", "", "", "", "", "", "", "", "", "", "" }
            };

            string result = ReportTemplateHelper.GetDataGridTemplate(dt, columnType);

            return(result);
        }
        public static string GetCompanyData()
        {
            string    connString = ConnectionStringFactory.NXJCConnectionString; //填写链接字符串
            DataTable dt         = new DataTable();

            using (SqlConnection conn = new SqlConnection(connString))
            {
                //conn.Open();
                SqlCommand cmd = conn.CreateCommand();
                cmd.CommandText = "SELECT key_id,CementTypes,vDate,OutputFirstTeam,OutputSecondTeam,OutputThirdTeam,OutputAmountto FROM CementMillProductionLineMonthlyOutput";                          //填写查询语句
                SqlDataAdapter da = new SqlDataAdapter(cmd);

                da.Fill(dt);
            }

            DataGridColumnType columnType = new DataGridColumnType
            {
                ColumnText  = new string[] { "ID", "日期", "水泥品种", "甲班产量", "乙班产量", "丙班产量", "合计产量" },                                //填写表头及宽度
                ColumnWidth = new int[] { 10, 100, 100, 100, 100, 100, 100 },
                ColumnType  = new string[] { "", "", "", "", "", "", "" }
            };

            string result = DataGridTemplateHelper.GetDataGridTemplate(dt, columnType);

            return(result);
        }
Exemplo n.º 8
0
        public static string GetCompanyData()
        {
            string    connString = ConnectionStringFactory.NXJCConnectionString;
            DataTable dt         = new DataTable();

            using (SqlConnection conn = new SqlConnection(connString))
            {
                SqlCommand cmd = conn.CreateCommand();
                cmd.CommandText = "SELECT [KeyID],vMonth,ElectricityConsumption,CoalDust,Qnet,Diesel,ResidualHeatSupply,ResidualHeatProduction,ResidualHeatSelfUse,ClinkerOutput,ClinkerIntensity,ClinkerIntensityCorrectionFactor,ComprehensiveECC,ComparableComprehensiveECC,ComprehensiveStandardCCC,ComparableComprehensiveStandardCCC,ComprehensiveDCC,ConversionResidualHeatSupply,ComprehensiveEnCC,ComparableComprehensiveEnCC FROM [table_ClinkerYeldPerUnitDistributionEnergyConsumptionYearly]";
                SqlDataAdapter da = new SqlDataAdapter(cmd);

                da.Fill(dt);
            }

            DataGridColumnType columnType = new DataGridColumnType
            {
                ColumnText  = new string[] { "ID", "月份", "熟料用电量 ", "入窑煤粉量", "煤粉空干基低位发热量", "点火用油", "余热供电量", "余热发电量", "余热自用电", "熟料产量", "熟料强度", "熟料强度修正系数", "熟料综合电耗", "可比熟料综合电耗", "熟料综合煤耗", "可比熟料综合煤耗", "熟料油耗", "余热供电折标", "熟料综合能耗", "可比熟料综合能耗" },                                //填写表头及宽度
                ColumnWidth = new int[] { 10, 40, 70, 70, 130, 60, 70, 70, 70, 60, 60, 110, 80, 110, 80, 110, 60, 80, 80, 110 },
                ColumnType  = new string[] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", }
            };

            string result = ReportTemplateHelper.GetDataGridTemplate(dt, columnType);

            return(result);
        }
        public static string GetCompanyData()
        {
            string    connString = ConnectionStringFactory.NXJCConnectionString; //填写链接字符串
            DataTable dt         = new DataTable();

            using (SqlConnection conn = new SqlConnection(connString))
            {
                //conn.Open();
                SqlCommand cmd = conn.CreateCommand();
                cmd.CommandText = "SELECT KeyID,vDate,ConsumptionFirstTeam,ConsumptionSecondTeam,ConsumptionThirdTeam,ConsumptionAmountto FROM table_ConsumptionMonthlyCoalDust";                          //填写查询语句
                SqlDataAdapter da = new SqlDataAdapter(cmd);

                da.Fill(dt);
            }

            DataGridColumnType columnType = new DataGridColumnType
            {
                ColumnText  = new string[] { "ID", "日期", "甲班", "乙班", "丙班", "合计" },                                 //填写表头及宽度
                ColumnWidth = new int[] { 10, 100, 100, 100, 100, 100 },
                ColumnType  = new string[] { "", "", "", "", "", "" }
            };

            string result = ReportTemplateHelper.GetDataGridTemplate(dt, columnType);

            return(result);
        }
Exemplo n.º 10
0
 /// <summary>
 /// Initializes a new instance of column info.
 /// </summary>
 /// <param name="field">Field name.</param>
 /// <param name="searchValue">Current search value.</param>
 /// <param name="direction">Current sort direction.</param>
 /// <param name="columnType">Current column type.</param>
 public DataGridColumnInfo(string field, object searchValue, SortDirection direction, DataGridColumnType columnType)
 {
     Field       = field;
     SearchValue = searchValue;
     Direction   = direction;
     ColumnType  = columnType;
 }
        public static string GetCompanyData()
        {
            string    connString = ConnectionStringFactory.NXJCConnectionString; //填写链接字符串
            DataTable dt         = new DataTable();

            using (SqlConnection conn = new SqlConnection(connString))
            {
                //conn.Open();
                SqlCommand cmd = conn.CreateCommand();
                cmd.CommandText = "SELECT [KeyID],[层次码],[工序名称],峰期电耗,谷期电耗,平期电耗,合计电耗 FROM [table_FormulaDay]";
                SqlDataAdapter da = new SqlDataAdapter(cmd);

                da.Fill(dt);
            }

            DataGridColumnType columnType = new DataGridColumnType
            {
                ColumnText  = new string[] { "ID", "层次码", "工序名称", "峰期电耗", "谷期电耗", "平期电耗", "合计电耗" },
                ColumnWidth = new int[] { 10, 50, 60, 60, 60, 60, 65 },
                ColumnType  = new string[] { "", "", "", "", "", "", "" }
            };

            string result = ReportTemplateHelper.GetDataGridTemplate(dt, columnType);

            return(result);
        }
Exemplo n.º 12
0
 public GridCol(DataGridColumnType type, string label, string sortMember)
 {
     Type = type;
     Label = label;
     Sortable = true;
     SortMember = sortMember;
 }
Exemplo n.º 13
0
 /// <summary>
 /// Initializes a new instance of column info.
 /// </summary>
 /// <param name="field">Field name.</param>
 /// <param name="searchValue">Current search value.</param>
 /// <param name="sortDirection">Current sort direction.</param>
 /// <param name="sortIndex">Sort index.</param>
 /// <param name="columnType">Current column type.</param>
 public DataGridColumnInfo(string field, object searchValue, SortDirection sortDirection, int sortIndex, DataGridColumnType columnType)
 {
     Field         = field;
     SearchValue   = searchValue;
     SortDirection = sortDirection;
     SortIndex     = sortIndex;
     ColumnType    = columnType;
 }
Exemplo n.º 14
0
 /// <summary>
 /// コンストラクタ
 /// </summary>
 /// <param name="columnIndex">列インデックス</param>
 /// <param name="type">列の種別</param>
 /// <param name="alingn">アライメント</param>
 /// <param name="width">幅</param>
 /// <param name="header">ヘッダ名称</param>
 /// <param name="content">コンテンツ(ボタン名称)</param>
 public DataGridColumnInfo(int columnIndex, DataGridColumnType type, DataGridViewContentAlignment alingn, int width, string header, string content)
 {
     this.ColumnIndex = columnIndex;
     this.ColumnType  = type;
     this.Alignment   = alingn;
     this.Width       = width;
     this.HeaderName  = header;
     this.ContentName = content;
 }
        public string GetFormulaYearTemplateData(Guid id, string tableName)
        {
            ReportDataHelper   dataHelper = new ReportDataHelper();
            DataTable          dt         = dataHelper.GetFormulaYearTable(id, tableName);
            DataGridColumnType columnType = new DataGridColumnType
            {
                ColumnText  = new string[] { "KeyID", "ID", "层次码", "工序名称", "峰期电耗", "谷期电耗", "平期电耗", "总计" },
                ColumnWidth = new int[] { 80, 80, 130, 130, 130, 130, 130, 130 },
                ColumnType  = new string[] { "", "", "\"type\":\"text\"", "\"type\":\"text\"",
                                             "\"type\":\"numberbox\", \"options\":{\"precision\":\"0\"}", "\"type\":\"numberbox\", \"options\":{\"precision\":\"0\"}",
                                             "\"type\":\"numberbox\", \"options\":{\"precision\":\"0\"}", "\"type\":\"numberbox\", \"options\":{\"precision\":\"0\"}" }
            };

            return(ReportTemplateHelper.GetDataGridTemplate(dt, columnType));
        }
Exemplo n.º 16
0
 public GridCol(DataGridColumnType type, string label, bool sortable)
 {
     Type = type;
     Label = label;
     Sortable = sortable;
 }
Exemplo n.º 17
0
 public GridCol(DataGridColumnType type, string label)
 {
     Type = type;
     Label = label;
     Sortable = true;
 }