Beispiel #1
0
        public JsonResult GetChartsBySmartReportId(int smartReportId)
        {
            var userService = new UserService();

            //userService.UpdateLastReport(Convert.ToInt32(Session["userId"].ToString()), smartReportId);
            userService.UpdateLastReport(WebSecurity.CurrentUserId, smartReportId);
            return(Json(_chartService.GetChartsBySmartReportId(smartReportId), JsonRequestBehavior.AllowGet));
        }
        public ActionResult MainToPdf(int reportId, bool withInsights, bool withComments, bool withChartInsights, int chartId, string from, string to)
        {
            var charts = _chartService.GetChartsBySmartReportId(reportId);
            var model  = new MainToPDFViewModel()
            {
                Report            = charts,
                WithInsights      = withInsights,
                WithComments      = withComments,
                WithChartInsights = withChartInsights,
                ReportId          = reportId,
                ChartId           = chartId,
                DateRange         = charts.Delivery.DateDelivered.GetValueOrDefault().ToString("MMM") + ", " + charts.Delivery.DateDelivered.GetValueOrDefault().Year,
                From = from,
                To   = to
            };

            return(View(model));
        }