Esempio n. 1
0
        public EditRoomViewModel(RoomsTabViewModel roomTabViewModel, IRoomTypeRepository roomTypeRepository)
        {
            _roomTabViewModel   = roomTabViewModel;
            _roomTypeRepository = roomTypeRepository;

            RoomTypeValues = _roomTypeRepository.GetAll();
            CapacityValues = new List <int>
            {
                1, 2, 3, 4
            };

            UpdateRoomCommand = new SimpleCommand(c => UpdateRoom());
        }
Esempio n. 2
0
        public AddRoomViewModel(RoomsTabViewModel roomTabViewModel, IRoomTypeRepository roomTypeRepository)
        {
            _roomTabViewModel   = roomTabViewModel;
            _roomTypeRepository = roomTypeRepository;

            Room = new Room
            {
                Number = 1
            };
            RoomTypeValues = _roomTypeRepository.GetAll();
            CapacityValues = new List <int>
            {
                1, 2, 3, 4
            };

            AddRoomCommand = new SimpleCommand(c => AddRoom());
        }