コード例 #1
0
 /// <summary>
 /// 查询所有的开房信息(首页的Grid,带搜索功能)
 /// </summary>
 private void GetOpenRoomInfoAll()
 {
     if (Request.Form["msg"] != null)
     {
         OpenRoomInfoBLL orib    = new OpenRoomInfoBLL();
         string          message = Request.Form["msg"];
         string          str     = orib.GetOpenRoomInfoAll(message);
         strJson = str;
     }
     else
     {
         OpenRoomInfoBLL orib = new OpenRoomInfoBLL();
         string          str  = orib.GetOpenRoomInfoAll("");
         strJson = str;
     }
 }
コード例 #2
0
    /// <summary>
    /// 退房操作
    /// </summary>
    private void CloseRoom()
    {
        OpenRoomInfoBLL orBll      = new OpenRoomInfoBLL();
        string          RoomNumber = Request.Form["RoomNumber"].ToString();
        string          json;

        //如果success为true,则表示服务器端处理成功
        if (orBll.CloseRoom(RoomNumber))
        {
            json = @"{success: true}";
        }
        else
        {
            json = @"{success: false}";
        }
        Response.Write(json);
    }
コード例 #3
0
    /// <summary>
    /// 开房操作
    /// </summary>
    private void OpenRoom()
    {
        OpenRoomInfoBLL  oriBll = new OpenRoomInfoBLL();  //逻辑层
        OpenRoomInfoBean orib   = new OpenRoomInfoBean(); //实体Bean

        //得到表单提交的值
        orib.RoomId      = int.Parse(Request.Form["RoomId"].ToString());
        orib.GuestNumber = Request.Form["guestNumber"];
        orib.GuestName   = Request.Form["guestName"];
        orib.GuestMoney  = double.Parse(Request.Form["money"].ToString());
        orib.Remark      = Request.Form["remark"];
        string json;

        //如果success为true,则表示服务器端处理成功
        if (oriBll.OpenRoom(orib))
        {
            json = @"{success: true}";
        }
        else
        {
            json = @"{success: false}";
        }
        Response.Write(json);
    }