Ejemplo n.º 1
0
        //Constructor:
        public CareTakerViewModel(IDataModelCommandOperations dataCommandProvider, IDataModelQueryOperations dataQueryProvider) : base("Menadżer Kluczy")
        {
            _dataCommandProvider = dataCommandProvider;
            _dataQueryProvider   = dataQueryProvider;

            RegisteredEmployee = new PresentedRegisteredEmployee();

            RegisterEmployeeCommand  = new CommandRelay(RegisterEmployee, () => true);
            HandoverTheKeyCommand    = new CommandRelay(HandoverTheKey, CanExecute_HandOverTheKey);
            TakeTheKeyBackCommand    = new CommandRelay(TakeTheKeyBack, CanExecute_TakeTheKeyBack);
            ResetRegistrationCommand = new CommandRelay(ClearRegistration, CanExecute_ClearRegistration);
        }
Ejemplo n.º 2
0
        // Constructor:
        public ReportViewModel(IDataModelQueryOperations queryProvider) : base("Raport o stanie kluczy")
        {
            _queryProvider = queryProvider;

            Detail = new PresentedDetail();

            ShowAllRoomKeysCommand        = new CommandRelay(ShowAllRoomKeys, () => true);
            ShowHandoveredRoomKeysCommand = new CommandRelay(ShowHandoveredRoomKeys, () => true);
            ShowRemainingRoomKeysCommand  = new CommandRelay(ShowRemainingRoomKeys, () => true);
            ShowSpecifiedKeyCommand       = new CommandRelay(ShowSpecifiedKey, () => true);

            ResetKeysCollection();
        }