Example #1
0
        public IHttpActionResult GetEncomendasProntas(string filial, string serie, int nDoc)
        {
            List <EncomendaCliente> encomendas = null;

            try {
                encomendas = PriIntegration.GetEncomendasPassiveisDeTransformacao(filial, serie, nDoc);
            } catch (InvalidOperationException e) {
                return(BadRequest(e.Message));
            } catch (Exception e) {
                return(InternalServerError(e));
            }

            if (encomendas == null || encomendas.Count < 1)
            {
                return(StatusCode(HttpStatusCode.NoContent));
            }
            else
            {
                return(Ok(encomendas));
            }
        }