예제 #1
0
        private void EditBudget()
        {
            var vm = new EditBudgetViewModel(new UnitOfWorkFactory(), Budget);

            vm.Init();
            var window = new EditBudgetView(vm);

            if (window.ShowDialog() ?? false)
            {
                OnPropertyChanged(nameof(Budget));
            }
        }
예제 #2
0
        private void NewBudget()
        {
            var budget = new Budget();
            var vm     = new EditBudgetViewModel(new UnitOfWorkFactory(), budget);

            vm.Init();
            var window = new EditBudgetView(vm);

            if (window.ShowDialog() ?? false)
            {
                BudgetList.Add(budget);
                Budget = budget;
            }
        }