public ActionResult DeleteConfirmed(int id) { Track_Person_Role track_Person_Role = db.Find(id); db.Delete(track_Person_Role); return(RedirectToAction("Index", new { id = track_Person_Role.TrackId })); }
public ActionResult Edit([Bind(Include = "Id,PersonId,TrackId,RoleId")] Track_Person_Role track_Person_Role) { if (ModelState.IsValid) { db.Update(track_Person_Role); return(RedirectToAction("Index", new { id = track_Person_Role.TrackId })); } ViewBag.PersonId = new SelectList(db.DBPerson, "Id", "name", track_Person_Role.PersonId); ViewBag.RoleId = new SelectList(db.DBRole, "Id", "role", track_Person_Role.RoleId); ViewBag.TrackId = new SelectList(db.DBRole, "Id", "name", track_Person_Role.TrackId); return(View(track_Person_Role)); }
// GET: Track_Person_Role/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Track_Person_Role track_Person_Role = db.Find(id); if (track_Person_Role == null) { return(HttpNotFound()); } return(View(track_Person_Role)); }
// GET: Track_Person_Role/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Track_Person_Role track_Person_Role = db.Find(id); if (track_Person_Role == null) { return(HttpNotFound()); } ViewBag.PersonId = new SelectList(db.DBPerson, "Id", "name", track_Person_Role.PersonId); ViewBag.RoleId = new SelectList(db.DBRole, "Id", "role", track_Person_Role.RoleId); return(View(track_Person_Role)); }