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 MES_RETURN_UI INSERT_ZS_WLKCBS(MES_TM_TMINFO_INSERT_GL model, string ptoken) { MES_RETURN mr = client.INSERT_ZS_WLKCBS(model, 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_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 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 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; }
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 MES_TM_TMINFO_INSERT_RETURN INSERT(MES_TM_TMINFO_INSERT_GL model, int ISAUTOADD, string ptoken) { MES_TM_TMINFO_INSERT_RETURN rst = client.INSERT(model, ISAUTOADD, ptoken); return(rst); }
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 (!IsGD) { ShowMeg(q(Msg_Type.msgscangd)); } else { MsgReturn msgInfo = VerifyWLisALL(); if (msgInfo.Pass == false) { //MessageBox.Show(msgInfo.Msg, "消息框"); ShowMeg(msgInfo.Msg); return; } MsgReturn msgInfo1 = VerifyContent(); if (msgInfo1.Pass == false) { //MessageBox.Show(msgInfo1.Msg, "消息框"); ShowMeg(msgInfo1.Msg); 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.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.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(); if (RigthType == Rigth_Type.baobiaocc) { frmBBprint form = new frmBBprint(model, Print_Type.bblot, RigthType, MES_PD_SCRW_LIST); form.block = re; show(form); string printToHome = ini.IniReadValue(ini.Section_Configuration, "printTohome"); if (printToHome.Equals("true")) { zybutton.PerformClick(); } } else { frmPrint_N form = new frmPrint_N(model, Print_Type.lot, RigthType); form.block = re; show(form); string printToHome = ini.IniReadValue(ini.Section_Configuration, "printTohome"); if (printToHome.Equals("true")) { zybutton.PerformClick(); } //this.Close(); } } SMtextBox.Select(); }
public frmPrint_N(MES_TM_TMINFO_INSERT_GL model, Print_Type type, Rigth_Type rtype) { InitializeComponent(); RigthType = rtype; MES_TM_TMINFO_INSERT_GL = model; if (!string.IsNullOrEmpty(MES_TM_TMINFO_INSERT_GL.MES_TM_TMINFO.MAXVALUE)) { xstextBox.MaxLength = Convert.ToInt32(MES_TM_TMINFO_INSERT_GL.MES_TM_TMINFO.MAXVALUE); } CPZTcomboBox.Visible = false; label5.Text = q(Msg_Type.titleslspace); //"数 量:"; label4.Text = q(Msg_Type.titlexsspace); //"箱 数:"; tstextBox.Visible = true; if (type == Print_Type.lot) { tstextBox.Visible = false; CPZTcomboBox.Location = tstextBox.Location; label5.Text = q(Msg_Type.titleztspace); //"状 态:"; label4.Text = q(Msg_Type.titleslspace); //"数 量:"; xstextBox.Text = model.MES_TM_TMINFO.SL == 0 ? "" : model.MES_TM_TMINFO.SL.ToString(); MES_SY_TYPEMX TYPEMX = new MES_SY_TYPEMX(); TYPEMX.TYPEID = 9; TYPEMX.GC = Convert.ToString(getGC("value")); CPZTcomboBox.DataSource = ServicModel.SY_TYPEMX.SELECT(TYPEMX, getToken()); CPZTcomboBox.Visible = true; CPZTcomboBox.DisplayMember = "MXNAME"; CPZTcomboBox.ValueMember = "ID"; } else if (type == Print_Type.rk) { } PrintType = type; RigthType = rtype; switch (type) { case Print_Type.rk: this.Text = q(Msg_Type.fielddyrkbs); //"打印入库标识"; break; case Print_Type.lot: this.Text = q(Msg_Type.fielddylotB); //"打印LOT"; break; default: break; } MES_TM_TMINFO_INSERT_GL = model; xstextBox.Select(); if (RigthType == Rigth_Type.gangketl_cc) { fsnumericUpDown.Value = 3; } else if (RigthType == Rigth_Type.ddjtl_cc) { fsnumericUpDown.Value = 4; } if (RigthType == Rigth_Type.jidiantitl_cc || RigthType == Rigth_Type.fujifengkoujitl_cc || RigthType == Rigth_Type.zhengjifengkoujitl_cc) { Sonluk.UI.Model.MES.PD_SCRWService.MES_PD_SCRW_CCTH res = new UI.Model.MES.PD_SCRWService.MES_PD_SCRW_CCTH(); if (RigthType == Rigth_Type.jidiantitl_cc) { res = ServicModel.PD_SCRW.SELECT_ZXCCINFO(MES_TM_TMINFO_INSERT_GL.MES_TM_TMINFO.RWBH, MES_TM_TMINFO_INSERT_GL.MES_TM_TMINFO.BC, getToken()); } else { res = ServicModel.PD_SCRW.SELECT_ZXCCINFO(MES_TM_TMINFO_INSERT_GL.MES_TM_TMINFO.RWBH, 0, getToken()); } if (res.MES_RETURN.TYPE.Equals("S")) { qshtextBox.Text = res.TH.ToString(); } else { ShowMeg(q(Msg_Type.msgthdataexcept) + res.MES_RETURN.MESSAGE);//"获取桶号信息报错" } } else { qshtextBox.Visible = false; label7.Visible = false; richTextBox1.Width = 426; } }
public frmPrint(MES_TM_TMINFO_INSERT_GL model, Print_Type type, Rigth_Type rtype) { InitializeComponent(); RigthType = rtype; MES_TM_TMINFO_INSERT_GL = model; //List<String> list = LocalPrinter.GetLocalPrinters(); //获得系统中的打印机列表 //IList<comboxclass> cbnodes = new List<comboxclass>(); rkbslabel.Visible = false; TMtextBox.Visible = false; //foreach (String s in list) //{ // //DYcomboBox.Items.Add(s); //将打印机名称添加到下拉框中 // comboxclass cb = new comboxclass(); // cb.Text = s; // cb.Value = s; // cbnodes.Add(cb); //} //DYcomboBox.DataSource = cbnodes.ToList(); //DYcomboBox.ValueMember = "value"; //DYcomboBox.DisplayMember = "text"; CPZTcomboBox.Visible = false; label5.Text = "数量:"; label4.Text = "箱数:"; tstextBox.Visible = true; if (type == Print_Type.lot) { tstextBox.Visible = false; TMtextBox.Select(); if (rtype == Rigth_Type.gangketl_cc) { rkbslabel.Visible = true; TMtextBox.Visible = true; //tstextBox.Visible = false; } else { int h = 70; label5.Location = new Point(label5.Location.X, label5.Location.Y - h); tstextBox.Location = new Point(tstextBox.Location.X, tstextBox.Location.Y - h); label4.Location = new Point(label4.Location.X, label4.Location.Y - h); xstextBox.Location = new Point(xstextBox.Location.X, xstextBox.Location.Y - h); label2.Location = new Point(label2.Location.X, label2.Location.Y - h); fsnumericUpDown.Location = new Point(fsnumericUpDown.Location.X, fsnumericUpDown.Location.Y - h); label6.Location = new Point(label6.Location.X, label6.Location.Y - h); bztextBox.Location = new Point(bztextBox.Location.X, bztextBox.Location.Y - h); //dybutton.Location = new Point(dybutton.Location.X, dybutton.Location.Y - h); } CPZTcomboBox.Location = tstextBox.Location; label5.Text = "状态:"; label4.Text = "数量:"; MES_SY_TYPEMX TYPEMX = new MES_SY_TYPEMX(); TYPEMX.TYPEID = 9; TYPEMX.GC = Convert.ToString(getGC("value")); CPZTcomboBox.DataSource = ServicModel.SY_TYPEMX.SELECT(TYPEMX, getToken()); CPZTcomboBox.Visible = true; CPZTcomboBox.DisplayMember = "MXNAME"; CPZTcomboBox.ValueMember = "ID"; } else if (type == Print_Type.rk) { tstextBox.Select(); label5.Location = new Point(label5.Location.X, label5.Location.Y - 50); tstextBox.Location = new Point(tstextBox.Location.X, tstextBox.Location.Y - 50); label2.Location = new Point(label2.Location.X, label2.Location.Y - 50); label4.Location = new Point(label4.Location.X, label4.Location.Y - 50); xstextBox.Location = new Point(xstextBox.Location.X, xstextBox.Location.Y - 50); fsnumericUpDown.Location = new Point(fsnumericUpDown.Location.X, fsnumericUpDown.Location.Y - 50); } PrintType = type; RigthType = rtype; switch (type) { case Print_Type.rk: this.Text = "打印入库标识"; break; case Print_Type.lot: this.Text = "打印LOT"; break; default: break; } MES_TM_TMINFO_INSERT_GL = model; //int width = printDialog1.PrinterSettings.DefaultPageSettings.PaperSize.Width; }