Exemplo n.º 1
0
Arquivo: Remark.cs Projeto: rcw0125/Lg
        public void loadData()
        {
            //LFProdArea
            //string sql = "select * from cbase_all_code where CODE_GROUP='"+maintype+"'";

            try
            {
                // string sql = "select * from cbase_all_code where CODE_GROUP='LFProdArea'";
                string sql = "select * from cbase_all_code where CODE_GROUP='" + maintype + "'";
                ds               = new AppSvrHMI.L3DataSet();
                ds.SourceType    = AppSvrHMI.L3DataSetSourceType.SQL;
                ds.SourceMethod  = sql;
                ds.L3DataAdapter = this.Adapter;
                ds.LoadData();

                if (ds.Tables[0].Rows.Count > 0)
                {
                    cbYuanyin.DataSource = ds;
                    // cbYuanyin.DataMember = "L3DataTable";
                    cbYuanyin.DisplayMember = "L3DataTable.Code_Des";
                }
                // cbYuanyin.DataSource = ds;
                //// cbYuanyin.DataMember = "L3DataTable";
                // cbYuanyin.DisplayMember = "L3DataTable.Code_Des";
                // MessageBox.Show(ds.Tables[0].Rows.Count.ToString());
            }
            catch
            {
                return;
            }
        }
Exemplo n.º 2
0
        public DialogResult showDialogForSteel(AppSvrIF.Session session, AppSvrHMI.L3DataSet ds)
        {
            // lblOldSteelGrade.Text = oldSteel;
            lblOldSteelGrade.Text = ds.Tables[0].Rows[0]["SteelGradeIndex"].ToString();  //钢种记号
            lblSteelGrade.Text    = ds.Tables[0].Rows[0]["SteelGrade"].ToString();       //钢种
            lblSteelGroup.Text    = ds.Tables[0].Rows[0]["Grade_Group_Code"].ToString(); //钢组
            lblNC1.Text           = ds.Tables[0].Rows[0]["NC_ZYX1"].ToString();          //NC1
            lblNC2.Text           = ds.Tables[0].Rows[0]["NC_ZYX2"].ToString();          //NC2
            lblProtel.Text        = ds.Tables[0].Rows[0]["Protocol"].ToString();         //协议

            if (ds.Tables[0].Rows[0]["Use_Flag"].ToString() == "1")
            {
                lblUseFlag.Text = "禁用";   //制造标准
            }
            else if (ds.Tables[0].Rows[0]["Use_Flag"].ToString() == "0")
            {
                lblUseFlag.Text = "在用";
            }
            else
            {
                lblUseFlag.Text = "未定义";
            }

            Adapter.Session = session;
            return(ShowDialog());
        }
Exemplo n.º 3
0
        private void AlloyAndAreaLFMapFrm_Load(object sender, EventArgs e)
        {
            tdsBOF          = (AppSvrHMI.L3DataSet)(dsBOF.Clone());
            tdsLFOne        = (AppSvrHMI.L3DataSet)(dsLFOne.Clone());
            tdsLFTwo        = (AppSvrHMI.L3DataSet)(dsLFTwo.Clone());
            tdsGroundPublic = (AppSvrHMI.L3DataSet)(dsGroundPublic.Clone());
            tdsGroundLF1    = (AppSvrHMI.L3DataSet)(dsGroundLF1.Clone());
            tdsGroundLF2    = (AppSvrHMI.L3DataSet)(dsGroundLF2.Clone());
            tdsWireLF1      = (AppSvrHMI.L3DataSet)(dsWireLF1.Clone());
            tdsWireLF2      = (AppSvrHMI.L3DataSet)(dsWireLF2.Clone());

            tdsBOF          = dsBOF;
            tdsLFOne        = dsLFOne;
            tdsLFTwo        = dsLFTwo;
            tdsGroundPublic = dsGroundPublic;
            tdsGroundLF1    = dsGroundLF1;
            tdsGroundLF2    = dsGroundLF2;
            tdsWireLF1      = dsWireLF1;
            tdsWireLF2      = dsWireLF2;

            //AppSvrHMI.L3DataSet d = null;
            dsA = (AppSvrHMI.L3DataSet)tdsBOF.Copy();
            dsB = (AppSvrHMI.L3DataSet)tdsLFOne.Copy();
            dsC = (AppSvrHMI.L3DataSet)tdsLFTwo.Copy();
            dsD = (AppSvrHMI.L3DataSet)tdsGroundPublic.Copy();
            //e = (AppSvrHMI.L3DataSet)tdsGroundLF1.Copy();
            dsE = (AppSvrHMI.L3DataSet)tdsGroundLF1.Copy();
            dsF = (AppSvrHMI.L3DataSet)tdsGroundLF2.Copy();
            dsG = (AppSvrHMI.L3DataSet)tdsWireLF1.Copy();
            dsH = (AppSvrHMI.L3DataSet)tdsWireLF2.Copy();
        }
