コード例 #1
0
ファイル: AdminController.cs プロジェクト: biletnam/Theater-7
 public ActionResult GenreDelete(int id)
 {
     try
     {
         if (genresDb.GetGenreById(id) != null)
         {
             genresDb.DeleteById(id);
             messagesGenreTable = Resources.Resource.MessageDeleted;
         }
         else
         {
             messagesGenreTable = Resources.Resource.ErrorFound;
         }
         return(RedirectToAction("GenresTable", "Admin"));
     }
     catch
     {
         messagesGenreTable = Resources.Resource.Error;
         return(RedirectToAction("GenresTable", "Admin"));
     }
 }