コード例 #1
0
        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;
        }
コード例 #2
0
 private void Untrack(ExpenseViewModel item)
 {
     item.PropertyChanged -= ExpenseViewModelOnPropertyChanged;
 }