Example #1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtSTOCK_CODE.Text.Trim().Length == 0)
            {
                strErr += "STOCK_CODE不能为空!\\n";
            }
            if (this.txtCREATE_DATE.Text.Trim().Length == 0)
            {
                strErr += "CREATE_DATE不能为空!\\n";
            }
            if (this.txtCREATE_NAME.Text.Trim().Length == 0)
            {
                strErr += "CREATE_NAME不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string STOCK_CODE  = this.txtSTOCK_CODE.Text;
            string CREATE_DATE = this.txtCREATE_DATE.Text;
            string CREATE_NAME = this.txtCREATE_NAME.Text;

            MyERP.Model.WL_STOCK_BEGIN_RECORD model = new MyERP.Model.WL_STOCK_BEGIN_RECORD();
            model.STOCK_CODE  = STOCK_CODE;
            model.CREATE_DATE = CREATE_DATE;
            model.CREATE_NAME = CREATE_NAME;

            MyERP.BLL.WL_STOCK_BEGIN_RECORD bll = new MyERP.BLL.WL_STOCK_BEGIN_RECORD();
            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx");
        }
Example #2
0
 private void ShowInfo(int ID)
 {
     MyERP.BLL.WL_STOCK_BEGIN_RECORD   bll   = new MyERP.BLL.WL_STOCK_BEGIN_RECORD();
     MyERP.Model.WL_STOCK_BEGIN_RECORD model = bll.GetModel(ID);
     this.lblID.Text          = model.ID.ToString();
     this.lblSTOCK_CODE.Text  = model.STOCK_CODE;
     this.lblCREATE_DATE.Text = model.CREATE_DATE;
     this.lblCREATE_NAME.Text = model.CREATE_NAME;
 }