private void ShowInfo(int VoteGroupId)
 {
     NoName.NetShop.BLL.VoteGroupModelBll bll   = new NoName.NetShop.BLL.VoteGroupModelBll();
     NoName.NetShop.Model.VoteGroupModel  model = bll.GetModel(VoteGroupId);
     this.lblVoteId.Text    = model.VoteId.ToString();
     this.lblGroupType.Text = model.GroupType.ToString();
     this.lblSubject.Text   = model.Subject;
     this.lblContent.Text   = model.Content;
 }
 private void ShowInfo(int VoteGroupId)
 {
     NoName.NetShop.BLL.VoteGroupModelBll bll=new NoName.NetShop.BLL.VoteGroupModelBll();
     NoName.NetShop.Model.VoteGroupModel model=bll.GetModel(VoteGroupId);
     this.lblVoteId.Text=model.VoteId.ToString();
     this.lblGroupType.Text=model.GroupType.ToString();
     this.lblSubject.Text=model.Subject;
     this.lblContent.Text=model.Content;
 }
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (!PageValidate.IsNumber(txtVoteId.Text))
            {
                strErr += "VoteId不是数字!\\n";
            }
            if (!PageValidate.IsNumber(txtGroupType.Text))
            {
                strErr += "GroupType不是数字!\\n";
            }
            if (this.txtSubject.Text == "")
            {
                strErr += "Subject不能为空!\\n";
            }
            if (this.txtContent.Text == "")
            {
                strErr += "Content不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            int    VoteId    = int.Parse(this.txtVoteId.Text);
            int    GroupType = int.Parse(this.txtGroupType.Text);
            string Subject   = this.txtSubject.Text;
            string Content   = this.txtContent.Text;


            NoName.NetShop.Model.VoteGroupModel model = new NoName.NetShop.Model.VoteGroupModel();
            model.VoteId    = VoteId;
            model.GroupType = GroupType;
            model.Subject   = Subject;
            model.Content   = Content;

            NoName.NetShop.BLL.VoteGroupModelBll bll = new NoName.NetShop.BLL.VoteGroupModelBll();
            bll.Update(model);
        }
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(!PageValidate.IsNumber(txtVoteId.Text))
            {
            strErr+="VoteId�������֣�\\n";
            }
            if(!PageValidate.IsNumber(txtGroupType.Text))
            {
            strErr+="GroupType�������֣�\\n";
            }
            if(this.txtSubject.Text =="")
            {
            strErr+="Subject����Ϊ�գ�\\n";
            }
            if(this.txtContent.Text =="")
            {
            strErr+="Content����Ϊ�գ�\\n";
            }

            if(strErr!="")
            {
            MessageBox.Show(this,strErr);
            return;
            }
            int VoteId=int.Parse(this.txtVoteId.Text);
            int GroupType=int.Parse(this.txtGroupType.Text);
            string Subject=this.txtSubject.Text;
            string Content=this.txtContent.Text;

            NoName.NetShop.Model.VoteGroupModel model=new NoName.NetShop.Model.VoteGroupModel();
            model.VoteId=VoteId;
            model.GroupType=GroupType;
            model.Subject=Subject;
            model.Content=Content;

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