Beispiel #1
0
 public bool DeleteCourse(Course course)
 {
     courseList.Remove(course);
     if (courseList.Contains(course))
     {
         return(false);
     }
     else
     {
         InputAndOutput.OutPutCourse(courseList);
         return(true);
     }
 }
Beispiel #2
0
 public bool AddCourse(Course course)
 {
     courseList.Add(course);
     if (courseList.Contains(course))
     {
         InputAndOutput.OutPutCourse(courseList);
         return(true);
     }
     else
     {
         return(false);
     }
 }
Beispiel #3
0
        public bool ChangeCourseInfo(Course course)
        {
            Course c = courseList.Find(x => x.Coursenum == course.Coursenum);

            courseList.Remove(c);
            courseList.Add(course);
            if (courseList.Contains(course))
            {
                InputAndOutput.OutPutCourse(courseList);
                return(true);
            }
            else
            {
                return(false);
            }
        }