private void txt_branch_Leave(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(this.txt_branch.Text.Trim()))
            {
                errMsg = "请输入仓库";
                return;
            }
            {
                errMsg = "";
            }
            string branch = this.txt_branch.Text.Trim();

            IBLL.IBranch     bll         = new BLL.BranchBLL();
            bi_t_branch_info branch_Info = new bi_t_branch_info()
            {
                branch_no = branch
            };

            branch_Info = bll.GetItem(branch_Info);

            if (branch_Info == null || string.IsNullOrEmpty(branch_Info.branch_no))
            {
                frmSelect frm = new frmSelect("5", branch);
                frm.ShowDialog();
                if (frm.item_no != "")
                {
                    if (frm.item_no != "")
                    {
                        branch_Info.branch_no = frm.item_no;
                        branch_Info           = bll.GetItem(branch_Info);
                    }
                }
            }

            this.branch = branch_Info;
            if (branch_Info == null || string.IsNullOrEmpty(branch_Info.branch_no))
            {
                errMsg = "仓库不存在";
                this.lbl_branch.Text = "";
                this.txt_branch.Text = "";
            }
            else
            {
                errMsg = "";
                this.lbl_branch.Text = branch_Info.branch_name;
                this.txt_branch.Text = branch_Info.branch_no;
            }
        }
        private void txt_cust_Leave(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txt_cust.Text.Trim()))
            {
                errMsg = "请输入客户";
                return;
            }
            else
            {
                errMsg = "";
            }

            string cust = this.txt_cust.Text.Trim();

            IBLL.ICus bll     = new BLL.CusBLL();
            var       supcust = bll.GetItem(cust);

            if (supcust == null || string.IsNullOrEmpty(supcust.supcust_no))
            {
                var frm = new frmSelect("2", cust);
                frm.ShowDialog();
                if (frm.item_no != "")
                {
                    supcust = bll.GetItem(frm.item_no);
                }
            }

            this.supcust = supcust;
            if (supcust == null)
            {
                errMsg = "客户不存在";
                this.lbl_cust_name.Text = "";
                this.txt_cust.Text      = "";
            }
            else
            {
                this.lbl_cust_name.Text = supcust.sup_name;
                this.txt_cust.Text      = supcust.supcust_no;
            }
        }