Beispiel #1
0
 protected void btnAceptar3_Click(object sender, EventArgs e)
 {
     try
     {
         this.ValidarClaves();
         //Modificado 27 / 08 / 2018 por Liliana Guerra clave mayuscula
         //if (HelperLogons.ActualizarClaveLogin(this.afi.nAF_Id, this.afi.sAF_Password, this.txtClave.Text.Trim(), this.afi.AF_DiasPassword, WebUtils.GetClientIP(this), 0))
         if (HelperLogons.ActualizarClaveLogin(this.afi.nAF_Id, this.afi.sAF_Password, this.txtClave.Text.Trim().ToUpper(), this.afi.AF_DiasPassword, WebUtils.GetClientIP(this), 0))
         {
             HelperLogons.ActivarUsuario(this.afi.nAF_Id);
             this.liMensaje1.Text = "Recuperación de Clave realizada Satisfactoriamente";
             this.liMensaje2.Text = "Por seguridad te recomendamos cambiar periódicamente tus claves";
         }
         else
         {
             this.liMensaje1.Text = "Problemas para realizar la Recuperación de Clave";
             this.liMensaje2.Text = "Por favor intenta más tarde";
         }
         this.panelClave.Visible = false;
         this.panelExito.Visible = true;
     }
     catch (PoliticaUsuarioClave.ErrorClaveException errorClaveException)
     {
         WebUtils.MessageBox(this, errorClaveException.Message);
     }
     catch (IBException bException)
     {
         WebUtils.MessageBox2005(this, bException.IBMessage);
     }
     catch (Exception exception)
     {
         WebUtils.MessageBox2005(this, exception.Message);
     }
 }
Beispiel #2
0
 private void ValidarCampos()
 {
     if (this.tddnumtxt.Text.Equals(string.Empty))
     {
         throw new Exception("Debe colocar un número de Tarjeta de Débito");
     }
     if (this.tddnumtxt.Text.Length < 19)
     {
         throw new Exception("El número de Tarjeta de Débito debe poseer 19 dígitos");
     }
     if ((this.tddnumtxt.Text.StartsWith("6397816") ? true : this.tddnumtxt.Text.StartsWith("901")))
     {
         throw new Exception("Número de Tarjeta de Débito no permitida");
     }
     HelperLogons.ValidarIntentoAfiliacion(this.tddnumtxt.Text, Tools.GetClientIP());
     if (this.txtCedula.Text.Equals(string.Empty))
     {
         throw new Exception("Debe indicar el número de cédula");
     }
     if (this.txtCta.Text.Equals(string.Empty))
     {
         throw new Exception("Indique los últimos 4 números de su cuenta");
     }
     if (this.txtCta.Text.Length < 4)
     {
         throw new Exception("Se requieren los últimos 4 números de su cuenta");
     }
     if (HelperLogons.ValidarAfiliacionIntentos(this.tddnumtxt.Text, string.Empty, "3").Equals("3"))
     {
         throw new Exception("Tarjeta bloqueada para realizar la afiliación, por favor dirigirse a una agencia o llamar al número 0500-228.0001");
     }
 }
Beispiel #3
0
 protected void btnContinuarSMS_Click(object sender, EventArgs e)
 {
     bool flag = false;
     try
     {
         if (this.txtClave.Text.Trim().Equals(string.Empty))
         {
             throw new Exception("Debe indicar la clave de Afiliación Temporal");
         }
         if (!HelperLogons.ValidarClaveTransacciones(base.Afiliado.nAF_Id, this.txtClave.Text.Trim(), WebUtils.GetClientIP(this), base.sCod))
         {
             throw new Exception("Clave inválida, por favor intente de nuevo");
         }
         flag = true;
     }
     catch (IBException bException1)
     {
         IBException bException = bException1;
         flag = true;
         if (bException.CodigoSistema.Equals("IBSX"))
         {
             WebUtils.MessageBootstrap(this, string.Concat("Se ha detectado un problema de ejecución, por favor verifique antes de realizar otra operación (", bException.ReturnCode, ")"), null);
         }
         else if ((!bException.CodigoSistema.Equals("SQLIB") ? false : bException.ReturnCode.Equals("4")))
         {
             WebUtils.MessageBootstrap(this, bException.IBMessage, null);
         }
         else
         {
             WebUtils.MessageBootstrap(this, bException.IBMessage, null);
         }
         return;
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         flag = true;
         WebUtils.MessageBootstrap(this, exception.Message, null);
         return;
     }
     if (flag)
     {
         this.panelDatos.Visible = true;
         this.panelValidacion.Visible = false;
     }
 }
