public ActionResult DeleteConfirmed(int id) { PlayerAttunement playerAttunement = db.PlayerAttunement.Find(id); db.PlayerAttunement.Remove(playerAttunement); db.SaveChanges(); return(RedirectToAction("Index")); }
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)); }
// 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)); }
// 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)); }