public void update() { labels.ForEach(x => panel1.Controls.Remove(x)); Label p; CourseFactory cf = new CourseFactory(); courses = CourseFactory.getInstance().getCList(); for (int i = 0; i < courses.Count; i++) { p = new Label() { Text = courses[i].getId(), Location = new Point(label10.Location.X, i * 30), Size = new Size(80, 20) }; panel1.Controls.Add(p); labels.Add(p); p = new Label() { Text = courses[i].getTitle(), Location = new Point(label9.Location.X, i * 30), Size = new Size(300, 20) }; panel1.Controls.Add(p); labels.Add(p); p = new Label() { Text = courses[i].getCredit().ToString(), Location = new Point(label8.Location.X, i * 30) }; panel1.Controls.Add(p); labels.Add(p); p = new Label() { Text = courses[i].getTuitionPerCredit().ToString(), Location = new Point(label7.Location.X, i * 30) }; panel1.Controls.Add(p); labels.Add(p); p = new Label() { Text = courses[i].getProgram(), Location = new Point(label6.Location.X, i * 30) }; panel1.Controls.Add(p); labels.Add(p); } }
public int getExtraFeeAmount() { iefc = CourseFactory.getInstance().getExtraFeeCalculator(); return(iefc.getExtraAmount(this.getTotal())); }
public Course getCourse(string id) { return(CourseFactory.getInstance().getCourse(id)); }
public bool addCourse(string id) { return(reg.addCourse(CourseFactory.getInstance().getCourse(id))); }