//正式入住
        protected void btnEnCheckIn_Click(object sender, EventArgs e)
        {
            int       roomid  = Convert.ToInt32(Request.QueryString["roomid"]);
            DataTable dt      = BLL_Hotel.Cha_OneReserve(roomid);//根据房间编号查询预约信息
            int       gid     = Convert.ToInt32(dt.Rows[0]["gid"]);
            DateTime  intime  = Convert.ToDateTime(dt.Rows[0]["intime"]);
            DateTime  outtime = Convert.ToDateTime(dt.Rows[0]["outtime"]);
            int       day     = Convert.ToInt32(dt.Rows[0]["daynum"]);
            double    charge  = Convert.ToDouble(dt.Rows[0]["charge"]);

            BLL_Hotel.Add_Record(gid, roomid, intime, outtime, day, charge); //将预约信息表的记录转到入住信息表中
            BLL_Hotel.Qu_Reserve(roomid, "已转正入住");                           //更换房间信息
            BLL_Hotel.Gai_roomstate(roomid, 2);                              //修改房间状态为已入住
            Response.Write("<script>alert('房间转正成功!');location.href='RoomDetail.aspx?roomid='+" + roomid + "</script>");
        }
Example #2
0
 //预约详情查看
 protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "sc")
     {
         int yid = Convert.ToInt32(e.CommandArgument);
         BLL_Hotel.DelReserve(yid);
         bind();
     }
     if (e.CommandName == "xq")
     {
         int       roomid = Convert.ToInt32(e.CommandArgument);
         DataTable dt     = BLL_Hotel.Cha_OneReserve(roomid);
         if (dt.Rows.Count == 0)
         {
             ScriptManager.RegisterClientScriptBlock(UpdatePanel1, this.GetType(), "click", "alert('该客户已转正或取消预约,暂不提供业务处理!');", true);
         }
         else
         {
             Response.Redirect("ReserveDetail.aspx?roomid=" + roomid);
         }
     }
 }
        public void bind()
        {
            int       roomid = Convert.ToInt32(Request.QueryString["roomid"]);
            DataTable dt     = BLL_Hotel.Cha_OneReserve(roomid);

            this.txtGid.Text      = dt.Rows[0]["gid"].ToString();
            this.txtGname.Text    = dt.Rows[0]["gname"].ToString();
            this.txtMobile.Text   = dt.Rows[0]["mobile"].ToString();
            this.txtRTName.Text   = dt.Rows[0]["Rtname"].ToString();
            this.txtTName.Text    = dt.Rows[0]["tname"].ToString();
            this.txtRoomName.Text = dt.Rows[0]["number"].ToString();
            this.txtMark.Text     = dt.Rows[0]["mark"].ToString();
            this.txtInTime.Text   = dt.Rows[0]["intime"].ToString();
            this.txtCharge.Text   = dt.Rows[0]["charge"].ToString();
            if (dt.Rows[0]["actcharge"].ToString() == "0")
            {
                this.txtResMark.Text = "您预订时选择的是【无担保预订】,正式入驻需缴纳押金" + dt.Rows[0]["charge"] + "元。";
            }
            else
            {
                this.txtResMark.Text = "您预订时选择的是【担保预订】,正式入驻无需缴纳押金,取消预订需退押金还" + dt.Rows[0]["actcharge"] + "元。";
            }
        }
Example #4
0
        public void bind()
        {
            int       roomid = Convert.ToInt32(Request.QueryString["roomid"]);
            DataTable dt     = BLL_Hotel.Cha_OneReserve(roomid);

            this.TextBox1.Text = dt.Rows[0]["gid"].ToString();
            this.TextBox2.Text = dt.Rows[0]["gname"].ToString();
            this.TextBox3.Text = dt.Rows[0]["mobile"].ToString();
            this.TextBox4.Text = dt.Rows[0]["Rtname"].ToString();
            this.TextBox5.Text = dt.Rows[0]["tname"].ToString();
            this.TextBox6.Text = dt.Rows[0]["number"].ToString();
            this.TextBox7.Text = dt.Rows[0]["mark"].ToString();
            this.TextBox8.Text = dt.Rows[0]["intime"].ToString();
            this.TextBox9.Text = dt.Rows[0]["charge"].ToString();
            if (dt.Rows[0]["actcharge"].ToString() == "0")
            {
                this.TextBox10.Text = "您预订时选择的是【无担保预订】,正式入驻需缴纳押金" + dt.Rows[0]["charge"] + "元。";
            }
            else
            {
                this.TextBox10.Text = "您预订时选择的是【担保预订】,正式入驻无需缴纳押金,取消预订需退押金还" + dt.Rows[0]["actcharge"] + "元。";
            }
        }