Пример #1
0
        protected void btnContinuarSMS_Click(object sender, EventArgs e)
        {
            this.panelMSG.Visible          = false;
            this.panelConfirmacion.Visible = true;
            string str = HelperAfiliado.CrearClaveTransaccionTemporal(base.Afiliado.nAF_Id);

            HelperEnvioCorreo.EnviarCorreoClaveTemporal(string.Concat(base.Afiliado.sCO_Nombres, " ", base.Afiliado.sCO_Apellidos), base.Afiliado.CO_Email, str);
            if (!string.IsNullOrEmpty(base.Afiliado.CO_Celular))
            {
                HelperTedexis.sendSMS(base.Afiliado.CO_Celular, string.Concat("BAV informa que su Clave de Transacciones Temporal es: ", str, ". Si usted no esta realizando esta operacion llame al 0500-288.00.01"));
            }
            this.Session.Add("SMS", true);
        }
Пример #2
0
 protected void btnhome_Click(object sender, EventArgs e)
 {
     if ((!base.IsPostBack ? false : base.Tipo_Seguridad == 1))
     {
         if (this.Session["SMS"] == null)
         {
             string str = HelperAfiliado.CrearClaveTransaccionTemporal(base.Afiliado.nAF_Id);
             if (!string.IsNullOrEmpty(base.Afiliado.CO_Celular))
             {
                 HelperTedexis.sendSMS(base.Afiliado.CO_Celular, string.Concat("BAV informa que su Clave de Transacciones Temporal es: ", str, ". Si usted no esta realizando esta operacion llame al 0500-288.00.01"));
                 this.Session.Add("SMS", true);
                 this.panelDatos.Visible = false;
                 this.panelHome.Visible = false;
                 this.panelValidacion.Visible = true;
             }
         }
         else
         {
             this.panelValidacion.Visible = true;
             this.panelHome.Visible = false;
             this.panelDatos.Visible = false;
         }
     }
 }