Exemplo n.º 4
0
        private float fGross = 0;//缓存毛重
        public DialogResult ShowDialogEx(AppSvrIF.Session session, AppSvrHMI.L3DataSet dsSend)
        {
            try
            {
                if (dsSend == null || dsSend.Tables[0].Rows.Count != 1)
                {
                    return(DialogResult.None);
                }

                dsMain.Tables[0].Rows.Clear();

                DataRow newrow = dsMain.Tables[0].NewRow();
                newrow["MaterialID"] = dsSend.Tables[0].Rows[0]["MaterialID"].ToString();
                newrow["BFID"]       = dsSend.Tables[0].Rows[0]["BFID"].ToString();
                newrow["TAP_No"]     = dsSend.Tables[0].Rows[0]["TAP_No"].ToString();
                newrow["TPC_No"]     = dsSend.Tables[0].Rows[0]["TPC_No"].ToString();
                newrow["Weight"]     = dsSend.Tables[0].Rows[0]["Net_Weight"].ToString();
                newrow["WeightMode"] = 2;
                dsMain.Tables[0].Rows.Add(newrow);
                try
                {
                    fGross = float.Parse(dsSend.Tables[0].Rows[0]["Gross_Weight"].ToString());
                }
                catch { fGross = 0; }

                Adapter.Session = session;

                return(ShowDialog());
            }
            catch { return(DialogResult.None); }
        }
Exemplo n.º 5
0
        public DialogResult ShowDialogEx(AppSvrIF.Session session, AppSvrHMI.L3DataSet dsSend)
        {
            try
            {
                if (dsSend == null || dsSend.Tables[0].Rows.Count != 1)
                {
                    return(DialogResult.None);
                }

                dsM.Tables[0].Rows.Clear();

                dsM.Tables[0].ImportRow(dsSend.Tables[0].Rows[0]);
                //DataRow newrow = dsM.Tables[0].NewRow();
                //newrow["MaterialID"] = dsSend.Tables[0].Rows[0]["MaterialID"].ToString();
                //newrow["BFID"] = dsSend.Tables[0].Rows[0]["BFID"].ToString();
                //newrow["TAP_No"] = dsSend.Tables[0].Rows[0]["TAP_No"].ToString();
                //newrow["TPC_No"] = dsSend.Tables[0].Rows[0]["TPC_No"].ToString();
                //newrow["Net_Weight"] = 0;
                //dsM.Tables[0].Rows.Add(newrow);
                Adapter.Session = session;

                return(ShowDialog());
            }
            catch { return(DialogResult.None); }
        }
Exemplo n.º 6
0
 public DialogResult ShowDialogEx(AppSvrIF.Session session, AppSvrHMI.L3DataSet dsData)
 {
     Adapter.Session = session;
     dsDiv.Tables[0].Clear();
     dsDiv.Tables[0].ImportRow(dsData.Tables[0].Rows[0]);
     return(ShowDialog());
 }
Exemplo n.º 7
0
 public void ShowDialogEx(AppSvrIF.Session session, AppSvrHMI.L3DataSet dsData)
 {
     dsBulkInStoreConfirm.Tables[0].Clear();
     dsBulkInStoreConfirm.Tables[0].ImportRow(dsData.Tables[0].Rows[0]);
     cmdCodeArea.Parameters[0].ConstantValue = dsData.Tables[0].Rows[0]["Bulk_CODE"].ToString();
     Adapter.Session = session;
     this.ShowDialog();
 }
