private List <BomDataGrid> getBomList(ZBCFUN_GDJGXX_READ model) { BOMdataGridView.DataSource = new List <BomDataGrid>(); List <BomDataGrid> list = new List <BomDataGrid>(); if (model.ET_BOM == null || model.ET_BOM.Length == 0) { ShowMeg(q(Msg_Type.msgrwunexistbom));//"任务对应BOM为空,请联系管理员" SMtextBox.Select(); return(new List <BomDataGrid>()); } for (int i = 0; i < model.ET_BOM.Length; i++) { BomDataGrid node = new BomDataGrid(); node.Xh = model.ET_BOM[i].POSNR; if (!string.IsNullOrEmpty(model.ET_BOM[i].IDNRK)) { node.Wlxx = model.ET_BOM[i].IDNRK + "/" + model.ET_BOM[i].MAKTX; } else { node.Wlxx = ""; } node.Wllb = model.ET_BOM[i].WLLBNAME; node.Wllbdm = model.ET_BOM[i].WLLB; if (!model.ET_BOM[i].ZSBS.Equals("Y")) { unRequireArr.Add(i); } list.Add(node); } return(list.ToList()); }
public void getReportInfoByTm() { MES_PD_TL model = new MES_PD_TL(); model.RWBH = Rwlist[Index].RWBH; model.TM = SMtextBox.Text.Trim().ToUpper(); model.JLR = Convert.ToInt32(getUserInfo("staffid")); MES_RETURN_UI res = ServicModel.PD_SCRW.FJTL_VERIFY(model, getToken()); if (res.TYPE.Equals("S")) { //foreach (Control contrl in panel1.Controls) //{ // if (contrl is TextBox) // { // contrl.BackColor = Color.FromArgb(187, 255, 102); // } //} qrtlbutton.Enabled = true; string datetime = ServicModel.PUBLIC_FUNC.GET_TIME(getToken()); tlsjtextBox.Text = Convert.ToDateTime(datetime).ToString("yyyy-MM-dd HH:mm"); tlsjtextBox.BackColor = Color.FromArgb(187, 255, 102); //MessageBox.Show("投料成功", "消息框"); ShowMeg("投料成功", 1500); } else { ShowMeg(res.MESSAGE); } SMtextBox.Clear(); SMtextBox.Select(); }
private void rzbutton_Click(object sender, EventArgs e) { frmLotLog form = new frmLotLog(RigthType, MES_PD_SCRW_LIST.SBBH, MES_PD_SCRW_LIST.RWBH, MES_PD_SCRW_LIST.WLLB); show(form); SMtextBox.Select(); }
private void getRwAndJLinfoByTm() { MES_PD_SCRW_SELECT_BY_TM model = new MES_PD_SCRW_SELECT_BY_TM(); model.SBBH = SBHID; model.TM = SMtextBox.Text.Trim().ToUpper(); model.ZPRQ = Convert.ToDateTime(ServicModel.PUBLIC_FUNC.GET_TIME(getToken())).AddHours(-4).ToString("yyyy-MM-dd"); SELECT_MES_PD_SCRW res = ServicModel.PD_SCRW.SELECT_BY_TM(model, getToken()); if (res.MES_RETURN.TYPE.Equals("S")) { if (res.MES_PD_SCRW_LIST.Length == 1) { RefreshRW(res.MES_PD_SCRW_LIST[0], SBHID); SMtextBox.Text = model.TM; getReportInfoByTm(); //BOMdataGridView.ClearSelection(); } else if (res.MES_PD_SCRW_LIST.Length > 1) { SMtextBox.Clear(); frmChange_GD form = new frmChange_GD(res.MES_PD_SCRW_LIST, model.SBBH, RigthType); form.block = RefreshRW; show(form); //for (int i = 0; i < BOMdataGridView.Rows.Count; i++) //{ // BOMdataGridView.Rows[i].Cells["状态"].Style.BackColor = Color.Red; //} //BOMdataGridView.ClearSelection(); //Tmlist = new List<TMDataGrid>(); //LSdataGridView.DataSource = Tmlist; //LSdataGridView.Columns["删除"].DisplayIndex = 4; //SMtextBox.Select(); SMtextBox.Text = model.TM; getReportInfoByTm(); } else if (res.MES_PD_SCRW_LIST.Length == 0) { //ShowMeg("找不到条码" + SMtextBox.Text.Trim() + "对应的任务信息"); ShowMeg(string.Format(q(Msg_Type.msgtmnorw), SMtextBox.Text.Trim())); } else { //ShowMeg("数据异常,请联系管理员"); ShowMeg(q(Msg_Type.msgtmexcept)); } SMtextBox.Select(); } else { ShowMeg(res.MES_RETURN.MESSAGE); BomList = new ZBCFUN_GDJGXX_READ(); BOMdataGridView.DataSource = new List <BomDataGrid>(); SMtextBox.Clear(); SMtextBox.Select(); } }
public void getCzrInfo() { MES_TM_CZR model = new MES_TM_CZR(); model.GC = _MES_PD_SCRW_LIST.GC; model.RWBH = _MES_PD_SCRW_LIST.RWBH; model.CZLB = 1; model.CZRGH = SMtextBox.Text.Trim(); model.GWID = 0; MES_RETURN_UI res = AddCzr(model); if (res.TYPE.Equals("S")) { _czrList = SelectCZR(model); czrytextBox.Text = _czrList.CZR; } else { //MessageBox.Show(res.MESSAGE, "消息框"); ShowMeg(res.MESSAGE); } SMtextBox.Clear(); SMtextBox.Select(); }
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); } }
private void button1_Click(object sender, EventArgs e) { frmZX_TL form = new frmZX_TL(MES_PD_SCRW_LIST, MES_PD_SCRW_LIST.SBBH, Rigth_Type.zhujizhengjitl);; push(form, this); SMtextBox.Select(); }
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); } }
private void rwqhbutton_Click(object sender, EventArgs e) { //if (string.IsNullOrEmpty(scrqtextBox.Text.Trim())) //{ // ShowMeg("生产日期不能为空"); // return; //} //if (judge.IsDate(scrqtextBox.Text.Trim()) == false) //{ // ShowMeg("生产日期格式不正确"); // return; //} MES_PD_SCRW model = new MES_PD_SCRW(); model.SBBH = _MES_PD_SCRW_LIST.SBBH; model.ZPRQ = dateTimePicker1.Text.Trim(); SELECT_MES_PD_SCRW Smodel = ServicModel.PD_SCRW.SELECT(model, getToken()); if (Smodel.MES_PD_SCRW_LIST.Length == 1) { //MessageBox.Show(_MES_PD_SCRW_LIST.SBH + "的当天任务派单只有一个", "消息框"); ShowMeg(string.Format(q(Msg_Type.msgrwonlyone), _MES_PD_SCRW_LIST.SBH)); SMtextBox.Select(); return; } else { frmChange_GD form = new frmChange_GD(Smodel.MES_PD_SCRW_LIST, model.SBBH, RigthType); form.block = RefreshRW; show(form); //show(form); } SMtextBox.Select(); }
private void dyrkbutton_Click(object sender, EventArgs e) { 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 (Convert.ToInt32(bccomboBox.SelectedValue) == 190) //{ // 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.SL = MES_PD_SCRW_LIST.BZCOUNT; model.MES_TM_TMINFO.MINVALUE = MES_PD_SCRW_LIST.MINVALUE; model.MES_TM_TMINFO.MAXVALUE = MES_PD_SCRW_LIST.MAXVALUE; 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(); frmPrint_N form = new frmPrint_N(model, Print_Type.rk, RigthType); show(form); string printToHome = ini.IniReadValue(ini.Section_Configuration, "printTohome"); if (printToHome.Equals("true")) { zybutton.PerformClick(); } //this.Close(); SMtextBox.Select(); }
public void getCzrInfo() { MES_TM_CZR model = new MES_TM_CZR(); model.SBBH = Rwlist[Index].SBBH; model.GC = Rwlist[Index].GC; model.CZLB = 2; model.CZRGH = SMtextBox.Text.Trim(); model.GWID = 0; MES_RETURN_UI res = AddCzr(model); if (res.TYPE.Equals("S")) { Crzlist = SelectCZR(model); czrtextBox.Text = Crzlist.CZR; //czrytextBox.Text = _czrList.CZR; } else { //MessageBox.Show(res.MESSAGE, "消息框"); ShowMeg(res.MESSAGE); } SMtextBox.Clear(); SMtextBox.Select(); }
public void ScanTM() { TM_Type type = TMtype(SMtextBox.Text.Trim()); switch (type) { case TM_Type.none: //MessageBox.Show("你扫描的是无效的条码!!", "消息框"); ShowMeg(q(Msg_Type.msgscantminvalid)); break; case TM_Type.staffno: getCzrInfo(); break; case TM_Type.gd: //MessageBox.Show("你扫描的是无效的条码!!", "消息框"); ShowMeg(q(Msg_Type.msgscantminvalid)); break; case TM_Type.ph: //MessageBox.Show("你扫描的是无效的条码!!", "消息框"); ShowMeg(q(Msg_Type.msgscantminvalid)); break; default: //MessageBox.Show("你扫描的是无效的条码!!", "消息框"); ShowMeg(q(Msg_Type.msgscantminvalid)); break; } SMtextBox.Clear(); SMtextBox.Select(); }
private void qhgdbutton_Click(object sender, EventArgs e) { MES_PD_SCRW model = new MES_PD_SCRW(); model.SBBH = _MES_PD_SCRW_LIST.SBBH; SELECT_MES_PD_SCRW Smodel = ServicModel.PD_SCRW.SELECT(model, getToken()); //if (Smodel.MES_PD_SCRW_LIST.Length <= 1) //{ // MessageBox.Show(_MES_PD_SCRW_LIST.SBH + "没有可切换的任务", "消息框"); // return; //} //else //{ if (Smodel.MES_RETURN.TYPE.Equals("S")) { frmChange_GD form = new frmChange_GD(Smodel.MES_PD_SCRW_LIST, model.SBBH, RigthType); form.block = RefreshRW; show(form); } else { ShowMeg(Smodel.MES_RETURN.MESSAGE); } SMtextBox.Select(); //} }
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(); } }
private void ryglbutton_Click(object sender, EventArgs e) { if (!IsGD) { ShowMeg(q(Msg_Type.msgscangd)); } else { if (string.IsNullOrEmpty(MES_PD_SCRW_LIST.GDDH)) { ShowMeg(q(Msg_Type.msgscangdforczr)); return; } frmManagerRY fomr = new frmManagerRY(_czrList, MES_PD_SCRW_LIST, 1); //push(fomr); show(fomr); MES_TM_CZR rymodel = new MES_TM_CZR(); rymodel.GC = this._MES_PD_SCRW_LIST.GC; rymodel.RWBH = this._MES_PD_SCRW_LIST.RWBH; rymodel.CZLB = 1; _czrList = ServicModel.TM_CZR.SELECT_CZR_NOW(rymodel, getToken()); czrytextBox.Text = _czrList.CZR; SMtextBox.Select(); } }
public void getReportInfoByTm() { //if (IsTMP) //{ MES_TM_TMINFO model = new MES_TM_TMINFO(); model.GC = this._MES_PD_SCRW_LIST.GC; model.TM = SMtextBox.Text.Trim().ToUpper(); model.RWBH = this._MES_PD_SCRW_LIST.RWBH; model.JLR = Convert.ToInt32(getUserInfo("staffid")); SELECT_MES_TM_TMINFO_BYTM res = ReadphTM(model, 1); if (res.MES_RETURN.TYPE.Equals("S")) { getTMList(res); } else { //MessageBox.Show(SMtextBox.Text + res.MES_RETURN.MESSAGE, "消息框"); ShowMeg(SMtextBox.Text + res.MES_RETURN.MESSAGE); } //} //else //{ // ShowMeg("请先扫描托盘码"); //} SMtextBox.Clear(); SMtextBox.Select(); }
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 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(); }
public void getReportInfoByTm() { bool isY = false; for (int i = 0; i < BindList.Count; i++) { if (SMtextBox.Text.Trim().ToUpper() == BindList[i].TM) { isY = true; } } if (isY) { ShowMeg(string.Format(q(Msg_Type.msgtmcf), SMtextBox.Text.Trim()));// SMtextBox.Clear(); SMtextBox.Select(); return; } MES_WLKCBS_GETWLZJ_IN model = new MES_WLKCBS_GETWLZJ_IN(); model.MBLNR = ZSL_BCS303_BS.MBLNR; model.XCBS = ZSL_BCS303_BS.XCBS; model.MJAHR = ZSL_BCS303_BS.MJAHR; model.LINE_ID = ZSL_BCS303_BS.LINE_ID; model.LIFNR = ZSL_BCS303_BS.LIFNR; model.TM = SMtextBox.Text.Trim().ToUpper(); SELECT_MES_TM_TMINFO_BYTM res = ServicModel.TM_TMINFO.SELECT_WLKCBS(model, getToken()); if (res.MES_RETURN.TYPE.Equals("S")) { for (int i = 0; i < res.MES_TM_TMINFO_LIST.Length; i++) { BindList.Add(res.MES_TM_TMINFO_LIST[i]); } for (int i = 0; i < BindList.Count; i++) { BindList[i].XH = i + 1; BindList[i].WLMS = BindList[i].WLH + "/" + BindList[i].WLMS; } dataGridView2.DataSource = new List <MES_TM_TMINFO_LIST>(); dataGridView2.DataSource = BindList; dataGridView2.ClearSelection(); Verify(); } else { ShowMeg(res.MES_RETURN.MESSAGE); } SMtextBox.Clear(); SMtextBox.Select(); }
public void ConfigData(MES_PD_SCRW_LIST[] model, string sbh) { Finish = new List <int>(); Sbh = sbh; SBlabel4.Text = sbh; //sbhtextBox.Text = sbh; JhList = new List <GridVrid>(); //scrqtextBox.Text = DateTime.Now.ToString("yyyy-MM-dd"); Rwlist = model; //monthCalendar1.BringToFront(); //monthCalendar1.Visible = false; Rwlist = model; int lenght = 0; for (int i = 0; i < model.Length; i++) { if (model[i].ISACTION == 0) { Index = i; break; } else { lenght++; } } if (lenght == model.Length && Index == 0) { SMtextBox.ReadOnly = true; } else { SMtextBox.Select(); SetCurrentTL(model[Index]); SMtextBox.ReadOnly = false; } qrtlbutton.Enabled = false; gzzxtextBox.Text = model[Index].GZZXBH + "-" + model[Index].GZZXNAME; gctextBox.Text = model[Index].GC; configDatagrid(); //MES_TM_CZR czr_model = new MES_TM_CZR(); //czr_model.SBBH = Rwlist[Index].SBBH; //czr_model.GC = Rwlist[Index].GC; //czr_model.CZLB = 2; //Crzlist = SelectCZR(czr_model); //czrtextBox.Text = Crzlist.CZR; }
private void qhgdbutton_Click(object sender, EventArgs e) { //if (string.IsNullOrEmpty(scrqtextBox.Text.Trim())) //{ // ShowMeg("生产日期不能为空"); // return; //} //if (judge.IsDate(scrqtextBox.Text.Trim()) == false) //{ // ShowMeg("生产日期格式不正确"); // return; //} string tm = SMtextBox.Text.Trim().ToUpper(); MES_PD_SCRW model = new MES_PD_SCRW(); model.SBBH = _MES_PD_SCRW_LIST.SBBH; model.ZPRQ = dateTimePicker1.Text.Trim(); SELECT_MES_PD_SCRW Smodel = ServicModel.PD_SCRW.SELECT(model, getToken()); if (Smodel.MES_PD_SCRW_LIST.Length <= 1) { //MessageBox.Show(_MES_PD_SCRW_LIST.SBH + "没有可切换的任务", "消息框"); ShowMeg(_MES_PD_SCRW_LIST.SBH + q(Msg_Type.msgnoreplacerw)); return; } else { frmChange_GD form = new frmChange_GD(Smodel.MES_PD_SCRW_LIST, model.SBBH, RigthType); form.block = RefreshRW; show(form); //show(form); } //SMtextBox.Select(); 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["状态"].Style.BackColor = Color.White; // } //} } BOMdataGridView.ClearSelection(); //BOMdataGridView.Columns["状态"].DefaultCellStyle.BackColor = Color.Red; Tmlist = new List <TMDataGrid>(); LSdataGridView.DataSource = Tmlist; LSdataGridView.Columns[q(Msg_Type.fielddelete)].DisplayIndex = 4;//"删除" SMtextBox.Select(); }
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 void ConfigData(MES_PD_SCRW_LIST[] model) { Finish = new List <int>(); JhList = new List <GridVrid>(); Rwlist = model; Rwlist = model; int lenght = 0; for (int i = 0; i < model.Length; i++) { if (model[i].ISACTION == 0) { Index = i; break; } else { lenght++; } } if (lenght == model.Length && Index == 0) { SMtextBox.ReadOnly = true; } else { SMtextBox.Select(); SetCurrentTL(model[Index]); SMtextBox.ReadOnly = false; } qrtlbutton.Enabled = false; gzzxtextBox.Text = model[Index].GZZXBH + "-" + model[Index].GZZXNAME; gctextBox.Text = model[Index].GC; tlsjtextBox.Clear(); //configDatagrid(); if (radioButton1.Checked) { ShowList(radioType.all); } else if (radioButton2.Checked) { ShowList(radioType.unfinish); } else if (radioButton3.Checked) { ShowList(radioType.finish); } }
private void ryglbutton_Click(object sender, EventArgs e) { frmManagerRY fomr = new frmManagerRY(Crzlist, Rwlist[Index], 2); //push(fomr); show(fomr); MES_TM_CZR czr_model = new MES_TM_CZR(); czr_model.SBBH = Rwlist[Index].SBBH; czr_model.GC = Rwlist[Index].GC; czr_model.CZLB = 2; Crzlist = SelectCZR(czr_model); czrtextBox.Text = Crzlist.CZR; SMtextBox.Select(); }
public void ScanTM() { TM_Type type = TMtype(SMtextBox.Text.Trim()); if (type != TM_Type.tpm) { if (!IsTMP) { ShowMeg(q(Msg_Type.msgscantpm)); SMtextBox.Clear(); SMtextBox.Select(); return; } } switch (type) { case TM_Type.none: //MessageBox.Show("你扫描的是无效的条码!!", "消息框"); ShowMeg(q(Msg_Type.msgscantminvalid)); break; case TM_Type.staffno: getCzrInfo(); break; case TM_Type.gd: //MessageBox.Show("你扫描的是无效的条码!!", "消息框"); ShowMeg(q(Msg_Type.msgscantminvalid)); //getGDinfo(); break; case TM_Type.ph: getReportInfoByTm(); break; case TM_Type.tpm: getTPMinfo(SMtextBox.Text.Trim().ToUpper()); break; default: //MessageBox.Show("你扫描的是无效的条码!!", "消息框"); ShowMeg(q(Msg_Type.msgscantminvalid)); break; } SMtextBox.Clear(); SMtextBox.Select(); }
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; }
private void nextrwbutton_Click(object sender, EventArgs e) { MES_PD_SCRW model = new MES_PD_SCRW(); model.SBBH = SBHID; //model.ZPRQ = DateTime.Now.ToString("yyyy-MM-dd"); string currentDay = ServicModel.PUBLIC_FUNC.GET_TIME(getToken()); string ksDate = Convert.ToDateTime(currentDay).AddDays(1).ToString("yyyy-MM-dd"); string jsDate = Convert.ToDateTime(currentDay).AddDays(10).ToString("yyyy-MM-dd"); model.ZPRQKS = ksDate; model.ZPRQJS = jsDate; SELECT_MES_PD_SCRW res = ServicModel.PD_SCRW.SELECT(model, getToken()); if (res.MES_RETURN.TYPE.Equals("S")) { MES_PD_SCRW_LIST[] rwlist = res.MES_PD_SCRW_LIST; //(from o in nodes_right orderby o.RGROUPID, o.RIGHTNO select o).ToList(); List <MES_PD_SCRW_LIST> nodes = (from o in rwlist.ToList() orderby o.ZPRQ select o).ToList(); if (nodes.Count > 0) { string neardate = nodes[0].ZPRQ; List <MES_PD_SCRW_LIST> requirelist = new List <MES_PD_SCRW_LIST>(); for (int i = 0; i < nodes.Count; i++) { if (nodes[i].ZPRQ.Equals(neardate)) { requirelist.Add(nodes[i]); } } frmNearDateRW form = new frmNearDateRW(requirelist.ToArray()); show(form); } else { ShowMeg(q(Msg_Type.msgzsnorw));//"暂时没有任务指派" } } else { ShowMeg(q(Msg_Type.msgzsnorw));//"暂时没有任务指派" } SMtextBox.Select(); }
public void IShidden(bool isHid) { if (isHid) { groupBox2.Size = new Size(groupBox2.Width, groupBox2.Height - 192); groupBox3.Size = new Size(groupBox3.Width, groupBox3.Height + 192); groupBox3.Location = new Point(groupBox3.Location.X, groupBox3.Location.Y - 192); button3.Text = q(Msg_Type.fieldhidden);//"隐藏"; } else { groupBox2.Size = new Size(groupBox2.Width, groupBox2.Height + 192); groupBox3.Size = new Size(groupBox3.Width, groupBox3.Height - 192); groupBox3.Location = new Point(groupBox3.Location.X, groupBox3.Location.Y + 192); button3.Text = q(Msg_Type.fieldshown);//"显示"; } SMtextBox.Select(); }
public void ScanTM() { TM_Type type = TMtype(SMtextBox.Text.Trim()); switch (type) { case TM_Type.none: //MessageBox.Show("你扫描的是无效的条码!!", "消息框"); ShowMeg(q(Msg_Type.msgscantminvalid)); break; case TM_Type.staffno: getCzrInfo(); break; case TM_Type.gd: //MessageBox.Show("你扫描的是无效的条码!!", "消息框"); ShowMeg(q(Msg_Type.msgscantminvalid)); break; case TM_Type.ph: { if (RigthType == Rigth_Type.mfqqingxi) { getRwAndJLinfoByTm(); } else { getReportInfoByTm(); } } break; case TM_Type.rwd: ChangeRW(); break; default: //MessageBox.Show("你扫描的是无效的条码!!", "消息框"); ShowMeg(q(Msg_Type.msgscantminvalid)); break; } SMtextBox.Select(); }
private void ryglbutton_Click(object sender, EventArgs e) { frmManagerRY fomr = new frmManagerRY(_czrList, MES_PD_SCRW_LIST, 1); //push(fomr); show(fomr); MES_TM_CZR rymodel = new MES_TM_CZR(); rymodel.GC = this._MES_PD_SCRW_LIST.GC; rymodel.RWBH = this._MES_PD_SCRW_LIST.RWBH; rymodel.CZLB = 1; _czrList = ServicModel.TM_CZR.SELECT_CZR_NOW(rymodel, getToken()); //MES_PD_SCRW model = new MES_PD_SCRW(); //model.SBHID = SBHID; czrytextbox.Text = _czrList.CZR; //SELECT_MES_PD_SCRW Smodel = ServicModel.PD_SCRW.SELECT(model, getToken()); SMtextBox.Select(); }