Beispiel #1
0
        public IEnumerable <StudentDrillDownQuery> GetStudentMultipleEnrollmentsDrilldownData(
            IOdsDataService odsDataService,
            OrgType orgType,
            int?schoolId,
            int edOrgId,
            int drillDownColumnIndex,
            string fourDigitSchoolYear)
        {
            var cacheKey = $"GetStudentMultipleEnrollmentsDrilldownData_{orgType}_{schoolId}_{edOrgId}_{drillDownColumnIndex}_{fourDigitSchoolYear}";

            lock (LockObject)
            {
                // if (!Cache.Contains(cacheKey))
                {
                    var results = odsDataService.GetMultipleEnrollmentStudentDrillDown(
                        orgType,
                        schoolId,
                        edOrgId,
                        drillDownColumnIndex,
                        fourDigitSchoolYear);

                    Cache.Add(cacheKey, results, CacheExpirationOffset);
                }

                return(Cache.Get(cacheKey) as IEnumerable <StudentDrillDownQuery>);
            }
        }
Beispiel #2
0
        public IEnumerable <StudentProgramsCountReportQuery> GetStudentProgramsCounts(
            IOdsDataService odsDataService,
            int?edOrgId,
            string fourDigitSchoolYear)
        {
            var cacheKey = $"GetStudentProgramsCounts_{edOrgId}_{fourDigitSchoolYear}";

            lock (LockObject)
            {
                if (!Cache.Contains(cacheKey))
                {
                    var results = odsDataService.GetStudentProgramsCounts(edOrgId, fourDigitSchoolYear);
                    Cache.Add(cacheKey, results, CacheExpirationOffset);
                }

                return(Cache.Get(cacheKey) as IEnumerable <StudentProgramsCountReportQuery>);
            }
        }
Beispiel #3
0
 public HomeController(
     IAnnouncementService announcementService,
     IAppUserService appUserService,
     IEdOrgService edOrgService,
     ISchoolYearService schoolYearService,
     IOdsDataService odsDataService,
     ISubmissionCycleService submissionCycleService,
     IRecordsRequestService recordsRequestService,
     IConfigurationValues configurationValues)
 {
     AnnouncementService    = announcementService;
     AppUserService         = appUserService;
     EdOrgService           = edOrgService;
     SchoolYearService      = schoolYearService;
     OdsDataService         = odsDataService;
     SubmissionCycleService = submissionCycleService;
     RecordsRequestService  = recordsRequestService;
     ConfigurationValues    = configurationValues;
 }
Beispiel #4
0
        public IEnumerable <ChangeOfEnrollmentReportQuery> GetChangeOfEnrollmentReport(
            IOdsDataService odsDataService,
            int edOrgId,
            string fourDigitSchoolYear)
        {
            var cacheKey = $"GetChangeOfEnrollmentReport_{edOrgId}_{fourDigitSchoolYear}";

            lock (LockObject)
            {
                if (!Cache.Contains(cacheKey))
                {
                    var results = odsDataService.GetChangeOfEnrollmentReport(
                        edOrgId,
                        fourDigitSchoolYear);

                    Cache.Add(cacheKey, results, CacheExpirationOffset);
                }

                return(Cache.Get(cacheKey) as IEnumerable <ChangeOfEnrollmentReportQuery>);
            }
        }
Beispiel #5
0
        public IEnumerable <DemographicsCountReportQuery> GetDistrictAncestryRaceCounts(
            IOdsDataService odsDataService,
            bool isStateMode,
            int?edOrgId,
            string fourDigitSchoolYear)
        {
            var cacheKey = $"DistrictAncestryRaceCounts_{isStateMode}_{edOrgId}_{fourDigitSchoolYear}";

            lock (LockObject)
            {
                if (!Cache.Contains(cacheKey))
                {
                    var results = odsDataService.GetDistrictAncestryRaceCounts(
                        isStateMode ? null : edOrgId,
                        fourDigitSchoolYear);

                    Cache.Add(cacheKey, results, CacheExpirationOffset);
                }

                return(Cache.Get(cacheKey) as IEnumerable <DemographicsCountReportQuery>);
            }
        }
Beispiel #6
0
        public IEnumerable <StudentDrillDownQuery> GetResidentsEnrolledElsewhereStudentDrillDown(
            IOdsDataService odsDataService,
            OrgType orgType,
            int?schoolId,
            int edOrgId,
            int drillDownColumnIndex,
            string fourDigitSchoolYear)
        {
            var cacheKey = $"GetResidentsEnrolledElsewhereStudentDrillDown_{orgType}_{schoolId}_{edOrgId}_{drillDownColumnIndex}_{fourDigitSchoolYear}";

            lock (LockObject)
            {
                if (!Cache.Contains(cacheKey))
                {
                    var results = odsDataService.GetResidentsEnrolledElsewhereStudentDrillDown(
                        edOrgId,
                        fourDigitSchoolYear);

                    Cache.Add(cacheKey, results, CacheExpirationOffset);
                }

                return(Cache.Get(cacheKey) as IEnumerable <StudentDrillDownQuery>);
            }
        }