Beispiel #4
0
        protected void btnContinuarSMS_Click(object sender, EventArgs e)
        {
            bool flag = false;

            try
            {
                if (this.txtClave.Text.Trim().Equals(string.Empty))
                {
                    throw new Exception("Debe indicar la clave de Afiliación Temporal");
                }
                string str = HelperLogons.ValidarAfiliacionIntentos(this.afi.sTarjeta, this.txtClave.Text.Trim(), "2");
                if (str.Equals("1"))
                {
                    throw new Exception("Clave inválida, por favor intente de nuevo");
                }
                if (str.Equals("2"))
                {
                    throw new Exception("Afiliación bloqueada");
                }
                if (str.Equals("3"))
                {
                    this.btnContinuarSMS.Visible = false;
                    throw new Exception("Clave caducada");
                }
                flag = true;
            }
            catch (Exception exception)
            {
                WebUtils.MessageBox(this, exception.Message);
                return;
            }

            if (flag)
            {
                this.Context.Items.Add("Afiliado", this.afi);
                base.Server.Transfer("GetNewUser.aspx");
            }
        }
Beispiel #5
0
 protected void btnConfirmar_Click(object sender, EventArgs e)
 {
     try
     {
         this.ValidarClaves();
         //Modificado 27/08/2018 por Liliana Guerra clave a mayuscula
         //if (HelperLogons.ActualizarClaveLogin(this.Afiliado.nAF_Id, this.Afiliado.sAF_Password, this.txtPassNew.Text.Trim(), int.Parse(this.ddlDiasCaducidad.SelectedValue), this.Afiliado.sIP, this.sCod))
         if (HelperLogons.ActualizarClaveLogin(this.Afiliado.nAF_Id, this.Afiliado.sAF_Password, this.txtPassNew.Text.Trim().ToUpper(), int.Parse(this.ddlDiasCaducidad.SelectedValue), this.Afiliado.sIP, this.sCod))
         {
             this.LogCaducoClave(" Exitoso");
             this.liMensaje1.Text = "Cambio de Clave realizada Satisfactoriamente";
             this.liMensaje2.Text = "Por seguridad te recomendamos cambiar periódicamente tus claves";
             HelperEnvioCorreo.BuscarCamposCorreo(37, this.Afiliado.sCO_Nombres.ToUpper(), this.Afiliado.CO_Email, new decimal(0), "", "", "", this.Afiliado.sCO_Nombres, "", "", "", "", "", "", "", "", "", "");
         }
         else
         {
             this.LogCaducoClave(" Fallido");
             this.liMensaje1.Text = "Problemas para realizar el Cambio de Clave";
             this.liMensaje2.Text = "Por favor intenta más tarde";
         }
         this.liMensaje.Visible      = false;
         this.panelClaves.Visible    = false;
         this.panelResultado.Visible = true;
     }
     catch (PoliticaUsuarioClave.ErrorClaveException errorClaveException)
     {
         WebUtils.MessageBox(this, errorClaveException.Message);
     }
     catch (IBException bException)
     {
         WebUtils.MessageBox2005(this, bException.IBMessage);
     }
     catch (Exception exception)
     {
         WebUtils.MessageBox2005(this, exception.Message);
     }
 }
