private void btnAddNew_Click(object sender, EventArgs e)
        {
            Form addNewStudent = new frmAddNewStudent();

            addNewStudent.ShowDialog();
            lblxstudents.Items.Clear();
            addToLB();
        }
Exemple #2
0
        //user can add new student info.
        private void btnAddNew_Click(object sender, EventArgs e)
        {
            //display add new student form using showDiaglog.
            Form addNewStudent = new frmAddNewStudent();

            addNewStudent.ShowDialog();
            //clear the previous student information in the list box
            lbxStudents.Items.Clear();
            //add student info to student list box
            addToListBox();
        }