Exemplo n.º 1
0
        public ActionResult Index(int id, int?actionType)
        {
            try
            {
                if (!AppSession.HasValidSession)
                {
                    SessionExpired();
                }

                HelperClasses.SetReportOrScheduleID(id, (int)ReportsListEnum.TracerByCMS);

                SearchInputService reportservice = new SearchInputService();
                var list = reportservice.GetSearchLists(WebConstants.TRACER_REPORT_TITLE_TRACE_BY_CMS_REPORT);
                list.TracersChapters = reportservice.GetTracersChapters().TracersChapters;
                ViewBag.allSites     = false;
                if (AppSession.ReportScheduleID > 0)
                {
                    //Load the saved parameters
                    var oSaveAndScheduleService = new SaveAndScheduleService();
                    var savedParameters         = oSaveAndScheduleService.LoadUserSchedule(AppSession.ReportScheduleID);
                    TempData["SavedParameters"] = savedParameters; //This tempdata will be used by the Ajax call to avoid loading the saved parameters again from DB
                    TempData["ActionType"]      = actionType;

                    //Show/Hide Save to my reports button
                    ViewBag.HideSaveReport = HelperClasses.HideSaveToMyReports(AppSession.RoleID, savedParameters.UserID, AppSession.UserID, actionType);

                    int?chapterID = null;
                    if (savedParameters.ReportParameters.Find(param => param.ReportParameterName == WebConstants.TRACERS_CHAPTER) != null)
                    {
                        chapterID = Convert.ToInt32(savedParameters.ReportParameters.Find(param => param.ReportParameterName == WebConstants.TRACERS_CHAPTER).ParameterValue);
                    }

                    list.CMSTags = reportservice.GetTracersCMS(chapterID == -1 ? null : chapterID).CMSTags;
                }
                else
                {
                    list.CMSTags = reportservice.GetTracersCMS(null).CMSTags;
                }

                return(View(list));
            }
            catch (Exception ex)
            {
                ExceptionLog exceptionLog = new ExceptionLog
                {
                    ExceptionText = "Reports: " + ex.Message,
                    PageName      = "TracerByCMS",
                    MethodName    = "Index",
                    UserID        = Convert.ToInt32(AppSession.UserID),
                    SiteId        = Convert.ToInt32(AppSession.SelectedSiteId),
                    TransSQL      = "",
                    HttpReferrer  = null
                };
                exceptionService.LogException(exceptionLog);

                return(RedirectToAction("Error", "Transfer"));
            }
        }
        public ActionResult Index(int id, int?actionType)
        {
            try
            {
                HelperClasses.SetReportOrScheduleID(id, (int)ReportsListEnum.TracerComplianceSummary);

                SearchInputService reportservice = new SearchInputService();
                SearchList         oSearchList   = new SearchList();
                if (AppSession.ReportScheduleID > 0)
                {
                    //Load the saved parameters
                    var oSaveAndScheduleService = new SaveAndScheduleService();
                    var savedParameters         = oSaveAndScheduleService.LoadUserSchedule(AppSession.ReportScheduleID);
                    TempData["SavedParameters"] = savedParameters; //This tempdata will be used by the Ajax call to avoid loading the saved parameters again from DB
                    TempData["ActionType"]      = actionType;

                    //Show/Hide Save to my reports button
                    ViewBag.HideSaveReport = HelperClasses.HideSaveToMyReports(AppSession.RoleID, savedParameters.UserID, AppSession.UserID, actionType);

                    oSearchList = reportservice.GetSearchListsForSavedParameters(AppSession.ReportScheduleID, savedParameters, WebConstants.TRACER_REPORT_TITLE_TRACER_COMPLIANCE_SUMMARY_REPORT);
                }
                else
                {
                    oSearchList = reportservice.GetSearchLists(WebConstants.TRACER_REPORT_TITLE_TRACER_COMPLIANCE_SUMMARY_REPORT);
                }

                var qryTracers = oSearchList.TracersLists.Where(item => item.TracerCustomID != -1);
                oSearchList.TracersLists = qryTracers;

                return(View(oSearchList));
            }
            catch (Exception ex)
            {
                ExceptionLog exceptionLog = new ExceptionLog
                {
                    ExceptionText = "Reports: " + ex.Message,
                    PageName      = "TracerCompliance",
                    MethodName    = "Index",
                    UserID        = Convert.ToInt32(AppSession.UserID),
                    SiteId        = Convert.ToInt32(AppSession.SelectedSiteId),
                    TransSQL      = "",
                    HttpReferrer  = null
                };
                exceptionService.LogException(exceptionLog);

                return(RedirectToAction("Error", "Transfer"));
            }
        }
        // GET: Corporate/EPScoringReportFinalMockSurvey
        public ActionResult Index(int id, int?actionType)
        {
            try
            {
                HelperClasses.SetReportOrScheduleID(id, (int)ReportsListEnum.EPScoringReportFinalMockSurvey);
                string reportTitle = WebConstants.AMP_EP_SCORING_REPORT_FINAL;

                if (AppSession.IsCorporateSite == true)
                {
                    reportTitle = WebConstants.AMP_EP_SCORING_REPORT_FINAL_AND_MOCK_SURVEY;
                }

                SearchInputService reportservice = new SearchInputService();
                if (AppSession.ReportScheduleID > 0)
                {
                    //Load the saved parameters
                    var oSaveAndScheduleService = new SaveAndScheduleService();
                    var savedParameters         = oSaveAndScheduleService.LoadUserSchedule(AppSession.ReportScheduleID);
                    TempData["SavedParameters"] = savedParameters; //This tempdata will be used by the Ajax call to avoid loading the saved parameters again from DB
                    TempData["ActionType"]      = actionType;

                    //Show/Hide Save to my reports button
                    ViewBag.HideSaveReport = HelperClasses.HideSaveToMyReports(AppSession.RoleID, savedParameters.UserID, AppSession.UserID, actionType);

                    return(View(reportservice.GetCorpSearchListsForSavedParameters(AppSession.ReportScheduleID, savedParameters, reportTitle)));
                }
                else
                {
                    return(View(reportservice.GetCorpSearchLists(reportTitle)));
                }
            }
            catch (Exception ex)
            {
                ExceptionLog exceptionLog = new ExceptionLog
                {
                    ExceptionText = "Reports: " + ex.Message,
                    PageName      = "EPScoringReportFinalMockSurvey",
                    MethodName    = "Index",
                    UserID        = Convert.ToInt32(AppSession.UserID),
                    SiteId        = Convert.ToInt32(AppSession.SelectedSiteId),
                    TransSQL      = "",
                    HttpReferrer  = null
                };
                exceptionService.LogException(exceptionLog);

                return(RedirectToAction("Error", "Transfer"));
            }
        }
        // GET: TracerER/ERTracerDashboard
        public ActionResult Index(int id, int?actionType)
        {
            try
            {
                if (!AppSession.HasValidSession)
                {
                    return(RedirectToAction("IndexER", "Transfer", new { area = "" }));
                }

                HelperClasses.SetReportOrScheduleID(id, (int)ReportsListEnum.ERTracerDashboard);

                SearchInputService reportservice = new SearchInputService();
                if (AppSession.ReportScheduleID > 0)
                {
                    //Load the saved parameters
                    var oSaveAndScheduleService = new SaveAndScheduleService();
                    var savedParameters         = oSaveAndScheduleService.LoadUserSchedule(AppSession.ReportScheduleID);
                    TempData["SavedParameters"] = savedParameters; //This tempdata will be used by the Ajax call to avoid loading the saved parameters again from DB
                    TempData["ActionType"]      = actionType;

                    //Show/Hide Save to my reports button
                    ViewBag.HideSaveReport = HelperClasses.HideSaveToMyReports(AppSession.RoleID, savedParameters.UserID, AppSession.UserID, actionType);
                }

                ERSearchList list = new ERSearchList();
                list = reportservice.GetERComplianceByTracer(WebConstants.ERTRACER_REPORT_TITLE_Tracer_Dashboard_Report);

                return(View(list));
            }
            catch (Exception ex)
            {
                ExceptionLog exceptionLog = new ExceptionLog
                {
                    ExceptionText = "ER Reports: " + ex.Message,
                    PageName      = "ERTracerDashboard",
                    MethodName    = "Index",
                    UserID        = Convert.ToInt32(AppSession.UserID),
                    SiteId        = Convert.ToInt32(AppSession.SelectedSiteId),
                    TransSQL      = "",
                    HttpReferrer  = null
                };
                exceptionService.LogException(exceptionLog);

                return(RedirectToAction("Error", "Transfer"));
            }
        }
