Пример #1
0
        public ActionResult Index()
        {
            SearchViewModel vm = new SearchViewModel();

            vm.ArrivalDate   = DateTime.Now;
            vm.DepartureDate = (DateTime.Now).AddDays(1);
            vm.Rooms         = _roomsRepository.GetRoomTypesGeneral();
            vm.RoomsIndex    = _roomsRepository.GetRooms();
            vm.Reservations  = _reservationsRepository.GetReservations();


            return(View(vm));
        }
 // GET: MyReservations
 public ActionResult MyReservations()
 {
     if (!Request.IsAuthenticated)
     {
         return(RedirectToAction("Login", "Account"));
     }
     else
     {
         ReservationsRepository       resRepo = new ReservationsRepository();
         DisplayReservationsViewModel model   = new DisplayReservationsViewModel();
         long currentUserId = User.Identity.GetUserId <long>();
         model.MyReservations = resRepo.GetReservations(currentUserId);
         return(View(model));
     }
 }
Пример #3
0
        // GET: Reservations
        public ActionResult Index()
        {
            var reservations = _reservationsRepository.GetReservations();

            return(View(reservations));
        }