コード例 #1
0
        public IHttpActionResult ConsultarPermisoPerfil([FromBody] ParametroConsultaDto perfil)
        {
            try
            {
                usuariosNegocio = new UsuariosNegocio();
                List <PermisoPerfilDto> res = usuariosNegocio.ConsultarPermisoPerfil(Convert.ToInt32(perfil.parametro));

                return(Content(HttpStatusCode.OK, new Mensaje()
                {
                    codigoRespuesta = Catalogo.OK, mensajeRespuesta = "", objetoRespuesta = res
                }));
            }
            catch (ExcepcionOperacion exOp)
            {
                return(Content(HttpStatusCode.InternalServerError, new Mensaje()
                {
                    codigoRespuesta = Catalogo.ERROR, mensajeRespuesta = Catalogo.FALLO_CONSULTA_MENU + exOp.Message
                }));
            }
            catch (Exception ex)
            {
                return(Content(HttpStatusCode.InternalServerError, new Mensaje()
                {
                    codigoRespuesta = Catalogo.ERROR, mensajeRespuesta = Catalogo.FALLO_CONSULTA_MENU + ex.Message
                }));
            }
        }