示例#1
0
 public Budget CreateBudgets(Budget item)
 {
     return this.Core.CreateBudget(
         item.Name,
         item.Value,
         item.IdCard,
         item.IdType,
         item.IdPlan,
         item.Create);
 }
        public async void CreateNewBudgetLocally(double overall, double household, double lifestyle, double unexpected)
        {
            var userId = await this.GetUserId();
            var budget = new Budget
            {
                Overall = overall,
                HouseholdExpectancy = household,
                LifestyleExpectancy = lifestyle,
                UnexpectedExpectancy = unexpected,
                Saved = overall - household - lifestyle - unexpected,
                UserId = userId
            };

            await this.budgets.Insert(budget);
            var successMessage = new MessageDialog("You successfully added your budget expectancies!");
            await successMessage.ShowAsync();
        }
 public Budget Put(Budget item)
 {
     return this._helper.UpdateBudgets(item);
 }
 public Budget Post(Budget item)
 {
     return this._helper.CreateBudgets(item);
 }