private void button2_Click(object sender, EventArgs e) { using (frm_student_information_entry frm = new frm_student_information_entry()) { frm.StartPosition = FormStartPosition.CenterParent; frm.ShowDialog(); LoadStudents(); } }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { int SelectStudentID = Convert.ToInt32(dataGridView1.Rows[e.RowIndex].Cells["clmStudentID"].Value); if (e.ColumnIndex == clmUpdateStudentInfo.Index) { using (frm_student_information_entry frm = new frm_student_information_entry(SelectStudentID)) { frm.StartPosition = FormStartPosition.CenterParent; frm.ShowDialog(); LoadStudents(); } } else if (e.ColumnIndex == clmGuardianInfo.Index) { using (frm_student_information_entry_guardian frm = new frm_student_information_entry_guardian(SelectStudentID)) { frm.StartPosition = FormStartPosition.CenterParent; frm.ShowDialog(); } } }