Exemplo n.º 1
0
        public Student GetStudentDetails(int studentId, int schoolYearId)
        {
            var student    = StudentStorage.GetById(studentId);
            var isEnrolled = ((DemoSchoolYearService)ServiceLocator.SchoolYearService).IsStudentEnrolled(studentId, schoolYearId);

            return(BuildStudentDetailsData(student, !isEnrolled));
        }
Exemplo n.º 2
0
        public Student GetById(int id, int schoolYearId)
        {
            var student    = StudentStorage.GetById(id);
            var isEnrolled = ServiceLocator.SchoolYearService.GetStudentAssignments().Any(x => x.StudentRef == id &&
                                                                                          x.SchoolYearRef == schoolYearId && x.IsEnrolled);

            return(BuildStudentDetailsData(student, !isEnrolled));
        }