public MsgReturn VerifyContent() { MsgReturn msgInfo = new MsgReturn(); msgInfo.Pass = true; if (string.IsNullOrEmpty(Convert.ToString(bccomboBox.SelectedValue))) { msgInfo.Msg = q(Msg_Type.msgbcnoempty);//"班次信息不能为空"; msgInfo.Pass = false; } if (string.IsNullOrEmpty(czrytextBox.Text.Trim())) { msgInfo.Msg = q(Msg_Type.msgczrnotempty);//"操作人员信息不能为空"; msgInfo.Pass = false; } //if (string.IsNullOrEmpty(scrqtextBox.Text.Trim())) //{ // msgInfo.Msg = "生产日期不能为空"; // msgInfo.Pass = false; //} //if (judge.IsDate(scrqtextBox.Text.Trim()) == false) //{ // msgInfo.Msg = "生产日期的日期格式不是正确的日期格式"; // msgInfo.Pass = false; //} //if (scrqtextBox.Text.Trim().Length != 10) //{ // msgInfo.Msg = "生产日期的日期格式不是正确的10位日期格式"; // msgInfo.Pass = false; //} return(msgInfo); }
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 MsgReturn VerifyContent() { MsgReturn msgInfo = new MsgReturn(); msgInfo.Pass = true; if (string.IsNullOrEmpty(czrytextBox.Text.Trim())) { msgInfo.Msg = q(Msg_Type.msgczrnotempty); msgInfo.Pass = false; } return(msgInfo); }
public MsgReturn VerifyWLisALL() { MsgReturn msgInfo = new MsgReturn(); msgInfo.Pass = false; msgInfo.Msg = q(Msg_Type.msgbomunfinish);//"生成物料的相关BOM物料不齐全,请查看需要添加的物料"; int bomcount = 0; int tmcount = 0; ZBCFUN_GDJGXX_READ judge = BomList; //list.Where((x, i) => list.FindIndex(z => z.WLLB == x.WLLB) == i); //List<int> list = BomList.ET_BOM.ToList().Select(x => x.WLLB).Distinct().ToList(); List <ET_BOM> list1 = new List <ET_BOM>(); if (BomList.ET_BOM == null) { return(msgInfo); } for (int i = 0; i < BomList.ET_BOM.Length; i++) { if (list1.Exists(x => x.WLLB == BomList.ET_BOM[i].WLLB) == false) { list1.Add(BomList.ET_BOM[i]); } } for (int i = 0; i < list1.Count; i++) { if (list1[i].ZSBS.Equals("Y")) { bomcount++; for (int j = 0; j < Tmlist.Count; j++) { if (list1[i].WLLB == Tmlist[j].Wllbdm) { tmcount++; } } } } if (tmcount >= bomcount) { msgInfo.Pass = true; } return(msgInfo); }
public MsgReturn VerifyContent() { MsgReturn msgInfo = new MsgReturn(); msgInfo.Pass = true; if (string.IsNullOrEmpty(czrytextBox.Text.Trim())) { msgInfo.Msg = "操作人员信息不能为空"; msgInfo.Pass = false; } return(msgInfo); }
public MsgReturn VerifyWLisALL() { MsgReturn msgInfo = new MsgReturn(); msgInfo.Pass = false; if (BomList != null) { //msgInfo.Msg = "生成物料的相关BOM物料不齐全,请查看需要添加的物料"; msgInfo.Msg = q(Msg_Type.msgbomunfinish); int bomcount = 0; int tmcount = 0; ZBCFUN_GDJGXX_READ judge = BomList; List <ET_BOM> list1 = new List <ET_BOM>(); for (int i = 0; i < BomList.ET_BOM.Length; i++) { if (list1.Exists(x => x.WLLB == BomList.ET_BOM[i].WLLB) == false) { list1.Add(BomList.ET_BOM[i]); } } for (int i = 0; i < list1.Count; i++) { if (list1[i].ZSBS.Equals("Y")) { bomcount++; for (int j = 0; j < Tmlist.Count; j++) { if (list1[i].WLLB == Tmlist[j].Wllbdm) { tmcount++; } } } } if (tmcount >= bomcount) { msgInfo.Pass = true; } } else { msgInfo.Msg = q(Msg_Type.msgscantpmforgl);//"请先扫描托盘码信息带出需要关联的BOM相关信息"; } return(msgInfo); }
public MsgReturn VerifyContent() { MsgReturn msgInfo = new MsgReturn(); msgInfo.Pass = true; //if (string.IsNullOrEmpty(Convert.ToString(bccomboBox.SelectedValue))) //{ // msgInfo.Msg = "班次信息不能为空"; // msgInfo.Pass = false; //} if (string.IsNullOrEmpty(czrytextBox.Text.Trim())) { msgInfo.Msg = q(Msg_Type.msgczrnotempty);//"操作人员信息不能为空";msgczrnotempty msgInfo.Pass = false; } return(msgInfo); }
private MsgReturn GetTM() { MsgReturn msg = new MsgReturn(); msg.Pass = false; msg.Msg = q(Msg_Type.msginserttmfail);//"生成条码失败!!!"; MES_TM_TMINFO_INSERT_RETURN res = new MES_TM_TMINFO_INSERT_RETURN(); res = Createbarcode(Convert.ToInt32(tmnumericUpDown.Value)); if (res.MES_RETURN.TYPE.Equals("S")) { PrintList = res.SELECT_MES_TM_TMINFO_PRINT; msg.Pass = true; } else { msg.Msg = res.MES_RETURN.MESSAGE; } return(msg); }
private MsgReturn VerifyLoginInfo() { MsgReturn res = new MsgReturn(); res.Pass = false; if (string.IsNullOrEmpty(userTextBox.Text)) { //res.Msg = "用户名不能为空!!!"; res.Msg = q(Msg_Type.unamenotempty); return(res); } if (string.IsNullOrEmpty(pwdTextBox.Text)) { //res.Msg = "密码不能为空!!!"; res.Msg = q(Msg_Type.pwdnotempty); return(res); } res.Pass = true; return(res); }
public MsgReturn VerifyWLisALL() { MsgReturn msgInfo = new MsgReturn(); msgInfo.Pass = false; msgInfo.Msg = q(Msg_Type.msgbomunfinish); int bomcount = 0; int tmcount = 0; ZBCFUN_GDJGXX_READ judge = BomList; List <ET_BOM> list1 = new List <ET_BOM>(); for (int i = 0; i < BomList.ET_BOM.Length; i++) { if (list1.Exists(x => x.WLLB == BomList.ET_BOM[i].WLLB) == false) { list1.Add(BomList.ET_BOM[i]); } } for (int i = 0; i < list1.Count; i++) { if (list1[i].ZSBS.Equals("Y")) { bomcount++; for (int j = 0; j < Tmlist.Count; j++) { if (list1[i].WLLB == Tmlist[j].Wllbdm) { tmcount++; } } } } if (tmcount >= bomcount) { msgInfo.Pass = true; } return(msgInfo); }
private void dybutton_Click(object sender, EventArgs e) { dybutton.Focus(); bool mgs1 = Verify(); if (mgs1 == false) { return; } MsgReturn mgs = GetTM(); if (mgs.Pass == false) { MessageBox.Show(mgs.Msg, "消息框"); return; } PrintInfo(Convert.ToInt32(fsnumericUpDown.Value), xstextBox.Text.Trim(), tstextBox.Text.Trim(), PrintList, RigthType, PrintType);//PrintType if (block != null) { block(); } this.Close(); }
private MsgReturn GetTM() { MsgReturn msg = new MsgReturn(); msg.Pass = false; msg.Msg = "生成条码失败!!!"; MES_TM_TMINFO_INSERT_RETURN res = new MES_TM_TMINFO_INSERT_RETURN(); if (PrintType == Print_Type.lot) { if (RigthType == Rigth_Type.gangketl_cc) { res = Createbarcode(Convert.ToInt32(fsnumericUpDown.Value)); } else { res = Createbarcode(1); } } else { res = Createbarcode(1); } if (res.MES_RETURN.TYPE.Equals("S")) { PrintList = res.SELECT_MES_TM_TMINFO_PRINT; msg.Pass = true; } else { msg.Msg = res.MES_RETURN.MESSAGE; } return(msg); }
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(); }
private void login() { MsgReturn res = VerifyLoginInfo(); if (res.Pass == false) { //MessageBox.Show(res.Msg, "消息框"); ShowMeg(res.Msg); return; } #region 登录请求相关信息 MES_SY_TYPEMX TYPEMX = new MES_SY_TYPEMX(); TYPEMX.TYPEID = 26; TYPEMX.MXNAME = Convert.ToString(langucomboBox.SelectedValue); MES_SY_TYPEMXLIST[] languArr = ServicModel.SY_TYPEMX.SELECT_NOPTOKEN(TYPEMX); int languID = 0; if (languArr.Length == 1) { languID = languArr[0].ID; } MES_LoginINFO loginfo = ServicModel.MES_Login.Login_language(userTextBox.Text.Trim(), pwdTextBox.Text.Trim(), "", "", 0, 1, 0, languID); CRM_JURISDICTION_GROUP[] list = loginfo.JURISDICTION_GROUP; if (list != null) { if (list.Length > 0) { List <CRM_JURISDICTION_GROUP> nodes = new List <CRM_JURISDICTION_GROUP>(); for (int i = 0; i < list.Length; i++) { CRM_HG_RIGHTGROUP node = list[i].CRM_HG_RIGHTGROUP; if (node.RGROUPID == 11) { nodes.Add(list[i]); list = nodes.ToArray(); break; } } } } Sonluk.UI.Model.MES.MES_LoginService.MES_RETURN msg = loginfo.MES_RETURN; if (msg.TYPE.Equals("E")) { //MessageBox.Show(msg.MESSAGE, "消息框"); ShowMeg(msg.MESSAGE); Clear(); } else { if (list == null || list.Length == 0) { ShowMeg(userTextBox.Text + q(Msg_Type.roleisnull)); return; } //if (list.Length == 0) //{ // ShowMeg("帐号" + userTextBox.Text + "没有对应的权限,请维护"); // return; //} TokenInfo tokenInfo = loginfo.TokenInfo; Common.token = tokenInfo.access_token; ini.IniWriteValue(ini.Section_UserInfo, "username", userTextBox.Text.Trim()); ini.IniWriteValue(ini.Section_UserInfo, "password", pwdTextBox.Text.Trim()); ini.IniWriteValue(ini.Section_UserInfo, "staffid", tokenInfo.STAFFID.ToString()); ini.IniWriteValue(ini.Section_UserInfo, "langu", Convert.ToString(langucomboBox.SelectedValue)); frmAction form = new frmAction(list); push(form, this); } #endregion }
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(); }
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(); }