private void ShowInfo(int ItemId) { NoName.NetShop.BLL.VoteItemsModelBll bll=new NoName.NetShop.BLL.VoteItemsModelBll(); NoName.NetShop.Model.VoteItemsModel model=bll.GetModel(ItemId); this.lblVoteGroupId.Text=model.VoteGroupId.ToString(); this.lblVoteId.Text=model.VoteId.ToString(); this.lblItemContent.Text=model.ItemContent; this.lblVoteCount.Text=model.VoteCount.ToString(); }
private void ShowInfo(int ItemId) { NoName.NetShop.BLL.VoteItemsModelBll bll = new NoName.NetShop.BLL.VoteItemsModelBll(); NoName.NetShop.Model.VoteItemsModel model = bll.GetModel(ItemId); this.lblVoteGroupId.Text = model.VoteGroupId.ToString(); this.lblVoteId.Text = model.VoteId.ToString(); this.lblItemContent.Text = model.ItemContent; this.lblVoteCount.Text = model.VoteCount.ToString(); }
protected void btnAdd_Click(object sender, EventArgs e) { string strErr = ""; if (!PageValidate.IsNumber(txtVoteGroupId.Text)) { strErr += "VoteGroupId不是数字!\\n"; } if (!PageValidate.IsNumber(txtVoteId.Text)) { strErr += "VoteId不是数字!\\n"; } if (this.txtItemContent.Text == "") { strErr += "ItemContent不能为空!\\n"; } if (!PageValidate.IsNumber(txtVoteCount.Text)) { strErr += "VoteCount不是数字!\\n"; } if (strErr != "") { MessageBox.Show(this, strErr); return; } int VoteGroupId = int.Parse(this.txtVoteGroupId.Text); int VoteId = int.Parse(this.txtVoteId.Text); string ItemContent = this.txtItemContent.Text; int VoteCount = int.Parse(this.txtVoteCount.Text); NoName.NetShop.Model.VoteItemsModel model = new NoName.NetShop.Model.VoteItemsModel(); model.VoteGroupId = VoteGroupId; model.VoteId = VoteId; model.ItemContent = ItemContent; model.VoteCount = VoteCount; NoName.NetShop.BLL.VoteItemsModelBll bll = new NoName.NetShop.BLL.VoteItemsModelBll(); bll.Update(model); }
protected void btnAdd_Click(object sender, EventArgs e) { string strErr=""; if(!PageValidate.IsNumber(txtVoteGroupId.Text)) { strErr+="VoteGroupId�������֣�\\n"; } if(!PageValidate.IsNumber(txtVoteId.Text)) { strErr+="VoteId�������֣�\\n"; } if(this.txtItemContent.Text =="") { strErr+="ItemContent����Ϊ�գ�\\n"; } if(!PageValidate.IsNumber(txtVoteCount.Text)) { strErr+="VoteCount�������֣�\\n"; } if(strErr!="") { MessageBox.Show(this,strErr); return; } int VoteGroupId=int.Parse(this.txtVoteGroupId.Text); int VoteId=int.Parse(this.txtVoteId.Text); string ItemContent=this.txtItemContent.Text; int VoteCount=int.Parse(this.txtVoteCount.Text); NoName.NetShop.Model.VoteItemsModel model=new NoName.NetShop.Model.VoteItemsModel(); model.VoteGroupId=VoteGroupId; model.VoteId=VoteId; model.ItemContent=ItemContent; model.VoteCount=VoteCount; NoName.NetShop.BLL.VoteItemsModelBll bll=new NoName.NetShop.BLL.VoteItemsModelBll(); bll.Update(model); }