public PartialViewResult GetMonthlyBudget() { HomePageModel model = new HomePageModel(); GetMonthlyBudgetQuery query = new GetMonthlyBudgetQuery(); model.MonthlyBudget = dispatcher.Dispatch <GetMonthlyBudgetQuery, MonthlyBudget>(query); model.MonthlyBudget.FoodPercentage = Convert.ToInt32(Math.Round(model.MonthlyBudget.FoodDollarAmount / 550 * 100, 2)); model.MonthlyBudget.ShoppingPercentage = Convert.ToInt32(Math.Round(model.MonthlyBudget.ShoppingDollarAmount / 200 * 100, 2)); model.MonthlyBudget.GasPercentage = Convert.ToInt32(Math.Round(model.MonthlyBudget.GasDollarAmount / 160 * 100, 2)); return(PartialView(model)); }
public MonthlyBudget Retrieve(GetMonthlyBudgetQuery query) { return(shoeTrackerRepository.GetMonthlyBudget()); }