Exemplo n.º 1
0
        public void GetElement()
        {
            MESService.WSMES mesService = new MESService.WSMES();
            var dsElement = mesService.GetElement("BOF", UnitID);

            dvSlagele.DataSource = dsElement.Tables["slag"];

            dsElementStd.Tables.Clear();
            DataTable tbM = new DataTable();

            tbM           = dsElement.Tables["product"].Clone();
            tbM           = dsElement.Tables["product"].Copy();
            tbM.TableName = "product";
            dsElementStd.Tables.Add(tbM);

            dsInCtrl.Tables.Clear();
            DataTable tbM1 = new DataTable();

            tbM1           = dsElement.Tables["inctl"].Clone();
            tbM1           = dsElement.Tables["inctl"].Copy();
            tbM1.TableName = "inctl";
            dsInCtrl.Tables.Add(tbM1);

            dsLabElement.Tables.Clear();
            DataTable tbM2 = new DataTable();

            tbM2           = dsElement.Tables["element"].Clone();
            tbM2           = dsElement.Tables["element"].Copy();
            tbM2.TableName = "elment";
            dsLabElement.Tables.Add(tbM2);
            CommDataMag.CommonMethed.dv_ElementStd_Draw(dvProEle, dsElementStd, dsInCtrl);
            CommDataMag.CommonMethed.dv_Element_Draw(dvProEle, dsLabElement);
            CommDataMag.CommonMethed.SetDataGridViewCellBackColorByRow(dvProEle, dsElementStd, dsInCtrl, 7);
        }
Exemplo n.º 2
0
        public void GetPlan()
        {
            MESService.WSMES mesService = new MESService.WSMES();
            var plan = mesService.GetPlan("BOF", UnitID);

            dvPlan.DataSource            = plan.Tables["plan"];
            dvArrivleCCMSteel.DataSource = plan.Tables["iron"];
        }
Exemplo n.º 3
0
        public void GetProcess()
        {
            MESService.WSMES mesService = new MESService.WSMES();
            var dsElement = mesService.GetProcess("BOF", UnitID);

            if (dsElement.Tables["feed"].Rows.Count > 0)
            {
                dsFeed.DataSource = dsElement.Tables["feed"];
            }
            else
            {
                lbIronWeight.Text    = "";
                lbScrapWeight.Text   = "";
                lbPigIronWeight.Text = "";
                label14.Text         = "";
                lbIronTemp.Text      = "";
                lbFeedWT.Text        = "";
                lbIronC.Text         = "";
                lbIronSi.Text        = "";
                lbIronMn.Text        = "";
            }

            dsPro.DataSource         = dsElement.Tables["process"];
            dvSumAddition.DataSource = dsElement.Tables["bulk"];
            dvAllay.DataSource       = dsElement.Tables["alloy"];
            dvTemp.DataSource        = dsElement.Tables["temp"];
            dvTestOxy.DataSource     = dsElement.Tables["oxygen"];
            dataGridView8.DataSource = dsElement.Tables["status"];


            try
            {
                if (dsElement.Tables["process"].Rows.Count > 0)
                {
                    double iFeedS  = Convert.ToDouble(dsElement.Tables["feed"].Rows[0]["S"].ToString());
                    double iFeedSi = Convert.ToDouble(dsElement.Tables["feed"].Rows[0]["Si"].ToString());
                    double iFeedP  = Convert.ToDouble(dsElement.Tables["feed"].Rows[0]["P"].ToString());
                    double iInS    = Convert.ToDouble(dsElement.Tables["feed"].Rows[0]["Iron_S_Max"].ToString());
                    double iInSi   = Convert.ToDouble(dsElement.Tables["feed"].Rows[0]["Iron_Si_Max"].ToString());
                    double iInP    = Convert.ToDouble(dsElement.Tables["feed"].Rows[0]["Iron_P_Max"].ToString());
                    if (iFeedS > iInS)
                    {
                        lbIronS.BackColor = Color.Yellow;
                    }
                    else
                    {
                        lbIronS.BackColor = Color.Silver;
                    }
                    if (iFeedSi > iInSi)
                    {
                        lbIronSi.BackColor = Color.Yellow;
                    }
                    else
                    {
                        lbIronSi.BackColor = Color.Silver;
                    }
                    if (iFeedP > iInP)
                    {
                        lbIronP.BackColor = Color.Yellow;
                    }
                    else
                    {
                        lbIronP.BackColor = Color.Silver;
                    }
                }
                else
                {
                    lbIronS.BackColor  = Color.Silver;
                    lbIronSi.BackColor = Color.Silver;
                    lbIronP.BackColor  = Color.Silver;
                }
            }
            catch (Exception ex) { var a = ex.ToString(); }
        }
Exemplo n.º 4
0
        public void GetStd()
        {
            MESService.WSMES mesService = new MESService.WSMES();
            var dsElement = mesService.GetStd("BOF", UnitID);

            if (dsElement.Tables["base"].Rows.Count > 0)
            {
                dsBase.DataSource = dsElement.Tables["base"];
            }
            else
            {  //清空数据
                label240.Text = "";
                label235.Text = "";
                label222.Text = "";
                label249.Text = "";
            }
            if (dsElement.Tables["infurnace"].Rows.Count > 0)
            {
                dsInToConver.DataSource = dsElement.Tables["infurnace"];
            }
            else
            {
                lbIronSMax.Text  = "";
                label10.Text     = "";
                lbIronNiMax.Text = "";
                label9.Text      = "";
                lbIronCrMax.Text = "";
                label8.Text      = "";
                lbIronCuMax.Text = "";
                label7.Text      = "";
                lbIronMnMax.Text = "";
                label6.Text      = "";
                lbIronSbMax.Text = "";
                label5.Text      = "";
                lbIronSnMax.Text = "";
                label4.Text      = "";
                lbIronAsMax.Text = "";
                label3.Text      = "";
                lbIronPbMax.Text = "";
                label1.Text      = "";
                label11.Text     = "";
            }

            dvTapping.DataSource  = dsElement.Tables["tapping"];
            dvLadleMat.DataSource = dsElement.Tables["ladle"];
            if (dsElement.Tables["ar"].Rows.Count > 0)
            {
                dsAr.DataSource = dsElement.Tables["ar"];
            }
            else
            {
                label24.Text = "";
                label25.Text = "";
                label26.Text = "";
                label27.Text = "";

                label28.Text = "";
                label29.Text = "";
                label30.Text = "";
                label31.Text = "";
            }
        }