Beispiel #1
0
        public ActionResult Index()
        {
            var model = new StatisticsViewModel();

            model.Categories    = EconomyBusiness.GetAllCategories();
            model.SubCategories = EconomyBusiness.GetAllSubCategories();
            model.Descriptions  = EconomyBusiness.GetAllDescriptions();

            model.Years = StatisticsBusiness.GetYears();

            int selectedYear = -AppSettings.GetAppSettingsInteger("YearsBack");//DateTime.Now.AddYears(-AppSettings.GetAppSettingsInteger("YearsBack")).Year;

            model.SelectedYear = DateTime.Now.AddYears(selectedYear).Year;

            model.ChartSrc = StatisticsBusiness.GetChart(new FilterJson {
                CategoryId  = 0, SubCategoryId = 0,
                Description = string.Empty,
                FromYear    = model.SelectedYear
            });
            return(View(model));
        }
Beispiel #2
0
        public JsonResult GetChart(FilterJson filterJson)
        {
            var chartImageSrc = StatisticsBusiness.GetChart(filterJson);

            return(Json(chartImageSrc));
        }