Exemplo n.º 8
0
        public void ShowDialogEx(AppSvrIF.Session session, AppSvrHMI.L3DataSet dsData)
        {
            Adapter.Session = session;
            dsPlan.Tables[0].Clear();
            dsPlan.Tables[0].ImportRow(dsData.Tables[0].Rows[0]);

            this.ShowDialog();
        }
Exemplo n.º 9
0
 public void ShowDialogEx(AppSvrIF.Session session, AppSvrHMI.L3DataSet dsData)
 {
     dsAlloyToBulk.Tables[0].Clear();
     dsAlloyToBulk.Tables[0].ImportRow(dsData.Tables[0].Rows[0]);
     txtOldAmount.Text = dsData.Tables[0].Rows[0]["AMOUNT"].ToString();
     Adapter.Session   = session;
     this.ShowDialog();
 }
Exemplo n.º 10
0
 public void ShowDialogEx(AppSvrIF.Session session, AppSvrHMI.L3DataSet dsData, string Unit)
 {
     Adapter.Session = session;
     txtTAPNo.Text   = dsData.Tables[0].Rows[0]["TAP_No"].ToString();
     txtTPCNo.Text   = dsData.Tables[0].Rows[0]["TPC_No"].ToString();
     IorII           = Unit;
     this.ShowDialog();
 }
Exemplo n.º 11
0
        public DialogResult ShowDialogEx(int nPosition, AppSvrHMI.L3DataSet dsData)
        {
            bsPlan.DataSource = dsData;
            bsPlan.DataMember = dsData.Tables[0].TableName;
            bsPlan.Position   = nPosition;

            return(ShowDialog());
        }
Exemplo n.º 12
0
        public DialogResult ShowDialogEx(AppSvrIF.Session session, int nPosition, ref AppSvrHMI.L3DataSet dsData)
        {
            Adapter.Session   = session;
            bsMain.DataSource = dsData;
            bsMain.DataMember = dsData.Tables[0].TableName;
            bsMain.Position   = nPosition;

            return(ShowDialog());
        }
Exemplo n.º 13
0
 public void ShowDialogEx(AppSvrIF.Session session, AppSvrHMI.L3DataSet dsData, string UnitID)
 {
     Adapter.Session             = session;
     txtTAPNo.Text               = dsData.Tables[0].Rows[0]["TAP_No"].ToString();
     txtTPCNo.Text               = dsData.Tables[0].Rows[0]["TPC_No"].ToString();
     dsIronsInfo.SourceCondition = "MaterialID = '" + dsData.Tables[0].Rows[0]["MaterialID"].ToString() + "'";
     IorII = UnitID;
     this.ShowDialog();
 }
Exemplo n.º 14
0
 public void ShowDialogEx(AppSvrIF.Session session, AppSvrHMI.L3DataSet dsData)
 {
     Adapter.Session = session;
     dsBalance.Tables[0].Clear();
     dsBalance.Tables[0].ImportRow(dsData.Tables[0].Rows[0]);
     dsBalance.Tables[0].Rows[0]["OldAmount"]   = dsData.Tables[0].Rows[0]["AMOUNT"];
     dsBalance.Tables[0].Rows[0]["StoreAreaID"] = dsData.Tables[0].Rows[0]["POSITION"];
     this.ShowDialog();
 }
Exemplo n.º 15
0
 //数据加载
 private void CCMMarkScrapFrm_Load(object sender, EventArgs e)
 {
     cmbCasterID.Items.Clear();
     dsSend = (AppSvrHMI.L3DataSet)dsHeatData.Clone();
     for (int i = 0; i < dsCasterID.Tables[0].Rows.Count; i++)
     {
         cmbCasterID.Items.Add(dsCasterID.Tables[0].Rows[i]["Code"]);
     }
 }
