Beispiel #1
0
 private void ShowInfo()
 {
     MyERP.BLL.PUB_BMTMP   bll   = new MyERP.BLL.PUB_BMTMP();
     MyERP.Model.PUB_BMTMP model = bll.GetModel();
     this.lblBMCODE.Text = model.BMCODE;
     this.lblBMNAME.Text = model.BMNAME;
 }
Beispiel #2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtBMCODE.Text.Trim().Length == 0)
            {
                strErr += "BMCODE不能为空!\\n";
            }
            if (this.txtBMNAME.Text.Trim().Length == 0)
            {
                strErr += "BMNAME不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string BMCODE = this.txtBMCODE.Text;
            string BMNAME = this.txtBMNAME.Text;

            MyERP.Model.PUB_BMTMP model = new MyERP.Model.PUB_BMTMP();
            model.BMCODE = BMCODE;
            model.BMNAME = BMNAME;

            MyERP.BLL.PUB_BMTMP bll = new MyERP.BLL.PUB_BMTMP();
            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx");
        }