Exemplo n.º 5
0
        // GET: Tracer/TracerDepartmentAssignment
        public ActionResult Index(int id, int?actionType)
        {
            try
            {
                HelperClasses.SetReportOrScheduleID(id, (int)ReportsListEnum.TracerDepartmentAssignment);

                // NEVER SET THIS VARIABLE TO FALSE. The value is set based on licensing for selected site and program. - Mark Orlando.
                // AppSession.IsCMSProgram = false;

                ViewBag.ScheduledTracerReport = true;
                SearchInputService reportservice = new SearchInputService();
                if (AppSession.ReportScheduleID > 0)
                {
                    //Load the saved parameters
                    var oSaveAndScheduleService = new SaveAndScheduleService();
                    var savedParameters         = oSaveAndScheduleService.LoadUserSchedule(AppSession.ReportScheduleID);
                    TempData["SavedParameters"] = savedParameters; //This tempdata will be used by the Ajax call to avoid loading the saved parameters again from DB
                    TempData["ActionType"]      = actionType;

                    //Show/Hide Save to my reports button
                    ViewBag.HideSaveReport = HelperClasses.HideSaveToMyReports(AppSession.RoleID, savedParameters.UserID, AppSession.UserID, actionType);

                    return(View(reportservice.GetSavedParameters_DepartmentAssignment(AppSession.ReportScheduleID, savedParameters, WebConstants.TRACER_REPORT_TITLE_TRACERDEPARTMENT_ASSIGNMENT_REPORT)));
                }
                else
                {
                    return(View(reportservice.GetSearchLists_DepartmentAssignment(WebConstants.TRACER_REPORT_TITLE_TRACERDEPARTMENT_ASSIGNMENT_REPORT)));
                }
            }
            catch (Exception ex)
            {
                ExceptionLog exceptionLog = new ExceptionLog
                {
                    ExceptionText = "Reports: " + ex.Message,
                    PageName      = "_TracerDepartmentAssignment",
                    MethodName    = "Index",
                    UserID        = Convert.ToInt32(AppSession.UserID),
                    SiteId        = Convert.ToInt32(AppSession.SelectedSiteId),
                    TransSQL      = "",
                    HttpReferrer  = null
                };
                exceptionService.LogException(exceptionLog);

                return(RedirectToAction("Error", "Transfer"));
            }
        }
