public void RefreshRW(MES_PD_SCRW_LIST list, string shebeihaoID) { SMtextBox.Select(); SBHID = shebeihaoID; MES_SY_TYPEMX bcmodel = new MES_SY_TYPEMX(); bcmodel.GC = Convert.ToString(getGC("value")); bcmodel.TYPEID = 5; //MES_SY_TYPEMXLIST[] bclist = ServicModel.SY_TYPEMX.SELECT(bcmodel, getToken()); //bccomboBox.DisplayMember = "MXNAME"; //bccomboBox.ValueMember = "ID"; //bccomboBox.DataSource = bclist; //scrqtextBox.Text = DateTime.Now.ToString("yyyy-MM-dd"); Tmlist = new List <TMDataGrid>(); if (list.RWBH == null) { gzzxtextBox.Text = getUserInfo("gzzxtext"); gctextBox.Text = getGC("text"); sbhtextBox.Text = shebeihaoID; } else { this._MES_PD_SCRW_LIST = list; configUI(list); //getReportInfoByTm(); } }
public void Init(MES_PD_SCRW_LIST list, string shebeihaoID, Rigth_Type rtype, string sbh) { dateTimePicker1.Text = list.ZPRQ; LastDate = dateTimePicker1.Text.Trim(); IsGD = false; this.Text = GetFormName(rtype); unRequireArr = new List <int>(); bingLSdatagridView(); bingBomdatagridView(); RigthType = rtype; SMtextBox.Select(); SBHID = shebeihaoID; MES_SY_TYPEMX bcmodel = new MES_SY_TYPEMX(); bcmodel.GC = Convert.ToString(getGC("value")); bcmodel.TYPEID = 5; MES_PD_SCRW_LIST = list; Tmlist = new List <TMDataGrid>(); if (list.RWBH == null) { gzzxtextBox.Text = getUserInfo("gzzxtext"); gctextBox.Text = getGC("text"); sbhtextBox.Text = sbh; } else { IsGD = true; this._MES_PD_SCRW_LIST = list; configUI(list); } }
public void Init(MES_PD_SCRW_LIST list, string shebeihaoID, Rigth_Type rtype, string sbh) { unRequireArr = new List <int>(); MES_PD_SCRW_LIST = list; this.Text = GetFormName(rtype); IsTMP = false; bingLSdatagridView(); bingBomdatagridView(); RigthType = rtype; SMtextBox.Select(); SBHID = shebeihaoID; MES_SY_TYPEMX bcmodel = new MES_SY_TYPEMX(); bcmodel.GC = Convert.ToString(getGC("value")); bcmodel.TYPEID = 5; //MES_SY_TYPEMXLIST[] bclist = ServicModel.SY_TYPEMX.SELECT(bcmodel, getToken()); //bccomboBox.DisplayMember = "MXNAME"; //bccomboBox.ValueMember = "ID"; //bccomboBox.DataSource = bclist; //scrqtextBox.Text = DateTime.Now.ToString("yyyy-MM-dd"); Tmlist = new List <TMDataGrid>(); if (list.RWBH == null) { gzzxtextBox.Text = getUserInfo("gzzxtext"); gctextBox.Text = getGC("text"); sbhtextBox.Text = sbh; } else { //this._MES_PD_SCRW_LIST = list; //configUI(list); } }
public frmFJprint(MES_PD_SCRW_LIST model) { InitializeComponent(); MES_PD_SCRW_LIST = model; chtextBox.Text = MES_PD_SCRW_LIST.SBH; bzrichTextBox.Text = MES_PD_SCRW_LIST.REMARK; thtextBox.Text = MES_PD_SCRW_LIST.TH.ToString(); //tlsjtextBox.Text = Convert.ToDateTime(MES_PD_SCRW_LIST.TLSJ).ToString("yyyy-MM-dd hh:mm"); tlsjtextBox.Text = Convert.ToDateTime(MES_PD_SCRW_LIST.TLSJ).ToString("yyyy-MM-dd HH:mm");; ccsjtextBox.Text = Convert.ToDateTime(ServicModel.PUBLIC_FUNC.GET_TIME(getToken())).ToString("yyyy-MM-dd HH:mm"); cpztcomboBox.DataSource = GetDictionaryMX(9); cpztcomboBox.DisplayMember = "MXNAME"; cpztcomboBox.ValueMember = "ID"; slcomboBox.DataSource = GetDictionaryMX(11); slcomboBox.DisplayMember = "MXNAME"; slcomboBox.ValueMember = "ID"; PrintType = Print_Type.lot; RigthType = Rigth_Type.fujicc; MES_TM_CZR czr_model = new MES_TM_CZR(); czr_model.SBBH = model.SBBH; czr_model.GC = model.GC; czr_model.CZLB = 2; Crzlist = SelectCZR(czr_model); czrtextBox.Text = Crzlist.CZR; SMtextBox.Select(); }
public void InitData(MES_PD_SCRW_LIST list) { MES_TM_CZR rymodel = new MES_TM_CZR(); rymodel.GC = list.GC; rymodel.RWBH = list.RWBH; rymodel.CZLB = 1; dateTimePicker1.Text = list.ZPRQ; _czrList = ServicModel.TM_CZR.SELECT_CZR_NOW(rymodel, getToken()); _bomList = ServicModel.PD_GD.SAP_GET_GDJGXX(list.RWBH, list.ZPRQ, list.GC, getToken()); unRequireArr = new List <int>(); MES_SY_TYPEMX bcmodel = new MES_SY_TYPEMX(); bcmodel.GC = Convert.ToString(getGC("value")); bcmodel.TYPEID = 5; List <MES_SY_TYPEMXLIST> bcArr = new List <MES_SY_TYPEMXLIST>(); MES_SY_TYPEMXLIST[] bclist = ServicModel.SY_TYPEMX.SELECT(bcmodel, getToken()); gzzxtextBox.Text = list.GZZXBH + "-" + list.GZZXNAME; czrytextBox.Text = _czrList.CZR; gctextBox.Text = list.GC; sbhtextBox.Text = list.SBH; pctextBox.Text = list.PC; MES_SY_TYPEMXLIST bcmodel1 = new MES_SY_TYPEMXLIST(); bcmodel1.ID = 0; bcmodel1.MXNAME = q(Msg_Type.titlechoice);//"==请选择=="; bcArr = bclist.ToList(); bcArr.Insert(0, bcmodel1); bccomboBox.DisplayMember = "MXNAME"; bccomboBox.ValueMember = "ID"; bccomboBox.DataSource = bcArr; bccomboBox.SelectedValue = list.BC; MESlabel.Text = q(Msg_Type.titlemesgd) + list.GDDH; //"MES工单:" GDHlabel.Text = q(Msg_Type.titlegd) + list.ERPNO; //"工单号:" WLXXlabel.Text = q(Msg_Type.titlewlxx) + list.WLH + "/" + list.WLMS; //"物料信息:" WLLBlabel1.Text = q(Msg_Type.titlewllb) + list.WLLBNAME; //"物料类别:" rwdlabel.Text = q(Msg_Type.titlerwd) + list.RWBH; //"任务单:" if (_bomList.MES_RETURN.TYPE.Equals("S")) { BOMdataGridView.DataSource = getBomList(_bomList); BOMdataGridView.ClearSelection(); } else { ShowMeg(_bomList.MES_RETURN.MESSAGE); //this.Close(); BOMdataGridView.DataSource = new List <BomDataGrid>(); } LSdataGridView.ReadOnly = true; LastDate = dateTimePicker1.Text.Trim(); if (RigthType == Rigth_Type.mfqqingxi) { GDHlabel.Visible = false; WLXXlabel.Location = GDHlabel.Location; } }
public void SetCurrentTL(MES_PD_SCRW_LIST model) { thtextBox.Text = model.TH.ToString(); pfhtextBox.Text = model.PFDH; pldhtextBox.Text = model.PLDH; zfcdtextBox.Text = model.XFCDNAME; zfphtextBox.Text = model.XFPC; }
public frmBaozhuang(MES_PD_SCRW_LIST list, string shebeihaoID, Rigth_Type rtype, string sbh, string tpm) { InitializeComponent(); Tpm = tpm; Init(list, shebeihaoID, rtype, sbh); getTPMinfo(tpm); }
public frmBZ(MES_PD_SCRW_LIST list, string shebeihaoID, Rigth_Type rtype) { InitializeComponent(); RigthType = rtype; SMtextBox.Select(); SBHID = shebeihaoID; Tmlist = new List <TMDataGrid>(); this._MES_PD_SCRW_LIST = list; MES_TM_CZR rymodel = new MES_TM_CZR(); rymodel.GC = list.GC; rymodel.RWBH = list.RWBH; rymodel.CZLB = 1; _czrList = ServicModel.TM_CZR.SELECT_CZR_NOW(rymodel, getToken()); //_bomList = ServicModel.PD_GD.SAP_GET_GDJGXX(list.RWBH,, list.GC, getToken()); unRequireArr = new List <int>(); MES_SY_TYPEMX bcmodel = new MES_SY_TYPEMX(); bcmodel.GC = Convert.ToString(getGC("value")); bcmodel.TYPEID = 5; List <MES_SY_TYPEMXLIST> bcArr = new List <MES_SY_TYPEMXLIST>(); //MES_SY_TYPEMXLIST bcBlank = new MES_SY_TYPEMXLIST(); //bcBlank.MXNAME = "空"; //bcBlank.ID = 0; //bcArr.Add(bcBlank); MES_SY_TYPEMXLIST[] bclist = ServicModel.SY_TYPEMX.SELECT(bcmodel, getToken()); //for (int i = 0; i < bclist.Length; i++) //{ // bcArr.Add(bclist[i]); //} gzzxtextBox.Text = list.GZZXBH + "-" + list.GZZXNAME; czrytextBox.Text = _czrList.CZR; gctextBox.Text = list.GC; sbhtextBox.Text = list.SBH; MESlabel.Text = "MES工单:" + list.GDDH; GDHlabel.Text = "工单号:" + list.ERPNO; WLXXlabel.Text = "物料信息:" + list.WLH + "/" + list.WLMS; WLLBlabel1.Text = "物料类别:" + list.WLLBNAME; rwdlabel.Text = "任务单:" + list.RWBH; //string[] cols = { "序号", "条码", "物料信息", "物料类别","删除", "物料类别代码", "条码代码","工厂"}; //string[] colss = { "Xh", "Tm", "Wlxx", "Wllb","del", "Wllbdm", "tmid" ,"gc"}; //string[] vcols = { "物料类别代码", "条码代码" ,"工厂"}; //DataGridBuild(cols, colss, LSdataGridView, vcols); BOMdataGridView.DataSource = getBomList(_bomList); //System.Timers.Timer t = new System.Timers.Timer(100); //t.Elapsed += new System.Timers.ElapsedEventHandler(theout); //t.AutoReset = false;//设置是执行一次(false)还是一直执行(true); //t.Enabled = true;//是否执行System.Timers.Timer.Elapsed事件; LSdataGridView.ReadOnly = true; bingLSdatagridView(); }
private void btn_Click(object sender, EventArgs e) { Button btn = (Button)sender; int index = Convert.ToInt32(btn.Tag) % 100; //任务清单 = 10 打印lot = 11 int row = Convert.ToInt32(btn.Tag) / 100; //数组第几个元素 int indexL = IndexList[row]; if (indexL == -1) { indexL = 0; } MES_PD_SCRW_LIST model = Fjcclist[row].RwArr.MES_PD_SCRW_LIST[indexL]; if (index == 11) { if (model.ISACTION == 0) { ShowMeg(q(Msg_Type.titlewaitingfortl));//"投料还没完成请耐心等待" return; } timer1.Stop(); frmFJprint form = new frmFJprint(model); show(form); RefreshZn(); //configUI(Sbhlist); timer1.Start(); //configUI(Sbhlist); //this.Refresh(); } else if (index == 10) { string sbhh = model.SBBH; string sbh = model.SBH; MES_PD_SCRW rwmodel = new MES_PD_SCRW(); rwmodel.SBBH = sbhh; rwmodel.GC = model.GC;//getGC("value"); //model.GZZXBH = getUserInfo("gzzxvalue"); rwmodel.ZPRQ = GetSystemDate(Date_Type.hour, -4, "yyyy-MM-dd"); SELECT_MES_PD_SCRW res = ServicModel.PD_SCRW.SELECT(rwmodel, getToken()); if (res.MES_RETURN.TYPE.Equals("S")) { timer1.Stop(); frmSelectRWList_N form = new frmSelectRWList_N(res.MES_PD_SCRW_LIST, sbh); show(form); timer1.Start(); } else { //MessageBox.Show(res.MES_RETURN.MESSAGE, "消息框"); ShowMeg(res.MES_RETURN.MESSAGE); } } }
public void configUI(MES_PD_SCRW_LIST list) { MES_PD_SCRW_LIST = list; MES_TM_CZR rymodel = new MES_TM_CZR(); rymodel.GC = list.GC; rymodel.RWBH = list.RWBH; rymodel.CZLB = 1; _czrList = ServicModel.TM_CZR.SELECT_CZR_NOW(rymodel, getToken()); dateTimePicker1.Text = list.ZPRQ; _bomList = ServicModel.PD_GD.SAP_GET_GDJGXX(list.RWBH, list.ZPRQ, list.GC, getToken()); gzzxtextBox.Text = list.GZZXBH + "-" + list.GZZXNAME; czrytextBox.Text = _czrList.CZR; gctextBox.Text = list.GC; sbhtextBox.Text = list.SBH; pctextBox.Text = list.PC; MESlabel.Text = q(Msg_Type.titlemesgd) + list.GDDH; //"MES工单:" GDHlabel.Text = q(Msg_Type.titlegd) + list.ERPNO; //"工单号:" WLXXlabel.Text = q(Msg_Type.titlewlxx) + list.WLH + "/" + list.WLMS; //"物料信息:" WLLBlabel1.Text = q(Msg_Type.titlewllb) + list.WLLBNAME; //"物料类别:" rwdlabel.Text = q(Msg_Type.titlerwd) + list.RWBH; //"任务单:" dcdjlabel.Text = q(Msg_Type.titledcdj) + list.DCDJNAME; //"电池等级:" dcxhlabel1.Text = q(Msg_Type.titledcdj) + list.DCXHNAME; //电池型号: if (string.IsNullOrEmpty(list.XSNOBILL)) { tskclabel1.Text = q(Msg_Type.titletskc);//"特殊库存:"; } else { tskclabel1.Text = q(Msg_Type.titletskc) + list.XSNOBILL + "-" + list.XSNOBILLMX; } if (_bomList.MES_RETURN.TYPE.Equals("S")) { BOMdataGridView.DataSource = getBomList(_bomList); } else { ShowMeg(_bomList.MES_RETURN.MESSAGE); BOMdataGridView.DataSource = new List <BomDataGrid>(); } LSdataGridView.ReadOnly = true; for (int i = 0; i < BOMdataGridView.Rows.Count; i++) { BOMdataGridView.Rows[i].Cells[q(Msg_Type.fieldstatus)].Style.BackColor = Color.Red; for (int j = 0; j < unRequireArr.Count; j++) { if (i == unRequireArr[j]) { BOMdataGridView.Rows[i].Cells[q(Msg_Type.fieldstatus)].Style.BackColor = Color.White; } } } BOMdataGridView.ClearSelection(); }
public string POST_PRINT_RWQD(string datastring) { MES_RETURN_UI rst = new MES_RETURN_UI(); MES_PD_SCRW_LIST model = Newtonsoft.Json.JsonConvert.DeserializeObject <MES_PD_SCRW_LIST>(datastring); MES_PD_SCRW_LIST[] model_list = new MES_PD_SCRW_LIST[1]; model_list[0] = model; AppClass.SetSession("MES_PD_SCRW_LIST", model_list); rst.TYPE = "S"; return(Newtonsoft.Json.JsonConvert.SerializeObject(rst)); }
public frmZX_CC(MES_PD_SCRW_LIST list, string shebeihaoID, Rigth_Type rtype) { InitializeComponent(); if (list.GC.Equals("8020")) { showTime = true; } configTable(); RigthType = rtype; MES_PD_SCRW_LIST = list; //monthCalendar1.Visible = false; configUI(MES_PD_SCRW_LIST); }
public void RefreshRW(MES_PD_SCRW_LIST list, string shebeihaoID) { //monthCalendar1.Visible = false; //scrqtextBox.Text = DateTime.Now.ToString("yyyy-MM-dd"); SMtextBox.Select(); SBHID = shebeihaoID; Tmlist = new List <TMDataGrid>(); this._MES_PD_SCRW_LIST = list; MES_TM_CZR rymodel = new MES_TM_CZR(); rymodel.GC = list.GC; rymodel.RWBH = list.RWBH; rymodel.CZLB = 1; _czrList = ServicModel.TM_CZR.SELECT_CZR_NOW(rymodel, getToken()); _bomList = ServicModel.PD_GD.SAP_GET_GDJGXX(list.RWBH, list.ZPRQ, list.GC, getToken()); unRequireArr = new List <int>(); MES_SY_TYPEMX bcmodel = new MES_SY_TYPEMX(); bcmodel.GC = Convert.ToString(getGC("value")); bcmodel.TYPEID = 5; List <MES_SY_TYPEMXLIST> bcArr = new List <MES_SY_TYPEMXLIST>(); MES_SY_TYPEMXLIST[] bclist = ServicModel.SY_TYPEMX.SELECT(bcmodel, getToken()); gzzxtextBox.Text = list.GZZXBH + "-" + list.GZZXNAME; gctextBox.Text = list.GC; sbhtextBox.Text = list.SBH; MESlabel.Text = q(Msg_Type.titlemesgd) + list.GDDH; //"MES工单:" GDHlabel.Text = q(Msg_Type.titlegd) + list.ERPNO; //"工单号:" WLXXlabel.Text = q(Msg_Type.titlewlxx) + list.WLH + "/" + list.WLMS; //"物料信息:" WLLBlabel1.Text = q(Msg_Type.titlewllb) + list.WLLBNAME; //"物料类别:" rwdlabel.Text = q(Msg_Type.titlerwd) + list.RWBH; //"任务单:" if (_bomList.MES_RETURN.TYPE.Equals("S")) { BOMdataGridView.DataSource = getBomList(_bomList); } else { ShowMeg(_bomList.MES_RETURN.MESSAGE); //this.Close(); BOMdataGridView.DataSource = new List <BomDataGrid>(); } BOMdataGridView.ClearSelection(); LSdataGridView.ReadOnly = true; UpdateJSDataGrid(MES_PD_SCRW_LIST.RWBH); //getTMList(ServicModel.TM_TMINFO.SELECT_TL_LAST(MES_PD_SCRW_LIST.RWBH, getToken())); }
public frmTL2_1(MES_PD_SCRW_LIST list, string shebeihaoID, Rigth_Type rtype) { InitializeComponent(); this.Text = GetFormName(rtype); //if (rtype != Rigth_Type.gangketl_cc) //{ // dyrkbutton.Visible = false; //} bingLSdatagridView(); bindBomView(); RigthType = rtype; SMtextBox.Select(); SBHID = shebeihaoID; Tmlist = new List <TMDataGrid>(); this._MES_PD_SCRW_LIST = list; }
public frmManagerRY(MES_TM_CZR_SELECT_CZR_NOW list, MES_PD_SCRW_LIST rwlist, int czlb) { InitializeComponent(); _czrList = list; _MES_PD_SCRW_LIST = rwlist; Czlb = czlb; int SC_width = 680; //int SC_height = 600; factory.configLabel(TTlabel, new Size(SC_width - 20, 40), new Point(10, 24), q(Msg_Type.fieldrygl));//"操作人员管理" TTlabel.TextAlign = ContentAlignment.MiddleCenter; factory.configText(SMtextBox, new Size(SC_width - 35, 40), new Point(10, TTlabel.Location.Y + 40 + 10), new Font(q(Msg_Type.fonttype), 18), ""); factory.configGridView(RYdataGridView, new Size(SC_width - 35, 600 - SMtextBox.Location.Y - 100), new Point(10, SMtextBox.Location.Y + 40 + 10), new Font(q(Msg_Type.fonttype), 9), new DataTable()); configDataRYgrid(); RYdataGridView.ReadOnly = true; }
public frmZX_TL(MES_PD_SCRW_LIST list, string shebeihaoID, Rigth_Type rtype) { InitializeComponent(); RigthType = rtype; //if (RigthType == Rigth_Type.zhuxiantl) //{ // sbhbutton.Visible = false; // qhgdbutton.Location = sbhbutton.Location; //} //monthCalendar1.Visible = false; //scrqtextBox.Text = DateTime.Now.ToString("yyyy-MM-dd"); SMtextBox.Select(); SBHID = shebeihaoID; Tmlist = new List <TMDataGrid>(); this._MES_PD_SCRW_LIST = list; if (MES_PD_SCRW_LIST.GC.Equals("8020")) { showTime = true; } }
private void btn_Click(object sender, EventArgs e) { Button btn = (Button)sender; int index = Convert.ToInt32(btn.Tag) % 10; //任务清单 = 1 打印lot = 2 int row = Convert.ToInt32(btn.Tag) / 10; //数组第几个元素 MES_PD_SCRW_LIST model = Fjcclist[row].RwArr.MES_PD_SCRW_LIST[IndexList[row]]; if (index == 2) { if (model.ISACTION == 0) { ShowMeg("投料还没完成请耐心等待"); return; } timer1.Stop(); frmFJprint form = new frmFJprint(model); show(form); //configUI(Sbhlist); timer1.Start(); //configUI(Sbhlist); //this.Refresh(); } else if (index == 1) { string sbhh = model.SBBH; string sbh = model.SBH; SELECT_MES_PD_SCRW res = GetRWbySBBH(sbhh); if (res.MES_RETURN.TYPE.Equals("S")) { timer1.Stop(); frmSelectRWList form = new frmSelectRWList(res.MES_PD_SCRW_LIST, sbh); show(form); timer1.Start(); } else { MessageBox.Show(res.MES_RETURN.MESSAGE, "消息框"); } } }
public void configUI(MES_PD_SCRW_LIST list) { dateTimePicker1.Text = list.ZPRQ; LastDate = dateTimePicker1.Text.Trim(); gzzxtextBox.Text = list.GZZXBH + "-" + list.GZZXNAME; gctextBox.Text = list.GC; sbhtextBox.Text = list.SBH; pctextBox.Text = list.PC; dateTimePicker1.Text = Convert.ToDateTime(list.ZPRQ).ToString("yyyy-MM-dd"); rwdtextBox.Text = list.RWBH; MESgdtextBox.Text = list.GDDH; gdtextBox.Text = list.ERPNO; wlxxtextBox.Text = list.WLH + "/" + list.WLMS; wllbtextBox.Text = list.WLLBNAME; MES_TM_CZR rymodel = new MES_TM_CZR(); rymodel.GC = list.GC; rymodel.RWBH = list.RWBH; rymodel.CZLB = 1; CzrList = ServicModel.TM_CZR.SELECT_CZR_NOW(rymodel, getToken()); czrytextbox.Text = CzrList.CZR; configgridviewData(list.RWBH); }
public frmZFSDprint(MES_PD_SCRW_LIST list, string scrq) { InitializeComponent(); rkrqtextBox.Text = scrq; MES_PD_SCRW_LIST = list; scxtextBox.Text = list.SBH; dcxxtextBox.Text = list.DCXHNAME + "/" + list.DCDJNAME; zflbcomboBox.DataSource = GetDictionaryMX(17); zflbcomboBox.DisplayMember = "MXNAME"; zflbcomboBox.ValueMember = "ID"; monthCalendar1.Visible = false; //monthCalendar2.Visible = false; //monthCalendar3.Visible = false; MES_PD_SCRW_CCTH res = ServicModel.PD_SCRW.SELECT_ZXCCINFO(list.RWBH, 0, getToken()); if (res.MES_RETURN.TYPE.Equals("S")) { zhtextBox.Text = res.TH.ToString(); } else { ShowMeg(res.MES_RETURN.MESSAGE); } }
public void ChangeRW() { MES_PD_SCRW model = new MES_PD_SCRW(); model.RWBH = SMtextBox.Text.Trim().ToUpper(); model.GC = getGC("value"); model.SBBH = SBHID; SELECT_MES_PD_SCRW res = ServicModel.PD_SCRW.SELECT(model, getToken()); if (res.MES_RETURN.TYPE.Equals("S")) { MES_PD_SCRW_LIST list = res.MES_PD_SCRW_LIST[0]; Tmlist = new List <TMDataGrid>(); LSdataGridView.DataSource = Tmlist; LSdataGridView.Columns[q(Msg_Type.fielddelete)].DisplayIndex = 4;//"删除" this._MES_PD_SCRW_LIST = list; MES_TM_CZR rymodel = new MES_TM_CZR(); rymodel.GC = list.GC; rymodel.RWBH = list.RWBH; rymodel.CZLB = 1; _czrList = ServicModel.TM_CZR.SELECT_CZR_NOW(rymodel, getToken()); _bomList = ServicModel.PD_GD.SAP_GET_GDJGXX(list.RWBH, dateTimePicker1.Text.Trim(), list.GC, getToken()); unRequireArr = new List <int>(); MES_SY_TYPEMX bcmodel = new MES_SY_TYPEMX(); bcmodel.GC = Convert.ToString(getGC("value")); bcmodel.TYPEID = 5; List <MES_SY_TYPEMXLIST> bcArr = new List <MES_SY_TYPEMXLIST>(); MES_SY_TYPEMXLIST[] bclist = ServicModel.SY_TYPEMX.SELECT(bcmodel, getToken()); gzzxtextBox.Text = list.GZZXBH + "-" + list.GZZXNAME; czrytextBox.Text = _czrList.CZR; gctextBox.Text = list.GC; sbhtextBox.Text = list.SBH; pctextBox.Text = list.PC; bcArr = bclist.ToList(); MES_SY_TYPEMXLIST bcmodel1 = new MES_SY_TYPEMXLIST(); bcmodel1.ID = 0; bcmodel1.MXNAME = q(Msg_Type.titlechoice);//"==请选择=="; bcArr.Insert(0, bcmodel1); bccomboBox.DisplayMember = "MXNAME"; bccomboBox.ValueMember = "ID"; bccomboBox.DataSource = bcArr; bccomboBox.SelectedValue = list.BC; MESlabel.Text = q(Msg_Type.titlemesgd) + list.GDDH; //"MES工单:" GDHlabel.Text = q(Msg_Type.titlegd) + list.ERPNO; //"工单号:" WLXXlabel.Text = q(Msg_Type.titlewlxx) + list.WLH + "/" + list.WLMS; //"物料信息:" WLLBlabel1.Text = q(Msg_Type.titlewllb) + list.WLLBNAME; //"物料类别:" rwdlabel.Text = q(Msg_Type.titlerwd) + list.RWBH; //"任务单:" if (_bomList.MES_RETURN.TYPE.Equals("S")) { BOMdataGridView.DataSource = getBomList(_bomList); } else { ShowMeg(_bomList.MES_RETURN.MESSAGE); BOMdataGridView.DataSource = new List <BomDataGrid>(); } //scrqtextBox.Text = DateTime.Now.ToString("yyyy-MM-dd"); LSdataGridView.ReadOnly = true; BOMdataGridView.Columns[q(Msg_Type.fieldstatus)].DefaultCellStyle.BackColor = Color.Red;//"状态" for (int i = 0; i < unRequireArr.Count; i++) { BOMdataGridView.Rows[unRequireArr[i]].Cells[q(Msg_Type.fieldstatus)].Style.BackColor = Color.White;//"状态" } //SELECT_MES_TM_TMINFO_BYTM r = ServicModel.TM_TMINFO.SELECT_TL_LAST(MES_PD_SCRW_LIST.RWBH, getToken()); //if (r.MES_RETURN.TYPE.Equals("S")) //{ // getTMList(r, 0); //} Tmlist = new List <TMDataGrid>(); LSdataGridView.DataSource = new List <TMDataGrid>(); LSdataGridView.ClearSelection(); LSdataGridView.Columns[q(Msg_Type.fielddelete)].DisplayIndex = 4;//"删除" BOMdataGridView.ClearSelection(); if (RigthType == Rigth_Type.mfqqingxi) { GDHlabel.Visible = false; WLXXlabel.Location = GDHlabel.Location; } } else { //MessageBox.Show(SMtextBox.Text + res.MES_RETURN.MESSAGE, "消息框"); ShowMeg(SMtextBox.Text + res.MES_RETURN.MESSAGE); } SMtextBox.Clear(); SMtextBox.Select(); }
public frmBBprint(MES_TM_TMINFO_INSERT_GL model, Print_Type ptype, Rigth_Type rtype, MES_PD_SCRW_LIST list) { InitializeComponent(); RigthType = rtype; PrintType = ptype; MES_PD_SCRW scrwmodel = new MES_PD_SCRW(); scrwmodel.RWBH = list.RWBH; SELECT_MES_PD_SCRW res = ServicModel.PD_SCRW.SELECT(scrwmodel, getToken()); if (res.MES_PD_SCRW_LIST.Length == 0) { ShowMeg(q(Msg_Type.msgrwdempty)); return; } list = res.MES_PD_SCRW_LIST[0]; if (list == null) { ShowMeg(q(Msg_Type.msgrwdempty)); return; } MES_TM_TMINFO_INSERT_GL = model; wlxxtextBox.Text = list.WLH + "/" + list.WLMS; if (!string.IsNullOrEmpty(list.XSNOBILL)) { if (!string.IsNullOrEmpty(list.PC)) { wlsxtextBox.Text = list.XSNOBILL + "-" + list.XSNOBILLMX + "/" + list.PC; } else { wlsxtextBox.Text = list.XSNOBILL + "-" + list.XSNOBILLMX; } } else { if (!string.IsNullOrEmpty(list.PC)) { wlsxtextBox.Text = list.PC; } } dcxhtextBox.Text = list.DCXHNAME; dcdjtextBox.Text = list.DCDJNAME; mbsltextBox.Text = Convert.ToString(list.MPSL); bbpmtextBox.Text = list.RQM; //if (judge.IsNumber(list.XSNOBILL) == false && !string.IsNullOrEmpty(list.XSNOBILL)) //{ // bzrichTextBox.Text = list.XSNOBILL + "-" + list.XSNOBILLMX; //} cpztcomboBox.DataSource = GetDictionaryMX(9); cpztcomboBox.DisplayMember = "MXNAME"; cpztcomboBox.ValueMember = "ID"; zhtextBox.Text = Convert.ToString(ServicModel.PD_SCRW.SELECT_TH_BY_GDDH_SBBH(list.RWBH, getToken()).TH); List <MES_SY_TYPEMXLIST> sbcdlist = GetDictionaryMX(15).ToList(); MES_SY_TYPEMXLIST choicllist = new MES_SY_TYPEMXLIST(); choicllist.ID = 0; choicllist.MXNAME = q(Msg_Type.titlechoice); sbcdlist.Insert(0, choicllist); sbcdcomboBox.DataSource = sbcdlist; sbcdcomboBox.DisplayMember = "MXNAME"; sbcdcomboBox.ValueMember = "ID"; List <MES_SY_TYPEMXLIST> hdgxlist = GetDictionaryMX(19).ToList(); hdgxlist.Insert(0, choicllist); hdgxcomboBox.DisplayMember = "MXNAME"; hdgxcomboBox.ValueMember = "ID"; hdgxcomboBox.DataSource = hdgxlist; hdgxcomboBox.SelectedValue = list.XDGX; }
public void configUI(MES_SY_GZZX_SBH[] model) { totalpanel.Controls.Clear(); Fjcclist = new List <FJCClist>(); IndexList = new List <int>(); Sbhlist = model; gctextBox.Text = getGC("text"); gzzxtextBox.Text = getUserInfo("gzzxtext"); rqtextBox.Text = GetSystemDate(Date_Type.hour, -4, "yyyy-MM-dd"); for (int i = 0; i < Sbhlist.Length; i++) { FJCClist list = new FJCClist(); MES_PD_SCRW pd_scrw = new MES_PD_SCRW(); pd_scrw.SBBH = Sbhlist[i].SBBH; pd_scrw.GC = getGC("value"); //pd_scrw.GZZXBH = getUserInfo("gzzxvalue"); pd_scrw.ZPRQ = rqtextBox.Text; SELECT_MES_PD_SCRW Smodel = ServicModel.PD_SCRW.SELECT(pd_scrw, getToken()); if (Smodel.MES_RETURN.TYPE.Equals("S")) { list.RwArr = Smodel; } else { list.RwArr = new SELECT_MES_PD_SCRW(); } list.SbStruct = Sbhlist[i]; Fjcclist.Add(list); } for (int i = 0; i < Fjcclist.Count; i++) { Panel p1 = new Panel(); p1.Location = new Point(i % 3 * (400), i / 3 * (rect.Height * 4 / 10) - 20 * (i / 3)); p1.Size = new Size(400, rect.Height * 4 / 10 - 20); if (Fjcclist[i].RwArr.MES_PD_SCRW_LIST == null) { Label sbh_lb = new Label(); Label lb = new Label(); factory.configLabel(sbh_lb, new Size(60, 35), new Point(10, 10), new Font(q(Msg_Type.fonttype), 29), Fjcclist[i].SbStruct.SBMS); factory.configLabel(lb, new Size(300, 35), new Point(20, 120), new Font(q(Msg_Type.fonttype), 20), q(Msg_Type.msgsbnorwd));//"设备没有派单任务" p1.Controls.Add(lb); p1.Controls.Add(sbh_lb); p1.BorderStyle = BorderStyle.FixedSingle; p1.BackColor = Color.FromArgb(252, 228, 214); totalpanel.Controls.Add(p1); } else { int flag = 0; int finish = 0; bool isRw = false; for (int j = 0; j < Fjcclist[i].RwArr.MES_PD_SCRW_LIST.Length; j++) { if (Fjcclist[i].RwArr.MES_PD_SCRW_LIST[j].ISACTION == 1) { flag = j; isRw = true; break; } else if (Fjcclist[i].RwArr.MES_PD_SCRW_LIST[j].ISACTION == 2) { finish++; } } if (isRw == false) { for (int j = 0; j < Fjcclist[i].RwArr.MES_PD_SCRW_LIST.Length; j++) { if (Fjcclist[i].RwArr.MES_PD_SCRW_LIST[j].ISACTION == 0) { flag = j; break; } } } IndexList.Add(flag); MES_PD_SCRW_LIST data = Fjcclist[i].RwArr.MES_PD_SCRW_LIST[flag]; Label sbh_lb = new Label(); sbh_lb.Tag = i * 10 + 3; p1.Controls.Add(sbh_lb); factory.configLabel(sbh_lb, new Size(60, 35), new Point(10, 10), new Font(q(Msg_Type.fonttype), 29), data.SBH.ToString()); Button qd_btn = new Button(); qd_btn.FlatStyle = FlatStyle.Popup; qd_btn.Click += new System.EventHandler(this.btn_Click); int magrin = p1.Size.Height / 9; int magrin1 = p1.Size.Height / 15; int btnheight = 0; if (p1.Size.Height > 225) { btnheight = p1.Size.Height - 50 - 30; } else { btnheight = p1.Size.Height - 50 - 10; } factory.configButton(qd_btn, new Size(130, 50), new Point(20, btnheight), q(Msg_Type.fieldrwqd), i * 10 + 1);//"任务清单" p1.Controls.Add(qd_btn); p1.BackColor = Color.FromArgb(252, 228, 214); if (Fjcclist[i].RwArr.MES_PD_SCRW_LIST.Length == finish) { Label lb = new Label(); factory.configLabel(lb, new Size(300, 35), new Point(20, 120), new Font(q(Msg_Type.fonttype), 20), q(Msg_Type.fieldtodayrwfinish));//"今天的任务已经完成" p1.Controls.Add(lb); } else { Label th_lb = new Label(); Label pf_lb = new Label(); Label pl_lb = new Label(); Label cd_lb = new Label(); Label zf_lb = new Label(); Label zt_lb = new Label(); th_lb.Tag = i * 10 + 4; pf_lb.Tag = i * 10 + 5; pl_lb.Tag = i * 10 + 6; cd_lb.Tag = i * 10 + 7; zf_lb.Tag = i * 10 + 8; Button lot_btn = new Button(); if (data.ISACTION == 0) { lot_btn.Enabled = false; } //ShowMeg(p1.Size.Height.ToString()); factory.configLabel(th_lb, new Size(400, 20), new Point(70, magrin1), q(Msg_Type.titleth) + data.TH); //"桶号:" factory.configLabel(pf_lb, new Size(400, 20), new Point(70, magrin1 + magrin * 1), q(Msg_Type.titlepfdh) + data.PFDH); //"配方单号:" factory.configLabel(pl_lb, new Size(400, 20), new Point(70, magrin1 + magrin * 2), q(Msg_Type.titlepldh) + data.PLDH); //"配料单号:" factory.configLabel(cd_lb, new Size(400, 20), new Point(70, magrin1 + magrin * 3), q(Msg_Type.titlexfcd) + data.XFCDNAME); //"锌粉产地:" factory.configLabel(zf_lb, new Size(400, 20), new Point(70, magrin1 + magrin * 4), q(Msg_Type.titlexfph) + data.XFPC); //"锌粉批号:" string zt = ""; if (data.ISACTION == 0) { zt = q(Msg_Type.fieldnotl);//"未投料"; zt_lb.ForeColor = Color.Red; } else if (data.ISACTION == 1) { zt = q(Msg_Type.fieldytl);//"已投料"; p1.BackColor = Color.FromArgb(146, 208, 80); } else if (data.ISACTION == 2) { zt = q(Msg_Type.fieldycc); //"已产出"; } factory.configLabel(zt_lb, new Size(400, 20), new Point(70, magrin1 + magrin * 5), q(Msg_Type.fieldtlzt) + zt); //"投料状态:" lot_btn.FlatStyle = FlatStyle.Popup; //10 + 31 * 5 + 40 //factory.configButton(lot_btn, new Size(130, 50), new Point(170, 10 + 31 * 5 + 40), "打印LOT表", i * 10 + 2); factory.configButton(lot_btn, new Size(130, 50), new Point(170, btnheight), q(Msg_Type.fielddylot), i * 10 + 2);//"打印LOT表" lot_btn.Click += new System.EventHandler(this.btn_Click); p1.Controls.Add(zt_lb); p1.Controls.Add(th_lb); p1.Controls.Add(pf_lb); p1.Controls.Add(pl_lb); p1.Controls.Add(cd_lb); p1.Controls.Add(zf_lb); p1.Controls.Add(lot_btn); } p1.BorderStyle = BorderStyle.FixedSingle; p1.Tag = 100 + i; totalpanel.Controls.Add(p1); } } //for (int i = 0; i < Sbhlist.Length; i++) //{ // FJCClist list = new FJCClist(); // MES_PD_SCRW pd_scrw = new MES_PD_SCRW(); // pd_scrw.SBBH = Sbhlist[i].SBBH; // pd_scrw.GC = getGC("value"); // pd_scrw.GZZXBH = getUserInfo("gzzxvalue"); // SELECT_MES_PD_SCRW Smodel = ServicModel.PD_SCRW.SELECT(pd_scrw, getToken()); // if (Smodel.MES_RETURN.TYPE.Equals("S")) // { // list.SbStruct = Sbhlist[i]; // list.RwArr = Smodel; // Fjcclist.Add(list); // } //} //for (int i = 0; i < Fjcclist.Count; i++) //{ // int flag = 0; // int length = 0; // for (int j = 0; j < Fjcclist[i].RwArr.MES_PD_SCRW_LIST.Length; j++) // { // if (Fjcclist[i].RwArr.MES_PD_SCRW_LIST[j].ISACTION == 1) // { // flag = j; // break; // } // if (Fjcclist[i].RwArr.MES_PD_SCRW_LIST[j].ISACTION == 0) // { // length++; // } // } // if (flag == 0) // { // if (length < Fjcclist[i].RwArr.MES_PD_SCRW_LIST.Length && length != 0) // { // for (int j = 0; j < Fjcclist[i].RwArr.MES_PD_SCRW_LIST.Length; j++) // { // if (Fjcclist[i].RwArr.MES_PD_SCRW_LIST[j].ISACTION == 2) // { // flag = j; // } // } // if (Fjcclist[i].RwArr.MES_PD_SCRW_LIST.Length - 1 == flag) // { // flag = Fjcclist[i].RwArr.MES_PD_SCRW_LIST.Length - 1; // } // else // { // flag += 1; // } // } // else // { // flag = 0; // } // } // IndexList.Add(flag); // Panel p1 = new Panel(); // p1.Location = new Point(i % 3 * (totalpanel.Bounds.Width / 3), i / 3 * 350); // p1.Size = new Size(totalpanel.Bounds.Width / 3, 350); // Label sbh_lb = new Label(); // Label th_lb = new Label(); // Label pf_lb = new Label(); // Label pl_lb = new Label(); // Label cd_lb = new Label(); // Label zf_lb = new Label(); // Label zt_lb = new Label(); // sbh_lb.Tag = i * 10 + 3; // th_lb.Tag = i * 10 + 4; // pf_lb.Tag = i * 10 + 5; // pl_lb.Tag = i * 10 + 6; // cd_lb.Tag = i * 10 + 7; // zf_lb.Tag = i * 10 + 8; // Button qd_btn = new Button(); // Button lot_btn = new Button(); // MES_PD_SCRW_LIST data = Fjcclist[i].RwArr.MES_PD_SCRW_LIST[flag]; // //if (data.ISACTION == 0) // //{ // // lot_btn.Enabled = false; // //} // factory.configLabel(sbh_lb, new Size(100, 35), new Point(30, 30), new Font(q(Msg_Type.fonttype), 29), data.SBH.ToString()); // factory.configLabel(th_lb, new Size(400, 20), new Point(100, 70), "桶号:" + data.TH); // factory.configLabel(pf_lb, new Size(400, 20), new Point(100, 70 + 31), "配方单号:" + data.PFDH); // factory.configLabel(pl_lb, new Size(400, 20), new Point(100, 70 + 31 * 2), "配料单号:" + data.PLDH); // factory.configLabel(cd_lb, new Size(400, 20), new Point(100, 70 + 31 * 3), "锌粉产地:" + data.XFCDNAME); // factory.configLabel(zf_lb, new Size(400, 20), new Point(100, 70 + 31 * 4), "锌粉批号:" + data.XFPC); // string zt = ""; // p1.BackColor = Color.FromArgb(252, 228, 214); // if (data.ISACTION == 0) // { // zt = "未投料"; // zt_lb.ForeColor = Color.Red; // } // else if (data.ISACTION == 1) // { // zt = "已投料"; // p1.BackColor = Color.FromArgb(146, 208, 80); // } // else if (data.ISACTION == 2) // { // zt = "已产出"; // } // factory.configLabel(zt_lb, new Size(400, 20), new Point(100, 70 + 31 * 5), "投料状态:" + zt); // qd_btn.FlatStyle = FlatStyle.Popup; // lot_btn.FlatStyle = FlatStyle.Popup; // factory.configButton(qd_btn, new Size(130, 50), new Point(100, 70 + 31 * 5 + 40), "任务清单", i * 10 + 1); // factory.configButton(lot_btn, new Size(130, 50), new Point(270, 70 + 31 * 5 + 40), "打印LOT表", i * 10 + 2); // qd_btn.Click += new System.EventHandler(this.btn_Click); // lot_btn.Click += new System.EventHandler(this.btn_Click); // //if (i % 4 == 0 || i % 4 == 3) // //{ // // p1.BackColor = Color.FromArgb(146, 208, 80); // //} // //else // //{ // p1.BorderStyle = BorderStyle.FixedSingle; // //} // p1.Tag = 100 + i; // p1.Controls.Add(zt_lb); // p1.Controls.Add(sbh_lb); // p1.Controls.Add(th_lb); // p1.Controls.Add(pf_lb); // p1.Controls.Add(pl_lb); // p1.Controls.Add(cd_lb); // p1.Controls.Add(zf_lb); // p1.Controls.Add(qd_btn); // p1.Controls.Add(lot_btn); // totalpanel.Controls.Add(p1); //} }
private void dylotbutton_Click(object sender, EventArgs e) { ZBCFUN_GDJGXX_READ r = ServicModel.PD_GD.SAP_GET_GDJGXX(MES_PD_SCRW_LIST.RWBH, MES_PD_SCRW_LIST.ZPRQ, MES_PD_SCRW_LIST.GC, getToken()); if (!r.MES_RETURN.TYPE.Equals("S")) { ShowMeg(r.MES_RETURN.MESSAGE); SMtextBox.Select(); return; } if (!IsTMP) { //ShowMeg("请先扫描托盘码"); ShowMeg(q(Msg_Type.msgscantpm)); } else { MsgReturn msgInfo = VerifyWLisALL(); if (msgInfo.Pass == false) { //MessageBox.Show(msgInfo.Msg, "消息框"); ShowMeg(msgInfo.Msg); SMtextBox.Select(); return; } MsgReturn msgInfo1 = VerifyContent(); if (msgInfo1.Pass == false) { //MessageBox.Show(msgInfo1.Msg, "消息框"); ShowMeg(msgInfo1.Msg); SMtextBox.Select(); return; } if (string.IsNullOrEmpty(Tpm)) { //ShowMeg("托盘码信息不能为空"); ShowMeg(q(Msg_Type.msgtpmnoempty)); } //if (Convert.ToInt32(bccomboBox.SelectedValue) == 0) //{ // MessageBox.Show("生成领用表必须输入班次信息不能为空", "消息框"); // return; //} MES_TM_TMINFO_INSERT_GL model = new MES_TM_TMINFO_INSERT_GL(); MES_TM_TMINFO info = new MES_TM_TMINFO(); model.MES_TM_TMINFO = info; model.MES_TM_TMINFO.TMLB = 1; //model.MES_TM_TMINFO.BC = Convert.ToInt32(bccomboBox.SelectedValue); model.MES_TM_TMINFO.RWBH = MES_PD_SCRW_LIST.RWBH; model.MES_TM_TMINFO.PC = MES_PD_SCRW_LIST.PC; model.MES_TM_TMINFO.JLR = Convert.ToInt32(getUserInfo("staffid")); model.MES_TM_TMINFO.GC = MES_PD_SCRW_LIST.GC; model.MES_TM_TMINFO.SL = MES_PD_SCRW_LIST.SL; model.MES_TM_TMINFO.TPM = Tpm; model.MES_TM_TMINFO.TMCOUNT = 1; model.MES_TM_TMINFO.MAC = DeviceInfo.GetNetCardMAC().Substring(0, 17); //model.MES_TM_TMINFO.TMSX = Print_Type. IList <MES_TM_GL> nodes = new List <MES_TM_GL>(); for (int i = 0; i < Tmlist.Count; i++) { MES_TM_GL node = new MES_TM_GL(); node.XCTM = Tmlist[i].Tm; node.XCTMGC = Tmlist[i].Gc; nodes.Add(node); } model.MES_TM_GL = nodes.ToArray(); Sonluk.UI.Model.MES.TM_TMINFOService.MES_TM_TMINFO_INSERT_RETURN res = ServicModel.TM_TMINFO.INSERT(model, 0, getToken()); if (res.MES_RETURN.TYPE.Equals("S")) { //ShowMeg("关联成功", 1500); ShowMeg(q(Msg_Type.msgglsuccess), 1500); //if (MessageBox.Show("关联成功", "消息框", MessageBoxButtons.OK) == DialogResult.OK) //{ string printToHome = ini.IniReadValue(ini.Section_Configuration, "printTohome"); if (printToHome.Equals("true")) { zybutton.PerformClick(); } IsTMP = false; BomList = new ZBCFUN_GDJGXX_READ(); List <BomDataGrid> list = new List <BomDataGrid>(); BOMdataGridView.DataSource = list; BomList = null; Tmlist = new List <TMDataGrid>(); LSdataGridView.DataSource = Tmlist.ToList(); LSdataGridView.ClearSelection(); LSdataGridView.Columns[q(Msg_Type.fielddelete)].DisplayIndex = 4; MES_PD_SCRW_LIST = new MES_PD_SCRW_LIST(); MESlabel.Text = q(Msg_Type.titlemesgd) + MES_PD_SCRW_LIST.GDDH; GDHlabel.Text = q(Msg_Type.titlegd) + MES_PD_SCRW_LIST.ERPNO; WLXXlabel.Text = q(Msg_Type.titlewlxx); WLLBlabel1.Text = q(Msg_Type.titlewllb) + MES_PD_SCRW_LIST.WLLBNAME; rwdlabel.Text = q(Msg_Type.titlerwd) + MES_PD_SCRW_LIST.RWBH; tpmlabel.Text = q(Msg_Type.titletpm);//"托盘码:"; Tpm = SMtextBox.Text.Trim(); //dcdjlabel.Text = "电池等级:" + list.DCDJNAME; //dcxhlabel1.Text = "电池型号:" + list.DCXHNAME; if (!string.IsNullOrEmpty(MES_PD_SCRW_LIST.XSNOBILL) && !string.IsNullOrEmpty(MES_PD_SCRW_LIST.XSNOBILLMX)) { tskclabel1.Text = q(Msg_Type.titletskc) + MES_PD_SCRW_LIST.XSNOBILL + "-" + MES_PD_SCRW_LIST.XSNOBILLMX; } else { tskclabel1.Text = q(Msg_Type.titletskc); } //} } else { ShowMeg(res.MES_RETURN.MESSAGE); } } SMtextBox.Select(); }
public frmBaozhuang(MES_PD_SCRW_LIST list, string shebeihaoID, Rigth_Type rtype, string sbh) { InitializeComponent(); Init(list, shebeihaoID, rtype, sbh); }
public void RWDSCAN(MES_PD_SCRW_LIST rw, int rigthID, string gc, string gzzx, int wllb, Form form1, string tmText) { form1.Close(); form1.Hide(); if (string.IsNullOrEmpty(gc)) { bool isValid = true; if (rigthID == 0) { isValid = false; } else { RigthType = (Rigth_Type)rigthID; if (RigthType == Rigth_Type.fujitl) { //frmFujiTL fjtlform = new frmFujiTL(Smodel.MES_PD_SCRW_LIST, sbList[0].SBMS, sbList[0].SBBH); //push(fjtlform); } else if (RigthType == Rigth_Type.gangketl_cc || RigthType == Rigth_Type.jidiantitl_cc || RigthType == Rigth_Type.mfqqingxi || RigthType == Rigth_Type.gmgtl_cc || RigthType == Rigth_Type.fujifengkoujitl_cc || RigthType == Rigth_Type.zhengjifengkoujitl_cc) { //frmTL2 form = new frmTL2(Smodel.MES_PD_SCRW_LIST[0], model.SBBH, RigthType); //push(form); frmTL2_1 form = new frmTL2_1(rw, rw.SBBH, RigthType); push(form, this); } else if (RigthType == Rigth_Type.ddjtl_cc) { frmTL2_2 form = new frmTL2_2(rw, rw.SBBH, RigthType); push(form, this); } else if (RigthType == Rigth_Type.zhuxiancc) { frmZX_CC form = new frmZX_CC(rw, rw.SBBH, RigthType); push(form, this); } else if (RigthType == Rigth_Type.baobiaocc || RigthType == Rigth_Type.dczztl_cc) { //frmBaobiao form = new frmBaobiao(rw, rw.SBBH, RigthType, rw.SBH,tmText); frmBaobiao form = new frmBaobiao(rw, rw.SBBH, RigthType, rw.SBH); push(form, this); } else if (RigthType == Rigth_Type.baozhuangcc) { frmBaozhuang form = new frmBaozhuang(new MES_PD_SCRW_LIST(), rw.SBBH, RigthType, rw.SBH); push(form, this); } else if (RigthType == Rigth_Type.zhuxiantl || RigthType == Rigth_Type.zhujizhengjitl) { frmZX_TL form = new frmZX_TL(rw, rw.SBBH, RigthType);; push(form, this); } } if (isValid) { } else { ShowMeg(q(Msg_Type.rwdexcept));//"获取任务单信息异常,请联系管理员" } } else { //扫描工单string gc,string gzzx,int wllb MES_SY_GZZX_SBH model = new MES_SY_GZZX_SBH(); model.GZZXBH = gzzx; model.GC = gc; model.WLLB = wllb; MES_SY_GZZX_SBH[] list = ServicModel.SY_GZZX_SBH.SELECT(model, getToken()); if (rigthID != 0) { RigthType = (Rigth_Type)rigthID; if (list.Length != 0) { frmFindSBH form = new frmFindSBH(list, gzzx, RigthType, tmText); push(form, this); } else { ShowMeg(gzzx + q(Msg_Type.sbhempty));//对应的设备号为空 } } else { ShowMeg(q(Msg_Type.rolegdexcept));//工单对应的权限异常,请联系管理员 } } }
public void RefreshRW(MES_PD_SCRW_LIST list, string shebeihaoID) { this._MES_PD_SCRW_LIST = list; Tmlist = new List <TMDataGrid>(); MES_TM_CZR rymodel = new MES_TM_CZR(); rymodel.GC = list.GC; rymodel.RWBH = list.RWBH; rymodel.CZLB = 1; _czrList = ServicModel.TM_CZR.SELECT_CZR_NOW(rymodel, getToken()); _bomList = ServicModel.PD_GD.SAP_GET_GDJGXX(list.RWBH, dateTimePicker1.Text.Trim(), list.GC, getToken()); unRequireArr = new List <int>(); MES_SY_TYPEMX bcmodel = new MES_SY_TYPEMX(); bcmodel.GC = Convert.ToString(getGC("value")); bcmodel.TYPEID = 5; List <MES_SY_TYPEMXLIST> bcArr = new List <MES_SY_TYPEMXLIST>(); MES_SY_TYPEMXLIST[] bclist = ServicModel.SY_TYPEMX.SELECT(bcmodel, getToken()); gzzxtextBox.Text = list.GZZXBH + "-" + list.GZZXNAME; czrytextBox.Text = _czrList.CZR; gctextBox.Text = list.GC; sbhtextBox.Text = list.SBH; pctextBox.Text = list.PC; MES_SY_TYPEMXLIST bcmodel1 = new MES_SY_TYPEMXLIST(); bcmodel1.ID = 0; bcmodel1.MXNAME = "==请选择=="; bcArr = bclist.ToList(); bcArr.Insert(0, bcmodel1); bccomboBox.DisplayMember = "MXNAME"; bccomboBox.ValueMember = "ID"; bccomboBox.DataSource = bcArr; bccomboBox.SelectedValue = list.BC; MESlabel.Text = "MES工单:" + list.GDDH; GDHlabel.Text = "工单号:" + list.ERPNO; WLXXlabel.Text = "物料信息:" + list.WLH + "/" + list.WLMS; WLLBlabel1.Text = "物料类别:" + list.WLLBNAME; rwdlabel.Text = "任务单:" + list.RWBH; BOMdataGridView.DataSource = getBomList(_bomList); //scrqtextBox.Text = DateTime.Now.ToString("yyyy-MM-dd"); LSdataGridView.ReadOnly = true; BOMdataGridView.Columns["状态"].DefaultCellStyle.BackColor = Color.Red; for (int i = 0; i < unRequireArr.Count; i++) { BOMdataGridView.Rows[unRequireArr[i]].Cells["状态"].Style.BackColor = Color.White; } SELECT_MES_TM_TMINFO_BYTM r = ServicModel.TM_TMINFO.SELECT_TL_LAST(MES_PD_SCRW_LIST.RWBH, getToken()); if (r.MES_RETURN.TYPE.Equals("S")) { getTMList(r, 0); } else { Tmlist = new List <TMDataGrid>(); LSdataGridView.DataSource = new List <TMDataGrid>(); LSdataGridView.ClearSelection(); LSdataGridView.Columns["删除"].DisplayIndex = 4; } if (RigthType == Rigth_Type.mfqqingxi) { GDHlabel.Visible = false; WLXXlabel.Location = GDHlabel.Location; } }
public frmZXprint(MES_PD_SCRW_LIST list, string scrq) { InitializeComponent(); IsLR61scx = false; MES_SY_MATERIAL mmRequest = new MES_SY_MATERIAL(); mmRequest.WLH = list.WLH; if (list.WLGROUP != null) { IsLR61scx = list.WLGROUP.Equals(ZZWLGROUP) ? true : false; } if (!IsLR61scx) { sdxtlabel17.Visible = false; sdxtcombobox.Visible = false; dyzslabel7.Location = pclabel6.Location; fsnumericUpDown.Location = pctextBox.Location; pclabel6.Location = sdxtlabel17.Location; pctextBox.Location = sdxtcombobox.Location; } mbsltextBox.Text = list.BZCOUNT == 0 ? "" : Convert.ToString(list.BZCOUNT); pctextBox.Text = list.PC; cpztcomboBox.DataSource = GetDictionaryMX(9).ToList(); cpztcomboBox.DisplayMember = "MXNAME"; cpztcomboBox.ValueMember = "ID"; MES_PD_SCRW_LIST = list; zhtextBox.Text = list.TH.ToString(); scrqtextBox.Text = scrq; bstextBox.Text = list.BZBS == 0?"":list.BZBS.ToString(); wlxxtextBox.Text = list.WLH + "/" + list.WLMS; dcxhtextBox.Text = list.DCXHNAME; dcdjtextBox.Text = list.DCDJNAME; hjsltextBox.Text = list.BZCOUNT * list.BZBS == 0 ? "" : (list.BZCOUNT * list.BZBS).ToString(); MES_PD_SCRW_CCTH res = ServicModel.PD_SCRW.SELECT_ZXCCINFO(list.RWBH, 0, getToken()); if (res.MES_RETURN.TYPE.Equals("S")) { zhtextBox.Text = res.TH.ToString(); kssjdateTimePicker.Text = Convert.ToDateTime(res.KSTIME).ToString("yyyy-MM-dd HH:mm:ss"); jssjdateTimePicker.Text = Convert.ToDateTime(res.JSTIME).ToString("yyyy-MM-dd HH:mm:ss"); //kssjtextBox.Text = res.KSTIME; //jssjtextBox.Text = res.JSTIME; } else { ShowMeg(res.MES_RETURN.MESSAGE); } List <MES_SY_TYPEMXLIST> zfsdlist = GetDictionaryMX(17).ToList(); MES_SY_TYPEMXLIST zfsdnode = new MES_SY_TYPEMXLIST(); zfsdnode.ID = 0; zfsdnode.MXNAME = q(Msg_Type.titlechoice);//"==请选择=="; zfsdlist.Insert(0, zfsdnode); zflbcomboBox.DataSource = zfsdlist; zflbcomboBox.DisplayMember = "MXNAME"; zflbcomboBox.ValueMember = "ID"; List <MES_SY_TYPEMXLIST> sdxtlist = GetDictionaryMX(22).ToList(); MES_SY_TYPEMXLIST sdxtnode = new MES_SY_TYPEMXLIST(); sdxtnode.ID = 0; sdxtnode.MXNAME = q(Msg_Type.titlechoice);//"==请选择=="; sdxtlist.Insert(0, sdxtnode); sdxtcombobox.DataSource = sdxtlist; sdxtcombobox.DisplayMember = "MXNAME"; sdxtcombobox.ValueMember = "ID"; if (list.GC == BranchGC) { bzrichTextBox.Text = "\n\n" + ZXVerifyStr + ""; } }
public void RefreshRW(MES_PD_SCRW_LIST list, string shebeihaoID) { MES_PD_SCRW_LIST = list; //monthCalendar1.Visible = false; configUI(MES_PD_SCRW_LIST); }
public frmBaobiao(MES_PD_SCRW_LIST list, string shebeihaoID, Rigth_Type rtype, string sbh, string gd) { InitializeComponent(); Init(list, shebeihaoID, rtype, sbh); getGDinfo(gd); }
public frmTL2(MES_PD_SCRW_LIST list, string shebeihaoID, Rigth_Type rtype) { InitializeComponent(); this.Text = GetFormName(rtype); if (rtype != Rigth_Type.gangketl_cc) { dyrkbutton.Visible = false; } bingLSdatagridView(); bindBomView(); RigthType = rtype; SMtextBox.Select(); SBHID = shebeihaoID; Tmlist = new List <TMDataGrid>(); this._MES_PD_SCRW_LIST = list; MES_TM_CZR rymodel = new MES_TM_CZR(); rymodel.GC = list.GC; rymodel.RWBH = list.RWBH; rymodel.CZLB = 1; _czrList = ServicModel.TM_CZR.SELECT_CZR_NOW(rymodel, getToken()); _bomList = ServicModel.PD_GD.SAP_GET_GDJGXX(list.RWBH, dateTimePicker1.Text.Trim(), list.GC, getToken()); unRequireArr = new List <int>(); MES_SY_TYPEMX bcmodel = new MES_SY_TYPEMX(); bcmodel.GC = Convert.ToString(getGC("value")); bcmodel.TYPEID = 5; List <MES_SY_TYPEMXLIST> bcArr = new List <MES_SY_TYPEMXLIST>(); MES_SY_TYPEMXLIST[] bclist = ServicModel.SY_TYPEMX.SELECT(bcmodel, getToken()); gzzxtextBox.Text = list.GZZXBH + "-" + list.GZZXNAME; czrytextBox.Text = _czrList.CZR; gctextBox.Text = list.GC; sbhtextBox.Text = list.SBH; pctextBox.Text = list.PC; MES_SY_TYPEMXLIST bcmodel1 = new MES_SY_TYPEMXLIST(); bcmodel1.ID = 0; bcmodel1.MXNAME = "==请选择=="; bcArr = bclist.ToList(); bcArr.Insert(0, bcmodel1); bccomboBox.DisplayMember = "MXNAME"; bccomboBox.ValueMember = "ID"; bccomboBox.DataSource = bcArr; bccomboBox.SelectedValue = list.BC; MESlabel.Text = "MES工单:" + list.GDDH; GDHlabel.Text = "工单号:" + list.ERPNO; WLXXlabel.Text = "物料信息:" + list.WLH + "/" + list.WLMS; WLLBlabel1.Text = "物料类别:" + list.WLLBNAME; rwdlabel.Text = "任务单:" + list.RWBH; BOMdataGridView.DataSource = getBomList(_bomList); //scrqtextBox.Text = DateTime.Now.ToString("yyyy-MM-dd"); LSdataGridView.ReadOnly = true; if (RigthType == Rigth_Type.mfqqingxi) { GDHlabel.Visible = false; WLXXlabel.Location = GDHlabel.Location; } }