public object Get([System.Web.Http.ModelBinding.ModelBinder] GetPagedListParams parms)
        {
            var subjectId = 0;

            if (parms.Filters.ContainsKey("subjectId"))
            {
                subjectId = int.Parse(parms.Filters["subjectId"]);
            }
            return(new
            {
                Students = CpManagementService.GetGraduateStudentsForUser(WebSecurity.CurrentUserId, subjectId, parms),
                PercentageGraphs = PercentageService.GetPercentageGraphsForLecturerAll(WebSecurity.CurrentUserId, parms)
            });
        }
예제 #2
0
        public object Get([System.Web.Http.ModelBinding.ModelBinder] GetPagedListParams parms)
        {
            var lecturerId = WebSecurity.CurrentUserId;

            if (parms.Filters.ContainsKey("lecturerId"))
            {
                lecturerId = int.Parse(parms.Filters["lecturerId"]);
            }

            var subjectId = 0;

            if (parms.Filters.ContainsKey("subjectId"))
            {
                subjectId = int.Parse(parms.Filters["subjectId"]);
            }

            return(new
            {
                Students = CpManagementService.GetGraduateStudentsForUser(lecturerId, subjectId, parms, false),
                CourseProjectConsultationDates = PercentageService.GetConsultationDatesForUser(lecturerId, subjectId)
            });
        }