예제 #1
0
        private void ValidarClaves()
        {
            List <Afiliado> afiliados = HelperAfiliado.AfiliadosGet(afi.AF_CodCliente);

            afi = afiliados[0];
            if (this.txtClave.Text.Trim().Equals(string.Empty))
            {
                throw new Exception("Su nueva clave es requerida");
            }
            if (this.txtClave.Text.Trim().Length < 8)
            {
                throw new Exception("Su nueva clave debe tener al menos 8 caracteres");
            }
            if (this.txtClaveConfirmar.Text.Trim().Equals(string.Empty))
            {
                throw new Exception("La confirmación de su nueva clave es requerida");
            }
            //Modificado 27/08/2018 por Liliana Guerra clave mayuscula
            //if (!this.txtClave.Text.Trim().Equals(this.txtClaveConfirmar.Text.Trim()))
            if (!this.txtClave.Text.Trim().ToUpper().Equals(this.txtClaveConfirmar.Text.Trim().ToUpper()))
            {
                throw new Exception("La nueva clave y su confirmación no coinciden");
            }
            if (!(new Regex("^(?=.*[A-Za-z])(?=.*\\d)(?=.*[$@!%*#?&\\.])[A-Za-z\\d$@!%*#?&\\.]{8,10}$")).IsMatch(this.txtClave.Text.Trim()))
            {
                throw new Exception("Su nueva clave debe tener al menos un (4) caracteres alfabéticos, un (4) caracteres numéricos, un (1) caracter especial, de longitud mínima 8 y máximo 10");
            }
            // //*************** IMPLEMENTACIÓN REGULACION 641-10 ******************************************************//
            ClaveNombre(this.afi.sCO_Nombres, this.txtClave.Text.Trim());
            ClaveUser(this.afi.sAF_NombreUsuario, this.txtClave.Text.Trim());
            ClaveTelefono(this.afi.CO_Celular, this.txtClave.Text.Trim());
            ClaveCedula(this.afi.sCedula, this.txtClave.Text.Trim());
            ClaveCuenta(this.txtClave.Text.Trim());
            PoliticaUsuarioClave.validaPoliticaClave(this.afi.sAF_NombreUsuario, this.txtClave.Text, this.txtClaveConfirmar.Text);
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.PreguntasValidadas)
            {
                this.panelValidacion.Visible = false;
                this.panelDatos.Visible      = true;
            }

            if (!HelperNotificacionIBP.VerificaNotificacion(base.Afiliado.nAF_Id))
            {
                this.btnAceptar.Visible = false;
                WebUtils.MessageBootstrap(this, string.Concat("Para usar esta opción debe tener una notificación activa. Si desea crear una notificación presione <a href=\"", base.ResolveUrl("~/pages/NotificacionViajes/NotificacionNueva.aspx"), "\">aquí</a>"), null);
            }
            else if (!HelperNotificacionIBP.ValidaDestinos(base.Afiliado.nAF_Id))
            {
                this.btnAceptar.Visible = false;
                WebUtils.MessageBootstrap(this, string.Concat("No cumple los requisitos para agregar un nuevo destino a esta notificación.<br/>Le recordamos que cada notificación tiene un máximo de 3 lugares como destino en un lapso de 6 meses.</br> presione <a href=\"", base.ResolveUrl("~/pages/NotificacionViajes/DetalleNotificacion.aspx"), "\">aquí para regresar a la consulta</a>"), null);;
            }
            else
            {
                if (!base.IsPostBack)
                {
                    this.ListaDestino.HasTextoInicial = true;
                    this.ListaDestino.TextoInicial    = "Seleccione el país";
                    this.ListaDestino.GetLista();
                    base.Afiliado            = HelperAfiliado.AfiliadosGet(base.Afiliado.nAF_Id, EnumTipoCodigo.AF_ID);
                    this.Session["Afiliado"] = base.Afiliado;
                }

                UltDestino   = Notificacion.UltimoDestino(base.Afiliado.nAF_Id);
                FechaMin     = Convert.ToDateTime(UltDestino.FechaFin);
                this.FD.Text = FechaMin.ToString("dd/MM/yyyy");

                PriDestino        = Notificacion.PrimerDestino(base.Afiliado.nAF_Id);
                FechaMax          = Convert.ToDateTime(PriDestino.FechaInicio);
                this.maximo.Value = FechaMax.ToString("dd/MM/yyyy");
            }
        }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.PreguntasValidadas)
            {
                this.panelValidacion.Visible = false;
                this.panelDatos.Visible      = true;
            }

            if (HelperNotificacionIBP.VerificaNotificacion(base.Afiliado.nAF_Id))
            {
                this.btnAceptar.Visible = false;
                WebUtils.MessageBootstrap(this, string.Concat("Ya posee una notificación activa. Si desea agregar otros destinos a esta notificación o eliminarla  presione <a href=\"", base.ResolveUrl("~/pages/NotificacionViajes/DetalleNotificacion.aspx"), "\">aquí</a>"), null);
            }

            if (!base.IsPostBack)
            {
                this.ListaDestino.HasTextoInicial = true;
                this.ListaDestino.TextoInicial    = "Seleccione el país";
                this.ListaDestino.GetLista();
                base.Afiliado            = HelperAfiliado.AfiliadosGet(base.Afiliado.nAF_Id, EnumTipoCodigo.AF_ID);
                this.Session["Afiliado"] = base.Afiliado;
            }
        }