Exemplo n.º 6
0
        // GET: Corporate/PriorityTjcRFI
        public ActionResult Index(int id, int?actionType)
        {
            try
            {
                HelperClasses.SetReportOrScheduleID(id, (int)ReportsListEnum.RFIFindingReport);


                SearchInputService reportservice = new SearchInputService();


                if (AppSession.ReportScheduleID > 0)
                {
                    //Load the saved parameters
                    var oSaveAndScheduleService = new SaveAndScheduleService();
                    var savedParameters         = oSaveAndScheduleService.LoadUserSchedule(AppSession.ReportScheduleID);
                    TempData["SavedParameters"] = savedParameters; //This tempdata will be used by the Ajax call to avoid loading the saved parameters again from DB
                    TempData["ActionType"]      = actionType;

                    //Show/Hide Save to my reports button
                    ViewBag.HideSaveReport = HelperClasses.HideSaveToMyReports(AppSession.RoleID, savedParameters.UserID, AppSession.UserID, actionType);

                    return(View(reportservice.GetCorpSearchListsForSavedParameters(AppSession.ReportScheduleID, savedParameters, WebConstants.RFI_REPORT_TITLE_FINDING_REPORT)));
                }
                else
                {
                    return(View(reportservice.GetCorpSearchLists(WebConstants.RFI_REPORT_TITLE_FINDING_REPORT)));
                }
            }
            catch (Exception ex)
            {
                ExceptionLog exceptionLog = new ExceptionLog
                {
                    ExceptionText = "Reports: " + ex.Message,
                    PageName      = "PriorityFindingRFI",
                    MethodName    = "RFIFindingSummaryIndex",
                    UserID        = Convert.ToInt32(AppSession.UserID),
                    SiteId        = Convert.ToInt32(AppSession.SelectedSiteId),
                    TransSQL      = "",
                    HttpReferrer  = null
                };
                exceptionService.LogException(exceptionLog);

                return(RedirectToAction("Error", "Transfer"));
            }
        }
