Пример #1
0
        public PartialViewResult ViewPrintPay(int checkinID, bool IsboolService, bool IsboolRoom, string tDate, int khunggio)
        {
            //[Ignore]
            //checkinID = 9;
            var model = new PaymentCheckOutModel();

            //thông tin khách hàng
            model.InforCustomer = _svustomerArrive.GetCustomerRoomByCheckInID(checkinID);
            DateTime dateToLeave;

            DateTime.TryParse(tDate, CultureInfo.GetCultureInfo("vi-vn"), DateTimeStyles.None, out dateToLeave);
            //danh sách giá phòng
            model.GetListPriceEstimate =
                new EstimatePrice1Service().caculatePrice(model.InforCustomer.SysHotelID.GetValueOrDefault(),
                                                          khunggio,//model.InforCustomer.KhungGio.GetValueOrDefault(0),
                                                          model.InforCustomer.roomid.GetValueOrDefault(0),
                                                          model.InforCustomer.Room_Type_ID.GetValueOrDefault(0),
                                                          model.InforCustomer.Arrive_Date.GetValueOrDefault(),
                                                          dateToLeave, -1, model.InforCustomer.Number_People, model.InforCustomer.Number_Children);
            model.InforCustomer.IsboolRoom    = IsboolRoom;
            model.InforCustomer.IsboolService = IsboolService;
            var cService = _svustomerArrive.GetListCustomerServices(checkinID);

            // danh sách dịnh vụ đã sử dụng
            model.GetListCustomerServices = cService.ToList();

            // danh sách dịnh vụ khác đã sử dụng
            //model.GetListCustomerOtherServices = cService.Where(x => x.UnitID == 0).ToList();
            //var model = _svustomerArrive.GetCustomerRoomByCheckInID(id);
            //model.GetListCustomerServices = _svustomerArrive.GetListCustomerServices(id);
            Session["RoomByCheckInID"] = model;

            return(PartialView("PrintPay", model));
        }
Пример #2
0
        public JsonResult PrintPay(int checkinID, string tDate, int khunggio)
        {
            //checkinID = 9;
            var model = new PaymentCheckOutModel();

            //thông tin khách hàng
            model.InforCustomer = _svustomerArrive.GetCustomerRoomByCheckInID(checkinID);

            DateTime dateToLeave;

            DateTime.TryParse(tDate, CultureInfo.GetCultureInfo("vi-vn"), DateTimeStyles.None, out dateToLeave);
            //danh sách giá phòng
            model.GetListPriceEstimate =
                new EstimatePrice1Service().caculatePrice(model.InforCustomer.SysHotelID.GetValueOrDefault(),
                                                          khunggio,//model.InforCustomer.KhungGio.GetValueOrDefault(0),
                                                          model.InforCustomer.roomid.GetValueOrDefault(0),
                                                          model.InforCustomer.Room_Type_ID.GetValueOrDefault(0),
                                                          model.InforCustomer.Arrive_Date.GetValueOrDefault(),
                                                          dateToLeave, -1, model.InforCustomer.Number_People, model.InforCustomer.Number_Children);

            var cService = _svustomerArrive.GetListCustomerServices(checkinID);

            // danh sách dịnh vụ đã sử dụng
            model.GetListCustomerServices = cService.ToList();

            // danh sách dịnh vụ khác đã sử dụng
            //model.GetListCustomerOtherServices = cService.Where(x => x.UnitID == 0).ToList();

            return(Json(model, JsonRequestBehavior.AllowGet));
        }
