// GET: ConfiguracionPlataforma/Configuracion/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            RolesDTO caracteristicas = caracteristicasDAO.Find(id);

            if (caracteristicas == null)
            {
                return(HttpNotFound());
            }

            return(PartialView("Details", caracteristicas));
        }
示例#2
0
 public UsuariosDTO Find(int?id)
 {
     try
     {
         Usuarios    model    = db.Usuarios.Include(x => x.rol).FirstOrDefault(x => x.id == id);
         UsuariosDTO response = new UsuariosDTO();
         response.id       = model.id;
         response.nombre   = model.nombre;
         response.apellido = model.apellido;
         response.ciudad   = model.ciudad;
         response.correo   = model.correo;
         response.password = model.password;
         response.rol      = rolesDAO.Find(model.rolId);
         return(response);
     }
     catch (Exception)
     {
         throw;
     }
 }