private void SMtextBox_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { MES_TM_CZR model = new MES_TM_CZR(); if (Czlb == 1) { model.RWBH = _MES_PD_SCRW_LIST.RWBH; model.CZLB = Czlb; } else if (Czlb == 2) { model.SBBH = _MES_PD_SCRW_LIST.SBBH; model.CZLB = Czlb; } model.GC = _MES_PD_SCRW_LIST.GC; model.CZRGH = SMtextBox.Text.Trim(); model.GWID = 0; MES_RETURN_UI res = AddCzr(model); if (res.TYPE.Equals("S")) { _czrList = ServicModel.TM_CZR.SELECT_CZR_NOW(model, getToken()); DatagridgetData(); } else { //MessageBox.Show(res.MESSAGE, "消息框"); ShowMeg(res.MESSAGE); } SMtextBox.Clear(); } }
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(); }
private void ComboBox_SelectedIndexChanged(object sender, EventArgs e) { int ID = Convert.ToInt16(this.RYdataGridView.CurrentRow.Cells[q(Msg_Type.fieldrydm)].Value);//"人员代码" ComboBox cb = (ComboBox)sender; object obj = cb.SelectedValue; MES_TM_CZR node = new MES_TM_CZR(); if (obj is TPYEMX) { TPYEMX m = (TPYEMX)obj; node.ID = ID; node.GWID = m.ID; } else { node.ID = ID; node.GWID = Convert.ToInt32(obj); } Sonluk.UI.Model.MES.TM_CZRService.MES_RETURN returns = ServicModel.TM_CZR.UPDATE_GW(node, getToken()); if (returns.TYPE.Equals("S")) { //MessageBox.Show("修改成功", "消息框"); ShowMeg(q(Msg_Type.msgxgcg)); } this.RYdataGridView.EndEdit(); }
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 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 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 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 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 string SET_CZR(string datastring) { TokenINFO rst_TokenINFO = GET_TokenINFO(); //string token = AppClass.GetSession("token").ToString(); MES_TM_CZR model_MES_TM_CZR = Newtonsoft.Json.JsonConvert.DeserializeObject <MES_TM_CZR>(datastring); MES_RETURN_UI model_MES_RETURN_UI = mesmodels.TM_CZR.INSERT(model_MES_TM_CZR, rst_TokenINFO.Token); return(Newtonsoft.Json.JsonConvert.SerializeObject(model_MES_RETURN_UI)); }
public MES_RETURN_UI INSERT(MES_TM_CZR model, string ptoken) { MES_RETURN mr = client.INSERT(model, ptoken); MES_RETURN_UI mrui = new MES_RETURN_UI(); mrui.TYPE = mr.TYPE; mrui.MESSAGE = mr.MESSAGE; return(mrui); }
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 GET_CZR_RWBH(string RWBH) { TokenINFO rst_TokenINFO = GET_TokenINFO(); //string token = AppClass.GetSession("token").ToString(); MES_TM_CZR model_MES_TM_CZR = new MES_TM_CZR(); model_MES_TM_CZR.RWBH = RWBH; model_MES_TM_CZR.CZLB = 1; MES_TM_CZR_SELECT_CZR_NOW rst_MES_TM_CZR_SELECT_CZR_NOW = mesmodels.TM_CZR.SELECT_CZR_NOW(model_MES_TM_CZR, rst_TokenINFO.Token); return(Newtonsoft.Json.JsonConvert.SerializeObject(rst_MES_TM_CZR_SELECT_CZR_NOW)); }
public void ConfigData(MES_PD_SCRW_LIST[] model, string sbh) { Finish = new List <int>(); Sbh = 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 frmZX_TL_Shown(object sender, EventArgs e) { MES_TM_CZR rymodel = new MES_TM_CZR(); rymodel.GC = MES_PD_SCRW_LIST.GC; rymodel.RWBH = MES_PD_SCRW_LIST.RWBH; rymodel.CZLB = 1; dateTimePicker1.Text = MES_PD_SCRW_LIST.ZPRQ; _czrList = ServicModel.TM_CZR.SELECT_CZR_NOW(rymodel, getToken()); _bomList = ServicModel.PD_GD.SAP_GET_GDJGXX(MES_PD_SCRW_LIST.RWBH, MES_PD_SCRW_LIST.ZPRQ, MES_PD_SCRW_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 = MES_PD_SCRW_LIST.GZZXBH + "-" + MES_PD_SCRW_LIST.GZZXNAME; gctextBox.Text = MES_PD_SCRW_LIST.GC; sbhtextBox.Text = MES_PD_SCRW_LIST.SBH; MESlabel.Text = q(Msg_Type.titlemesgd) + MES_PD_SCRW_LIST.GDDH; //"MES工单:" GDHlabel.Text = q(Msg_Type.titlegd) + MES_PD_SCRW_LIST.ERPNO; //"工单号:" WLXXlabel.Text = q(Msg_Type.titlewlxx) + MES_PD_SCRW_LIST.WLH + "/" + MES_PD_SCRW_LIST.WLMS; //"物料信息:" WLLBlabel1.Text = q(Msg_Type.titlewllb) + MES_PD_SCRW_LIST.WLLBNAME; //"物料类别:" dclabel.Text = q(Msg_Type.titledcdjandxh) + MES_PD_SCRW_LIST.DCXHNAME + "/" + MES_PD_SCRW_LIST.DCDJNAME; //"电池型号/等级:" rwdlabel.Text = q(Msg_Type.titlerwd) + MES_PD_SCRW_LIST.RWBH; //"任务单:" configBom(); 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; LastDate = dateTimePicker1.Text.Trim(); ConfigJsDataGridView(); LSdataGridView.ClearSelection(); BOMdataGridView.ClearSelection(); button3.Text = q(Msg_Type.fieldhidden);// "隐藏"; IShidden(true); }
private void czrtextBox_Click(object sender, EventArgs e) { frmManagerRY fomr = new frmManagerRY(Crzlist, MES_PD_SCRW_LIST, 2); //push(fomr); show(fomr); MES_TM_CZR czr_model = new MES_TM_CZR(); czr_model.SBBH = MES_PD_SCRW_LIST.SBBH; czr_model.GC = MES_PD_SCRW_LIST.GC; czr_model.CZLB = 2; Crzlist = SelectCZR(czr_model); czrtextBox.Text = Crzlist.CZR; }
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())); }
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()); }
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(); }
private void btn_Click(object sender, EventArgs e) { Button btn = (Button)sender; MES_TM_CZR node = new MES_TM_CZR(); node.ID = ryID; node.GWID = Convert.ToInt32(btn.Tag); Sonluk.UI.Model.MES.TM_CZRService.MES_RETURN returns = ServicModel.TM_CZR.UPDATE_GW(node, getToken()); if (returns.TYPE.Equals("S")) { if (MessageBox.Show(q(Msg_Type.msgxgcg), q(Msg_Type.msgtitle), MessageBoxButtons.OK) == DialogResult.OK) //"修改成功" { this.Close(); } } }
public void getCzrInfo() { if (!string.IsNullOrEmpty(_MES_PMM_MOULD.MID)) { MES_RETURN_UI res = ServicModel.PUBLIC_FUNC.GET_YGNAME(SMtextBox.Text.Trim().ToUpper(), getToken()); if (res.TYPE.Equals("S")) { MES_TM_CZR model = new MES_TM_CZR(); //model.GC = _MES_PMM_MOULD.GC; model.CZLB = 3; model.CZRGH = SMtextBox.Text.Trim().ToUpper(); model.CZRNAME = res.MESSAGE; model.SBBH = _MES_PMM_MOULD.SBBH; model.ISREPLACE = 1; MES_RETURN_UI addres = AddCzr(model); if (addres.TYPE == "S") { czrtextBox1.Text = res.MESSAGE; Gh = SMtextBox.Text.Trim().ToUpper(); } else { ShowMeg(addres.MESSAGE); } } else { ShowMeg(res.MESSAGE); } } else { ShowMeg("扫描操作人员前先扫描模具号"); } //if (res.TYPE.Equals("S")) //{ // _czrList = SelectCZR(model); // czrytextBox.Text = _czrList.CZR; //} //else //{ // MessageBox.Show(res.MESSAGE, "消息框"); //} }
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(); }
private void SMtextBox_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { MES_TM_CZR model = new MES_TM_CZR(); model.SBBH = MES_PD_SCRW_LIST.SBBH; model.GC = MES_PD_SCRW_LIST.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(); //MES_SY_CZR_BYGH model = ServicModel.TM_CZR.GET_RYNAME(SMtextBox.Text.Trim(), getToken()); //if (string.IsNullOrEmpty(model.NAME)) //{ // ShowMeg("查不到人员信息"); // return; //} //else //{ // MES_SY_CZR_BYGH = model; // czrtextBox.Text = model.NAME; // SMtextBox.Clear(); //} } }
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 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; } }
private void RYdataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (this.RYdataGridView.CurrentCell.OwningColumn.Name == q(Msg_Type.fielddelete)) //"删除" { int id = Convert.ToInt32(this.RYdataGridView.CurrentRow.Cells[q(Msg_Type.fieldrydm)].Value); //"人员代码" MES_RETURN_UI res = ServicModel.TM_CZR.UPDATE_LEAVE(id, getToken()); if (res.TYPE.Equals("S")) { MES_TM_CZR model = new MES_TM_CZR(); model.GC = _MES_PD_SCRW_LIST.GC; //model.CZRGH = SMtextBox.Text.Trim(); //model.GWID = 0; model.CZLB = Czlb; if (Czlb == 1) { model.RWBH = _MES_PD_SCRW_LIST.RWBH; } else if (Czlb == 2) { model.SBBH = _MES_PD_SCRW_LIST.SBBH; } _czrList = ServicModel.TM_CZR.SELECT_CZR_NOW(model, getToken()); DatagridgetData(); } else { //MessageBox.Show(res.MESSAGE, "消息框"); ShowMeg(res.MESSAGE); } } else if (this.RYdataGridView.CurrentCell.OwningColumn.Name == q(Msg_Type.fieldxggw))//"修改岗位" { MES_SY_GZZX model = new MES_SY_GZZX(); model.GC = getGC("value"); model.GZZXBH = Convert.ToString(getUserInfo("gzzxvalue")); MES_SY_GZZX_GW_LIST gwList = ServicModel.SY_GZZX.SELECT_GZZX_GW(model, getToken()); if (gwList.MES_RETURN.TYPE.Equals("S")) { GwArr = gwList.MES_SY_GZZX_GW; } else { //MessageBox.Show(gwList.MES_RETURN.MESSAGE, "消息框"); ShowMeg(gwList.MES_RETURN.MESSAGE); } int id = Convert.ToInt32(this.RYdataGridView.CurrentRow.Cells[q(Msg_Type.fieldrydm)].Value);//"人员代码" frmGW form = new frmGW(GwArr, id); show(form); MES_TM_CZR rymodel = new MES_TM_CZR(); rymodel.GC = MES_PD_SCRW_LIST.GC; if (Czlb == 1) { rymodel.RWBH = MES_PD_SCRW_LIST.RWBH; } else if (Czlb == 2) { rymodel.SBBH = MES_PD_SCRW_LIST.SBBH; } rymodel.CZLB = Czlb; _czrList = ServicModel.TM_CZR.SELECT_CZR_NOW(rymodel, getToken()); DatagridgetData(); } }
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(); }
private void ConfigUI(MES_PMM_MOULD model) { if (model.STATUS != "正常") { ShowMeg(string.Format("模具{0}状态为{1}", model.MOULD, model.STATUS)); } wllbtype = 0; if (model.WLLBNAME == "密封圈") { wllbtype = 1; wqhyslabel.Text = "无腔号:"; } else if (model.WLLBNAME == "绝缘圈") { wllbtype = 2; wqhyslabel.Text = "颜色:"; List <MES_SY_TYPEMXLIST> yslist = GetDictionaryMX(33).ToList(); int index = yslist.FindIndex(p => model.WLMS.Contains(p.MXNAME)); if (index != -1) { wxhystextBox2.Text = yslist[index].MXNAME; } } else { ShowMeg("模具物料类别不属于绝缘圈或密封圈为" + model.WLLBNAME); } gctextBox.Text = model.GC + "-" + model.GCMS; gzzxtextBox4.Text = model.GZZXBH + "-" + model.GZZXMS; sbhtextBox2.Text = model.SBMS; mjhtextBox5.Text = model.MOULD; wlxxtextBox.Text = model.WLH + "/" + model.WLMS; sltextBox1.Text = model.CASENUM.ToString(); jztextBox1.Text = model.CASEWET.ToString(); clpbdmtextBox6.Text = model.MATCHCODENAME; //List<MES_SY_TYPEMXLIST> dwlist = GetDictionaryMX(2,model.GC).ToList(); MES_SY_TYPEMXLIST choicllist = new MES_SY_TYPEMXLIST(); choicllist.ID = 0; choicllist.MXNAME = "==请选择=="; //dwlist.Insert(0, choicllist); //dwcomboBox1.DataSource = dwlist; //dwcomboBox1.DisplayMember = "MXNAME"; //dwcomboBox1.ValueMember = "ID"; MES_SY_MATERIAL materialmodel = new MES_SY_MATERIAL(); materialmodel.WLH = model.WLH; materialmodel.GC = model.GC; MES_SY_MATERIAL_SELECT mRes = ServicModel.SY_MATERIAL.SELECT(materialmodel, getToken()); if (mRes.MES_RETURN.TYPE.Equals("S")) { if (mRes.MES_SY_MATERIAL != null && mRes.MES_SY_MATERIAL.Length > 0) { dwlabel.Text = mRes.MES_SY_MATERIAL[0].UNITSNAME; } } List <MES_SY_TYPEMXLIST> cpztlist = GetDictionaryMX(9, model.GC).ToList(); cpztlist.Insert(0, choicllist); cpztcomboBox1.DataSource = cpztlist; cpztcomboBox1.DisplayMember = "MXNAME"; cpztcomboBox1.ValueMember = "ID"; int hgindex = cpztlist.FindIndex(p => p.MXNAME == "合格"); if (hgindex != -1) { cpztcomboBox1.SelectedValue = cpztlist[hgindex].ID; } List <MES_SY_TYPEMXLIST> lxlist = GetDictionaryMX(32, model.GC).ToList(); lxlist.Insert(0, choicllist); lxcomboBox2.DataSource = lxlist; lxcomboBox2.DisplayMember = "MXNAME"; lxcomboBox2.ValueMember = "ID"; int zcindex = lxlist.FindIndex(p => p.MXNAME == "正常"); if (zcindex != -1) { lxcomboBox2.SelectedValue = lxlist[zcindex].ID; } MES_TM_TMINFO kstimemodel = new MES_TM_TMINFO(); kstimemodel.LB = 1; kstimemodel.MID = model.MID; MES_RETURN_UI kstimeres = ServicModel.TM_TMINFO.SELECT_TM_LASTTIME(kstimemodel, getToken()); string currentTime = Convert.ToDateTime(ServicModel.PUBLIC_FUNC.GET_TIME(getToken())).ToString("yyyy-MM-dd HH:mm:ss"); if (kstimeres.TYPE == "S") { if (!string.IsNullOrEmpty(kstimeres.MESSAGE)) { ksdateTimePicker1.Text = kstimeres.MESSAGE;//.ToString("yyyy-MM-dd HH:mm:ss"); } else { ksdateTimePicker1.Text = currentTime;//DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); } } //ksdateTimePicker1.Text = jsdateTimePicker2.Text = currentTime;// DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); MES_TM_CZR czrmodel = new MES_TM_CZR(); czrmodel.SBBH = model.SBBH; czrmodel.CZLB = 3; MES_TM_CZR_SELECT_CZR_NOW czrres = SelectCZR(czrmodel); if (czrres.MES_RETURN.TYPE == "S" && czrres.MES_TM_CZR.Length == 1) { Gh = czrres.MES_TM_CZR[0].CZRGH; czrtextBox1.Text = czrres.MES_TM_CZR[0].CZRNAME; } else { } }
public MES_RETURN UPDATE_GW(MES_TM_CZR model, string ptoken) { return(client.UPDATE_GW(model, ptoken)); }
public MES_TM_CZR_SELECT_CZR_NOW SELECT_CZR_NOW(MES_TM_CZR model, string ptoken) { return(client.SELECT_CZR_NOW(model, ptoken)); }
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; } }