Exemplo n.º 16
0
        public void ShowDialogEx(AppSvrIF.Session session, AppSvrHMI.L3DataSet dsData)
        {
            Adapter.Session = session;
            dsTapping.Tables[0].ImportRow(dsData.Tables[0].Rows[0]);
            dsTapping.AcceptChanges();
            bsTapping.Position = 0;

            lbSteelGradeIndex.Text = dsData.Tables[0].Rows[0]["SteelGradeIndex"].ToString();
            this.ShowDialog();
        }
Exemplo n.º 17
0
 public void ShowDialogEx(AppSvrIF.Session session, AppSvrHMI.L3DataSet dsData)
 {
     Adapter.Session = session;
     dsSpileChange.Tables[0].Clear();
     for (int i = 0; i < dsData.Tables[0].Rows.Count; i++)
     {
         dsSpileChange.Tables[0].ImportRow(dsData.Tables[0].Rows[i]);
     }
     this.ShowDialog();
 }
Exemplo n.º 18
0
        public DialogResult ShowDialogEx(AppSvrIF.Session session, AppSvrHMI.L3DataSet dsData)
        {
            Adapter.Session = session;
            dsInStore.Tables[0].Clear();
            for (int i = 0; i < dsData.Tables[0].Rows.Count; i++)
            {
                dsInStore.Tables[0].ImportRow(dsData.Tables[0].Rows[i]);
            }

            return(ShowDialog());
        }
Exemplo n.º 19
0
 private void CCMMakeProductFrm_Load(object sender, EventArgs e)
 {
     //[20090102Liao]
     cmbCasterID.Items.Clear();
     for (int i = 0; i < dsCasterID.Tables[0].Rows.Count; i++)
     {
         cmbCasterID.Items.Add(dsCasterID.Tables[0].Rows[i][0].ToString());
     }
     cmbCasterID.SelectedIndex = 0;
     dsSend = (AppSvrHMI.L3DataSet)dsHeatData.Clone();
 }
Exemplo n.º 20
0
        public DialogResult ShowDialogEx(int nPosition, string strSort, ref AppSvrHMI.L3DataSet dsData)
        {
            bsDesStdMainten.DataSource = null;
            bsDesStdMainten.DataSource = dsData;
            bsDesStdMainten.DataMember = dsData.Tables[0].TableName;

            ((System.Data.DataRowView)(bsDesStdMainten.Current)).DataView.Sort = strSort;
            bsDesStdMainten.Position = nPosition;

            return(ShowDialog());
        }
Exemplo n.º 21
0
        public void ShowDialogEx(AppSvrIF.Session session, AppSvrHMI.L3DataSet dsData)
        {
            Adapter.Session = session;
            Adapter.RefreshDataBindings();

            dsRollBack.Tables[0].Clear();
            dsRollBack.Tables[0].ImportRow(dsData.Tables[0].Rows[0]);
            dsRollBack.Tables[0].Rows[0]["OldAmount"] = dsData.Tables[0].Rows[0]["AMOUNT"];
            dsRollBack.Tables[0].Rows[0]["AMOUNT"]    = 0;
            this.ShowDialog();
        }
Exemplo n.º 22
0
        public DialogResult ShowDialogEx(AppSvrIF.Session session, ref AppSvrHMI.L3DataSet dsData)
        {
            Adapter.Session   = session;
            bsPlan.DataSource = null;
            bsPlan.DataSource = dsData;
            bsPlan.DataMember = dsData.Tables[0].TableName;

            bsPlan.MoveFirst();

            return(ShowDialog());
        }
Exemplo n.º 23
0
        public void ShowDialogEx(AppSvrIF.Session session, AppSvrHMI.L3DataSet dsData)
        {
            Adapter.Session = session;

            dsWriteTime.Tables[0].ImportRow(dsData.Tables[0].Rows[0]);
            dsWriteTime.AcceptChanges();
            bsData.Position = 0;
            //bsData.DataSource = dsData;
            //bsData.DataMember = dsData.Tables[0].TableName;

            this.ShowDialog();
        }
