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);
        }
        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);
        }
        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);
        }
Exemple #4
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 [key_id],VMonth,ElectricityConsumption,CoalDust,Qnet,Diesel,ResidualHeatSupply,ResidualHeatProduction,ResidualHeatSelfUse,ClinkerOutput,ClinkerIntensity,ClinkerIntensityCorrectionFactor,ComprehensiveECC,ComparableComprehensiveECC,ComprehensiveStandardCCC,ComparableComprehensiveStandardCCC,ComprehensiveDCC,ConversionResidualHeatSupply,ComprehensiveEnCC,ComparableComprehensiveEnCC FROM [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 = 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,ClinkerAmountto,ClinkerFirstTeam,ClinkerSecondTeam,ClinkerThirdTeam,CoalDustAmountto,CoalDustFirstTeam,CoalDustSecondTeam,CoalDustThirdTeam,PowerGenerationAmountto,PowerGenerationFirstTeam,PowerGenerationhSecondTeam,PowerGenerationThirdTeam,RawBatchAmountto,RawBatchFirstTeam,RawBatchSecondTeam,RawBatchThirdTeam,vDate from 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 = DataGridTemplateHelper.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,vDate,ClinkerFirstTeam,ClinkerSecondTeam,ClinkerThirdTeam,ClinkerAmountto,DailyFirstTeam,DailySecondTeam,DailyThirdTeam,DailyAmountto,RawBatchFirstTeam,RawBatchSecondTeam,RawBatchThirdTeam,RawBatchAmountto FROM 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 = DataGridTemplateHelper.GetDataGridTemplate(dt, columnType);

            return(result);
        }