コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            CriticRatingLoader criticRatingLoader = db.CriticRatingLoaders.Find(id);

            db.CriticRatingLoaders.Remove(criticRatingLoader);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "CriticRatingId,CriticSiteId,MovieDetailID,Rating")] CriticRatingLoader criticRatingLoader)
 {
     if (ModelState.IsValid)
     {
         db.Entry(criticRatingLoader).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CriticSiteId  = new SelectList(db.CriticSites, "CriticSiteId", "SiteName", criticRatingLoader.CriticSiteId);
     ViewBag.MovieDetailID = new SelectList(db.MovieDetails, "MovieDetailID", "DetailsUrl", criticRatingLoader.MovieDetailID);
     return(View(criticRatingLoader));
 }
コード例 #3
0
        // GET: CriticRatingLoaders/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CriticRatingLoader criticRatingLoader = db.CriticRatingLoaders.Find(id);

            if (criticRatingLoader == null)
            {
                return(HttpNotFound());
            }
            return(View(criticRatingLoader));
        }
コード例 #4
0
        // GET: CriticRatingLoaders/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CriticRatingLoader criticRatingLoader = db.CriticRatingLoaders.Find(id);

            if (criticRatingLoader == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CriticSiteId  = new SelectList(db.CriticSites, "CriticSiteId", "SiteName", criticRatingLoader.CriticSiteId);
            ViewBag.MovieDetailID = new SelectList(db.MovieDetails, "MovieDetailID", "DetailsUrl", criticRatingLoader.MovieDetailID);
            return(View(criticRatingLoader));
        }