Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        public void RemoveLecturePlanByID(int id)
        {
            LecturePlan lecturePlan = GetLecturePlanByID(id);

            RemoveLecturePlan(lecturePlan);
        }
Exemple #4
0
 public void RemoveLecturePlan(LecturePlan lectureplan)
 {
     lecturePlans.Remove(lectureplan);
 }
Exemple #5
0
 public int AddLecturePlan(LecturePlan lectureplan)
 {
     lectureplan.ID = this.NextID();
     lecturePlans.Add(lectureplan);
     return(lectureplan.ID);
 }