예제 #1
0
        public void UpdateExpenses(object parameter)
        {
            Window window = new View.EditExpenses();

            window.DataContext = new EditExpensesViewModel(db, SelectedExpenses, Id);
            window.Title       = "Изменить";
            window.ShowDialog();
        }
예제 #2
0
        public void AddExpenses(object parameter)
        {
            Window window = new View.EditExpenses();

            window.DataContext = new EditExpensesViewModel(db, null, Id);
            window.Title       = "Добавление";
            window.ShowDialog();
            ExpensesSource = new ObservableCollection <Expenses>(db.Expenses.Where(i => i.User.Id == Id).ToList());
        }