private void btnDeleteCustomFields_Click(object sender, EventArgs e) { CustomField _CustomField = new CustomField(); _CustomField = CustomerDb.GetCustomFieldById(CutomFieldId); DialogResult dialogResult = MessageBox.Show(this, "Delete Custom Field", "Are you sure you wish to CustomField ", MessageBoxButtons.YesNo, MessageBoxIcon.Information); if (dialogResult == DialogResult.Yes) { CustomerDb.DeleteCustomField(_CustomField); BindAddOns(CustomerId); } else if (dialogResult == DialogResult.No) { //do something else } BindCustomFields(CustomerId); }