}//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)
}//end Add(AbstractCourse) public override void Remove(AbstractCourse course) { CourseList.Remove(course); }//end Remove(AbstractCourse)
}//end Add(AbstractCourse) public override void Remove(AbstractCourse course) { throw new InvalidOperationException(); }//end Remove(AbstractCourse)
}//end Course(String, String, bool) : Base (String, String, bool) #region Necessary Overrides public override void Add(AbstractCourse course) { CourseList.Add(course); }//end Add(AbstractCourse)
}//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)
/// <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);
}//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);
}//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)