private void DelNote(Notes notes) { var msg = "真的要删除:" + notes.Title + "?"; var result = MessageBox.Show(msg, "删除确认", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2); if (DialogResult.Yes != result) { return; } if (notesService.Del(notes)) { LoadNotes(); } }