예제 #1
0
        public async void LoadRetailInvoices()
        {
            await LoadInitialData();

            var expenditures = UraRestInvoices.Where(x => x.BrojPrimke != 0).ToList();

            UraRestInvoices = new ObservableCollection <BookUraRestModel>(expenditures);
            FilterPrimke();
        }
예제 #2
0
        public async void LoadOnlyRestExpenditures()
        {
            await LoadInitialData();

            var expenditures = UraRestInvoices.Where(x => (x.BrojPrimke == 0 && x.IznosSPorezom > 0 && !x.Storno) ||
                                                     (x.BrojPrimke == 0 && x.IznosSPorezom < 0 && x.Storno)).ToList();

            UraRestInvoices = new ObservableCollection <BookUraRestModel>(expenditures);
            FilterPrimke();
        }
예제 #3
0
        private async void SaveToDatabase()
        {
            IEnumerable <BookUraRestModel> primke = UraRestInvoices.Where(x => x.RedniBroj > _maxPrimka);
            var list = new List <BookUraRestModel>(primke);

            IsLoading = true;
            await _bookUraEndpoint.PostPrimke(list);

            _loaded = false;
            LoadPrimke();
        }
예제 #4
0
        public async void LoadRetailInvoices()
        {
            IsLoading = true;
            await LoadInitialData();

            var expenditures = UraRestInvoices.Where(x => x.BrojPrimke != 0).ToList();

            UraRestInvoices = new ObservableCollection <BookUraRestModel>(expenditures);
            FilterPrimke();

            await Application.Current.Dispatcher.BeginInvoke(new Action(DatagridLoaded), DispatcherPriority.ContextIdle, null);
        }
예제 #5
0
        public async void LoadOnlyRestExpenditures()
        {
            IsLoading = true;
            await LoadInitialData();

            var expenditures = UraRestInvoices.Where(x => (x.BrojPrimke == 0 && x.IznosSPorezom > 0 && !x.Storno) ||
                                                     (x.BrojPrimke == 0 && x.IznosSPorezom < 0 && x.Storno)).ToList();

            UraRestInvoices = new ObservableCollection <BookUraRestModel>(expenditures);
            FilterPrimke();

            await Application.Current.Dispatcher.BeginInvoke(new Action(DatagridLoaded), DispatcherPriority.ContextIdle, null);
        }
예제 #6
0
        private async void SaveToDatabase()
        {
            IEnumerable <BookUraRestModel> primke = UraRestInvoices.Where(x => x.RedniBroj > _maxPrimka);
            var list = new List <BookUraRestModel>(primke);

            StatusMessage = "Zapisujem u bazu podataka...";
            await _bookUraEndpoint.PostPrimke(list);

            StatusMessage = "";;

            _loaded = false;
            LoadPrimke();
        }