Пример #1
0
        public frmInitSetting()
        {
            InitializeComponent();
            //
            foreach (Control con in this.panel1.Controls)
            {
                cons.AddClickAct.Add(con);
            }
            IBLL.ISysBLL bll = new BLL.SysBLL();
            var          lst = bll.GetParSettingList();

            txt_branch_no.Focus();
            foreach (Model.bt_par_setting item in lst)
            {
                if (item.par_id == "branch_no")
                {
                    txt_branch_no.Text           = item.par_val;
                    txt_branch_no.SelectionStart = txt_branch_no.Text.Length;
                }
                else if (item.par_id == "jh")
                {
                    txt_jh.Text           = item.par_val;
                    txt_jh.SelectionStart = txt_jh.Text.Length;
                }
            }
        }
Пример #2
0
        public frmParSetting()
        {
            InitializeComponent();
            //
            foreach (Control con in this.panel1.Controls)
            {
                cons.AddClickAct.Add(con);
            }
            IBLL.ISysBLL bll = new BLL.SysBLL();
            var          lst = bll.GetParSettingList();

            txt_branch_no.Focus();
            foreach (Model.bt_par_setting item in lst)
            {
                if (item.par_id == "mo_ling")
                {
                    if (item.par_val == "1")
                    {
                        radioButton2.Checked = true;
                    }
                    else if (item.par_val == "2")
                    {
                        radioButton3.Checked = true;
                    }
                    else if (item.par_val == "3")
                    {
                        radioButton4.Checked = true;
                    }
                    else
                    {
                        radioButton1.Checked = true;
                    }
                }
                else if (item.par_id == "weight_model")
                {
                    if (item.par_val == "2")
                    {
                        radioButton6.Checked = true;
                    }
                    else
                    {
                        radioButton5.Checked = true;
                    }
                }
                else if (item.par_id == "branch_no")
                {
                    txt_branch_no.Text           = item.par_val;
                    txt_branch_no.SelectionStart = txt_branch_no.Text.Length;
                }
                else if (item.par_id == "jh")
                {
                    txt_jh.Text           = item.par_val;
                    txt_jh.SelectionStart = txt_jh.Text.Length;
                }
                else if (item.par_id == "input_cus_model")
                {
                    if (item.par_val == "2")
                    {
                        radioButton8.Checked = true;
                    }
                    else
                    {
                        radioButton7.Checked = true;
                    }
                }
                else if (item.par_id == "print_count")
                {
                    txt_print_count.Text           = item.par_val;
                    txt_print_count.SelectionStart = txt_print_count.Text.Length;
                }
                else if (item.par_id == "can_input_qty")
                {
                    if (item.par_val != "1")
                    {
                        chk_input_qty.Checked = false;
                    }
                }
                else if (item.par_id == "is_continue_weight")
                {
                    if (item.par_val == "1")
                    {
                        chk_continue_weight.Checked = true;
                    }
                }
            }
        }