public static List <CENNotaCreditoMotivoNC> obtenerMotivosNC()
        {
            CLNNotaCredito notacredito         = new CLNNotaCredito();
            List <CENNotaCreditoMotivoNC> list = null;

            try
            {
                list = notacredito.obtenerMotivosNC();
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(list);
        }
        public static CENNotaCreditoDatosVenta obtenerVenta(int codigo)
        {
            CLNNotaCredito           notacredito = new CLNNotaCredito();
            CENNotaCreditoDatosVenta obj         = null;

            try
            {
                obj = notacredito.obtenerVenta(codigo);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(obj);
        }
        public static List <CENNotaCreditoDatosDetalleVenta> obtenerDetalleVenta(int codigo)
        {
            CLNNotaCredito notacredito = new CLNNotaCredito();
            List <CENNotaCreditoDatosDetalleVenta> list = null;

            try
            {
                list = notacredito.obtenerDetalleVenta(codigo);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(list);
        }
        public static CENNotaCreditoParametrosRpta obtenerParametros(CENNotaCreditoParametros parametros)
        {
            CLNNotaCredito notacredito       = new CLNNotaCredito();
            CENNotaCreditoParametrosRpta obj = null;

            try
            {
                obj = notacredito.obtenerParametros(parametros);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(obj);
        }
        public static List <CENNotaCreditoVenta> buscarVentas(CENNotaCreditoParametroBuscarVenta parametros)
        {
            CLNNotaCredito             notacredito = new CLNNotaCredito();
            List <CENNotaCreditoVenta> lista       = null;

            try
            {
                lista = notacredito.buscarVentas(parametros);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(lista);
        }
        public static CENNotaCreditoRptaValidacion validarVenta(int codigo)
        {
            CLNNotaCredito notacredito       = new CLNNotaCredito();
            CENNotaCreditoRptaValidacion obj = null;

            try
            {
                obj = notacredito.validarVenta(codigo);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(obj);
        }
        public static List <CENPreventaCliente> buscarCliente(string cadena)
        {
            CLNNotaCredito            notacredito = new CLNNotaCredito();
            List <CENPreventaCliente> lista       = null;

            try
            {
                lista = notacredito.buscarCliente(cadena);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(lista);
        }
        public static CENNotaCreditoRptaRegistroNC registrarNC(CENNotaCredito nc)
        {
            CLNNotaCredito notacredito       = new CLNNotaCredito();
            CENNotaCreditoRptaRegistroNC obj = null;

            try
            {
                obj = notacredito.registrarNC(nc);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(obj);
        }
        public static List <CENNotaCreditoVentaDescuento> obtenerVentaDescuento(int codigo)
        {
            CLNNotaCredito notacredito = new CLNNotaCredito();
            List <CENNotaCreditoVentaDescuento> list = null;

            try
            {
                list = notacredito.obtenerVentaDescuento(codigo);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(list);
        }
        public static byte[] generarNotaCreditoPDF(int codNotaCredito)
        {
            CLNNotaCredito objetoCLN = new CLNNotaCredito();

            byte[] binaryData = null;

            try
            {
                binaryData = objetoCLN.generarNotaCreditoPDF(codNotaCredito);
            }
            catch (Exception ex)
            {
                throw ex;
                //ex.StackTrace.ToString();
            }

            return(binaryData);
        }