public static List <CourseOffering> PopulateCourseOffering() { List <CourseOffering> courseOfferingList = new List <CourseOffering>(); TimeSpan Start = new TimeSpan(8, 30, 00); TimeSpan End = new TimeSpan(9, 30, 00); CourseOffering courseOffering = new CourseOffering(1, "83455", "M,W,F", 15, Start, End); courseOfferingList.Add(courseOffering); Start = new TimeSpan(8, 30, 00); End = new TimeSpan(9, 30, 00); courseOffering = new CourseOffering(1, "83456", "M,W,F", 12, Start, End); courseOfferingList.Add(courseOffering); Start = new TimeSpan(2, 30, 00); End = new TimeSpan(3, 30, 00); courseOffering = new CourseOffering(2, "83456", "M,W,F", 11, Start, End); courseOfferingList.Add(courseOffering); Start = new TimeSpan(3, 30, 00); End = new TimeSpan(4, 30, 00); courseOffering = new CourseOffering(1, "83256", "T,TR", 19, Start, End); courseOfferingList.Add(courseOffering); Start = new TimeSpan(5, 30, 00); End = new TimeSpan(6, 30, 00); courseOffering = new CourseOffering(3, "13456", "M,W,F", 13, Start, End); courseOfferingList.Add(courseOffering); Start = new TimeSpan(8, 30, 00); End = new TimeSpan(9, 30, 00); courseOffering = new CourseOffering(5, "83356", "M,W,F", 9, Start, End); courseOfferingList.Add(courseOffering); Start = new TimeSpan(9, 30, 00); End = new TimeSpan(10, 30, 00); courseOffering = new CourseOffering(4, "83656", "T,TR", 3, Start, End); courseOfferingList.Add(courseOffering); Start = new TimeSpan(12, 30, 00); End = new TimeSpan(1, 30, 00); courseOffering = new CourseOffering(5, "83056", "T,TR", 7, Start, End); courseOfferingList.Add(courseOffering); Start = new TimeSpan(10, 30, 00); End = new TimeSpan(11, 30, 00); courseOffering = new CourseOffering(3, "83996", "T,TR", 2, Start, End); courseOfferingList.Add(courseOffering); return(courseOfferingList); }
public override bool Equals(object obj) { bool areEqual = false; if (obj != null) { CourseOffering secondCourseOffering = (CourseOffering)obj; if (this.CourseOfferingId == secondCourseOffering.CourseOfferingId) { areEqual = true; } } return(areEqual); }