public IActionResult RemoveMovie(MovieInfo movie) { try { int admin = Convert.ToInt32(HttpContext.Session.GetInt32("Admin")); if (admin == 1) { string delete = adminDAObj.DeleteMovie(movie.MovieID); string success; if (delete == "YES") { success = "Movie Deleted successfully"; } else { success = "Cannot delete the movie. Seats Booked"; } return(RedirectToAction("MovieList", "Admin", new { message = success })); } else { return(RedirectToAction("Home", "Movie")); } } catch (Exception exDeleteMovie) { string exMessage = "oops! There is a problem in deleting your movie."; return(RedirectToAction("Index", "ExeptionHandler", new { Exeption = exMessage })); } }