Пример #3
0
        public override string EjecutarAccion()
        {
            DateTime         now;
            decimal          monto           = this.Monto;
            EnumTipoFavorito tipoTransaccion = this.TipoTransaccion;

            // Liliana Guerra 08 Nov 2019 EXTRA EFECTIVO
            if (tipoTransaccion == EnumTipoFavorito.ExtraEfectivoTDC)
            {
                this.SCod_Trans = "EETDC";
                //this.LogDiario(0);
                RespuestaIntrfdsjv respuestaIntrfdsjv3 = HelperIbs.ibsTransfPgoBAV(base.Afiliado.AF_CodCliente, base.Afiliado.sAF_Rif, this.CtaDebitar, base.Afiliado.sAF_Rif, this.CtaAcreditar, monto, 0, DateTime.Now, TransferenciaTipoOperacion.Transferencia, string.Empty, TipoServicio.NoAplica);
                //LineaExtracredito solicitud = HelperExtracredito.solicAprobacion(CedulaBeneficiario, CtaAcreditar, CtaDebitar, montoSolic, cantCuotas, montoCuota);

                this.mensaje = string.Concat("IB", " OK");
                this.LogTransferenciasPagos();
            }

            else if (tipoTransaccion <= EnumTipoFavorito.TransferenciaOtrosBancosTerceros)
            {
                switch (tipoTransaccion)
                {
                case EnumTipoFavorito.PagoServicioElectricidadCaracas:
                {
                    this.Instrumento = this.numContrato;
                    this.SCod_Trans  = "PAEDC";
                    if (this.RdoSelected == 1)
                    {
                        this.PagoServicios(monto, TipoServicio.EDC1);
                        break;
                    }
                    else if (this.RdoSelected == 2)
                    {
                        this.PagoServicios(monto, TipoServicio.EDC2);
                        break;
                    }
                    else if (this.RdoSelected == 3)
                    {
                        this.PagoServicios(monto, TipoServicio.EDC3);
                        break;
                    }
                    else
                    {
                        break;
                    }
                }

                case EnumTipoFavorito.PagoServicioCANTV:
                {
                    this.Instrumento = this.numContrato;
                    this.SCod_Trans  = "PAGSE";
                    this.PagoServicios(monto, TipoServicio.CANTV);
                    break;
                }

                case EnumTipoFavorito.PagoServicioElectricidadCaracas | EnumTipoFavorito.PagoServicioCANTV:
                {
                    break;
                }

                case EnumTipoFavorito.PagoServicioCANTVNET:
                {
                    this.Instrumento = this.numContrato;
                    this.SCod_Trans  = "PACNN";
                    this.PagoServicios(monto, TipoServicio.CantvNET);
                    break;
                }

                case EnumTipoFavorito.PagoServicioMovilnet:
                {
                    this.Instrumento = this.numContrato;
                    this.SCod_Trans  = "PAMOV";
                    this.PagoServicios(monto, TipoServicio.Movilnet);
                    break;
                }

                default:
                {
                    EnumTipoFavorito enumTipoFavorito = tipoTransaccion;
                    if (enumTipoFavorito == EnumTipoFavorito.TransferenciaMismoTitularBAV)
                    {
                        this.SCod_Trans = "TBAMT";
                        this.LogDiario(0);
                        RespuestaIntrfdsjv respuestaIntrfdsjv3 = HelperIbs.ibsTransfPgoBAV(base.Afiliado.AF_CodCliente, base.Afiliado.sAF_Rif, this.CtaDebitar, base.Afiliado.sAF_Rif, this.CtaAcreditar, monto, 0, DateTime.Now, TransferenciaTipoOperacion.Transferencia, string.Empty, TipoServicio.NoAplica);
                        if ((respuestaIntrfdsjv3.intrfdsjv.EErrores.SVectorCod == string.Empty ? false : !respuestaIntrfdsjv3.intrfdsjv.EErrores.SVectorCod.Trim().Equals(string.Empty)))
                        {
                            throw new IBException(respuestaIntrfdsjv3.intrfdsjv.EErrores.SVectorCod.Trim(), "IBSX");
                        }
                        this.mensaje = respuestaIntrfdsjv3.intrfdsjv.SReferencia;
                        if (!string.IsNullOrEmpty(this.mensaje))
                        {
                            this.mensaje = string.Concat("IB", this.mensaje.Trim().PadLeft(10, '0'));
                            this.LogTransferenciasPagos();
                        }
                        else
                        {
                            goto Label0;
                        }
                    }
                    else if (enumTipoFavorito == EnumTipoFavorito.TransferenciaTercerosBAV)
                    {
                        this.SCod_Trans = "TBTER";
                        this.LogDiario(0);
                        RespuestaIntrfdsjv respuestaIntrfdsjv4 = HelperIbs.ibsTransfPgoBAV(base.Afiliado.AF_CodCliente, base.Afiliado.sAF_Rif, this.CtaDebitar, this.CedulaBeneficiario, this.CtaAcreditar, monto, 0, DateTime.Now, TransferenciaTipoOperacion.TransferenciaTer, string.Empty, TipoServicio.NoAplica);
                        if ((respuestaIntrfdsjv4.intrfdsjv.EErrores.SVectorCod == string.Empty ? false : !respuestaIntrfdsjv4.intrfdsjv.EErrores.SVectorCod.Trim().Equals(string.Empty)))
                        {
                            throw new IBException(respuestaIntrfdsjv4.intrfdsjv.EErrores.SVectorCod.Trim(), "IBSX");
                        }
                        this.mensaje = respuestaIntrfdsjv4.intrfdsjv.SReferencia;
                        if (!string.IsNullOrEmpty(this.mensaje))
                        {
                            this.mensaje = string.Concat("IB", this.mensaje.Trim().PadLeft(10, '0'));
                            this.LogTransferenciasPagos();
                            string   cOCelular3 = base.Afiliado.CO_Celular;
                            object[] objArray2  = new object[] { "BAV informa Transferencia por Bs. ", monto, " de su cuenta ", this.CtaDebitar.Substring(10, 10), " a la cuenta ", this.CtaAcreditar.Substring(10, 10), " en fecha ", null, null };
                            now          = DateTime.Now;
                            objArray2[7] = now.ToString("dd/MM/yyyy hh:mm:ss");
                            objArray2[8] = ". Si la desconoce llame al 0500-288.00.01";
                            HelperTedexis.sendSMS(cOCelular3, string.Concat(objArray2));
                        }
                        else
                        {
                            goto Label0;
                        }
                    }
                    else
                    {
                        EnumTipoFavorito enumTipoFavorito1 = tipoTransaccion;
                        if (enumTipoFavorito1 == EnumTipoFavorito.TransferenciaOtrosBancosMismoTitular)
                        {
                            this.SCod_Trans = "TBOMT";
                            this.LogDiario(0);
                            RespuestaInextdsjv respuestaInextdsjv2 = HelperIbs.ibsTransfPgoOtros(base.Afiliado.AF_CodCliente, base.Afiliado.sAF_Rif, DateTime.Now, monto, this.CtaDebitar, base.Afiliado.sCO_Nombres.Trim(), this.CtaAcreditar, this.Beneficiario.Trim(), TransferenciaTipoVia.TransferenciaExterna, base.Afiliado.sAF_Rif, this.CedulaBeneficiario, "220", this.SCodBco);
                            if ((respuestaInextdsjv2.inextdsjv.EErrores.SVectorCod == string.Empty ? false : !respuestaInextdsjv2.inextdsjv.EErrores.SVectorCod.Trim().Equals(string.Empty)))
                            {
                                throw new IBException(respuestaInextdsjv2.inextdsjv.EErrores.SVectorCod.Trim(), "IBSX");
                            }
                            this.mensaje = respuestaInextdsjv2.inextdsjv.SReferencia;
                            if (!string.IsNullOrEmpty(this.mensaje))
                            {
                                this.mensaje = string.Concat("IB", this.mensaje.Trim().PadLeft(10, '0'));
                                this.LogTransferenciasPagos();
                                string   str3      = base.Afiliado.CO_Celular;
                                object[] objArray3 = new object[] { "BAV informa Transferencia por Bs. ", monto, " de su cuenta ", this.CtaDebitar.Substring(10, 10), " a la cuenta ", this.CtaAcreditar.Substring(10, 10), " en fecha ", null, null };
                                now          = DateTime.Now;
                                objArray3[7] = now.ToString("dd/MM/yyyy hh:mm:ss");
                                objArray3[8] = ". Si la desconoce llame al 0500-288.00.01";
                                HelperTedexis.sendSMS(str3, string.Concat(objArray3));
                            }
                            else
                            {
                                goto Label0;
                            }
                        }
                        else if (enumTipoFavorito1 == EnumTipoFavorito.TransferenciaOtrosBancosTerceros)
                        {
                            this.SCod_Trans = "TBOTE";
                            this.LogDiario(0);
                            RespuestaInextdsjv respuestaInextdsjv3 = HelperIbs.ibsTransfPgoOtros(base.Afiliado.AF_CodCliente, base.Afiliado.sAF_Rif, DateTime.Now, monto, this.CtaDebitar, base.Afiliado.sCO_Nombres, this.CtaAcreditar, this.Beneficiario, TransferenciaTipoVia.TransferenciaExternaTer, base.Afiliado.sAF_Rif, this.CedulaBeneficiario, "220", this.SCodBco);
                            if ((respuestaInextdsjv3.inextdsjv.EErrores.SVectorCod == string.Empty ? false : !respuestaInextdsjv3.inextdsjv.EErrores.SVectorCod.Trim().Equals(string.Empty)))
                            {
                                throw new IBException(respuestaInextdsjv3.inextdsjv.EErrores.SVectorCod.Trim(), "IBSX");
                            }
                            this.mensaje = respuestaInextdsjv3.inextdsjv.SReferencia;
                            if (!string.IsNullOrEmpty(this.mensaje))
                            {
                                this.mensaje = string.Concat("IB", this.mensaje.Trim().PadLeft(10, '0'));
                                this.LogTransferenciasPagos();
                                string   cOCelular4 = base.Afiliado.CO_Celular;
                                object[] str4       = new object[] { "BAV informa Transferencia por Bs. ", monto, " de su cuenta ", this.CtaDebitar.Substring(10, 10), " a la cuenta ", this.CtaAcreditar.Substring(10, 10), " en fecha ", null, null };
                                now     = DateTime.Now;
                                str4[7] = now.ToString("dd/MM/yyyy hh:mm:ss");
                                str4[8] = ". Si la desconoce llame al 0500-288.00.01";
                                HelperTedexis.sendSMS(cOCelular4, string.Concat(str4));
                            }
                            else
                            {
                                goto Label0;
                            }
                        }
                    }
                    break;
                }
                }
            }
            else
            {
                switch (tipoTransaccion)
                {
                case EnumTipoFavorito.AdelantodeEfectivoTDC:
                {
                    this.SCod_Trans = "TAVEF";
                    this.LogDiario(1);
                    RespuestaIntrfdsjv respuestaIntrfdsjv = HelperIbs.ibsTransfPgoBAV(base.Afiliado.AF_CodCliente, base.Afiliado.sAF_Rif, this.CtaDebitar, base.Afiliado.sAF_Rif, this.CtaAcreditar, monto, 0, DateTime.Now, TransferenciaTipoOperacion.Avance, string.Empty, TipoServicio.NoAplica);
                    if ((respuestaIntrfdsjv.intrfdsjv.EErrores.SVectorCod == null ? false : !respuestaIntrfdsjv.intrfdsjv.EErrores.SVectorCod.Trim().Equals(string.Empty)))
                    {
                        throw new IBException(respuestaIntrfdsjv.intrfdsjv.EErrores.SVectorCod.Trim(), "IBSX");
                    }
                    this.mensaje = respuestaIntrfdsjv.intrfdsjv.SReferencia;
                    if (!string.IsNullOrEmpty(this.mensaje))
                    {
                        this.mensaje = string.Concat("IB", this.mensaje.Trim().PadLeft(10, '0'));
                        this.LogTransferenciasPagos();
                        break;
                    }
                    else
                    {
                        break;
                    }
                }

                case EnumTipoFavorito.PagoTarjetaCreditoMismoTitularBAV:
                {
                    this.SCod_Trans = "PTBMT";
                    this.LogDiario(0);
                    RespuestaIntrfdsjv respuestaIntrfdsjv1 = HelperIbs.ibsTransfPgoBAV(base.Afiliado.AF_CodCliente, base.Afiliado.sAF_Rif, this.CtaDebitar, base.Afiliado.sAF_Rif, this.CtaAcreditar, monto, 0, DateTime.Now, TransferenciaTipoOperacion.Pago, this.Instrumento, TipoServicio.NoAplica);
                    if ((respuestaIntrfdsjv1.intrfdsjv.EErrores.SVectorCod == string.Empty ? false : !respuestaIntrfdsjv1.intrfdsjv.EErrores.SVectorCod.Trim().Equals(string.Empty)))
                    {
                        throw new IBException(respuestaIntrfdsjv1.intrfdsjv.EErrores.SVectorCod.Trim(), "IBSX");
                    }
                    this.mensaje = respuestaIntrfdsjv1.intrfdsjv.SReferencia;
                    if (!string.IsNullOrEmpty(this.mensaje))
                    {
                        this.mensaje      = string.Concat("IB", this.mensaje.Trim().PadLeft(10, '0'));
                        this.CtaAcreditar = this.Instrumento;
                        this.LogTransferenciasPagos();
                        break;
                    }
                    else
                    {
                        break;
                    }
                }

                case EnumTipoFavorito.PagoTarjetaCreditoTercerosBAV:
                {
                    this.SCod_Trans = "PTBTE";
                    this.LogDiario(0);
                    RespuestaIntrfdsjv respuestaIntrfdsjv2 = HelperIbs.ibsTransfPgoBAV(base.Afiliado.AF_CodCliente, base.Afiliado.sAF_Rif, this.CtaDebitar, this.CedulaBeneficiario, this.CtaAcreditar, monto, 0, DateTime.Now, TransferenciaTipoOperacion.Pago, this.Instrumento, TipoServicio.NoAplica);
                    if ((respuestaIntrfdsjv2.intrfdsjv.EErrores.SVectorCod == null ? false : !respuestaIntrfdsjv2.intrfdsjv.EErrores.SVectorCod.Trim().Equals(string.Empty)))
                    {
                        throw new IBException(respuestaIntrfdsjv2.intrfdsjv.EErrores.SVectorCod.Trim(), "IBSX");
                    }
                    this.mensaje = respuestaIntrfdsjv2.intrfdsjv.SReferencia;
                    if (!string.IsNullOrEmpty(this.mensaje))
                    {
                        this.mensaje      = string.Concat("IB", this.mensaje.Trim().PadLeft(10, '0'));
                        this.CtaAcreditar = this.Instrumento;
                        this.LogTransferenciasPagos();
                        string   cOCelular = base.Afiliado.CO_Celular;
                        object[] str       = new object[] { "BAV informa PagoTDC por Bs. ", monto, " de su cuenta ", this.CtaDebitar.Substring(10, 10), " a la tarjeta ", this.CtaAcreditar.Substring(8, 8), " en fecha ", null, null };
                        now    = DateTime.Now;
                        str[7] = now.ToString("dd/MM/yyyy hh:mm:ss");
                        str[8] = ". Si la desconoce llame al 0500-288.00.01";
                        HelperTedexis.sendSMS(cOCelular, string.Concat(str));
                        break;
                    }
                    else
                    {
                        break;
                    }
                }

                default:
                {
                    if (tipoTransaccion == EnumTipoFavorito.PagoTarjetaCreditoOtrosBancosMismoTitular)
                    {
                        string str1 = string.Concat(this.SCodBco, this.CtaAcreditar);
                        if (this.CtaAcreditar.Length < 16)
                        {
                            str1 = string.Concat(this.SCodBco, this.CtaAcreditar.Substring(0, this.CtaAcreditar.Length - 9).PadLeft(7, '0'), this.CtaAcreditar.Substring(this.CtaAcreditar.Length - 9, 9));
                        }
                        this.SCod_Trans = "PTOMT";
                        this.LogDiario(0);
                        RespuestaInextdsjv respuestaInextdsjv = HelperIbs.ibsTransfPgoOtros(base.Afiliado.AF_CodCliente, base.Afiliado.sAF_Rif, DateTime.Now, monto, this.CtaDebitar, base.Afiliado.sCO_Nombres.Trim(), str1, this.Beneficiario.Trim(), TransferenciaTipoVia.PagoTDC, base.Afiliado.sAF_Rif, this.CedulaBeneficiario, "225", this.SCodBco);
                        if ((respuestaInextdsjv.inextdsjv.EErrores.SVectorCod == null ? false : !respuestaInextdsjv.inextdsjv.EErrores.SVectorCod.Trim().Equals(string.Empty)))
                        {
                            throw new IBException(respuestaInextdsjv.inextdsjv.EErrores.SVectorCod.Trim(), "IBSX");
                        }
                        this.mensaje = respuestaInextdsjv.inextdsjv.SReferencia;
                        if (!string.IsNullOrEmpty(this.mensaje))
                        {
                            this.mensaje = string.Concat("IB", this.mensaje.Trim().PadLeft(10, '0'));
                            this.LogTransferenciasPagos();
                            string   cOCelular1 = base.Afiliado.CO_Celular;
                            object[] objArray   = new object[] { "BAV informa PagoTDC por Bs. ", monto, " de su cuenta ", this.CtaDebitar.Substring(10, 10), " a la tarjeta ", str1.Substring(8, 8), " en fecha ", null, null };
                            now         = DateTime.Now;
                            objArray[7] = now.ToString("dd/MM/yyyy hh:mm:ss");
                            objArray[8] = ". Si la desconoce llame al 0500-288.00.01";
                            HelperTedexis.sendSMS(cOCelular1, string.Concat(objArray));
                            break;
                        }
                        else
                        {
                            break;
                        }
                    }
                    else if (tipoTransaccion != EnumTipoFavorito.PagoTarjetaCreditoOtrosBancosTerceros)
                    {
                        break;
                    }
                    else
                    {
                        this.SCod_Trans = "PTOTE";
                        this.LogDiario(0);
                        string str2 = string.Concat(this.SCodBco, this.CtaAcreditar);
                        if (this.CtaAcreditar.Length < 16)
                        {
                            str2 = string.Concat(this.SCodBco, this.CtaAcreditar.Substring(0, this.CtaAcreditar.Length - 9).PadLeft(7, '0'), this.CtaAcreditar.Substring(this.CtaAcreditar.Length - 9, 9));
                        }
                        RespuestaInextdsjv respuestaInextdsjv1 = HelperIbs.ibsTransfPgoOtros(base.Afiliado.AF_CodCliente, base.Afiliado.sAF_Rif, DateTime.Now, monto, this.CtaDebitar, base.Afiliado.sCO_Nombres, str2, this.Beneficiario, TransferenciaTipoVia.PagoTDC, base.Afiliado.sAF_Rif, this.CedulaBeneficiario, "225", this.SCodBco);
                        if ((respuestaInextdsjv1.inextdsjv.EErrores.SVectorCod == null ? false : !respuestaInextdsjv1.inextdsjv.EErrores.SVectorCod.Trim().Equals(string.Empty)))
                        {
                            throw new IBException(respuestaInextdsjv1.inextdsjv.EErrores.SVectorCod.Trim(), "IBSX");
                        }
                        this.mensaje = respuestaInextdsjv1.inextdsjv.SReferencia;
                        if (!string.IsNullOrEmpty(this.mensaje))
                        {
                            this.mensaje = string.Concat("IB", this.mensaje.Trim().PadLeft(10, '0'));
                            this.LogTransferenciasPagos();
                            string   cOCelular2 = base.Afiliado.CO_Celular;
                            object[] objArray1  = new object[] { "BAV informa PagoTDC por Bs. ", monto, " de su cuenta ", this.CtaDebitar.Substring(10, 10), " a la tarjeta ", str2.Substring(8, 8), " en fecha ", null, null };
                            now          = DateTime.Now;
                            objArray1[7] = now.ToString("dd/MM/yyyy hh:mm:ss");
                            objArray1[8] = ". Si la desconoce llame al 0500-288.00.01";
                            HelperTedexis.sendSMS(cOCelular2, string.Concat(objArray1));
                            break;
                        }
                        else
                        {
                            break;
                        }
                    }
                }
                }
            }
Label0:
            HelperTransaccion.AcumuladorTransVerifyUpdate(false, base.Afiliado.nAF_Id, this.Monto, this.sCod, this.SCod_Trans);
            HelperEnvioCorreo.BuscarCamposCorreo(this.sCod, base.Afiliado.sCO_Nombres, base.Afiliado.CO_Email, this.Monto, (string.IsNullOrEmpty(this.CtaAcreditar) ? string.Empty : this.CtaAcreditar), (string.IsNullOrEmpty(this.CtaAcreditar) ? string.Empty : this.CtaAcreditar), this.mensaje, (string.IsNullOrEmpty(this.Beneficiario) ? string.Empty : this.Beneficiario), (string.IsNullOrEmpty(this.CtaAcreditar) ? string.Empty : this.CtaAcreditar), (string.IsNullOrEmpty(this.TipoTarj) ? string.Empty : this.TipoTarj), (string.IsNullOrEmpty(this.CtaDebitar) ? string.Empty : this.CtaDebitar), string.Empty, string.Empty, (string.IsNullOrEmpty(this.Concepto) ? string.Empty : this.Concepto), (string.IsNullOrEmpty(this.CtaDebitar) ? string.Empty : this.CtaDebitar), (string.IsNullOrEmpty(base.Afiliado.sCO_Nombres) ? string.Empty : base.Afiliado.sCO_Nombres), (string.IsNullOrEmpty(this.NumBanco) ? string.Empty : this.NumBanco), (string.IsNullOrEmpty(this.Email) ? string.Empty : this.Email));
            return(this.mensaje);
        }
