public ActionResult DeleteConfirmed(string id) { CS_roles rOLES = db.CS_roles.Find(id); db.CS_roles.Remove(rOLES); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID_ROL,ID_PERFIL,DESCRIPCION")] CS_roles rOLES) { if (ModelState.IsValid) { db.Entry(rOLES).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ID_PERFIL = new SelectList(db.C_servicios, "id_servicio", "nombre_servicio", rOLES.ID_SERVICIO); return(View(rOLES)); }
// GET: ROLES/Details/5 public ActionResult Details(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CS_roles rOLES = db.CS_roles.Find(id); if (rOLES == null) { return(HttpNotFound()); } return(View(rOLES)); }
// GET: ROLES/Edit/5 public ActionResult Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CS_roles rOLES = db.CS_roles.Find(id); if (rOLES == null) { return(HttpNotFound()); } // ViewBag.ID_PERFIL = new SelectList(db.C_servicios, "id_servicio", "nombre_servicio", rOLES.C_servicios); return(View(rOLES)); }