Beispiel #6
0
        private void ValidarCampos()
        {
            string str;

            if (base.Tipo_Seguridad == 1)
            {
                if (this.txtPassword.Text.Trim().Equals(string.Empty))
                {
                    throw new Exception("La Clave de Transacciones es requerida");
                }
                if (!HelperLogons.ValidarClaveTransacciones(base.Afiliado.nAF_Id, this.txtPassword.Text.Trim(), WebUtils.GetClientIP(this), base.sCod))
                {
                    throw new Exception("La Clave de Transacciones no es válida");
                }
                this.txtPassword.Text = string.Empty;
            }
            IObjetoGenerico objetoTransaccion = (IObjetoGenerico)this.tipotransaccion.ObjetoTransaccion;

            if (objetoTransaccion.GetType() == typeof(GTransferenciasPagos))
            {
                GTransferenciasPagos gTransferenciasPago = (GTransferenciasPagos)objetoTransaccion;
                string str1 = gTransferenciasPago.TipoTransaccion.ToString();
                if (base.sCod == 30)
                {
                    if (str1 != "PagoServicioCANTV")
                    {
                        str = (str1 == "PagoServicioCANTVNET" ? "PACNN" : "PAMOV");
                    }
                    else
                    {
                        str = "PAGSE";
                    }
                    str1 = str;
                }
                else if (str1.Equals("TransferenciaMismoTitularBAV"))
                {
                    str1 = "TBAMT";
                }
                else if (str1.Equals("TransferenciaTercerosBAV"))
                {
                    str1 = "TBTER";
                }
                else if (str1.Equals("TransferenciaOtrosBancosMismoTitular"))
                {
                    str1 = "TBOMT";
                }
                else if (str1.Equals("TransferenciaOtrosBancosTerceros"))
                {
                    str1 = "TBOTE";
                }
                else if (str1.Equals("PagoTarjetaCreditoMismoTitularBAV"))
                {
                    str1 = "PTBMT";
                }
                else if (str1.Equals("PagoTarjetaCreditoTercerosBAV"))
                {
                    str1 = "PTBTE";
                }
                else if (str1.Equals("PagoTarjetaCreditoOtrosBancosMismoTitular"))
                {
                    str1 = "PTOMT";
                }
                else if (str1.Equals("PagoTarjetaCreditoOtrosBancosTerceros"))
                {
                    str1 = "PTOTE";
                }
                else
                {
                    str1 = (!str1.Equals("PagoServicioElectricidadCaracas") ? "" : "PAEDC");
                }
                if ((str1.Equals("") ? false : HelperTransaccion.AcumuladorTransVerifyUpdate(true, base.Afiliado.nAF_Id, gTransferenciasPago.Monto, base.sCod, str1)))
                {
                    throw new Exception("El Monto supera al máximo diario");
                }
            }
        }
Beispiel #7
0
        protected void btnAceptar_Click(object sender, EventArgs e)
        {
            bool flag = false;

            this.afi = new Afiliado();
            try
            {
                this.ValidarCampos();
                List <Afiliado> afiliados = HelperAfiliado.AfiliadosGet(string.Concat(this.ddlTipoCedula.SelectedValue, this.txtCedula.Text), EnumTipoValor.CedulaAfiliado);
                if (afiliados.Count <= 0)
                {
                    throw new Exception("Usuario o tarjeta no válida");
                }
                this.afi = afiliados[0];
                if (this.afi != null)
                {
                    HelperLogons.ValidarIntentoRecuparecionCLV(this.afi.nAF_Id, this.tddnumtxt.Text, Tools.GetClientIP());
                    flag = true;
                    string text = this.txtCta.Text;
                    RespuestaAfilpedsjv respuestaAfilpedsjv = HelperIbs.ibsAfiliarNatural(this.afi.AF_CodCliente, this.afi.sAF_Rif, text, this.tddnumtxt.Text);
                    this.afi.AF_CodCliente = long.Parse(respuestaAfilpedsjv.afilpedsjv.SUserId);
                }
            }
            catch (IBException bException2)
            {
                IBException bException = bException2;
                string      empty      = string.Empty;
                bool        flag1      = false;
                try
                {
                    if ((bException.IsErrorIB || this.afi == null ? false : this.afi.nAF_Id > (long)0))
                    {
                        HelperLogons.ValidarIntentoRecuparecionCLVFALLIDO(this.afi.nAF_Id, this.tddnumtxt.Text, Tools.GetClientIP());
                    }
                }
                catch (IBException bException1)
                {
                    empty = bException1.IBMessage;
                    flag1 = true;
                }
                if (flag1)
                {
                    WebUtils.MessageBox2005(this, empty);
                }
                else
                {
                    WebUtils.MessageBox2005(this, bException.IBMessage);
                }
                return;
            }
            catch (Exception exception)
            {
                WebUtils.MessageBox2005(this, exception.Message);
                return;
            }
            if ((!flag ? false : this.afi != null))
            {
                this.PreguntasDesafio.llenarPreguntasAfiliado(this.afi.nAF_Id);
                this.panelDatos.Visible      = false;
                this.panelValidacion.Visible = true;
            }
        }
Beispiel #8
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);
            }
        }