private void btnDelete_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { CompaniesBO aCompaniesBO = new CompaniesBO(); int ID = int.Parse(viewAvailableCompanies.GetFocusedRowCellValue("ID").ToString()); string Name = aCompaniesBO.Select_ByID(ID).Name; DialogResult result = MessageBox.Show("Bạn có muốn xóa công ty " + Name + " này không?", "Xóa công ty", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (result == DialogResult.Yes) { aCompaniesBO.Delete(ID); MessageBox.Show("Xóa thành công"); this.ReloadData(); } }