public ActionResult DeleteConfirmed(int id) { rolesoperaciones rolesoperaciones = db.rolesoperaciones.Find(id); db.rolesoperaciones.Remove(rolesoperaciones); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "id,Rol_Id,Operaciones_Id")] rolesoperaciones rolesoperaciones) { if (ModelState.IsValid) { db.Entry(rolesoperaciones).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Operaciones_Id = new SelectList(db.operaciones, "id", "Nombre", rolesoperaciones.Operaciones_Id); ViewBag.Rol_Id = new SelectList(db.rol, "id", "Nombre", rolesoperaciones.Rol_Id); return(View(rolesoperaciones)); }
// GET: rolesoperaciones/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } rolesoperaciones rolesoperaciones = db.rolesoperaciones.Find(id); if (rolesoperaciones == null) { return(HttpNotFound()); } return(View(rolesoperaciones)); }
// GET: rolesoperaciones/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } rolesoperaciones rolesoperaciones = db.rolesoperaciones.Find(id); if (rolesoperaciones == null) { return(HttpNotFound()); } ViewBag.Operaciones_Id = new SelectList(db.operaciones, "id", "Nombre", rolesoperaciones.Operaciones_Id); ViewBag.Rol_Id = new SelectList(db.rol, "id", "Nombre", rolesoperaciones.Rol_Id); return(View(rolesoperaciones)); }