Beispiel #1
0
        public ActionResult _ComplianceDepartmentExcel([DataSourceRequest] DataSourceRequest request, Search search)
        {
            var dcaService = new TracerComplianceDepartment();

            DataSourceResult result = dcaService._complianceDepartmentExcel(request, search);
            JsonResult       jr     = new JsonResult();

            jr = Json(result, JsonRequestBehavior.AllowGet);
            jr.MaxJsonLength  = Int32.MaxValue;
            jr.RecursionLimit = 100;
            return(jr);
        }
Beispiel #2
0
        public ActionResult LoadComplianceDepartmentGrid(Search search)
        {
            var tcService = new TracerComplianceDepartment();

            DataTable tPivotTable = new DataTable();

            tPivotTable = tcService.DynamicGroupByDepartmentColumns(search);

            try
            {
                string     JSONString = string.Empty;
                JsonResult jr         = new JsonResult();
                JSONString = JsonConvert.SerializeObject(tPivotTable);
                var _result = new
                {
                    outputData           = JSONString,
                    ExceedFlag           = tcService.ExceedLimit,
                    RecordStatus         = tcService.RecordStatus,
                    OutputDepartmentList = tcService.OutputDepartmentIds
                };
                jr = Json(_result, JsonRequestBehavior.AllowGet);
                jr.MaxJsonLength  = Int32.MaxValue;
                jr.RecursionLimit = 100;
                return(jr);
            }

            catch (Exception ex)
            {
                ExceptionLog exceptionLog = new ExceptionLog
                {
                    ExceptionText = "Reports: " + ex.Message,
                    PageName      = "_ComplianceDepartmentChart",
                    MethodName    = "LoadComplianceDepartmentGrid",
                    UserID        = Convert.ToInt32(AppSession.UserID),
                    SiteId        = Convert.ToInt32(AppSession.SelectedSiteId),
                    TransSQL      = "",
                    HttpReferrer  = null
                };
                exceptionService.LogException(exceptionLog);
                return(RedirectToAction("Error", "Transfer"));
            }
        }