Esempio n. 1
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(!PageValidate.IsDateTime(txt评价时间.Text))
            {
                strErr+="评价时间格式错误!\\n";
            }

            if(strErr!="")
            {
                MessageBox.Show(this,strErr);
                return;
            }
            int 评价编号=int.Parse(this.lbl评价编号.Text);
            int travle_ID=int.Parse(this.lbltravle_ID.Text);
            string user_telphone=this.lbluser_telphone.Text;
            int 评价字典编号=int.Parse(this.lbl评价字典编号.Text);
            DateTime 评价时间=DateTime.Parse(this.txt评价时间.Text);

            la.Model.comment model=new la.Model.comment();
            model.评价编号=评价编号;
            model.travle_ID=travle_ID;
            model.user_telphone=user_telphone;
            model.评价字典编号=评价字典编号;
            model.评价时间=评价时间;

            la.BLL.comment bll=new la.BLL.comment();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this,"保存成功!","list.aspx");
        }
Esempio n. 2
0
 private void ShowInfo(int 评价编号,int travle_ID,string user_telphone,int 评价字典编号)
 {
     la.BLL.comment bll=new la.BLL.comment();
     la.Model.comment model=bll.GetModel(评价编号,travle_ID,user_telphone,评价字典编号);
     this.lbl评价编号.Text=model.评价编号.ToString();
     this.lbltravle_ID.Text=model.travle_ID.ToString();
     this.lbluser_telphone.Text=model.user_telphone;
     this.lbl评价字典编号.Text=model.评价字典编号.ToString();
     this.lbl评价时间.Text=model.评价时间.ToString();
 }
Esempio n. 3
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(!PageValidate.IsNumber(txt评价编号.Text))
            {
                strErr+="评价编号格式错误!\\n";
            }
            if(!PageValidate.IsNumber(txttravle_ID.Text))
            {
                strErr+="旅行ID格式错误!\\n";
            }
            if(this.txtuser_telphone.Text.Trim().Length==0)
            {
                strErr+="用户Phone不能为空!\\n";
            }
            if(!PageValidate.IsNumber(txt评价字典编号.Text))
            {
                strErr+="评价字典编号格式错误!\\n";
            }
            if(!PageValidate.IsDateTime(txt评价时间.Text))
            {
                strErr+="评价时间格式错误!\\n";
            }

            if(strErr!="")
            {
                MessageBox.Show(this,strErr);
                return;
            }
            int 评价编号=int.Parse(this.txt评价编号.Text);
            int travle_ID=int.Parse(this.txttravle_ID.Text);
            string user_telphone=this.txtuser_telphone.Text;
            int 评价字典编号=int.Parse(this.txt评价字典编号.Text);
            DateTime 评价时间=DateTime.Parse(this.txt评价时间.Text);

            la.Model.comment model=new la.Model.comment();
            model.评价编号=评价编号;
            model.travle_ID=travle_ID;
            model.user_telphone=user_telphone;
            model.评价字典编号=评价字典编号;
            model.评价时间=评价时间;

            la.BLL.comment bll=new la.BLL.comment();
            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this,"保存成功!","add.aspx");
        }