public void CopyData(AAS.DB.Course other) { CRN = other.CRN; Subject = other.Subject; Credits = other.Credits; Title = other.Title; CourseNumber = other.CourseNumber; SectionNumber = other.SectionNumber; foreach (AAS.DB.Period p in other.Periods) { if (p.DayOfWeek.ToUpper() == "M") { Monday.Add(new Period(p)); } if (p.DayOfWeek.ToUpper() == "T") { Tuesday.Add(new Period(p)); } if (p.DayOfWeek.ToUpper() == "W") { Wednesday.Add(new Period(p)); } if (p.DayOfWeek.ToUpper() == "R") { Thursday.Add(new Period(p)); } if (p.DayOfWeek.ToUpper() == "F") { Friday.Add(new Period(p)); } } foreach (AAS.DB.Exam e in other.Exams) { Exams.Add(new Exam(e)); } }
public Course(AAS.DB.Course _course) : this() { CopyData(_course); }