public ActionResult DeleteConfirmed(int id)
        {
            rol_operacion rol_operacion = db.rol_operacion.Find(id);

            db.rol_operacion.Remove(rol_operacion);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
        public ActionResult DeleteConfirmed(int id)
        {
            rol_operacion rol_operacion = db.rol_operacion.Find(id);

            db.rol_operacion.Remove(rol_operacion);
            db.SaveChanges();
            Request.Flash("success", "Operacion Eliminada correctamente");
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "id,idRol,idOperacion")] rol_operacion rol_operacion)
 {
     if (ModelState.IsValid)
     {
         db.Entry(rol_operacion).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.idOperacion = new SelectList(db.operaciones, "id", "nombre", rol_operacion.idOperacion);
     ViewBag.idRol       = new SelectList(db.rol, "id", "nombre", rol_operacion.idRol);
     return(View(rol_operacion));
 }
 public ActionResult Edit([Bind(Include = "id_rol_operacion,id_rol,id_operacion")] rol_operacion rol_operacion)
 {
     if (ModelState.IsValid)
     {
         db.Entry(rol_operacion).State = EntityState.Modified;
         db.SaveChanges();
         Request.Flash("success", "Operacion Editada correctamente");
         return(RedirectToAction("Index"));
     }
     ViewBag.id_operacion = new SelectList(db.operacioes, "id_operaciones", "nombre", rol_operacion.id_operacion);
     ViewBag.id_rol       = new SelectList(db.roles, "id_rol", "nombre", rol_operacion.id_rol);
     return(View(rol_operacion));
 }
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            rol_operacion rol_operacion = db.rol_operacion.Find(id);

            if (rol_operacion == null)
            {
                return(HttpNotFound());
            }
            return(View(rol_operacion));
        }
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            rol_operacion rol_operacion = db.rol_operacion.Find(id);

            if (rol_operacion == null)
            {
                return(HttpNotFound());
            }
            ViewBag.id_operacion = new SelectList(db.operacioes, "id_operaciones", "nombre", rol_operacion.id_operacion);
            ViewBag.id_rol       = new SelectList(db.roles, "id_rol", "nombre", rol_operacion.id_rol);
            return(View(rol_operacion));
        }