private void btnAddCourse_Click(object sender, EventArgs e) { Course c = new Course(txtCourseName.Text, numOfSections, sections); CourseManager.getInstance().addCourse(c); this.Close(); Form1 form1 = Form1.getInstance(); form1.Form1_Load(sender, e); }
private Form1() { InitializeComponent(); Section s1 = new Section(1, Day.Monday, Hour.h_8_30); Section s2 = new Section(2, Day.Monday, Hour.h_11_30); Section s3 = new Section(3, Day.Tuesday, Hour.h_12_30); Section s4 = new Section(4, Day.Wednesday, Hour.h_13_30); Section s5 = new Section(2, Day.Thursday, Hour.h_10_30); Section s6 = new Section(1, Day.Friday, Hour.h_14_30); List<Section> sections1 = new List<Section>(); List<Section> sections2 = new List<Section>(); List<Section> sections3 = new List<Section>(); sections1.Add(s1); sections1.Add(s2); sections1.Add(s3); sections1.Add(s4); sections2.Add(s1); sections2.Add(s5); sections3.Add(s6); sections3.Add(s2); sections3.Add(s3); Course c1 = new Course("Fizik", 4, sections1); Course c2 = new Course("Kimya", 2, sections2); Course c3 = new Course("Matematik", 3, sections3); CourseManager.getInstance().addCourse(c1); CourseManager.getInstance().addCourse(c2); CourseManager.getInstance().addCourse(c3); }
public void removeCourse(Course course) { courseList.Remove(course); }
public void addCourse(Course course) { courseList.Add(course); }
public Lecture(Course course, Section section) { this.course = course; this.section = section; }