Exemple #1
0
 public RegistrationControlModel(MainController mainController, IHotelSystem hotel)
 {
     this.mainController = mainController;
     this.hotel          = hotel;
     RegisterCommand     = new RelayCommand(RegisterExecute, RegisterCanExecute);
     BackToLoginCommand  = new RelayCommand(BackToLoginCommandExecute);
 }
Exemple #2
0
 public LoginControlModel(MainController mainController, IHotelSystem hotel)
 {
     this.mainController = mainController;
     this.hotel          = hotel;
     LoginCommand        = new RelayCommand(LoginExecute, LoginCanExecute);
     RegisterCommand     = new RelayCommand(RegisterExecute);
 }
Exemple #3
0
        public RegistrationDashboardModel(MainController mainController, IHotelSystem hotel)
        {
            _mainController = mainController;
            _hotel          = hotel;

            _registrationControlModel = new RegistrationControlModel(_mainController, _hotel);
            RegistrationControl       = new RegistrationControl(_registrationControlModel);
        }
Exemple #4
0
        public LoginDashboardModel(MainController mainController, IHotelSystem hotel)
        {
            _mainController = mainController;
            _hotel          = hotel;

            _loginControlModel = new LoginControlModel(_mainController, hotel);
            LoginControl       = new LoginControl(_loginControlModel);
        }
Exemple #5
0
        public VisitorDashboardModel(MainController mainController, IHotelSystem hotel, IDialogService dialogService)
        {
            _mainController = mainController;
            _hotel          = hotel;
            _dialogService  = dialogService;

            LogoutCommand = new RelayCommand(LogoutCommandExecute);

            InitializeTabs();
        }
Exemple #6
0
        public AddBookingDialogWindowModel(DateTime dateTime, Booking booking, IHotelSystem hotel, int roomId)
        {
            Booking     = booking;
            this.hotel  = hotel;
            this.roomId = roomId;
            InDate      = dateTime;
            OutDate     = InDate.AddDays(1);

            OkCommand     = new RelayCommand(OkCommandExecute, CanOkCommandExecute);
            CancelCommand = new RelayCommand(o => CloseRequested?.Invoke(this, new DialogCloseRequestedEventArgs(false)));
        }
Exemple #7
0
        public MainController(IHotelSystem hotel, Window mainWindow, IDialogService dialogService)
        {
            _loginDashboardModel = new LoginDashboardModel(this, hotel);
            _loginDashboard      = new LoginDashboard(mainWindow, _loginDashboardModel);

            _registrationDashboardModel = new RegistrationDashboardModel(this, hotel);
            _registrationDashboard      = new RegistrationDashboard(mainWindow, _registrationDashboardModel);

            _managerDashboardModel = new ManagerDashboardModel(this, hotel, dialogService);
            _managerDashboard      = new ManagerDashboard(mainWindow, _managerDashboardModel);

            _visitorDashboardModel = new VisitorDashboardModel(this, hotel, dialogService);
            _visitorDashboard      = new VisitorDashboard(mainWindow, _visitorDashboardModel);
        }
Exemple #8
0
        public VisitorRoomsControlModel(MainController mainController, IHotelSystem hotel, IDialogService dialogService)
        {
            _mainController = mainController;
            _hotel          = hotel;
            _dialogService  = dialogService;

            NextDayCommand    = new RelayCommand(NextDayCommandExecute);
            PrevDayCommand    = new RelayCommand(PrevDayCommandExecute);
            AddBookingCommand = new RelayCommand(AddBookingCommandExecute);

            RoomCollectionV     = new ObservableCollection <Room>();
            RoomCollectionViewV = (CollectionView)CollectionViewSource.GetDefaultView(RoomCollectionV);

            SortRoomsTypesV = new List <string>()
            {
                "Type",
                "Subtype"
            };
            ShownDateTimeV = DateTime.Now.Date;
        }
Exemple #9
0
        public ManagerRoomsControlModel(MainController mainController, IHotelSystem hotel, IDialogService dialogService)
        {
            _mainController = mainController;
            _hotel          = hotel;
            _dialogService  = dialogService;

            NextDayCommand      = new RelayCommand(NextDayCommandExecute);
            PrevDayCommand      = new RelayCommand(PrevDayCommandExecute);
            AddRoomCommand      = new RelayCommand(AddRoomCommandExecute);
            RemoveRoomCommand   = new RelayCommand(RemoveRoomCommandExecute, CanRemoveRoomCommand);
            RoomAboutCommand    = new RelayCommand(RoomAboutCommandExecute);
            RoomBookingsCommand = new RelayCommand(RoomBookingsCommandExecute);

            RoomCollection            = new ObservableCollection <RoomModel>();
            RoomCollectionView        = (CollectionView)CollectionViewSource.GetDefaultView(RoomCollection);
            RoomCollectionView.Filter = RoomModelFilter;

            SortRoomsTypes = new List <string>()
            {
                "Type",
                "Subtype"
            };
            ShownDateTime = DateTime.Now.Date;
        }
Exemple #10
0
 public ManagerUsersControlModel(MainController mainController, IHotelSystem hotel, IDialogService dialogService)
 {
     _mainController = mainController;
     _hotel          = hotel;
     _dialogService  = dialogService;
 }
Exemple #11
0
 public VisitorBookingsControlModel(MainController mainController, IHotelSystem hotel, IDialogService dialogService)
 {
     _mainController = mainController;
     _hotel          = hotel;
     _dialogService  = dialogService;
 }