private void DeleteSelectedItem_Click(object sender, RoutedEventArgs e) { var selecteditems = WordListView.SelectedItems.ToList(); foreach (var item in selecteditems) { var _item = item as WordNoteViewModel; if (WordNoteHelper.Delete(_item.ID)) { ViewModel.WordNoteViewModelCollection.Remove(_item); } } CancelMultiSelectionState(); }
public void DeleteFromBook(string _word, int _wordnotebookid) { WordNoteHelper.Delete(_word, _wordnotebookid); Update(_wordnotebookid); }
public void Delete(WordNoteViewModel viewmodelitem) { WordNoteHelper.Delete(viewmodelitem.ID); WordNoteViewModelCollection.Remove(viewmodelitem); }
public void DeleteFromBook(string _word, int _wordnotebookid) { WordNoteHelper.Delete(_word, _wordnotebookid); NoteBookControlViewModel.Update(_wordnotebookid); }