public ComprobanteXCliente_DatosInicialesBE ListarDatosIniciales(string usuario)//, int idCliente)
        {
            ComprobanteXCliente_DatosInicialesBE obe  = new ComprobanteXCliente_DatosInicialesBE();
            List <ComprobanteXClienteBE>         lobe = new List <ComprobanteXClienteBE>();
            List <ListaComboBE>     loCliente         = new List <ListaComboBE>();
            List <ListaComboTextBE> loComprobante     = new List <ListaComboTextBE>();

            using (SqlConnection con = new SqlConnection(strCnxRule))
            {
                con.Open();
                loCliente     = oMaestrosDA.Cliente(con, usuario, 0);
                loComprobante = oMaestrosDA.Comprobante(con, usuario);                     //, idCliente);
                lobe          = oComprobanteXClienteDA.ListarDatosIniciales(con, usuario); //, idCliente);
            }

            obe.loListado      = lobe;
            obe.loCliente      = loCliente;
            obe.loTipoDocVenta = loComprobante;

            return(obe);
        }
Exemplo n.º 2
0
        public IHttpActionResult GetDatosIniciales(string usuario)//, int idCliente)
        {
            try
            {
                ComprobanteXCliente_DatosInicialesBE lobe = oComprobanteXClienteBL.ListarDatosIniciales(usuario);//, idCliente);

                if (lobe != null)
                {
                    return(Ok(Models.Util.GetBodyResponse(200, lobe)));
                }
                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)));
            }
        }