public LecturePlan GetLecturePlan(LecturePlan lectureplan) { LecturePlan result = null; foreach (LecturePlan item in lecturePlans) { if (lectureplan.Equals(item)) { result = lectureplan; } } if (result == null) { throw new NullReferenceException(); } return(result); }
public LecturePlan GetLecturePlanByID(int id) { LecturePlan result = null; foreach (LecturePlan item in lecturePlans) { if (id.Equals(item.ID)) { result = item; } } if (result == null) { throw new NullReferenceException(); } return(result); }
public void RemoveLecturePlanByID(int id) { LecturePlan lecturePlan = GetLecturePlanByID(id); RemoveLecturePlan(lecturePlan); }
public void RemoveLecturePlan(LecturePlan lectureplan) { lecturePlans.Remove(lectureplan); }
public int AddLecturePlan(LecturePlan lectureplan) { lectureplan.ID = this.NextID(); lecturePlans.Add(lectureplan); return(lectureplan.ID); }