Ejemplo n.º 1
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtCommodityFatherID.Text.Trim().Length == 0)
            {
                strErr += "CommodityFatherID不能为空!\\n";
            }
            if (this.txtCommoditySonName.Text.Trim().Length == 0)
            {
                strErr += "CommoditySonName不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string CommoditySonID    = this.lblCommoditySonID.Text;
            string CommodityFatherID = this.txtCommodityFatherID.Text;
            string CommoditySonName  = this.txtCommoditySonName.Text;


            Maticsoft.Model.CommoditySon model = new Maticsoft.Model.CommoditySon();
            model.CommoditySonID    = CommoditySonID;
            model.CommodityFatherID = CommodityFatherID;
            model.CommoditySonName  = CommoditySonName;

            Maticsoft.BLL.CommoditySon bll = new Maticsoft.BLL.CommoditySon();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }
Ejemplo n.º 2
0
 private void ShowInfo(string CommoditySonID)
 {
     Maticsoft.BLL.CommoditySon   bll   = new Maticsoft.BLL.CommoditySon();
     Maticsoft.Model.CommoditySon model = bll.GetModel(CommoditySonID);
     this.lblCommoditySonID.Text    = model.CommoditySonID;
     this.lblCommodityFatherID.Text = model.CommodityFatherID;
     this.lblCommoditySonName.Text  = model.CommoditySonName;
 }