예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            PlayerAttunement playerAttunement = db.PlayerAttunement.Find(id);

            db.PlayerAttunement.Remove(playerAttunement);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "PlayerID,AttuneID,DateAchieved")] PlayerAttunement playerAttunement)
 {
     if (ModelState.IsValid)
     {
         db.Entry(playerAttunement).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.PlayerID = new SelectList(db.Player, "PlayerID", "PlayerName", playerAttunement.PlayerID);
     return(View("~/Views/Admin/PlayerAttunements/Edit.cshtml", playerAttunement));
 }
예제 #3
0
        // GET: PlayerAttunements/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PlayerAttunement playerAttunement = db.PlayerAttunement.Find(id);

            if (playerAttunement == null)
            {
                return(HttpNotFound());
            }
            return(View("~/Views/Admin/PlayerAttunements/Details.cshtml", playerAttunement));
        }
예제 #4
0
        // GET: PlayerAttunements/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PlayerAttunement playerAttunement = db.PlayerAttunement.Find(id);

            if (playerAttunement == null)
            {
                return(HttpNotFound());
            }
            ViewBag.PlayerID = new SelectList(db.Player, "PlayerID", "PlayerName", playerAttunement.PlayerID);
            return(View("~/Views/Admin/PlayerAttunements/Edit.cshtml", playerAttunement));
        }