Exemplo n.º 1
0
 // GET: MovieUser/Delete/5
 public ActionResult Delete(int id)
 {
     using (ContextBLL ctx = new ContextBLL())
     {
         MovieUserBLL U = ctx.FindMovieUserByID(id);
         if (U == null)
         {
             return(View("ItemNotFound"));
         }
         else
         {
             return(View(U));
         }
     }
 }
Exemplo n.º 2
0
 public ActionResult Edit(int id, MovieUserBLL u)
 {
     try
     {
         using (ContextBLL ctx = new ContextBLL())
         {
             ctx.JustUpdateMovieUser(id, u.MovieID, u.UserID, u.Date);
             return(RedirectToAction("Index"));
         }
     }
     catch (Exception ex)
     {
         return(View("Error", ex));
     }
 }