private void buttonDeleteBook_Click(object sender, EventArgs e) { if (IsValidInventoryData()) { DialogResult ans = MessageBox.Show("Do you really want to delete this Product?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Information); if (ans == DialogResult.Yes) { InventoryDA.Delete(Convert.ToInt32(textBoxISBN.Text)); MessageBox.Show("Product record has been deleted successfully", "Confirmation"); ClearAll(); textBoxISBN.Enabled = true; } } }