public void Removebook(BookData bookData) { IList <IUser> usersWithThisBook = GetUserWithThisBook(book); if (usersWithThisBook.Count == 0) { DialogResult dialogResult = MessageBox.Show("Are You Sure ?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dialogResult == DialogResult.Yes) { _libraryPresenter.Container.books.Remove(book); _libraryPresenter.Container.Save(); MessageBox.Show("Removed"); bookData.Close(); } else if (dialogResult == DialogResult.No) { //Cancel Delete } } else { DialogResult dialogResult = MessageBox.Show(GetUserForDisplay(usersWithThisBook), "Delete", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }