private void btnGiaoVuKhoa_Click(object sender, EventArgs e) { if (grvGiaoVien.FocusedRowHandle >= 0) { DataRow dr = grvGiaoVien.GetDataRow(grvGiaoVien.FocusedRowHandle); int[] arrIDChecked = null; if ("" + dr["IDDM_Khoa_GiaoVu"] != "") { arrIDChecked = new int[1]; arrIDChecked[0] = int.Parse(dr["IDDM_Khoa_GiaoVu"].ToString()); } dlgChonKhoa dlg = new dlgChonKhoa(false, arrIDChecked); if (dlg.ShowDialog() == DialogResult.OK) { oBGiaoVien.UpdateIDDM_Khoa_GiaoVu(dlg.arrIDChecked[0], int.Parse(dr["NS_GiaoVienID"].ToString())); trvDonVi_FocusedNodeChanged(null, null); } } }