Пример #1
0
        public IHttpActionResult GetComprobantes(string usuario, int idCliente, int idTienda)
        {
            try
            {
                VentaBL oVentaBL           = new VentaBL(idCliente);
                Venta_DatosInicialesBE obe = oVentaBL.ListarComprobantes(usuario, idCliente, idTienda);

                if (obe != null && (obe.loComprobante != null && obe.loComprobante.Count > 1))
                {
                    return(Ok(Models.Util.GetBodyResponse(200, obe)));
                }
                else if (obe.loComprobante == null || (obe.loComprobante != null && obe.loComprobante.Count == 1))
                {
                    return(Ok(Models.Util.GetBodyResponse(300, "No se encontró Tipo de Documento para la Tienda seleccionada.")));
                }
                else
                {
                    return(Ok(Models.Util.GetBodyResponse(300, "No se encontraron registros.")));
                }
            }
            catch (Exception ex)
            {
                /*LogSA.GrabarLogError("SOL TR", user, "GetListarOrdOtrs", ex);*/
                return(Ok(Models.Util.GetBodyResponse(400, ex.Message)));
            }
        }