public async Task <GridResponse> GetGridData(GridRequest request, IPrincipal currentUser)
        {
            // Gets a list of all the last versions of the student extra hours.
            var query        = _db.StudentExtraHourGrid;
            var securedQuery = _auth.ApplySecurity(query, query, currentUser);
            var gridMetadata = request.ProcessMetadata(new StudentExtraHourGrid());

            return(await securedQuery.ExecuteGridQuery(gridMetadata, request.AllData));
        }
        public async Task <GridResponse> GetGridData(GridRequest request, IPrincipal currentUser)
        {
            var query        = _db.StudentAttendanceDetail;
            var securedQuery = _auth.ApplySecurity(query, query, currentUser);
            var gridMetadata = request.ProcessMetadata(new StudentAttendanceDetail());

            return(await securedQuery.ExecuteGridQuery(gridMetadata, true));
        }
        public async Task <GridResponse> GetGridData(GridRequest request, IPrincipal currentUser)
        {
            var query        = _db.StudentCourseTranscript;
            var securedQuery = _auth.ApplySecurity(query, query, currentUser);
            var gridMetadata = request.ProcessMetadata(new StudentCourseTranscript());

            return(await securedQuery.ExecuteGridQuery(gridMetadata, request.AllData));
        }
Exemplo n.º 4
0
        public async Task <GridResponse> GetGridData(GridRequest request, IPrincipal currentUser)
        {
            var query        = _db.StudentAbsencesByCourse;
            var securedQuery = _auth.ApplySecurity(query, query, currentUser);
            var gridMetadata = request.ProcessMetadata(new StudentAbsencesByCourse());

            return(await securedQuery.OrderBy(x => x.ClassPeriodName).ExecuteGridQuery(gridMetadata, request.AllData));
        }
Exemplo n.º 5
0
        public async Task <IEnumerable <object> > GetGridFilter(IPrincipal currentUser)
        {
            var query = _db.Schools;

            return(_auth.ApplySecurity(query, query, currentUser).ToList().GroupBy(x => new { x.SchoolId, x.LocalEducationAgencyId, x.NameOfInstitution }).Select(x => new {
                x.Key.SchoolId,
                x.Key.LocalEducationAgencyId,
                x.Key.NameOfInstitution,
                ChildOptions = x.Select(g => new { Id = g.GradeLevel, Value = g.GradeLevel }) // For GradeLevel Filter
            }));
        }