Esempio n. 1
0
        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));
            }
        }
Esempio n. 2
0
        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));
            }
        }