Exemplo n.º 24
0
 public void ShowDialogEx(AppSvrIF.Session session, AppSvrHMI.L3DataSet dsData)
 {
     dsAlloyInStoreConfirm.Tables[0].Clear();
     dsAlloyInStoreConfirm.Tables[0].ImportRow(dsData.Tables[0].Rows[0]);
     txtOldAmount.Text = dsData.Tables[0].Rows[0]["AMOUNT"].ToString();
     //cmdCodeArea.Parameters[0].ConstantValue = dsData.Tables[0].Rows[0]["ALLOY_CODE"].ToString();
     cmdPossition.Parameters[0].ConstantValue = dsData.Tables[0].Rows[0]["ALLOY_CODE"].ToString();
     Adapter.Session = session;
     //dsCodeArea.L3DataAdapter = Adapter;
     dsPossition.L3DataAdapter = Adapter;
     this.ShowDialog();
 }
Exemplo n.º 25
0
        //上位
        private void btnOnPosition_Click(object sender, EventArgs e)
        {
            string strbtnName = ((ToolStripMenuItem)sender).Name;

            AppSvrHMI.L3DataSet dsSend = SetDSOnPositon(strbtnName);
            if (dsSend != null)
            {
                cmdOnPosition.Parameters[0].SourceObject   = dsSend;
                cmdOnPosition.Parameters[0].SourceProperty = "L3DataTable";
                cmdOnPosition.Execute();
            }
        }
Exemplo n.º 26
0
        private int iAddCount2 = 0;  //拨入钢坯支数2

        public DialogResult ShowDialogEx(AppSvrIF.Session session, AppSvrHMI.L3DataSet dsData, string UnitID)
        {
            //if (UnitID == CommDataMag.CommonData.CCM_UNIT_05ID)
            //{
            //    dMax = 100;
            //}
            Adapter.Session = session;
            Adapter.set_URIParameters("CCMID", UnitID);
            Adapter.RefreshDataBindings();
            dsHeatData.Tables[0].ImportRow(dsData.Tables[0].Rows[0]);

            return(ShowDialog());
        }
Exemplo n.º 27
0
        public void ShowDialogEx(AppSvrIF.Session session, AppSvrHMI.L3DataSet dsData)
        {
            Adapter.Session = session;

            l3cmdpCodeArea.ConstantValue = dsData.Tables[0].Rows[0]["Bulk_CODE"].ToString();
            dsCodeArea.L3DataAdapter     = Adapter;
            dsCodeArea.L3DataAdapter     = null;

            dsChange.Tables[0].Clear();
            dsChange.Tables[0].ImportRow(dsData.Tables[0].Rows[0]);
            dsChange.Tables[0].Rows[0]["OldAmount"] = dsData.Tables[0].Rows[0]["AMOUNT"];
            this.ShowDialog();
        }
Exemplo n.º 28
0
        public void ShowDialogEx(AppSvrIF.Session session, AppSvrHMI.L3DataSet dsData)
        {
            Adapter.Session = session;

            l3cmdpTraget.ConstantValue = dsData.Tables[0].Rows[0]["ALLOY_CODE"].ToString();
            dsTraget.L3DataAdapter     = Adapter;
            Adapter.RefreshDataBindings();
            dsTraget.LoadData();

            dsChange.Tables[0].Clear();
            dsChange.Tables[0].ImportRow(dsData.Tables[0].Rows[0]);
            dsChange.Tables[0].Rows[0]["OldAmount"] = dsData.Tables[0].Rows[0]["AMOUNT"];
            this.ShowDialog();
        }
