示例#1
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(!PageValidate.IsDateTime(txtenshrine_time.Text))
            {
                strErr+="收藏时间格式错误!\\n";
            }

            if(strErr!="")
            {
                MessageBox.Show(this,strErr);
                return;
            }
            int enshrine_id=int.Parse(this.lblenshrine_id.Text);
            int travle_ID=int.Parse(this.lbltravle_ID.Text);
            string user_telphone=this.lbluser_telphone.Text;
            DateTime enshrine_time=DateTime.Parse(this.txtenshrine_time.Text);
            bool enshrine_islvalid=this.chkenshrine_islvalid.Checked;

            la.Model.enshrine model=new la.Model.enshrine();
            model.enshrine_id=enshrine_id;
            model.travle_ID=travle_ID;
            model.user_telphone=user_telphone;
            model.enshrine_time=enshrine_time;
            model.enshrine_islvalid=enshrine_islvalid;

            la.BLL.enshrine bll=new la.BLL.enshrine();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this,"保存成功!","list.aspx");
        }
示例#2
0
 private void ShowInfo(int enshrine_id,int travle_ID,string user_telphone)
 {
     la.BLL.enshrine bll=new la.BLL.enshrine();
     la.Model.enshrine model=bll.GetModel(enshrine_id,travle_ID,user_telphone);
     this.lblenshrine_id.Text=model.enshrine_id.ToString();
     this.lbltravle_ID.Text=model.travle_ID.ToString();
     this.lbluser_telphone.Text=model.user_telphone;
     this.lblenshrine_time.Text=model.enshrine_time.ToString();
     this.lblenshrine_islvalid.Text=model.enshrine_islvalid?"是":"否";
 }
示例#3
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(!PageValidate.IsNumber(txtenshrine_id.Text))
            {
                strErr+="收藏ID格式错误!\\n";
            }
            if(!PageValidate.IsNumber(txttravle_ID.Text))
            {
                strErr+="旅行ID格式错误!\\n";
            }
            if(this.txtuser_telphone.Text.Trim().Length==0)
            {
                strErr+="用户Phone不能为空!\\n";
            }
            if(!PageValidate.IsDateTime(txtenshrine_time.Text))
            {
                strErr+="收藏时间格式错误!\\n";
            }

            if(strErr!="")
            {
                MessageBox.Show(this,strErr);
                return;
            }
            int enshrine_id=int.Parse(this.txtenshrine_id.Text);
            int travle_ID=int.Parse(this.txttravle_ID.Text);
            string user_telphone=this.txtuser_telphone.Text;
            DateTime enshrine_time=DateTime.Parse(this.txtenshrine_time.Text);
            bool enshrine_islvalid=this.chkenshrine_islvalid.Checked;

            la.Model.enshrine model=new la.Model.enshrine();
            model.enshrine_id=enshrine_id;
            model.travle_ID=travle_ID;
            model.user_telphone=user_telphone;
            model.enshrine_time=enshrine_time;
            model.enshrine_islvalid=enshrine_islvalid;

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