Exemplo n.º 7
0
        //
        // GET: Tracer/ComplianceDepartment
        public ActionResult Index(int id, int?actionType)
        {
            try
            {
                HelperClasses.SetReportOrScheduleID(id, (int)ReportsListEnum.ComplianceByDepartment);
                ViewBag.ShowCMSRadio = true;

                SearchInputService reportservice = new SearchInputService();
                if (AppSession.ReportScheduleID > 0)
                {
                    //Load the saved parameters
                    var oSaveAndScheduleService = new SaveAndScheduleService();
                    var savedParameters         = oSaveAndScheduleService.LoadUserSchedule(AppSession.ReportScheduleID);
                    TempData["SavedParameters"] = savedParameters; //This tempdata will be used by the Ajax call to avoid loading the saved parameters again from DB
                    TempData["ActionType"]      = actionType;

                    //Show/Hide Save to my reports button
                    ViewBag.HideSaveReport = HelperClasses.HideSaveToMyReports(AppSession.RoleID, savedParameters.UserID, AppSession.UserID, actionType);

                    return(View(reportservice.GetSavedParameters_ComplianceDepartment(AppSession.ReportScheduleID, savedParameters, WebConstants.TRACER_REPORT_TITLE_COMPLIANCE_BY_DEPARTMENT)));
                }
                else
                {
                    return(View(reportservice.GetSearchLists_ComplianceDepartment(WebConstants.TRACER_REPORT_TITLE_COMPLIANCE_BY_DEPARTMENT)));
                }
            }
            catch (Exception ex)
            {
                ExceptionLog exceptionLog = new ExceptionLog
                {
                    ExceptionText = "Reports: " + ex.Message,
                    PageName      = "ComplianceDepartment",
                    MethodName    = "Index",
                    UserID        = Convert.ToInt32(AppSession.UserID),
                    SiteId        = Convert.ToInt32(AppSession.SelectedSiteId),
                    TransSQL      = "",
                    HttpReferrer  = null
                };
                exceptionService.LogException(exceptionLog);

                return(RedirectToAction("Error", "Transfer"));
            }
        }
        public ActionResult Index(int id, int?actionType)
        {
            HelperClasses.SetReportOrScheduleID(id, (int)ReportsListEnum.OrganizationPriorityFindings);

            if (AppSession.ReportScheduleID > 0)
            {
                //Load the saved parameters
                var oSaveAndScheduleService = new SaveAndScheduleService();
                var savedParameters         = oSaveAndScheduleService.LoadUserSchedule(AppSession.ReportScheduleID);
                TempData["SavedParameters"] = savedParameters; //This tempdata will be used by the Ajax call to avoid loading the saved parameters again from DB
                TempData["ActionType"]      = actionType;

                //Show/Hide Save to my reports button
                ViewBag.HideSaveReport = HelperClasses.HideSaveToMyReports(AppSession.RoleID, savedParameters.UserID, AppSession.UserID, actionType);
            }

            SearchInputService reportservice = new SearchInputService();

            return(View(reportservice.GetOrgFindingsSearchParams(WebConstants.TRACER_REPORT_TITLE_TRACER_PRIORITY_FINDING)));
        }
