private void btnXoa_Click(object sender, EventArgs e) { try { if (MessageBox.Show("Bạn có muốn xóa?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { var rowHandle = gridViewPhongHoc.FocusedRowHandle; int _caHocId = O2S_Common.TypeConvert.Parse.ToInt32(gridViewPhongHoc.GetRowCellValue(rowHandle, "PhongHocId").ToString()); if (PhongHocLogic.Delete(_caHocId)) { O2S_Common.Utilities.ThongBao.frmThongBao frmthongbao = new O2S_Common.Utilities.ThongBao.frmThongBao(Base.ThongBaoLable.XOA_THANH_CONG); frmthongbao.Show(); LoadGridPhongHoc(); } } } catch (Exception ex) { O2S_Common.Logging.LogSystem.Error(ex); } }