コード例 #1
0
        public ActionResult GetStudentList(int classId, [DataSourceRequest] DataSourceRequest request)
        {
            DataSourceResult result = _learningClassService.GetById(classId).LearningClassStudents.ToDataSourceResult(
                request, student => new
            {
                student.StudentId,
                student.ClassId,
                student.MidTermPoint,
                student.EndTermPoint,
                student.TotalPoint
            });

            return(Json(result));
        }
コード例 #2
0
        public ActionResult GetTrainingMajorList(int classId, [DataSourceRequest] DataSourceRequest request)
        {
            var subject = _subjectService.GetById(_learningClassService.GetById(classId).SubjectId);

            return(Json(subject.TrainingMajors, JsonRequestBehavior.AllowGet));
        }