Exemplo n.º 9
0
        // GET: Corporate/EPScoring
        public ActionResult Index(int id, int?actionType)
        {
            HelperClasses.SetReportOrScheduleID(id, (int)ReportsListEnum.EPScoringReport);

            SearchInputService reportservice = new SearchInputService();

            if (AppSession.ReportScheduleID > 0)
            {
                //Load the saved parameters
                var oSaveAndScheduleService = new SaveAndScheduleService();
                var savedParameters         = oSaveAndScheduleService.LoadUserSchedule(AppSession.ReportScheduleID);
                TempData["SavedParameters"] = savedParameters; //This tempdata will be used by the Ajax call to avoid loading the saved parameters again from DB
                TempData["ActionType"]      = actionType;

                //Show/Hide Save to my reports button
                ViewBag.HideSaveReport = HelperClasses.HideSaveToMyReports(AppSession.RoleID, savedParameters.UserID, AppSession.UserID, actionType);

                return(View(reportservice.GetCorpSearchListsForSavedParameters(AppSession.ReportScheduleID, savedParameters, WebConstants.AMP_EP_SCORING_REPORT)));
            }
            else
            {
                return(View(reportservice.GetCorpSearchLists(WebConstants.AMP_EP_SCORING_REPORT)));
            }
        }
Exemplo n.º 10
0
        public ActionResult Index(int id, int?actionType)
        {
            try
            {
                if (!AppSession.HasValidSession)
                {
                    SessionExpired();
                }

                HelperClasses.SetReportOrScheduleID(id, (int)ReportsListEnum.TracerByEP);

                SearchInputService reportservice  = new SearchInputService();
                SearchList         list           = new SearchList();
                string             savedChapters  = string.Empty;
                string             savedStandards = string.Empty;

                if (AppSession.ReportScheduleID > 0)
                {
                    //Load the saved parameters
                    var oSaveAndScheduleService = new SaveAndScheduleService();
                    var savedParameters         = oSaveAndScheduleService.LoadUserSchedule(AppSession.ReportScheduleID);
                    TempData["SavedParameters"] = savedParameters; //This tempdata will be used by the Ajax call to avoid loading the saved parameters again from DB
                    TempData["ActionType"]      = actionType;

                    //Show/Hide Save to my reports button
                    ViewBag.HideSaveReport = HelperClasses.HideSaveToMyReports(AppSession.RoleID, savedParameters.UserID, AppSession.UserID, actionType);

                    //Get the saved Chapters and Standards
                    savedChapters  = savedParameters.ReportParameters.FirstOrDefault(param => param.ReportParameterName == WebConstants.TRACERS_CHAPTER).ParameterValue;
                    savedStandards = savedParameters.ReportParameters.FirstOrDefault(param => param.ReportParameterName == WebConstants.TRACERS_STANDARD).ParameterValue;

                    list = reportservice.GetSearchListsForSavedParameters(AppSession.ReportScheduleID, savedParameters, WebConstants.TRACER_REPORT_TITLE_TRACE_BY_EP_REPORT);
                }
                else
                {
                    list = reportservice.GetSearchLists(WebConstants.TRACER_REPORT_TITLE_TRACE_BY_EP_REPORT);
                }

                list.TracersChapters = reportservice.GetTracersChapters().TracersChapters;

                List <TracersStandards> standardList = new List <TracersStandards>();
                if (!String.IsNullOrWhiteSpace(savedChapters) && savedChapters != "-1") //Load standards only for the selected Chapters
                {
                    standardList = reportservice.GetTracersStandards(savedChapters).TracersStandards.ToList();
                }
                else
                {
                    standardList.Add(new TracersStandards
                    {
                        TracerStandardID = Convert.ToInt32(-1),
                        Code             = "All"
                    });
                }
                list.TracersStandards = standardList;

                List <TracersEP> epList = new List <TracersEP>();
                if (!String.IsNullOrWhiteSpace(savedStandards) && savedStandards != "-1") //Load EPs only for the selected Standards and Chapters
                {
                    epList = reportservice.GetTracersEPs(savedChapters, savedStandards).TracersEPs.ToList();
                }
                else
                {
                    epList.Add(new TracersEP
                    {
                        EPTextID = Convert.ToInt32(-1),
                        StandardLabelAndEPLabel = "All",
                    });
                }

                list.TracersEPs = epList;
                return(View(list));
            }
            catch (Exception ex)
            {
                ExceptionLog exceptionLog = new ExceptionLog
                {
                    ExceptionText = "Reports: " + ex.Message,
                    PageName      = "TracerByEP",
                    MethodName    = "Index",
                    UserID        = Convert.ToInt32(AppSession.UserID),
                    SiteId        = Convert.ToInt32(AppSession.SelectedSiteId),
                    TransSQL      = "",
                    HttpReferrer  = null
                };
                exceptionService.LogException(exceptionLog);

                return(RedirectToAction("Error", "Transfer"));
            }
        }
