Esempio n. 1
0
        public void BookRoom(int roomid, int userid, DateTime sdate, DateTime edate, string remark)
        {
            if (sdate.AddDays(1) < DateTime.Now)
            {
                OutResult("入住日期必须大于等于当前日期!");
                return;
            }
            if (edate <= sdate)
            {
                OutResult("离开日期必须大于入住日期!");
                return;
            }

            MemberController controller = new MemberController();
            var r = controller.BookRoom(roomid, sdate, edate, remark, userid);
            if (r == 1)
            {
                OutResult(1);
            }
            else if (r == -2)
            {
                OutResult("该时段的房间已全部被预订!");
            }
            else if (r == -3)
            {
                OutResult("您的余额已不足!请登录旅居中国官网充值。");
            }
            else
            {
                OutResult("预订失败,请重试!");
            }
        }
Esempio n. 2
0
 public void DeleteOrder(int orderid)
 {
     MemberController controller = new MemberController();
     var r = controller.DeleteOrder(orderid);
     OutResult(r);
 }
Esempio n. 3
0
 public void CancelBook(HQ_BookRoom broom)
 {
     MemberController controller = new MemberController();
     var r = controller.CancelBook(broom);
     OutResult(r);
 }
Esempio n. 4
0
 public void UpdateOrderRemark(int orderid, string remark)
 {
     MemberController controller = new MemberController();
     var order = new HQ_BookRoom();
     order["ID"] = orderid;
     order.Remark = remark;
     var r = controller.SaveBRoomRemark(order);
     OutResult(r);
 }