Пример #4
0
        protected void btnAceptar_Click(object sender, EventArgs e)
        {
            bool   flag  = false;
            string empty = string.Empty;

            //Daba Error Objeto no instanciado ***** this.afi = new Afiliado(null); ****
            //Modificado 07/08/2016 por Liliana Guerra
            this.afi = new Afiliado();
            try
            {
                this.ValidarCampos();
                List <Afiliado> afiliados = HelperAfiliado.AfiliadosGet(string.Concat(this.ddlTipoCedula.SelectedValue, this.txtCedula.Text.Trim()), EnumTipoValor.CedulaAfiliado);

                if (afiliados.Count > 0)
                {
                    this.afi = afiliados[0];
                    throw new Exception("Usted ya se encuentra afiliado al servicio de Internet Banking");
                }

                this.afi = new Afiliado()
                {
                    cedRIF   = string.Concat(this.ddlTipoCedula.SelectedValue, this.txtCedula.Text.Trim()),
                    sCedula  = this.txtCedula.Text.Trim(),
                    sAF_Rif  = string.Concat(this.ddlTipoCedula.SelectedValue, this.txtCedula.Text.Trim()),
                    sTarjeta = this.tddnumtxt.Text.Trim()
                };

                string str = this.txtCta.Text.Trim();
                RespuestaAfilpedsjv respuestaAfilpedsjv = HelperIbs.ibsAfiliarNatural((long)0, this.afi.cedRIF, str, this.tddnumtxt.Text);
                this.afi.AF_CodCliente = long.Parse(respuestaAfilpedsjv.afilpedsjv.SUserId);
                this.afi.AF_CodOficina = int.Parse(respuestaAfilpedsjv.afilpedsjv.SOfcCte);
                this.afi.sCO_Nombres   = respuestaAfilpedsjv.afilpedsjv.SNomCte.ToUpper();
                this.afi.CO_Celular    = respuestaAfilpedsjv.afilpedsjv.SCelCte;
                bool flag1 = (this.afi.CO_Celular.StartsWith("0412") || this.afi.CO_Celular.StartsWith("0414") || this.afi.CO_Celular.StartsWith("0424") || this.afi.CO_Celular.StartsWith("0416") ? true : this.afi.CO_Celular.StartsWith("0426"));

                if ((this.afi.CO_Celular.Trim().Equals(string.Empty) ? true : !flag1))
                {
                    throw new Exception("Número de celular no válido, por favor dirigirse a una agencia o llamar al número 0500-228.0001");
                }
                flag = true;
            }
            catch (IBException bException)
            {
                empty = bException.IBMessage;
                WebUtils.MessageBox(this, empty);
                return;
            }
            catch (Exception exception)
            {
                empty = exception.Message;
            }
            if ((!flag ? false : this.afi != null))
            {
                Random random = new Random(DateTime.Now.Millisecond);
                int    num    = random.Next(1000000, 2147483647);
                this.clvTemporal = num.ToString();
                HelperTedexis.sendSMS(this.afi.CO_Celular, string.Concat("BAV informa que su Clave de Afiliacion Temporal es: ", this.clvTemporal, ". Si usted no esta realizando esta operacion llame al 0500-288.00.01"));
                HelperLogons.ValidarAfiliacionIntentos(this.afi.sTarjeta, this.clvTemporal, "1");
                this.panelDatos.Visible = false;
                this.panelMSG.Visible   = true;
            }
            else
            {
                try
                {
                    HelperLogons.FallidoIntentoAfiliacion(this.tddnumtxt.Text, Tools.GetClientIP());
                }
                catch (IBException bException1)
                {
                    empty = bException1.IBMessage;
                }
            }
            if (!empty.Equals(string.Empty))
            {
                WebUtils.MessageBox(this, empty);
            }
        }