public Course(short id, string name, int number, int credits, Department dept)
 {
     this.ID = id;
     this.name = name;
     this.number = number;
     this.credits = credits;
     this.department = dept;
 }
 public List<Department> GetDepartments()
 {
     List<Department> departments = new List<Department>();
     DataRowCollection rows = _studentRecords.Departments.Rows;
     foreach (DataRow r in rows)
     {
         StudentRecordsDataSet.DepartmentsRow row = (StudentRecordsDataSet.DepartmentsRow) r;
         Department d = new Department(row.DeptName);
         d.SetCourseListing(GetCourses(d));
         departments.Add(d);
     }
     return departments;
 }
 public List<Course> GetCourses(Department d)
 {
     List<Course> courses = new List<Course>();
     DataRowCollection rows = _studentRecords.Courses.Rows;
     foreach (DataRow r in rows)
     {
         StudentRecordsDataSet.CoursesRow row = (StudentRecordsDataSet.CoursesRow) r;
         if (row.DeptName.Equals(d.GetName()))
         {
             Course c = new Course(row.ID, row.Name, row.Number, row.Credits, d);
             c.SetSections(GetSections(c));
             courses.Add(c);
         }
     }
     return courses;
 }
 public void DropDepartment(Department d)
 {
 }
 public void AddDepartment(Department d)
 {
 }