예제 #1
0
        /// <summary>
        /// Finds all the students not enrolled in the given course and binds it to the repeater.
        /// </summary>
        /// <param name="course">The reference course</param>
        /// <param name="repeater">The repeater to be bound</param>
        /// <returns>The number of enrollments</returns>
        public int GetAllNotEnrolledStudentsForCourseAndBindToRepeater(Course course, ref Repeater repeater)
        {
            List <Student> notEnrolledStudents = studentDAO.FindAllStudentsNotEnrolledInCourse(course);

            repeater.DataSource = notEnrolledStudents;
            repeater.DataBind();

            return(notEnrolledStudents.Count);
        }