protected void btnAdd_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(this.txtRemark.Text =="")
            {
            strErr+="Remark����Ϊ�գ�\\n";
            }
            if(!PageValidate.IsDateTime(txtVoteTime.Text))
            {
            strErr+="VoteTime����ʱ���ʽ��\\n";
            }
            if(this.txtVoteIP.Text =="")
            {
            strErr+="VoteIP����Ϊ�գ�\\n";
            }

            if(strErr!="")
            {
            MessageBox.Show(this,strErr);
            return;
            }
            string Remark=this.txtRemark.Text;
            DateTime VoteTime=DateTime.Parse(this.txtVoteTime.Text);
            string VoteIP=this.txtVoteIP.Text;

            NoName.NetShop.Model.VoteRemarkModel model=new NoName.NetShop.Model.VoteRemarkModel();
            model.Remark=Remark;
            model.VoteTime=VoteTime;
            model.VoteIP=VoteIP;

            NoName.NetShop.BLL.VoteRemarkModelBll bll=new NoName.NetShop.BLL.VoteRemarkModelBll();
            bll.Update(model);
        }
Beispiel #2
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtRemark.Text == "")
            {
                strErr += "Remark不能为空!\\n";
            }
            if (!PageValidate.IsDateTime(txtVoteTime.Text))
            {
                strErr += "VoteTime不是时间格式!\\n";
            }
            if (this.txtVoteIP.Text == "")
            {
                strErr += "VoteIP不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string   Remark   = this.txtRemark.Text;
            DateTime VoteTime = DateTime.Parse(this.txtVoteTime.Text);
            string   VoteIP   = this.txtVoteIP.Text;


            NoName.NetShop.Model.VoteRemarkModel model = new NoName.NetShop.Model.VoteRemarkModel();
            model.Remark   = Remark;
            model.VoteTime = VoteTime;
            model.VoteIP   = VoteIP;

            NoName.NetShop.BLL.VoteRemarkModelBll bll = new NoName.NetShop.BLL.VoteRemarkModelBll();
            bll.Update(model);
        }
 private void ShowInfo(int VoteId, int UserId)
 {
     NoName.NetShop.BLL.VoteRemarkModelBll bll   = new NoName.NetShop.BLL.VoteRemarkModelBll();
     NoName.NetShop.Model.VoteRemarkModel  model = bll.GetModel(VoteId, UserId);
     this.lblRemark.Text   = model.Remark;
     this.lblVoteTime.Text = model.VoteTime.ToString();
     this.lblVoteIP.Text   = model.VoteIP;
 }
 private void ShowInfo(int VoteId,int UserId)
 {
     NoName.NetShop.BLL.VoteRemarkModelBll bll=new NoName.NetShop.BLL.VoteRemarkModelBll();
     NoName.NetShop.Model.VoteRemarkModel model=bll.GetModel(VoteId,UserId);
     this.lblVoteId.Text=model.VoteId.ToString();
     this.lblUserId.Text=model.UserId.ToString();
     this.txtRemark.Text=model.Remark;
     this.txtVoteTime.Text=model.VoteTime.ToString();
     this.txtVoteIP.Text=model.VoteIP;
 }