コード例 #1
0
        private void btnAddNew_Click(object sender, EventArgs e)
        {
            Form addNewStudent = new frmAddNewStudent();

            addNewStudent.ShowDialog();
            lblxstudents.Items.Clear();
            addToLB();
        }
コード例 #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();
        }