public IActionResult MovieDetails(int id)//shows the details of a perticular movie
 {
     try
     {
         MovieInfo movie = MovieDAObj.GetMovie(id);
         return(View(movie));
     }
     catch (Exception exMovieDetails)
     {
         string exMessage = "oops! There is a problem in loading details of the movie.";
         return(RedirectToAction("Index", "ExeptionHandler", new { Exeption = exMessage }));
     }
 }
Esempio n. 2
0
 public IActionResult RemoveMovie(int movieid)//for canceling the Movie
 {
     try
     {
         int admin = Convert.ToInt32(HttpContext.Session.GetInt32("Admin"));
         if (admin == 1)
         {
             MovieDA   movieDAObj = new MovieDA();
             MovieInfo movie      = new MovieInfo();
             movie = movieDAObj.GetMovie(movieid);
             return(View(movie));
         }
         else
         {
             return(RedirectToAction("Home", "Movie"));
         }
     }
     catch (Exception exCancelConfirmation)
     {
         string exMessage = "oops! There is a problem in loading the page.";
         return(RedirectToAction("Index", "ExeptionHandler", new { Exeption = exMessage }));
     }
 }