private void pic_continue_weight_Click(object sender, EventArgs e) { if (Program.is_continue_weight == "1") { Program.is_continue_weight = "0"; pic_continue_weight.Image = Properties.Resources.noweight; } else { Program.is_continue_weight = "1"; pic_continue_weight.Image = Properties.Resources.weight; } IBLL.ISysBLL bll = new BLL.SysBLL(); var lst = new List <Model.bt_par_setting>(); lst.Add(new Model.bt_par_setting { par_id = "is_continue_weight", par_val = Program.is_continue_weight }); bll.UpdateParSetting(lst); }
private void label14_Click(object sender, EventArgs e) { try { Cursor.Current = Cursors.WaitCursor; if (txt_branch_no.Text.Trim().Length == 0) { new MsgForm("机构编码不能为空").ShowDialog(); return; } IBLL.ISysBLL bll = new BLL.SysBLL(); var lst = new List <Model.bt_par_setting>(); lst.Add(new Model.bt_par_setting { par_id = "branch_no", par_val = txt_branch_no.Text }); lst.Add(new Model.bt_par_setting { par_id = "jh", par_val = txt_jh.Text }); bll.UpdateParSetting(lst); Program.branch_no = txt_branch_no.Text; Program.jh = txt_jh.Text; var frm = new MsgForm("初始化设置成功"); frm.ShowDialog(); this.DialogResult = DialogResult.OK; this.Close(); } catch (Exception ex) { new MsgForm(ex.GetMessage()).ShowDialog(); } finally { Cursor.Current = Cursors.Default; } }
private void label14_Click(object sender, EventArgs e) { try { Cursor.Current = Cursors.WaitCursor; if (txt_branch_no.Text.Trim().Length == 0) { new MsgForm("机构编码不能为空").ShowDialog(); return; } string mo_ling = "0"; string weight_model = "1"; string input_cus_model = "1"; if (radioButton2.Checked) { mo_ling = "1"; } else if (radioButton3.Checked) { mo_ling = "2"; } else if (radioButton4.Checked) { mo_ling = "3"; } if (radioButton6.Checked) { weight_model = "2"; } if (radioButton8.Checked) { input_cus_model = "2"; } var can_input_qty = "1"; if (!chk_input_qty.Checked) { can_input_qty = "0"; } var is_continue_weight = "0"; if (chk_continue_weight.Checked) { is_continue_weight = "1"; } IBLL.ISysBLL bll = new BLL.SysBLL(); var lst = new List <Model.bt_par_setting>(); lst.Add(new Model.bt_par_setting { par_id = "mo_ling", par_val = mo_ling }); lst.Add(new Model.bt_par_setting { par_id = "weight_model", par_val = weight_model }); lst.Add(new Model.bt_par_setting { par_id = "branch_no", par_val = txt_branch_no.Text }); lst.Add(new Model.bt_par_setting { par_id = "jh", par_val = txt_jh.Text }); lst.Add(new Model.bt_par_setting { par_id = "input_cus_model", par_val = input_cus_model }); lst.Add(new Model.bt_par_setting { par_id = "print_count", par_val = txt_print_count.Text }); lst.Add(new Model.bt_par_setting { par_id = "can_input_qty", par_val = can_input_qty }); lst.Add(new Model.bt_par_setting { par_id = "is_continue_weight", par_val = is_continue_weight }); bll.UpdateParSetting(lst); Program.mo_ling = mo_ling; Program.weight_model = weight_model; Program.branch_no = txt_branch_no.Text; Program.jh = txt_jh.Text; Program.input_cus_model = input_cus_model; Program.print_count = Conv.ToInt(txt_print_count.Text); Program.can_input_qty = can_input_qty; Program.is_continue_weight = is_continue_weight; if (!SoftUpdate.PermissionsBalidation()) { IBLL.IClientBLL bll2 = new BLL.ClientBLL(); int errId = 0; string errMsg = ""; bll2.DownLoadOper(out errId, out errMsg); } var frm = new MsgForm("修改参数设置成功"); frm.ShowDialog(); this.DialogResult = DialogResult.OK; this.Close(); } catch (Exception ex) { new MsgForm(ex.GetMessage()).ShowDialog(); } finally { Cursor.Current = Cursors.Default; } }