Beispiel #1
0
        public override string EjecutarAccion()
        {
            string              empty               = string.Empty;
            long                aFCodCliente        = base.Afiliado.AF_CodCliente;
            string              sAFRif              = base.Afiliado.sAF_Rif;
            string              cuentaOrigen        = this.CuentaOrigen;
            string              cuentaDestino       = this.CuentaDestino;
            decimal             monto               = this.Monto;
            string              tarjeta             = this.Tarjeta;
            short               codigoSeguridad     = this.CodigoSeguridad;
            RespuestaAvancedsjv respuestaAvancedsjv = HelperIbs.ibsAvanceEfectivo(aFCodCliente, sAFRif, cuentaOrigen, cuentaDestino, monto, tarjeta, codigoSeguridad.ToString(), this.FechaVencimiento);

            if (!string.IsNullOrEmpty(respuestaAvancedsjv.avancedsjv.EErrores.SVectorCod))
            {
                throw new IBException(respuestaAvancedsjv.avancedsjv.EErrores.SVectorCod);
            }
            empty = respuestaAvancedsjv.avancedsjv.SReferencia;
            if (!string.IsNullOrEmpty(empty))
            {
                this.LogAvance();
            }
            empty = string.Concat("IB", empty.Trim().PadLeft(10, '0'));
            HelperEnvioCorreo.BuscarCamposCorreo(base.sCod, base.Afiliado.sCO_Nombres, base.Afiliado.CO_Email, this.Monto, this.Tarjeta, "", empty, "", this.CuentaDestino, this.TipoTarjeta, "", "", "", "", "", "", "", "");
            return(empty);
        }
Beispiel #2
0
        public static RespuestaAvancedsjv ibsAvanceEfectivo(long SUserId, string SCedRif, string SCtaOrgn, string SCtaDest, decimal SMto, string SInstrmto, string SCodSeg, string SFchVcto)
        {
            RespuestaAvancedsjv respuestaAvancedsjv = null;
            AvancedsjvIn        avancedsjvIn        = new AvancedsjvIn()
            {
                SUserId   = SUserId.ToString(),
                SCedRif   = SCedRif,
                SCtaOrgn  = SCtaOrgn,
                SCtaDest  = SCtaDest,
                SMto      = SMto.ToString("#0.00").Replace(",", "").Replace(".", ""),
                STpOper   = "A",
                SInstrmto = SInstrmto,
                SCodSeg   = SCodSeg,
                SFchVcto  = SFchVcto,
                SPrefijo  = string.Empty,
                SFiller   = string.Empty
            };

            using (IbsServiceService ibsServiceService = new IbsServiceService())
            {
                ibsServiceService.Timeout = 10000;
                try
                {
                    respuestaAvancedsjv = ibsServiceService.ibaAvanceEfectivo(avancedsjvIn);
                    if (respuestaAvancedsjv == null)
                    {
                        throw new IBException(9998, "SQLIB");
                    }
                    if (!string.IsNullOrEmpty(respuestaAvancedsjv.SError))
                    {
                        throw new IBException(respuestaAvancedsjv.SError, "SQLIB");
                    }
                    if (respuestaAvancedsjv.avancedsjv == null)
                    {
                        throw new IBException(9998, "SQLIB");
                    }
                    if ((respuestaAvancedsjv.avancedsjv.EErrores == null ? false : !string.IsNullOrEmpty(respuestaAvancedsjv.avancedsjv.EErrores.SVectorCod)))
                    {
                        throw new IBException(respuestaAvancedsjv.avancedsjv.EErrores.SVectorCod, "IBS");
                    }
                }
                catch (WebException webException)
                {
                    throw new IBException(9997, "SQLIB");
                }
                catch (SoapException soapException)
                {
                    throw new IBException(9997, "SQLIB");
                }
            }
            return(respuestaAvancedsjv);
        }