コード例 #1
0
        private void BtnAddStudent_Click(object sender, EventArgs e)
        {
            FrmAddAndUpdateStudent addStuForm = new FrmAddAndUpdateStudent();

            addStuForm.ShowDialog();
            PopulateStudentListBox();
        }
コード例 #2
0
        private void BtnUpdateStudent_Click(object sender, EventArgs e)
        {
            Student selectedStu = lstStudents.SelectedItem as Student;
            var     updateForm  = new FrmAddAndUpdateStudent(selectedStu);

            updateForm.ShowDialog();
            PopulateStudentListBox();
        }