예제 #1
0
        private void SelectCourse(object courseId)
        {
            if (courseId == null)
            {
                return;
            }

            this.selectedCourseId = (int)courseId;

            this.Students = studentService
                            .GetTeacherStudents(selectedCourseId);

            this.SelectedCourseName = courseService
                                      .GetCourseName(selectedCourseId);

            this.ExceptionMessage = string.Empty;
        }
예제 #2
0
        private void Initialize()
        {
            this.courseService  = new TeacherCourseService();
            this.studentService = new TeacherStudentService();

            this.Courses = courseService
                           .GetTeacherCourses(User.UserId);

            var initializedCourse = this.Courses
                                    .FirstOrDefault();

            if (initializedCourse != null)
            {
                this.Students = studentService
                                .GetTeacherStudents(initializedCourse.CourseId);

                this.SelectedCourseName = courseService
                                          .GetCourseName(initializedCourse.CourseId);

                this.selectedCourseId = initializedCourse.CourseId;
            }
        }