Пример #3
0
        // GET: RoomCheckOut
        public ActionResult Index(int checkinID)
        {
            //checkinID = 9;
            var model = new PaymentCheckOutModel();

            //thông tin khách hàng
            model.InforCustomer = _svustomerArrive.GetCustomerRoomByCheckInID(checkinID);
            if (model.InforCustomer == null)
            {
                return(Redirect("CustomerPayCheckOutFalse"));
            }
            var listRoomPrice = new List <RoomPriceEstimateModel>();
            //okie
            DateTime dateToArrive = DateTime.Now;

            //DateTime dateToArrive= model.InforCustomer.Leave_Date.GetValueOrDefault(DateTime.Now);
            //if (dateToArrive.CompareTo(DateTime.Now) > 0) dateToArrive = DateTime.Now;
            model.InforCustomer.Leave_Date = DateTime.Now;
            listRoomPrice = new EstimatePrice1Service().caculatePrice(model.InforCustomer.SysHotelID.GetValueOrDefault(0), model.InforCustomer.KhungGio.GetValueOrDefault(0),
                                                                      model.InforCustomer.roomid.GetValueOrDefault(0), model.InforCustomer.Room_Type_ID.GetValueOrDefault(0), model.InforCustomer.Arrive_Date.GetValueOrDefault(DateTime.Now),
                                                                      dateToArrive, -1);
            //danh sách giá phòng
            model.GetListPriceEstimate = listRoomPrice;

            var cService = _svustomerArrive.GetListCustomerServices(checkinID);

            // danh sách dịnh vụ đã sử dụng
            model.GetListCustomerServices = cService.Where(x => x.UnitID > 0).ToList();

            // danh sách dịnh vụ khác đã sử dụng
            model.GetListCustomerOtherServices = cService.Where(x => x.UnitID == 0).ToList();
            // danh sách dịch vụ
            model.GetProductList = _svustomerArrive.GetlistProduct(model.InforCustomer.SysHotelID.GetValueOrDefault(), model.InforCustomer.roomid.GetValueOrDefault(0));
            return(View(model));
        }
Пример #4
0
        // GET: RoomCheckOut
        public ActionResult Index(int checkinID)
        {
            //checkinID = 9;
            var model = new PaymentCheckOutModel();

            //thông tin khách hàng
            model.InforCustomer = _svustomerArrive.GetCustomerRoomByCheckInID(checkinID);
            if (model.InforCustomer == null)
            {
                return(Redirect("CustomerPayCheckOutFalse"));
            }
            var listRoomPrice = new List <RoomPriceEstimateModel>();

            //okie
            ViewBag.Leave_Date = model.InforCustomer.Leave_Date.GetValueOrDefault(DateTime.Now);
            TimeSpan         tm     = DateTime.Now.Subtract(model.InforCustomer.Arrive_Date.GetValueOrDefault(DateTime.Now));
            tbl_HotelsConfig config = (new CommService()).getConfigHotel();

            ViewBag.totalHours = tm.Hours + (tm.Minutes > (config.startRoundMain ?? 0)?1:0);

            //DateTime dateToArrive= model.InforCustomer.Leave_Date.GetValueOrDefault(DateTime.Now);
            //if (dateToArrive.CompareTo(DateTime.Now) > 0) dateToArrive = DateTime.Now;
            model.InforCustomer.Leave_Date = DateTime.Now;
            listRoomPrice =
                new EstimatePrice1Service().caculatePrice(model.InforCustomer.SysHotelID.GetValueOrDefault(0),
                                                          -1,
                                                          model.InforCustomer.roomid.GetValueOrDefault(0),
                                                          model.InforCustomer.Room_Type_ID.GetValueOrDefault(0),
                                                          model.InforCustomer.Arrive_Date.GetValueOrDefault(DateTime.Now),
                                                          model.InforCustomer.Leave_Date.GetValueOrDefault(DateTime.Now), -1
                                                          , model.InforCustomer.Number_People, model.InforCustomer.Number_Children);
            //danh sách giá phòng
            model.GetListPriceEstimate = listRoomPrice;

            var cService = _svustomerArrive.GetListCustomerServices(checkinID);

            // danh sách dịnh vụ đã sử dụng
            model.GetListCustomerServices = cService.Where(x => x.UnitID > 0).ToList();

            // danh sách dịnh vụ khác đã sử dụng
            model.GetListCustomerOtherServices = cService.Where(x => x.UnitID == 0).ToList();
            // danh sách dịch vụ
            model.GetProductList = _svustomerArrive.GetlistProduct(model.InforCustomer.SysHotelID.GetValueOrDefault(),
                                                                   model.InforCustomer.roomid.GetValueOrDefault(0));
            return(View(model));
        }