Exemplo n.º 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)
Exemplo n.º 2
0
        }//end Add(AbstractCourse)

        public override void Remove(AbstractCourse course)
        {
            CourseList.Remove(course);
        }//end Remove(AbstractCourse)
Exemplo n.º 3
0
        }//end Add(AbstractCourse)

        public override void Remove(AbstractCourse course)
        {
            throw new InvalidOperationException();
        }//end Remove(AbstractCourse)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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);
Exemplo n.º 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);
Exemplo n.º 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)