Пример #1
0
        public ComprobanteXTienda_DatosInicialesBE ListarDatosIniciales(string usuario, int idCliente)
        {
            ComprobanteXTienda_DatosInicialesBE obe         = new ComprobanteXTienda_DatosInicialesBE();
            List <ComprobanteXTiendaBE>         lobe        = new List <ComprobanteXTiendaBE>();
            List <ListaComboBE>               loCliente     = new List <ListaComboBE>();
            List <ListaComboBE>               loTienda      = new List <ListaComboBE>();
            List <ListaComboBE>               loComprobante = new List <ListaComboBE>();
            List <ReporteColumnas>            loColumns     = new List <ReporteColumnas>();
            List <ComprobanteXTiendaExportBE> loExport      = new List <ComprobanteXTiendaExportBE>();

            using (SqlConnection con = new SqlConnection(strCnxRule))
            {
                con.Open();
                loCliente     = oMaestrosDA.Cliente(con, usuario, idCliente);
                lobe          = oComprobanteXTiendaDA.ListarDatosIniciales(con, usuario, out loColumns, out loExport);
                loTienda      = oMaestrosDA.ComboTienda(con, usuario, idCliente, -1);
                loComprobante = oMaestrosDA.ComboComprobante(con, usuario, idCliente);
            }

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

            obe.loColumns = loColumns;
            obe.loExport  = loExport;
            return(obe);
        }
Пример #2
0
        public ComprobanteXTienda_DatosInicialesBE ListarDatosCambioCliente(string usuario, int idCliente)
        {
            ComprobanteXTienda_DatosInicialesBE obe = new ComprobanteXTienda_DatosInicialesBE();
            List <ListaComboBE> loTienda            = new List <ListaComboBE>();
            List <ListaComboBE> loComprobante       = new List <ListaComboBE>();

            using (SqlConnection con = new SqlConnection(strCnxRule))
            {
                con.Open();
                loTienda      = oMaestrosDA.ComboTienda(con, usuario, idCliente, -1);
                loComprobante = oMaestrosDA.ComboComprobante(con, usuario, idCliente);
            }

            obe.loTienda      = loTienda;
            obe.loComprobante = loComprobante;

            return(obe);
        }
Пример #3
0
        public IHttpActionResult GetDatosCambioCliente(string usuario, int idCliente)
        {
            try
            {
                ComprobanteXTiendaBL oComprobanteXTiendaBL = new ComprobanteXTiendaBL(idCliente);
                ComprobanteXTienda_DatosInicialesBE lobe   = oComprobanteXTiendaBL.ListarDatosCambioCliente(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)));
            }
        }