Exemplo n.º 29
0
        //控件加载
        private void TundishBaseMagFrmOT_Load(object sender, EventArgs e)
        {
            //锁定排序
            CommDataMag.CommonMethed.SetdvColumnSortNotSortable(dvTundish);
            dsCold = (AppSvrHMI.L3DataSet)dsTundish.Clone();

            //永久层打结开始
            cmdInnerTieStart.Parameters[0].SourceFilter = "CheckFlag = 1 and Status = '" + CommDataMag.CommonData.CTUNDISH_STATUS_OFFLINE + "'";

            //永久层打结束
            cmdInnerTieEnd.Parameters[0].SourceFilter = "CheckFlag =1  and Status = '" + CommDataMag.CommonData.CTUNDISH_STATUS_INNER_BUILD + "' and Flag = 0";

            //永久层烘烤开始
            cmdInnerFireStart.Parameters[0].SourceFilter = "CheckFlag = 1  and  Status = '" + CommDataMag.CommonData.CTUNDISH_STATUS_INNER_BUILD + "' and Flag = 1";

            //永久层烘烤结束
            cmdInnerFireEnd.Parameters[0].SourceFilter = "CheckFlag = 1 and Status = '" + CommDataMag.CommonData.CTUNDISH_STATUS_INNER_FIRE + "'  and Flag = 0";

            //上件开始
            cmdInstallStart.Parameters[0].SourceFilter = "( CheckFlag = 1 and  Status = '" + CommDataMag.CommonData.CTUNDISH_STATUS_OFFLINE
                                                         + "') or ( CheckFlag = 1 and  Status = '" + CommDataMag.CommonData.CTUNDISH_STATUS_INNER_FIRE + "' and Flag = 1 )";

            //上件结束
            cmdInstallEnd.Parameters[0].SourceFilter = "CheckFlag = 1 and Status = '" + CommDataMag.CommonData.CTUNDISH_STATUS_ISTALL + "'  and Flag = 0";

            //工作层修砌开始
            cmdWorkBuildStart.Parameters[0].SourceFilter = "CheckFlag = 1 and Status = '" + CommDataMag.CommonData.CTUNDISH_STATUS_ISTALL + "' and Flag = 1";

            //工作层修砌结束
            cmdWorkBuildEnd.Parameters[0].SourceFilter = "CheckFlag = 1 and Status = '" + CommDataMag.CommonData.CTUNDISH_STATUS_WORK_DAUB + "' and Flag = 0";

            //工作层烘烤开始
            cmdWorkFireStart.Parameters[0].SourceFilter = "CheckFlag = 1 and Status = '" + CommDataMag.CommonData.CTUNDISH_STATUS_WORK_DAUB + "'  and Flag = 1";

            //工作层烘烤结束
            cmdWorkFireEnd.Parameters[0].SourceFilter = "CheckFlag = 1 and Status = '" + CommDataMag.CommonData.CTUNDISH_STATUS_WORK_FIRE + "'  and Flag = 0";

            //工作层确认冷备
            cmdConfirmCold.Parameters[0].SourceFilter = "CheckFlag = 1 and Status = '" + CommDataMag.CommonData.CTUNDISH_STATUS_WORK_FIRE + "'  and Flag = 1";

            //热备烘烤开始
            cmdOnFireStart.Parameters[0].SourceFilter = "CheckFlag = 1 and Status = '" + CommDataMag.CommonData.CTUNDISH_STATUS_COLD + "'  and Flag = 1";

            //热备烘烤结束
            cmdOnFireEnd.Parameters[0].SourceFilter = "CheckFlag = 1 and Status = '" + CommDataMag.CommonData.CTUNDISH_STATUS_HOT_FIRE + "' and Flag = 0";

            //中包异常下线
            cmdOffLineException.Parameters[0].SourceFilter = "CheckFlag = 1 and Status < '" + CommDataMag.CommonData.CTUNDISH_STATUS_USE + "'";
        }
Exemplo n.º 30
0
        private void AlloyAndAreaMapFrm_Load(object sender, EventArgs e)
        {
            tdsFire   = (AppSvrHMI.L3DataSet)(dsFire.Clone());
            tdsGround = (AppSvrHMI.L3DataSet)(dsGround.Clone());
            tdsWire   = (AppSvrHMI.L3DataSet)(dsWire.Clone());

            tdsFire   = dsFire;
            tdsGround = dsGround;
            tdsWire   = dsWire;

            //AppSvrHMI.L3DataSet d = null;
            a = (AppSvrHMI.L3DataSet)tdsFire.Copy();
            b = (AppSvrHMI.L3DataSet)tdsGround.Copy();
            c = (AppSvrHMI.L3DataSet)tdsWire.Copy();
        }