Exemplo n.º 11
0
        //
        // GET: /TracersByTJCStandard/
        public ActionResult Index(int id, int?actionType)
        {
            try
            {
                if (!AppSession.HasValidSession)
                {
                    return(RedirectToAction("IndexER", "Transfer", new { area = "" }));
                }

                HelperClasses.SetReportOrScheduleID(id, (int)ReportsListEnum.TracersByTJCStandard);

                SearchInputService reportservice = new SearchInputService();
                if (AppSession.ReportScheduleID > 0)
                {
                    //Load the saved parameters
                    var oSaveAndScheduleService = new SaveAndScheduleService();
                    var savedParameters         = oSaveAndScheduleService.LoadUserSchedule(AppSession.ReportScheduleID);
                    TempData["SavedParameters"] = savedParameters; //This tempdata will be used by the Ajax call to avoid loading the saved parameters again from DB
                    TempData["ActionType"]      = actionType;

                    //Show/Hide Save to my reports button
                    ViewBag.HideSaveReport = HelperClasses.HideSaveToMyReports(AppSession.RoleID, savedParameters.UserID, AppSession.UserID, actionType);

                    return(View(reportservice.GetSavedParameters_ByTJCStandard(AppSession.ReportScheduleID, savedParameters, WebConstants.ERTRACER_REPORT_TITLE_Tracer_By_TJC_Standard)));
                }
                else
                {
                    ERSearchList list = new ERSearchList();
                    list = reportservice.GetSearchLists_ByTJCStandard(WebConstants.ERTRACER_REPORT_TITLE_Tracer_By_TJC_Standard);
                    List <TracersStandards> standardList = new List <TracersStandards>();
                    standardList.Add(new TracersStandards
                    {
                        TracerStandardID = Convert.ToInt32(-1),
                        Code             = "All"
                    });
                    list.TracersStandards = standardList;
                    List <TracersEP> epList = new List <TracersEP>();

                    epList.Add(new TracersEP
                    {
                        EPTextID = Convert.ToInt32(-1),
                        StandardLabelAndEPLabel = "All",
                    });


                    list.TracersEPs = epList;
                    return(View(list));
                }
            }
            catch (Exception ex)
            {
                ExceptionLog exceptionLog = new ExceptionLog
                {
                    ExceptionText = "ER Reports: " + ex.Message,
                    PageName      = "TracersByTJCStandard",
                    MethodName    = "Index",
                    UserID        = Convert.ToInt32(AppSession.UserID),
                    SiteId        = Convert.ToInt32(AppSession.SelectedSiteId),
                    TransSQL      = "",
                    HttpReferrer  = null
                };
                exceptionService.LogException(exceptionLog);

                return(RedirectToAction("Error", "Transfer"));
            }
        }