Exemplo n.º 1
0
        public AggregationReportData GetCompareReport()
        {
            AggregationReportData response = new AggregationReportData();

            response.SalList = new List <BasicReportData.OverallSALTable>();
            response.DocumentLibraryTable = new List <DocumentLibraryTable>();


            TokenManager tm            = new TokenManager();
            var          aggregationID = tm.PayloadInt("aggreg");

            if (aggregationID == null)
            {
                return(response);
            }

            var assessmentList = new BusinessLogic.AggregationManager()
                                 .GetAssessmentsForAggregation((int)aggregationID);

            response.AggregationName = assessmentList.Aggregation.AggregationName;

            foreach (var a in assessmentList.Assessments)
            {
                ReportsDataManager reportsDataManager = new ReportsDataManager(a.AssessmentId);


                // Incorporate SAL values into response
                var salTable = reportsDataManager.GetSals();

                var entry = new BasicReportData.OverallSALTable();
                response.SalList.Add(entry);
                entry.Alias = a.Alias;
                entry.OSV   = salTable.OSV;
                entry.Q_CV  = "";
                entry.Q_IV  = "";
                entry.Q_AV  = "";
                entry.LastSalDeterminationType = salTable.LastSalDeterminationType;

                if (salTable.LastSalDeterminationType != "GENERAL")
                {
                    entry.Q_CV = salTable.Q_CV;
                    entry.Q_IV = salTable.Q_IV;
                    entry.Q_AV = salTable.Q_AV;
                }


                // Document Library
                var documentLibraryTable = reportsDataManager.GetDocumentLibrary();
                foreach (var docEntry in documentLibraryTable)
                {
                    docEntry.Alias = a.Alias;
                    response.DocumentLibraryTable.Add(docEntry);
                }
            }

            return(response);
        }
Exemplo n.º 2
0
        public BasicReportData getSiteSummary()
        {
            int assessmentId = Auth.AssessmentForUser();

            ReportsDataManager reportsDataManager = new ReportsDataManager(assessmentId);
            BasicReportData    data = new BasicReportData();

            data.genSalTable                   = reportsDataManager.GetGenSals();
            data.information                   = reportsDataManager.GetInformation();
            data.salTable                      = reportsDataManager.GetSals();
            data.nistTypes                     = reportsDataManager.GetNistInfoTypes();
            data.nistSalTable                  = reportsDataManager.GetNistSals();
            data.DocumentLibraryTable          = reportsDataManager.GetDocumentLibrary();
            data.RankedQuestionsTable          = reportsDataManager.GetRankedQuestions();
            data.QuestionsWithCommentsTable    = reportsDataManager.getQuestionsWithCommentsOrMarkedForReview();
            data.QuestionsWithAlternateJustifi = reportsDataManager.GetQuestionsWithAlternateJustification();
            return(data);
        }
Exemplo n.º 3
0
        public BasicReportData GetDetail()
        {
            int assessmentId = Auth.AssessmentForUser();

            ReportsDataManager reportsDataManager = new ReportsDataManager(assessmentId);
            BasicReportData    data = new BasicReportData();

            data.genSalTable                   = reportsDataManager.GetGenSals();
            data.information                   = reportsDataManager.GetInformation();
            data.salTable                      = reportsDataManager.GetSals();
            data.nistTypes                     = reportsDataManager.GetNistInfoTypes();
            data.nistSalTable                  = reportsDataManager.GetNistSals();
            data.DocumentLibraryTable          = reportsDataManager.GetDocumentLibrary();
            data.RankedQuestionsTable          = reportsDataManager.GetRankedQuestions();
            data.QuestionsWithComments         = reportsDataManager.GetQuestionsWithComments();
            data.QuestionsMarkedForReview      = reportsDataManager.GetQuestionsMarkedForReview();
            data.QuestionsWithAlternateJustifi = reportsDataManager.GetQuestionsWithAlternateJustification();
            data.StandardsQuestions            = reportsDataManager.GetQuestionsForEachStandard();
            data.ComponentQuestions            = reportsDataManager.GetComponentQuestions();
            return(data);
        }