private void EditTransaction() { var vm = new EditTransactionViewModel(new UnitOfWorkFactory(), SelectedTransaction); vm.Init(); var window = new EditTransactionView(vm); if (window.ShowDialog() ?? false) { CollectionViewSource.GetDefaultView(TransactionList).Refresh(); OnPropertyChanged(nameof(AllRevenuesTotal)); OnPropertyChanged(nameof(AllExpensesTotal)); OnPropertyChanged(nameof(BudgetChartValues)); } }
private void NewTransaction() { var transaction = new Transaction(); var vm = new EditTransactionViewModel(new UnitOfWorkFactory(), transaction); vm.Init(); var window = new EditTransactionView(vm); if (window.ShowDialog() ?? false) { OnPropertyChanged(nameof(TransactionList)); OnPropertyChanged(nameof(AllRevenuesTotal)); OnPropertyChanged(nameof(AllExpensesTotal)); OnPropertyChanged(nameof(BudgetChartValues)); } }