public ActionResult Delete(int DeckId) { var dck = deckService.GetDeck(DeckId); deckService.DeleteDeck(DeckId); return(RedirectToAction(nameof(Index), new { ParentId = dck.ResourceId })); }
public void DeleteDeck(int id) // Удаление колоды { if (_deckService.AuthorizeUserDeck(User.Identity.Name, id)) // проверка принадлежит ли колода пользователю { _deckService.DeleteDeck(id); } }
private void CommandDeleteDeckExecute(EditDeck editDeck) { if (deckService.CanDelete(editDeck.Deck)) { deckService.DeleteDeck(editDeck.Deck); } trackerFactory.GetFileManager().SaveDatabase(); ApplyFilter(); }
private void CommandDeleteDeckExecute(object param) { if (deckService.CanDelete(SelectedDeck)) { deckService.DeleteDeck(SelectedDeck); } trackerFactory.GetFileManager().SaveDatabase(); ApplyFilter(); }