Beispiel #1
0
        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);
        }
Beispiel #2
0
        public void Form1_Load(object sender, EventArgs e)
        {
            cbxCourses.Items.Clear();
            courses = CourseManager.getInstance().courseList;

            foreach (Course c in courses)
            {
                cbxCourses.Items.Add(c.name.ToString());
            }

            dataGridView1.Rows.Clear();
            insertRows();
        }