protected void btnAdd_Click(object sender, EventArgs e) { string strErr=""; if(!PageValidate.IsNumber(txtCateId.Text)) { strErr+="CateId不是数字!\\n"; } if(this.txtParaName.Text =="") { strErr+="ParaName不能为空!\\n"; } if(!PageValidate.IsNumber(txtParaType.Text)) { strErr+="ParaType不是数字!\\n"; } if(!PageValidate.IsNumber(txtStatus.Text)) { strErr+="Status不是数字!\\n"; } if(!PageValidate.IsNumber(txtParaGroupId.Text)) { strErr+="ParaGroupId不是数字!\\n"; } if(this.txtParaValues.Text =="") { strErr+="ParaValues不能为空!\\n"; } if(this.txtDefaultValue.Text =="") { strErr+="DefaultValue不能为空!\\n"; } if(strErr!="") { MessageBox.Show(this,strErr); return; } int CateId=int.Parse(this.txtCateId.Text); string ParaName=this.txtParaName.Text; int ParaType=int.Parse(this.txtParaType.Text); int Status=int.Parse(this.txtStatus.Text); int ParaGroupId=int.Parse(this.txtParaGroupId.Text); string ParaValues=this.txtParaValues.Text; string DefaultValue=this.txtDefaultValue.Text; NoName.NetShop.Model.CategoryParaModel model=new NoName.NetShop.Model.CategoryParaModel(); model.CateId=CateId; model.ParaName=ParaName; model.ParaType=ParaType; model.Status=Status; model.ParaGroupId=ParaGroupId; model.ParaValues=ParaValues; model.DefaultValue=DefaultValue; NoName.NetShop.BLL.CategoryParaModelBll bll=new NoName.NetShop.BLL.CategoryParaModelBll(); bll.Update(model); }
protected void btnAdd_Click(object sender, EventArgs e) { string strErr=""; if(!PageValidate.IsNumber(txtCateId.Text)) { strErr+="CateId�������֣�\\n"; } if(this.txtParaName.Text =="") { strErr+="ParaName����Ϊ�գ�\\n"; } if(!PageValidate.IsNumber(txtParaType.Text)) { strErr+="ParaType�������֣�\\n"; } if(!PageValidate.IsNumber(txtStatus.Text)) { strErr+="Status�������֣�\\n"; } if(!PageValidate.IsNumber(txtParaGroupId.Text)) { strErr+="ParaGroupId�������֣�\\n"; } if(this.txtParaValues.Text =="") { strErr+="ParaValues����Ϊ�գ�\\n"; } if(this.txtDefaultValue.Text =="") { strErr+="DefaultValue����Ϊ�գ�\\n"; } if(strErr!="") { MessageBox.Show(this,strErr); return; } int CateId=int.Parse(this.txtCateId.Text); string ParaName=this.txtParaName.Text; int ParaType=int.Parse(this.txtParaType.Text); int Status=int.Parse(this.txtStatus.Text); int ParaGroupId=int.Parse(this.txtParaGroupId.Text); string ParaValues=this.txtParaValues.Text; string DefaultValue=this.txtDefaultValue.Text; NoName.NetShop.Model.CategoryParaModel model=new NoName.NetShop.Model.CategoryParaModel(); model.CateId=CateId; model.ParaName=ParaName; model.ParaType=ParaType; model.Status=Status; model.ParaGroupId=ParaGroupId; model.ParaValues=ParaValues; model.DefaultValue=DefaultValue; NoName.NetShop.BLL.CategoryParaModelBll bll=new NoName.NetShop.BLL.CategoryParaModelBll(); bll.Add(model); }
private void ShowInfo(int ParaId) { NoName.NetShop.BLL.CategoryParaModelBll bll = new NoName.NetShop.BLL.CategoryParaModelBll(); NoName.NetShop.Model.CategoryParaModel model = bll.GetModel(ParaId); this.lblCateId.Text = model.CateId.ToString(); this.lblParaName.Text = model.ParaName; this.lblParaType.Text = model.ParaType.ToString(); this.lblStatus.Text = model.Status.ToString(); this.lblParaGroupId.Text = model.ParaGroupId.ToString(); this.lblParaValues.Text = model.ParaValues; this.lblDefaultValue.Text = model.DefaultValue; }
private void ShowInfo(int ParaId) { NoName.NetShop.BLL.CategoryParaModelBll bll=new NoName.NetShop.BLL.CategoryParaModelBll(); NoName.NetShop.Model.CategoryParaModel model=bll.GetModel(ParaId); this.lblCateId.Text=model.CateId.ToString(); this.lblParaName.Text=model.ParaName; this.lblParaType.Text=model.ParaType.ToString(); this.lblStatus.Text=model.Status.ToString(); this.lblParaGroupId.Text=model.ParaGroupId.ToString(); this.lblParaValues.Text=model.ParaValues; this.lblDefaultValue.Text=model.DefaultValue; }