Esempio n. 1
0
 private void ShowInfo(string CommodityFatherID)
 {
     Maticsoft.BLL.CommodityFather   bll   = new Maticsoft.BLL.CommodityFather();
     Maticsoft.Model.CommodityFather model = bll.GetModel(CommodityFatherID);
     this.lblCommodityFatherID.Text   = model.CommodityFatherID;
     this.lblCommodityFatherName.Text = model.CommodityFatherName;
 }
Esempio n. 2
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtCommodityFatherName.Text.Trim().Length == 0)
            {
                strErr += "CommodityFatherName不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string CommodityFatherID   = this.lblCommodityFatherID.Text;
            string CommodityFatherName = this.txtCommodityFatherName.Text;


            Maticsoft.Model.CommodityFather model = new Maticsoft.Model.CommodityFather();
            model.CommodityFatherID   = CommodityFatherID;
            model.CommodityFatherName = CommodityFatherName;

            Maticsoft.BLL.CommodityFather bll = new Maticsoft.BLL.CommodityFather();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }