private bool validaHTML(ref String _mensaje)
        {
            CtrlValidaInyeccion valida = new CtrlValidaInyeccion();
            string mensajeFuncion      = string.Empty;

            if (valida.htmlInyectionValida(this.txtNombre.Text.Trim(), ref mensajeFuncion, "Nombre", ref this.txtNombre))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.htmlInyectionValida(this.txtAPaterno.Text.Trim(), ref mensajeFuncion, "A Paterno", ref this.txtAPaterno))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.htmlInyectionValida(this.txtAMaterno.Text.Trim(), ref mensajeFuncion, "A Materno", ref this.txtAMaterno))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.htmlInyectionValida(this.txtCorreoElectronico.Text.Trim(), ref mensajeFuncion, "Correo Electronico", ref this.txtCorreoElectronico))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.htmlInyectionValida(this.txtRFC.Text.Trim(), ref mensajeFuncion, "RFC", ref this.txtRFC))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }


            return(true);
        }
Esempio n. 2
0
        private bool validaHTML(ref String _mensaje)

        {
            CtrlValidaInyeccion valida = new CtrlValidaInyeccion();
            string mensajeFuncion      = string.Empty;

            if (valida.htmlInyectionValida(this.txtClaveUnica.Text.Trim(), ref mensajeFuncion, "Clave Unica", ref this.txtClaveUnica))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.htmlInyectionValida(this.txtNombre.Text.Trim(), ref mensajeFuncion, "Nombre", ref this.txtNombre))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.htmlInyectionValida(this.txtAPaterno.Text.Trim(), ref mensajeFuncion, "A Paterno", ref this.txtAPaterno))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.htmlInyectionValida(this.txtAMaterno.Text.Trim(), ref mensajeFuncion, "A Materno", ref this.txtAMaterno))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.htmlInyectionValida(this.txtNumHermanos.Text.Trim(), ref mensajeFuncion, "Numero Hermanos", ref this.txtNumHermanos))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.htmlInyectionValida(this.txtEmail.Text.Trim(), ref mensajeFuncion, "Correo", ref this.txtEmail))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.htmlInyectionValida(this.txtCodigoPostal.Text.Trim(), ref mensajeFuncion, "Codigo Postal", ref this.txtCodigoPostal))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }

            if (valida.htmlInyectionValida(this.txtRfc.Text.Trim(), ref mensajeFuncion, "RFC", ref this.txtRfc))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            //if (valida.htmlInyectionValida(this.txtFechaNacimiento.Text.Trim(), ref mensajeFuncion, "Fecha de Nacimiento", ref this.txtFechaNacimiento))
            //{
            //    _mensaje = mensajeFuncion;
            //    return false;
            //}
            return(true);
        }
        private bool validaHTML(ref String _mensaje)

        {
            CtrlValidaInyeccion valida = new CtrlValidaInyeccion();
            string mensajeFuncion      = string.Empty;

            if (valida.htmlInyectionValida(this.txtNombreUsuario.Text.Trim(), ref mensajeFuncion, "Nombre de Usuario", ref this.txtNombreUsuario))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.htmlInyectionValida(this.txtContraseña.Text.Trim(), ref mensajeFuncion, "Contraseña", ref this.txtContraseña))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.htmlInyectionValida(this.txtConfirmarContraseña.Text.Trim(), ref mensajeFuncion, "Confirmar Contraseña", ref this.txtConfirmarContraseña))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            return(true);
        }