コード例 #1
0
        /// <summary>Gets a list of all of the Courses in the database which are associated with the Teacher table via the ID column.</summary>
        /// <param name="teacherID">The ID of the Teacher for which to retrieve the child Courses.</param>
        /// <returns>An IEnumerable of Courses.</returns>
        public IEnumerable <SO.Course> GetCoursesByTeacherID(int teacherID, int page)
        {
            IEnumerable <DA.Course> returnValue = CourseLogic.GetByTeacherID(teacherID);

            if (returnValue != null)
            {
                return(ServiceUtil.GetPage(returnValue, page).Select(o => SO.Course.FromDataAccessObject(o)));
            }

            return(null);
        }
コード例 #2
0
        /// <summary>Gets a list of all of the Courses in the database which are associated with the Teacher table via the ID column.</summary>
        /// <param name="teacherID">The ID of the Teacher for which to retrieve the child Courses.</param>
        /// <returns>An IEnumerable of Courses.</returns>
        public IEnumerable <SO.Course> GetCoursesByTeacherID(string teacherID, string page)
        {
            IEnumerable <DA.Course> returnValue = CourseLogic.GetByTeacherID(ParseInt("id", teacherID));

            if (returnValue != null)
            {
                return(ServiceUtil.GetPage(returnValue, ParseInt("page", page)).Select(o => SO.Course.FromDataAccessObject(o)));
            }

            return(null);
        }
コード例 #3
0
 /// <summary>Gets how many Courses by TeacherID exist.<summary>
 public int GetCoursesByTeacherIDCount(int teacherID)
 {
     return(CourseLogic.GetByTeacherID(teacherID).Count());
 }
コード例 #4
0
 /// <summary>Gets how many Courses by TeacherID exist.<summary>
 public int GetCoursesByTeacherIDCount(string teacherID)
 {
     return(CourseLogic.GetByTeacherID(ParseInt("teacherID", teacherID)).Count());
 }