Esempio n. 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));
        }
Esempio n. 2
0
        // GET: Rooms/Create
        public ActionResult Create()
        {
            var model = new RoomEquipmentViewModels {
                Equipments = _equipmentGateway.Read(), Departments = _departmentsGateway.Read()
            };

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

            return(View(viewModel));
        }
Esempio n. 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"));
        }
Esempio n. 5
0
 // GET: Bookings
 public ActionResult Index()
 {
     return(View(_bookingGateway.Read()));
 }
Esempio n. 6
0
 // GET: Departments
 public ActionResult Index()
 {
     return(View(_departmentGateway.Read().OrderBy(x => x.Name)));
 }