Ejemplo n.º 1
0
 public void scheduleCourse(String when, String what)
 {
     CourseModel c = new CourseModel(new DM.Course());
     ScheduleItemModel s = new ScheduleItemModel(new DM.ScheduleItem());
     foreach (CourseModel cm in AllCourses)
     {
         if (cm.Name == what)
         {
             s.Course = c;
             String[] split = when.Split(' ');
             s.Semester = split[0];
             s.Year = split[1];
             _user.Schedule.Add(s);
             s.write();
             _user.write();
             break;
         }
     }
 }
Ejemplo n.º 2
0
 public String getCourseDescription(string y)
 {
     CourseModel c = new CourseModel(new DM.Course());
     foreach (CourseModel val in AllCourses)
     {
         if ((val.Department.Name + " " + val.Number) == y)
         {
             c = val;
             return
         c.Name + "\n" +
         "Hours: " + c.Hours + "\n" +
         "Prerequisites: " + c.PrerequisiteDescription + "\n" +
         "Description: " + c.Description;
         }
     }
     return "Course not found";
 }