Ejemplo n.º 1
0
 public ActionResult AddListBook(int listID, int bookID)
 {
     try
     {
         var sl = service.GetListById(listID);
         var sb = bookService.GetBookById(bookID);
         service.AddListBook(sl, sb);
         if (Request.IsAjaxRequest())
         {
             return(PartialView("_EditListView", Models.DataModels.List.GetEditListModel(listID)));
         }
         return(RedirectToAction("Edit", new { ID = listID }));
     }
     catch (Exception ex)
     {
         logger.Error(ex);
         return(View("Error"));
     }
 }