示例#1
0
        }//end CreateAccount(User)

        public int CreateCourse(AbstractCourse CourseIn)
        {
            int    iStatus = 0; //0 indicates nothing happened
            Course NewCourse;

            if (!(CourseIn is Courses))  //Make sure you're not passing a course list here
            {
                NewCourse = new Course((Course)CourseIn);
                //Save the new course to the database?
            }
            else
            {
                iStatus = -1;           //Indicates a course was passed
            }

            return(iStatus);
        }//end CreateCourse(AbstractCourse)
示例#2
0
        }//end Add(AbstractCourse)

        public override void Remove(AbstractCourse course)
        {
            CourseList.Remove(course);
        }//end Remove(AbstractCourse)
示例#3
0
        }//end Add(AbstractCourse)

        public override void Remove(AbstractCourse course)
        {
            throw new InvalidOperationException();
        }//end Remove(AbstractCourse)
示例#4
0
        }//end Course(String, String, bool) : Base (String, String, bool)

        #region Necessary Overrides

        public override void Add(AbstractCourse course)
        {
            CourseList.Add(course);
        }//end Add(AbstractCourse)
示例#5
0
        }//end Concentration()

        /// <summary>
        /// Copy Constructor for concentration
        /// </summary>
        /// <param name="ConcentrationIn"></param>
        public Concentration(Concentration ConcentrationIn)
        {
            this.Criteria    = new Criteria(ConcentrationIn.Criteria.GetStatus(), ConcentrationIn.Criteria.GetDescription(), ConcentrationIn.Criteria.GetDisplayOrder(), ConcentrationIn.Criteria.GetCriteriaType());
            this.Courses     = new Courses(ConcentrationIn.Courses.GetId(), ConcentrationIn.Courses.GetName(), ConcentrationIn.Courses.GetStatus());
            this.Description = ConcentrationIn.Description;
        }//end Concentration(ConcentrationIn)
示例#6
0
 /// <summary>
 /// Template method to remove a course from the tree
 /// </summary>
 /// <param name="course"> The course to remove </param>
 public abstract void Remove(AbstractCourse course);
示例#7
0
        }//end AbstractCourse(AbstractCourse)

        #endregion

        #region Abstract Methods
        /// <summary>
        /// Abstract method to add a course to the tree
        /// </summary>
        /// <param name="course"> The course to add </param>
        public abstract void Add(AbstractCourse course);
示例#8
0
        }//end AbstractCourse(String, String, bool)

        /// <summary>
        /// The copy constructor
        /// </summary>
        /// <param name="CourseIn"> The course object to be copied </param>
        public AbstractCourse(AbstractCourse CourseIn)
        {
            this.Id     = CourseIn.Id;
            this.Name   = CourseIn.Name;
            this.status = CourseIn.status;
        }//end AbstractCourse(AbstractCourse)