示例#1
0
        public EditSlotViewModel(ISlotsRepository slotsRepository, IRegionManager regionManager)
        {
            _slotsRepository = slotsRepository;
            _regionManager   = regionManager;

            SaveChangesCommand = new DelegateCommand(Save);

            DoneCommand = new DelegateCommand(Done);
        }
示例#2
0
        public AddSlotViewModel(ISlotsRepository slotsRepository, IBlocksRepository blocksRepository, IRegionManager regionManager)
        {
            _slotsRepository  = slotsRepository;
            _blocksRepository = blocksRepository;
            _regionManager    = regionManager;

            AddCommand    = new DelegateCommand(Add);
            CancelCommand = new DelegateCommand(Cancel);

            SelectBlockCommand = new DelegateCommand <object>(OnSelectBlockChanged);
        }
        public CheckInViewModel(IParkingsRepository parkingsRepository, ISlotsRepository slotsRepository)
        {
            _parkingsRepository = parkingsRepository;
            _slotsRepository    = slotsRepository;

            Task.WaitAll(Task.Run(async() => await Load()));

            ConfirmCommand = new DelegateCommand(Confirm);

            CancelCommand = new DelegateCommand(Cancel);

            ClearView();

            SecurityCodeGenerator();
        }
        public CheckOutViewModel(IParkingsRepository parkingsRepository, ICustomersRepository customersRepository, IParkingLotsRepository parkingLotsRepository, IMonthlyIncomesRepository monthlyIncomesRepository, ISlotsRepository slotsRepository)
        {
            _parkingsRepository       = parkingsRepository;
            _customersRepository      = customersRepository;
            _parkingLotsRepository    = parkingLotsRepository;
            _monthlyIncomesRepository = monthlyIncomesRepository;
            _slotsRepository          = slotsRepository;

            Task.WaitAll(Task.Run(async() => await Load()));

            ConfirmCommand = new DelegateCommand(Confirm);

            CheckOutCommand = new DelegateCommand(CheckOut);

            ClearTheView();
        }
示例#5
0
        public ManageSlotViewModel(IRegionManager regionManager, ISlotsRepository slotsRepository, IBlocksRepository blocksRepository)
        {
            _regionManager    = regionManager;
            _slotsRepository  = slotsRepository;
            _blocksRepository = blocksRepository;
            _window           = Application.Current.MainWindow;

            EditSlotCommand            = new DelegateCommand <DataAccess.DataModels.Slot>(EditSlot);
            DeleteSlotCommand          = new DelegateCommand <DataAccess.DataModels.Slot>(DeleteSlot);
            SelectBlockCommand         = new DelegateCommand <object>(OnBlockChanged);
            AddSlotCommand             = new DelegateCommand(AddSlot);
            ViewAllCommand             = new DelegateCommand(LoadUI);
            OrderByAvailabilityCommand = new DelegateCommand(OrderByAvailability);
            OrderByStatusCommand       = new DelegateCommand(OrderByStatus);
            OrderByNameCommand         = new DelegateCommand(OrderByName);

            SlotsView  = new ObservableCollection <DataAccess.DataModels.Slot>();
            BlocksView = new ObservableCollection <Block>();

            #region Handle Window State Changed Event
            if (_window.WindowState == WindowState.Normal)
            {
                MaxHeight = 450;
            }
            else
            {
                MaxHeight = 700;
            }
            _window.StateChanged += (sender, e) =>
            {
                if (_window.WindowState == WindowState.Normal)
                {
                    MaxHeight = 450;
                }
                else
                {
                    MaxHeight = 700;
                }
            };
            #endregion
        }
 private InformationFinder CreateSut(ISlotsRepository repository)
 {
     return new InformationFinder(repository);
 }
 private InformationFinder CreateSut(ISlotsRepository repository)
 {
     return(new InformationFinder(repository));
 }
 public InformationFinder([NotNull] ISlotsRepository repository)
 {
     m_Repository = repository;
 }
示例#9
0
 public SlotsController(ISlotsRepository repository, IMapper mapper)
 {
     this.repository = repository;
     this.mapper     = mapper;
 }
示例#10
0
 public SlotsService(ISlotsRepository slotsRepository, IMapper mapper)
 {
     _slotsRepository = slotsRepository;
     _mapper          = mapper;
 }
 public InformationFinder([NotNull] ISlotsRepository repository)
 {
     m_Repository = repository;
 }