public HttpResponseMessage ObtenerProductosPorCriterios(int idEmpresa) { try { var logica = new LNCriteriosSST(); var result = logica.ObtenerProductosPorCriterios(idEmpresa); if (result != null) { var response = Request.CreateResponse(HttpStatusCode.OK, result); return(response); } else { var response = Request.CreateResponse(HttpStatusCode.ExpectationFailed); return(response); } } catch (Exception ex) { var response = Request.CreateResponse(HttpStatusCode.InternalServerError); return(response); } }