private async Task CreateExpense(ExpenseViewModel expense) { var server = IocContainer.Get <IServerService>(); expense.IsDirty = false; expense.IsPending = true; var model = await server.CreateExpense(expense.Model); if (model != null) { expense.Model.ApplicationUserID = model.ApplicationUserID; expense.Model.ExpenseId = model.ExpenseId; expense.IsCreated = true; } else { expense.IsDirty = true; } expense.IsPending = false; }
private void Untrack(ExpenseViewModel item) { item.PropertyChanged -= ExpenseViewModelOnPropertyChanged; }