public ActionResult _GetEPScoringExcelData(SearchEPScoringParams search)
        {
            try
            {
                if (String.IsNullOrEmpty(search.ScoreValueList))
                {
                    search.ScoreValueList = "";
                }

                JsonResult            jr          = new JsonResult();
                List <EpExcelDetails> EpExcelData = new List <EpExcelDetails>();
                EpExcelData       = EPScoringReport.GetEPExcelDetails(search);
                jr                = Json(EpExcelData, JsonRequestBehavior.AllowGet);
                jr.MaxJsonLength  = Int32.MaxValue;
                jr.RecursionLimit = 100;
                return(jr);
            }
            catch (Exception ex)
            {
                ExceptionLog exceptionLog = new ExceptionLog
                {
                    ExceptionText = "Reports: " + ex.Message,
                    PageName      = "EP Scoring Report",
                    MethodName    = "_GetEPScoringExcelData",
                    UserID        = Convert.ToInt32(AppSession.UserID),
                    SiteId        = Convert.ToInt32(AppSession.SelectedSiteId),
                    TransSQL      = "",
                    HttpReferrer  = null
                };
                exceptionService.LogException(exceptionLog);

                return(RedirectToAction("Error", "Transfer"));
            }
        }
Exemple #2
0
        public List <ScoredByUser> GetScoredByForEPs(int siteID, int selectedProgramID, string selectedChapterIDs, string selectedStandardIDs, string selectedScoreType)
        {
            var epsScoredBy = new List <ScoredByUser>();

            if (selectedProgramID > 0 || selectedChapterIDs != "-1" || selectedStandardIDs != "-1" || selectedScoreType != "-1")
            {
                epsScoredBy = EPScoringReport.GetScoredByForEPs(siteID, selectedProgramID,
                                                                selectedChapterIDs != "-1" ? selectedChapterIDs : null,
                                                                selectedStandardIDs != "-1" ? selectedStandardIDs : null,
                                                                selectedScoreType != "-1" ? selectedScoreType : null
                                                                ).Select(x => new ScoredByUser()
                {
                    UserID = x.UserID, UserName = x.UserName
                }).ToList();
            }

            epsScoredBy.Insert(0, new ScoredByUser
            {
                UserID   = Convert.ToInt32(-1),
                UserName = "******",
            });

            return(epsScoredBy);
        }