private async void ResetCommandsAndView() { LoadHeaders(); JournalDetails = null; SelectedJournal = null; DeleteJournalCommand.RaiseCanExecuteChanged(); ProcessItemCommand.RaiseCanExecuteChanged(); SaveChangesCommand.RaiseCanExecuteChanged(); await Application.Current.Dispatcher.BeginInvoke(new Action(DatagridLoaded), DispatcherPriority.ContextIdle, null); }
private async void LoadJournalDetails() { if (SelectedJournal != null) { IsLoading = true; var list = await _accountingJournalEndpoint .LoadJournalDetails(new AccountingJournalModel { BrojTemeljnice = SelectedJournal.BrojTemeljnice, VrstaTemeljnice = SelectedJournal.VrstaTemeljnice }); JournalDetails = new ObservableCollection <AccountingJournalModel>(list); DeleteJournalCommand.RaiseCanExecuteChanged(); SumColumns(); await Application.Current.Dispatcher.BeginInvoke(new Action(DatagridLoaded), DispatcherPriority.ContextIdle, null); } }