Example #1
0
        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();
 }
Example #4
0
 private void CommandDeleteDeckExecute(object param)
 {
     if (deckService.CanDelete(SelectedDeck))
     {
         deckService.DeleteDeck(SelectedDeck);
     }
     trackerFactory.GetFileManager().SaveDatabase();
     ApplyFilter();
 }