private void btnAddNew_Click(object sender, EventArgs e) { Form addNewStudent = new frmAddNewStudent(); addNewStudent.ShowDialog(); lblxstudents.Items.Clear(); addToLB(); }
//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(); }