private void TMtextBox_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { MES_TM_TMINFO model = new MES_TM_TMINFO(); model.GC = MES_TM_TMINFO_INSERT_GL.MES_TM_TMINFO.GC; model.TM = TMtextBox.Text.Trim().ToUpper(); SELECT_MES_TM_TMINFO_BYTM res = ServicModel.TM_TMINFO.SELECT_BYTM(model, 0, getToken()); //MES_TM_TMINFO model = new MES_TM_TMINFO(); //model.GC = MES_TM_TMINFO_INSERT_GL.MES_TM_TMINFO.GC; //model.TM = TMtextBox.Text.Trim().ToUpper(); //model.RWBH = MES_TM_TMINFO_INSERT_GL.MES_TM_TMINFO.RWBH; //SELECT_MES_TM_TMINFO_BYTM res = ReadphTM(model, 2); if (res.MES_RETURN.TYPE.Equals("S")) { if (res.MES_TM_TMINFO_LIST[0].TMLB != 2) { ShowMeg("请扫描领用表条码"); } } else { ShowMeg(res.MES_RETURN.MESSAGE); } } }
private void dybutton_Click(object sender, EventArgs e) { if (Convert.ToInt32(fsnumericUpDown.Value) > 0) { MES_TM_TMINFO TMINFOmodel = new MES_TM_TMINFO(); TMINFOmodel.TM = tmtextBox.Text.Trim().ToUpper(); SELECT_MES_TM_TMINFO_BYTM tminfiRes = ServicModel.TM_TMINFO.SELECT(TMINFOmodel, getToken()); if (!tminfiRes.MES_RETURN.TYPE.Equals("S")) { ShowMeg(tminfiRes.MES_RETURN.MESSAGE); return; } if (tminfiRes.MES_TM_TMINFO_LIST != null && tminfiRes.MES_TM_TMINFO_LIST.Length == 1) { PrintInfoByTM(tmtextBox.Text.Trim().ToUpper(), tminfiRes.MES_TM_TMINFO_LIST[0].GC, Convert.ToInt32(fsnumericUpDown.Value), RigthType, PrintType); } else { //ShowMeg("读取扫描条码信息失败"); ShowMeg(q(Msg_Type.msgloadtmfail)); return; } this.Close(); } else { //ShowMeg("打印份数必须大于0"); ShowMeg(q(Msg_Type.msgprintnoempty)); } }
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 string INSERT_PD_TL_BL(string datastring) { string token = AppClass.GetSession("token").ToString(); int STAFFID = Convert.ToInt32(AppClass.GetSession("STAFFID")); Sonluk.UI.Model.MES.PD_TLGLService.MES_PD_TL model = Newtonsoft.Json.JsonConvert.DeserializeObject <Sonluk.UI.Model.MES.PD_TLGLService.MES_PD_TL>(datastring); model.JLR = STAFFID; MES_TM_TMINFO model_MES_TM_TMINFO = new MES_TM_TMINFO(); model_MES_TM_TMINFO.TM = model.TM; model_MES_TM_TMINFO.RWBH = model.RWBH; MES_RETURN_UI rst = new MES_RETURN_UI(); SELECT_MES_TM_TMINFO_BYTM rst_SELECT_MES_TM_TMINFO_BYTM = mesModels.TM_TMINFO.SELECT_BYTM(model_MES_TM_TMINFO, 0, token); if (rst_SELECT_MES_TM_TMINFO_BYTM.MES_RETURN.TYPE == "S") { if (rst_SELECT_MES_TM_TMINFO_BYTM.MES_TM_TMINFO_LIST.Length == 1) { rst = mesModels.PD_TLGL.INSERT(model, token); } else { rst.TYPE = "E"; rst.MESSAGE = "没有查询到条码信息!"; } } else { rst.TYPE = rst_SELECT_MES_TM_TMINFO_BYTM.MES_RETURN.TYPE; rst.MESSAGE = rst_SELECT_MES_TM_TMINFO_BYTM.MES_RETURN.MESSAGE; } return(Newtonsoft.Json.JsonConvert.SerializeObject(rst)); }
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 string UPDATE_ZFDC(string datastring1, string datastring2) { MES_RETURN_UI rst = new MES_RETURN_UI(); int STAFFID = Convert.ToInt32(AppClass.GetSession("STAFFID")); string token = AppClass.GetSession("token").ToString(); MES_TM_TMINFO model_MES_TM_TMINFO = Newtonsoft.Json.JsonConvert.DeserializeObject <MES_TM_TMINFO>(datastring1); model_MES_TM_TMINFO.JLR = STAFFID; MES_RETURN_UI rst_MES_RETURN_UI = mesModels.TM_TMINFO.UPDATE_ZFDC(model_MES_TM_TMINFO, token); if (rst_MES_RETURN_UI.TYPE == "S") { UI.Model.MES.TM_ZFDCMXService.MES_TM_ZFDCMX model_MES_TM_ZFDCMX = new UI.Model.MES.TM_ZFDCMXService.MES_TM_ZFDCMX(); model_MES_TM_ZFDCMX.TM = model_MES_TM_TMINFO.TM; rst_MES_RETURN_UI = mesModels.TM_ZFDCMX.DELETE(model_MES_TM_ZFDCMX, token); if (rst_MES_RETURN_UI.TYPE == "S") { Sonluk.UI.Model.MES.TM_ZFDCMXService.MES_TM_ZFDCMX[] model_MES_TM_ZFDCMX_list = Newtonsoft.Json.JsonConvert.DeserializeObject <Sonluk.UI.Model.MES.TM_ZFDCMXService.MES_TM_ZFDCMX[]>(datastring2); for (int i = 0; i < model_MES_TM_ZFDCMX_list.Length; i++) { model_MES_TM_ZFDCMX_list[i].TM = model_MES_TM_TMINFO.TM; rst = mesModels.TM_ZFDCMX.INSERT(model_MES_TM_ZFDCMX_list[i], token); } } else { rst = rst_MES_RETURN_UI; } } else { rst = rst_MES_RETURN_UI; } return(Newtonsoft.Json.JsonConvert.SerializeObject(rst)); }
public string GET_TMINFO_LB(string datastring) { string token = AppClass.GetSession("token").ToString(); MES_TM_TMINFO model_MES_TM_TMINFO = Newtonsoft.Json.JsonConvert.DeserializeObject <MES_TM_TMINFO>(datastring); SELECT_MES_TM_TMINFO_BYTM rst_SELECT_MES_TM_TMINFO_BYTM = mesmodels.TM_TMINFO.SELECT_LB(model_MES_TM_TMINFO, token); return(Newtonsoft.Json.JsonConvert.SerializeObject(rst_SELECT_MES_TM_TMINFO_BYTM)); }
public string MES_TMINFO_SELECT_LB(string cxdata) { token = appClass.CRM_Gettoken(); MES_TM_TMINFO model = Newtonsoft.Json.JsonConvert.DeserializeObject <MES_TM_TMINFO>(cxdata); model.STAFFID = appClass.CRM_GetStaffid(); SELECT_MES_TM_TMINFO_BYTM data = mesModels.TM_TMINFO.SELECT_LB(model, token); return(Newtonsoft.Json.JsonConvert.SerializeObject(data)); }
public string GET_TMINFO(string datastring) { string token = appClass.CRM_Gettoken(); MES_TM_TMINFO model_MES_TM_TMINFO = Newtonsoft.Json.JsonConvert.DeserializeObject <MES_TM_TMINFO>(datastring); model_MES_TM_TMINFO.TMLB = 1; SELECT_MES_TM_TMINFO_BYTM rst_SELECT_MES_TM_TMINFO_BYTM = mesModels.TM_TMINFO.SELECT(model_MES_TM_TMINFO, token); return(Newtonsoft.Json.JsonConvert.SerializeObject(rst_SELECT_MES_TM_TMINFO_BYTM)); }
public string GET_TM_ZFDC_BY_ROLE(string datastring) { int STAFFID = Convert.ToInt32(AppClass.GetSession("STAFFID")); string token = AppClass.GetSession("token").ToString(); MES_TM_TMINFO model_MES_TM_TMINFO = Newtonsoft.Json.JsonConvert.DeserializeObject <MES_TM_TMINFO>(datastring); model_MES_TM_TMINFO.STAFFID = STAFFID; SELECT_MES_TM_TMINFO_BYTM rst_SELECT_MES_TM_TMINFO_BYTM = mesModels.TM_TMINFO.SELECT_ZFDC_BY_ROLE(model_MES_TM_TMINFO, token); return(Newtonsoft.Json.JsonConvert.SerializeObject(rst_SELECT_MES_TM_TMINFO_BYTM)); }
public string GET_TM_TL(string TM, string RWBH) { TokenINFO rst_TokenINFO = GET_TokenINFO(); //string token = AppClass.GetSession("token").ToString(); MES_TM_TMINFO model_MES_TM_TMINFO = new MES_TM_TMINFO(); model_MES_TM_TMINFO.TM = TM; model_MES_TM_TMINFO.RWBH = RWBH; SELECT_MES_TM_TMINFO_BYTM rst_SELECT_MES_TM_TMINFO_BYTM = mesmodels.TM_TMINFO.SELECT_BYTM(model_MES_TM_TMINFO, 0, rst_TokenINFO.Token); return(Newtonsoft.Json.JsonConvert.SerializeObject(rst_SELECT_MES_TM_TMINFO_BYTM)); }
public string TM_TMINFO_UPDATE_CF(string datastring) { string token = AppClass.GetSession("token").ToString(); int STAFFID = Convert.ToInt32(AppClass.GetSession("STAFFID")); MES_TM_TMINFO model = Newtonsoft.Json.JsonConvert.DeserializeObject <MES_TM_TMINFO>(datastring); model.STAFFID = STAFFID; model.JLR = STAFFID; MES_RETURN_UI result = mesmodels.TM_TMINFO.UPDATE_CF(model, token); return(Newtonsoft.Json.JsonConvert.SerializeObject(result)); }
public MES_RETURN_UI UPDATE(MES_TM_TMINFO model, string ptoken) { MES_RETURN mr = client.UPDATE(model, 1, ptoken); MES_RETURN_UI mrui = new MES_RETURN_UI(); mrui.TYPE = mr.TYPE; mrui.MESSAGE = mr.MESSAGE; mrui.TM = mr.TM; mrui.TMSX = mr.TMSX; mrui.GC = mr.GC; return(mrui); }
public string SET_TMTL(string RWBH, string TM, string REMARK) { TokenINFO rst_TokenINFO = GET_TokenINFO(); MES_TM_TMINFO model_MES_TM_TMINFO = new MES_TM_TMINFO(); model_MES_TM_TMINFO.RWBH = RWBH; model_MES_TM_TMINFO.TM = TM; model_MES_TM_TMINFO.JLR = rst_TokenINFO.STAFFID; model_MES_TM_TMINFO.TLREMARK = REMARK; SELECT_MES_TM_TMINFO_BYTM rst_SELECT_MES_TM_TMINFO_BYTM = mesmodels.TM_TMINFO.SELECT_BYTM(model_MES_TM_TMINFO, 1, rst_TokenINFO.Token); return(Newtonsoft.Json.JsonConvert.SerializeObject(rst_SELECT_MES_TM_TMINFO_BYTM)); }
public void ConfigTable(bool ISrwd) { MES_TM_TMINFO model = new MES_TM_TMINFO(); model.MAC = DeviceInfo.GetNetCardMAC().Substring(0, 17); if (ISrwd) { model.RWBH = Rwbh; } model.WLLB = Wllb; DateTime sy_dt = Convert.ToDateTime(ServicModel.PUBLIC_FUNC.GET_TIME(getToken())).AddHours(-4); model.JLJSTIME = sy_dt.ToString("yyyy-MM-dd"); model.JLKSTIME = sy_dt.ToString("yyyy-MM-dd"); if (RigthType == Rigth_Type.zhengjicc) { model.GZZXBH = SBHID; } else { model.SBBH = SBHID; } SELECT_MES_TM_TMINFO_BYTM res = ServicModel.TM_TMINFO.SELECT(model, getToken()); if (res.MES_RETURN.TYPE.Equals("S")) { TM_list = res.MES_TM_TMINFO_LIST.ToList(); if (res.MES_TM_TMINFO_LIST.Length == 0) { ShowMeg(q(Msg_Type.msgtodaynodata));//"当天没有对应的数据" } else { JLdataGridView.DataSource = TM_list; Type type = JLdataGridView.GetType(); PropertyInfo pi = type.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic); pi.SetValue(JLdataGridView, true, null); JLdataGridView.ClearSelection(); } } else { ShowMeg(res.MES_RETURN.MESSAGE); } dybutton.Select(); }
public string UPDATE_TMINFO(string data) { string token = appClass.CRM_Gettoken(); MES_RETURN_UI temp2 = new MES_RETURN_UI(); MES_TM_TMINFO_LIST[] model = Newtonsoft.Json.JsonConvert.DeserializeObject <MES_TM_TMINFO_LIST[]>(data); for (int i = 0; i < model.Length; i++) { MES_TM_TMINFO temp = new MES_TM_TMINFO(); temp.TM = model[i].TM; temp.YHBS = "X"; MES_RETURN_UI res = mesModels.TM_TMINFO.UPDATE_LB(temp, 7, token); } temp2.TYPE = "S"; return(Newtonsoft.Json.JsonConvert.SerializeObject(temp2)); }
public string SET_TM_INSERT(string datastring1, string datastring2) { TokenINFO rst_TokenINFO = GET_TokenINFO(); //string token = AppClass.GetSession("token").ToString(); //int STAFFID = Convert.ToInt32(AppClass.GetSession("STAFFID")); MES_TM_TMINFO model_MES_TM_TMINFO = Newtonsoft.Json.JsonConvert.DeserializeObject <MES_TM_TMINFO>(datastring1); model_MES_TM_TMINFO.JLR = rst_TokenINFO.STAFFID; model_MES_TM_TMINFO.TMCOUNT = 1; model_MES_TM_TMINFO.TMLB = 1; MES_TM_GL[] model_MES_TM_GL = Newtonsoft.Json.JsonConvert.DeserializeObject <MES_TM_GL[]>(datastring2); MES_TM_TMINFO_INSERT_GL model_MES_TM_TMINFO_INSERT_GL = new MES_TM_TMINFO_INSERT_GL(); model_MES_TM_TMINFO_INSERT_GL.MES_TM_TMINFO = model_MES_TM_TMINFO; model_MES_TM_TMINFO_INSERT_GL.MES_TM_GL = model_MES_TM_GL; Sonluk.UI.Model.MES.TM_TMINFOService.MES_TM_TMINFO_INSERT_RETURN rst_MES_TM_TMINFO_INSERT_RETURN = mesmodels.TM_TMINFO.INSERT(model_MES_TM_TMINFO_INSERT_GL, 0, rst_TokenINFO.Token); return(Newtonsoft.Json.JsonConvert.SerializeObject(rst_MES_TM_TMINFO_INSERT_RETURN)); }
public string INSERT_ZS_WLKCBS(string TM_TMINFO_data, string TM_GL_data) { try { string token = AppClass.GetSession("token").ToString(); MES_TM_TMINFO TM_TMINFO_MODEL = Newtonsoft.Json.JsonConvert.DeserializeObject <MES_TM_TMINFO>(TM_TMINFO_data); Sonluk.UI.Model.MES.TM_TMINFOService.MES_TM_GL[] TM_GL_MODEL = Newtonsoft.Json.JsonConvert.DeserializeObject <Sonluk.UI.Model.MES.TM_TMINFOService.MES_TM_GL[]>(TM_GL_data); MES_TM_TMINFO_INSERT_GL MODEL = new MES_TM_TMINFO_INSERT_GL(); MODEL.MES_TM_TMINFO = TM_TMINFO_MODEL; MODEL.MES_TM_GL = TM_GL_MODEL; MES_RETURN_UI NEWDATA = mesmodels.TM_TMINFO.INSERT_ZS_WLKCBS(MODEL, token); return(Newtonsoft.Json.JsonConvert.SerializeObject(NEWDATA)); } catch (Exception e) { return(e.ToString()); } }
private void TMtextBox_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { MES_TM_TMINFO model = new MES_TM_TMINFO(); model.GC = MES_TM_TMINFO_INSERT_GL.MES_TM_TMINFO.GC; SELECT_MES_TM_TMINFO_BYTM res = ServicModel.TM_TMINFO.SELECT_BYTM(model, 0, getToken()); if (res.MES_RETURN.TYPE.Equals("S")) { if (res.MES_TM_TMINFO_LIST[0].TMLB != 2) { //ShowMeg("请扫描领用表条码"); ShowMeg(q(Msg_Type.msgscanlybtm)); } } else { ShowMeg(res.MES_RETURN.MESSAGE); } } }
public void getReportInfoByTm() { 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")) { ShowMeg(q(Msg_Type.msgtlsuccess), 1500);//"投料成功" UpdateJSDataGrid(MES_PD_SCRW_LIST.RWBH); } else { //MessageBox.Show(res.MES_RETURN.MESSAGE, "消息框"); ShowMeg(res.MES_RETURN.MESSAGE); } }
private void cxbutton_Click(object sender, EventArgs e) { //MES_SY_TYPEMXLIST[] wllbArr = ServicModel.SY_TYPEMX.SELECT(typeModel, getToken()); //List<MES_SY_TYPEMXLIST> wllblist = wllbArr.ToList(); //MES_SY_TYPEMXLIST choicwllb = new MES_SY_TYPEMXLIST(); //choicwllb.ID = 0; //choicwllb.MXNAME = "==请选择=="; //wllblist.Insert(0, choicwllb); MES_TM_TMINFO model = new MES_TM_TMINFO(); if (!Convert.ToString(gccomboBox.SelectedValue).Equals("0")) { model.GC = Convert.ToString(gccomboBox.SelectedValue); } if (gzzxcomboBox.SelectedValue != null) { if (!Convert.ToString(gzzxcomboBox.SelectedValue).Equals("0")) { model.GZZXBH = Convert.ToString(gzzxcomboBox.SelectedValue); } } if (!Convert.ToString(sbhcomboBox.SelectedValue).Equals("0")) { model.SBBH = Convert.ToString(sbhcomboBox.SelectedValue); } if (!string.IsNullOrEmpty(tmtextBox.Text.Trim())) { if (tmtextBox.Text.Trim().Length == 12)// && tmtextBox.Text.Trim().ToUpper().StartsWith("P")) { model.TM = tmtextBox.Text.Trim(); } else { //ShowMeg("条码格式是P开头的12位信息,请核对"); ShowMeg(q(Msg_Type.msgtmstartwithP)); return; } } if (!string.IsNullOrEmpty(wlbmtextBox.Text.Trim())) { model.WLH = wlbmtextBox.Text.Trim(); } if (!string.IsNullOrEmpty(xsddtextBox.Text.Trim())) { model.NOBILL = xsddtextBox.Text.Trim(); } if (!string.IsNullOrEmpty(thtextBox.Text.Trim())) { if (judge.IsNumber(thtextBox.Text.Trim())) { model.TH = Convert.ToInt32(thtextBox.Text.Trim()); } else { //ShowMeg("桶号必须是数字"); ShowMeg(q(Msg_Type.msgthisdigital)); return; } } if (!string.IsNullOrEmpty(erptextBox.Text.Trim())) { if (erptextBox.Text.Trim().Length == 8) { model.ERPNO = erptextBox.Text.Trim(); } else { //ShowMeg("ERP工单是有效的8位信息"); ShowMeg(q(Msg_Type.msgerpdglengtheigth)); return; } } if (!string.IsNullOrEmpty(rwdtextBox.Text.Trim())) { if (rwdtextBox.Text.Trim().Length == 11) { model.RWBH = rwdtextBox.Text.Trim().ToUpper(); } else { //ShowMeg("任务单是有效的11位信息"); ShowMeg(q(Msg_Type.msgrwdlengtheleven)); return; } } if (!string.IsNullOrEmpty(pctextBox.Text.Trim())) { model.PC = Convert.ToString(pctextBox.Text.Trim()); } //if (!string.IsNullOrEmpty(scrqtextBox.Text.Trim())) //{ // if (judge.IsDate(scrqtextBox.Text.Trim())) // { // model.SCDATE = scrqtextBox.Text.Trim(); // } // else // { // ShowMeg("生产日期不是有效的时间格式"); // return; // } //} //if (!string.IsNullOrEmpty(jlrqfromtextBox.Text.Trim())) //{ // if (judge.IsDate(jlrqfromtextBox.Text.Trim())) // { // model.JLKSTIME = Convert.ToDateTime(jlrqfromtextBox.Text.Trim()).ToString("yyyy-MM-dd"); // } // else // { // ShowMeg("记录开始日期不是有效的时间格式"); // return; // } //} //if (!string.IsNullOrEmpty(jlrqtotextBox.Text.Trim())) //{ // if (judge.IsDate(jlrqtotextBox.Text.Trim())) // { // model.JLJSTIME = Convert.ToDateTime(jlrqtotextBox.Text.Trim()).ToString("yyyy-MM-dd"); // } // else // { // ShowMeg("记录结束日期不是有效的时间格式"); // return; // } //} if (!string.IsNullOrEmpty(scrqtextBox.Text.Trim())) { if (judge.IsDate(scrqtextBox.Text.Trim())) { model.SCDATE = scrqtextBox.Text.Trim(); } else { //ShowMeg("生产日期不是正确的日期格式"); ShowMeg(q(Msg_Type.msgscrqformat)); } } if (!string.IsNullOrEmpty(jlrqfromtextBox.Text.Trim())) { if (judge.IsDate(jlrqfromtextBox.Text.Trim())) { model.JLKSTIME = jlrqfromtextBox.Text.Trim(); } else { //ShowMeg("记录开始日期不是正确的日期格式"); ShowMeg(q(Msg_Type.msgjlksrqformat)); } } if (!string.IsNullOrEmpty(jlrqtotextBox.Text.Trim())) { if (judge.IsDate(jlrqtotextBox.Text.Trim())) { model.JLJSTIME = jlrqtotextBox.Text.Trim(); } else { //ShowMeg("记录结束日期不是正确的日期格式"); ShowMeg(q(Msg_Type.msgjljsrqformat)); } } if (!string.IsNullOrEmpty(jlrqfromtextBox.Text.Trim()) && !string.IsNullOrEmpty(jlrqtotextBox.Text.Trim())) { TimeSpan midtine = DateTime.Parse(jlrqfromtextBox.Text.Trim()) - DateTime.Parse(jlrqtotextBox.Text.Trim()); if (midtine.Days > 0) { //ShowMeg("记录开始日期不能大于记录结束日期"); ShowMeg(q(Msg_Type.msgksgtjs)); } } if (MaccheckBox.Checked) { model.MAC = DeviceInfo.GetNetCardMAC().Substring(0, 17); } //model.WLLBNAME = "素电"; model.WLLB = Convert.ToInt32(wllbcomboBox1.SelectedValue); SELECT_MES_TM_TMINFO_BYTM res = ServicModel.TM_TMINFO.SELECT(model, getToken()); if (res.MES_RETURN.TYPE.Equals("S")) { JLdataGridView.DataSource = res.MES_TM_TMINFO_LIST.ToList(); List = res.MES_TM_TMINFO_LIST.ToList(); JLdataGridView.ClearSelection(); Type type = JLdataGridView.GetType(); PropertyInfo pi = type.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic); pi.SetValue(JLdataGridView, true, null); } else { ShowMeg(res.MES_RETURN.MESSAGE); } }
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 SELECT_MES_TM_TMINFO_BYTM SELECT_BYTM_YT(MES_TM_TMINFO model, int ISINSERT, string ptoken) { return(client.SELECT_BYTM(model, ISINSERT, 2, ptoken)); }
public SELECT_MES_TM_TMINFO_BYTM SELECT_ZFDC_BY_ROLE(MES_TM_TMINFO model, string ptoken) { return(client.SELECT_BY_STAFFID(model, 1, ptoken)); }
public SELECT_MES_TM_TMINFO_BYTM SELECT_TPM(MES_TM_TMINFO model, string ptoken) { return(client.SELECT(model, 2, ptoken)); }
public SELECT_MES_TM_TMINFO_BYTM SELECT_ALL(MES_TM_TMINFO model, string ptoken) { return(client.SELECT_ALL(model, 0, ptoken)); }
public SELECT_MES_TM_TMINFO_BYTM SELECT_LIST_datatable(MES_TM_TMINFO_LIST[] model, MES_TM_TMINFO model1, string ptoken) { return(client.SELECT_LIST_datatable(model, model1, ptoken)); }
public MES_TM_TMINFO_SELECT_TL_GL_CC SELECT_TL_GL_CC(MES_TM_TMINFO model, string ptoken) { return(client.SELECT_TL_GL_CC(model, ptoken)); }
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; } 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) == 0) { //MessageBox.Show("生成LOT表必须输入班次信息不能为空", "消息框"); ShowMeg(q(Msg_Type.msgbcnoemptyforlotb)); SMtextBox.Select(); 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.SCDATE = dateTimePicker1.Text.Trim(); model.MES_TM_TMINFO.BC = Convert.ToInt32(bccomboBox.SelectedValue); model.MES_TM_TMINFO.RWBH = MES_PD_SCRW_LIST.RWBH; model.MES_TM_TMINFO.SL = MES_PD_SCRW_LIST.BZCOUNT; if (RigthType == Rigth_Type.mfqqingxi) { model.MES_TM_TMINFO.PC = pctextBox.Text.Trim(); } else { 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.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.lot, RigthType); show(form); string printToHome = ini.IniReadValue(ini.Section_Configuration, "printTohome"); if (printToHome.Equals("true")) { zybutton.PerformClick(); } //this.Close(); 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.Columns["状态"].DefaultCellStyle.BackColor = Color.Red; Tmlist = new List <TMDataGrid>(); LSdataGridView.DataSource = Tmlist; LSdataGridView.Columns[q(Msg_Type.fielddelete)].DisplayIndex = 4;//"删除" SMtextBox.Select(); }
public SELECT_MES_TM_TMINFO_BYTM SELECT_BY_KCDDLimit(MES_TM_TMINFO model, string ptoken) { return(client.SELECT_BY_KCDDLimit(model, ptoken)); }