Ejemplo n.º 1
0
    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();
    }
Ejemplo n.º 2
0
    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();
    }