Beispiel #1
0
        // GET: Users
        public ActionResult Index()
        {
            var model = new UsersViewModel {
                Users = _userGateway.Read().FindAll(x => x.LockoutEnabled == false).OrderBy(x => x.FirstName).ToList()
            };

            return(View(model));
        }
Beispiel #2
0
        // GET: Rooms/Create
        public ActionResult Create()
        {
            var model = new RoomEquipmentViewModels {
                Equipments = _equipmentGateway.Read(), Departments = _departmentsGateway.Read()
            };

            return(View(model));
        }
Beispiel #3
0
        public ActionResult Index()
        {
            var viewModel = new IndexViewModel {
                Rooms = _roomGateway.Read(), Equipment = _equipmentGateway.Read(), Departments = _departmentGateway.Read()
            };

            return(View(viewModel));
        }
Beispiel #4
0
        // GET: SelectedBooking/BookRoom
        public ActionResult BookRoom(string startDate, string endDate, int?id)
        {
            if (id != null & id > 0)
            {
                var model = new BookRoomViewModel {
                    Room = _roomGateway.Read(id.Value)
                };
                if (!startDate.IsNullOrWhiteSpace())
                {
                    model.StartDate = startDate;
                }
                if (!endDate.IsNullOrWhiteSpace())
                {
                    model.EndDate = endDate;
                }

                return(View(model));
            }
            return(RedirectToAction("Index", "Home"));
        }
Beispiel #5
0
 // GET: Bookings
 public ActionResult Index()
 {
     return(View(_bookingGateway.Read()));
 }
Beispiel #6
0
 // GET: Departments
 public ActionResult Index()
 {
     return(View(_departmentGateway.Read().OrderBy(x => x.Name)));
 }