Esempio n. 1
0
 private void ShowInfo(int ProductId)
 {
     NoName.NetShop.BLL.ProductExtModelBll bll   = new NoName.NetShop.BLL.ProductExtModelBll();
     NoName.NetShop.Model.ProductExtModel  model = bll.GetModel(ProductId);
     this.lblProductId.Text   = model.ProductId.ToString();
     this.txtProductDesc.Text = model.ProductDesc;
 }
 private void ShowInfo(int ProductId)
 {
     NoName.NetShop.BLL.ProductExtModelBll bll=new NoName.NetShop.BLL.ProductExtModelBll();
     NoName.NetShop.Model.ProductExtModel model=bll.GetModel(ProductId);
     this.lblProductId.Text=model.ProductId.ToString();
     this.txtProductDesc.Text=model.ProductDesc;
 }
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(this.txtProductDesc.Text =="")
            {
            strErr+="ProductDesc����Ϊ�գ�\\n";
            }

            if(strErr!="")
            {
            MessageBox.Show(this,strErr);
            return;
            }
            string ProductDesc=this.txtProductDesc.Text;

            NoName.NetShop.Model.ProductExtModel model=new NoName.NetShop.Model.ProductExtModel();
            model.ProductDesc=ProductDesc;

            NoName.NetShop.BLL.ProductExtModelBll bll=new NoName.NetShop.BLL.ProductExtModelBll();
            bll.Add(model);
        }
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtProductDesc.Text == "")
            {
                strErr += "ProductDesc不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string ProductDesc = this.txtProductDesc.Text;

            NoName.NetShop.Model.ProductExtModel model = new NoName.NetShop.Model.ProductExtModel();
            model.ProductDesc = ProductDesc;

            NoName.NetShop.BLL.ProductExtModelBll bll = new NoName.NetShop.BLL.ProductExtModelBll();
            bll.Add(model);
        }