protected void InitOContent() { CourseTypeList currentCourseTypeList = null; StringBuilder html = new StringBuilder(); foreach (Course course in Course.GetCoursesList(true)) { if (currentCourseTypeList == null) { currentCourseTypeList = new CourseTypeList(course); } else if (currentCourseTypeList.currentType != course.CourseType) { html.Append(currentCourseTypeList.ToString()); currentCourseTypeList = new CourseTypeList(course); } currentCourseTypeList.Add(course); } if (currentCourseTypeList != null) { html.Append(currentCourseTypeList.ToString()); } oContent.Text = html.ToString(); }
protected void InitOContent() { CourseTypeList currentCourseTypeList = null; StringBuilder html = new StringBuilder(); foreach (Course course in Course.GetCoursesList(true)) { if (currentCourseTypeList == null) { currentCourseTypeList = new CourseTypeList(course); } else if (currentCourseTypeList.currentType != course.CourseType) { html.Append(currentCourseTypeList.ToString()); currentCourseTypeList = new CourseTypeList(course); } currentCourseTypeList.Add(course); } if (currentCourseTypeList != null) { html.Append(currentCourseTypeList.ToString()); } oContent.Text = html.ToString(); }