예제 #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (this.PreguntasValidadas)
     {
         this.panelValidacion.Visible = false;
         this.panelDatos.Visible      = true;
     }
     if (!base.IsPostBack)
     {
         base.Afiliado            = HelperAfiliado.AfiliadosGet(base.Afiliado.nAF_Id, EnumTipoCodigo.AF_ID);
         this.Session["Afiliado"] = base.Afiliado;
         if (!string.IsNullOrEmpty(base.Afiliado.CO_Celular))
         {
             this.liNumeroActual.Text = Formatos.formatoTarjeta(base.Afiliado.CO_Celular);
         }
         else
         {
             this.liNumeroActual.Text = "No Afiliado";
         }
         this.liCorreoActual.Text = Formatos.formatoEmail(base.Afiliado.CO_Email);
         this.tg = this.Context.Items["TipoTransaccionGenerica"] as TipoTransaccionGenerica;
     }
     if (this.tg != null)
     {
         StringBuilder stringBuilder = new StringBuilder("<script>setTimeout(function(){");
         this.panelDatos.Visible      = true;
         this.panelValidacion.Visible = false;
         GActualizarDatos objetoTransaccion = this.tg.ObjetoTransaccion as GActualizarDatos;
         if ((string.IsNullOrEmpty(objetoTransaccion.Correo) ? false : !base.IsPostBack))
         {
             this.rdoEmailSi.Checked      = true;
             this.rdoEmailNo.Checked      = false;
             this.txtCorreo.Text          = objetoTransaccion.Correo;
             this.txtCorreoConfirmar.Text = objetoTransaccion.Correo;
             stringBuilder.Append(string.Concat("$('#", this.rdoEmailSi.ClientID, "').prop('checked',true).trigger('change');"));
         }
         if ((string.IsNullOrEmpty(objetoTransaccion.Celular) ? false : !base.IsPostBack))
         {
             this.rdoCelSi.Checked = true;
             this.rdoCelNo.Checked = false;
             string celular = objetoTransaccion.Celular;
             string str     = celular.Substring(0, 4);
             this.ddlistNumeroMovil.ClearSelection();
             this.ddlistNumeroMovil.Items.FindByValue(str).Selected = true;
             this.ddlistNumeroMovilConfirm.ClearSelection();
             this.ddlistNumeroMovilConfirm.Items.FindByValue(str).Selected = true;
             TextBox textBox  = this.txtNumeroMovil;
             TextBox textBox1 = this.txtNumeroMovilConfirm;
             string  str1     = celular.Substring(4, celular.Length - 4);
             string  str2     = str1;
             textBox1.Text = str1;
             textBox.Text  = str2;
             stringBuilder.Append(string.Concat("$('#", this.rdoCelSi.ClientID, "').prop('checked',true).trigger('change');"));
         }
         stringBuilder.Append("}, 150);</script>");
         if (!base.IsPostBack)
         {
             this.liScript.Text = stringBuilder.ToString();
         }
     }
 }
예제 #5
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;
            }
        }
예제 #6
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);
            }
        }