private void btnDeleteContact_Click(object sender, EventArgs e) { CustomerContact _DeleteContact = new CustomerContact(); _DeleteContact = CustomerDb.GetCustomerContactById(ContactId); DialogResult dialogResult = MessageBox.Show(this, "Are you sure you wish to Delete Contact ", "Delete Contact", MessageBoxButtons.YesNo, MessageBoxIcon.Information); if (dialogResult == DialogResult.Yes) { CustomerDb.DeleteContact(_DeleteContact); BindContacts(CustomerId); } else if (dialogResult == DialogResult.No) { //do something else } BindContacts(CustomerId); }