예제 #1
0
        private void OnExpenseUpdated(ExpenseDetailViewModel source, Expense expense)
        {
            var ExpenseInList = Expenses.Single(c => c.Id == expense.Id);

            ExpenseInList.Description = expense.Description;
            ExpenseInList.Amount      = expense.Amount;
            ExpenseInList.PostDate    = expense.PostDate;
            ExpenseInList.Id          = expense.Id;
            ExpenseInList.UserId      = expense.UserId;
        }
예제 #2
0
 private void OnExpenseAdded(ExpenseDetailViewModel source, Expense expense)
 {
     Expenses.Add(new ExpenseViewModel(expense));
 }