private void btnDeleteNote_Click(object sender, EventArgs e) { Note _DeleteNote = new Note(); _DeleteNote = CustomerDb.GetNotesById(NotesId); DialogResult dialogResult = MessageBox.Show(this, "Are you sure you wish to Delete Note ", "Delete Note", MessageBoxButtons.YesNo, MessageBoxIcon.Information); if (dialogResult == DialogResult.Yes) { CustomerDb.DeleteNote(_DeleteNote); BindAddOns(CustomerId); } else if (dialogResult == DialogResult.No) { //do something else } BindNotes(CustomerId); }