Beispiel #1
0
        public ActionResult AllMonthsInfoView()
        {
            var budgetInfoProvider = new MonthlyBudgetInfoAccessor(new SqlDataAccessor(), new MonthlyBudgetStatisticsCalculator());
            var months             = budgetInfoProvider.GetAllMonthsInfo();

            return(View(months));
        }
Beispiel #2
0
        public ActionResult SaveNewMonthInfo(Month monthInfo)
        {
            //   var month = DateTime.Now.Month;
            //  var year = DateTime.Now.Year;

            var month = 5;
            var year  = 2017;

            var budgetInfoProvider = new MonthlyBudgetInfoAccessor(new SqlDataAccessor(), new MonthlyBudgetStatisticsCalculator());

            // budgetInfoProvider.CreateNewMonthInfo(monthInfo, month - 2, year);


            budgetInfoProvider.CreateNewMonthInfo(monthInfo, month, year);

            var months = budgetInfoProvider.GetAllMonthsInfo();

            return(View("ViewAllMonthsInfo", months));
        }