Exemplo n.º 1
0
        public frmProduct()
        {
            InitializeComponent();
            this.Load += frm_Load;
            //实例化必须,bllBusinessBase必须替换为bll层自己继承的子类(指定正确的dal.DBCode),建议封装重写到项目bll层

            _bll = bll = new bllProduct();
        }
Exemplo n.º 2
0
        protected override void InitializeForm()
        {
            _SummaryView        = new DevGridView(gvSummary);//每个业务窗体必需给这个变量赋值.
            _ActiveEditor       = txtPcode;
            _KeyEditor          = txtPcode;
            _DetailGroupControl = gcDetailEditor;
            _BLL         = new bllProduct();   //业务逻辑实例
            _BllInstance = _BLL as bllProduct; //本窗体引用

            base.InitializeForm();
        }
Exemplo n.º 3
0
        private void OnStockCode_Validating(object sender, CancelEventArgs e)
        {
            if (this.IsAddOrEditMode == false)
            {
                return;
            }
            if (string.IsNullOrEmpty((sender as ButtonEdit).Text))
            {
                return;
            }

            string    stockCode = (sender as ButtonEdit).Text.Trim();
            DataTable dt        = new bllProduct().GetDataByKey(stockCode); //验证产品编号是否正确

            if (dt.Rows.Count > 0)
            {
                this.SearchStockCallBack(dt.Rows[0]);
            }
            else
            {
                e.Cancel = true;
                Msg.Warning("产品编号不存在!");
            }
        }