Пример #1
0
        public CashierVM(ICashierRepository repository,
                         IMainNavigationService navigationService)
        {
            this.DataGridVisibility = true;
            this.ButtonVisible      = false;

            _repository        = repository;
            _navigationService = navigationService;

            this.Cashier = new CashierModel();

            Task.Factory.StartNew(() =>
            {
                lock (locker)
                {
                    this.Cashiers = new ObservableCollection <CashierModel>(_repository.GetAll());
                }

                Application.Current.Dispatcher.Invoke(
                    new Action(() =>
                {
                    this.DataGridVisibility = false;
                    this.ButtonVisible      = true;
                    this.ForegroundForUser  = "******";
                    this.MessageForUser     = "******";
                }));
            });

            ReceiveCashier();
        }
Пример #2
0
 public IActionResult GetAll()
 {
     return(Ok(_cashierRepository.GetAll()));
 }