public async void LoadRetailInvoices() { await LoadInitialData(); var expenditures = UraRestInvoices.Where(x => x.BrojPrimke != 0).ToList(); UraRestInvoices = new ObservableCollection <BookUraRestModel>(expenditures); FilterPrimke(); }
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(); }
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(); }
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); }
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); }
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(); }