Example #1
0
        public JsonResult GetOpenMarketSLO(int reportId, DateTime startDate, DateTime endDate, string unit, string includeExpired)
        {
            var table   = OpenMarketReportRepository.GetOpenMarketSLO(startDate, endDate, unit);
            var columns = OpenMarketReportRepository.GetOpenMarketColumnDefinitionByReportId(reportId, "SLO");
            var jtable  = BuidJsonTable(table, columns);

            return(Json(jtable, JsonRequestBehavior.AllowGet));
        }
Example #2
0
        public ActionResult ExportExcelForSLO(int reportId, DateTime startDate, DateTime endDate, string unit, string includeExpired)
        {
            var table      = OpenMarketReportRepository.GetOpenMarketSLO(startDate, endDate, unit);
            var columns    = OpenMarketReportRepository.GetOpenMarketColumnDefinitionByReportId(reportId, "SLO");
            var jtable     = BuidJsonTable(table, columns);
            var reportName = MenuService.GetMenuNodeByReportId(reportId).DisplayName;

            reportName = Resources.Global.OpenMarketSLO;
            var totalColumns = new List <string>();

            totalColumns.Add("IssueAmount");
            var jP = new JsonExcelParameter {
                Table = jtable, TableName = reportName, Source = Resources.Global.Source, totalColumns = totalColumns, sumGroupColumnName = "Direction", isTotal = true
            };

            return(new JsonTableGroupExcelResult(jP));
        }