Example #1
0
        private bool validaHtml(ref String _mensaje)

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

            if (valida.htmlInyectionValida(this.txtNombreUsuario.Text.Trim(), ref mensajeFuncion, "Nombre", ref this.txtNombreUsuario))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.htmlInyectionValida(this.txtContrasenia1.Text.Trim(), ref mensajeFuncion, "Contraseña", ref this.txtContrasenia1))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.htmlInyectionValida(this.txtContrasenia2.Text.Trim(), ref mensajeFuncion, "Repetir contraseña", ref this.txtContrasenia2))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.htmlInyectionValida(this.TextBox1.Text.Trim(), ref mensajeFuncion, "Fecha ingreso", ref this.TextBox1))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }

            return(true);
        }
Example #2
0
        private bool validaHTML(ref String _mensaje)
        {
            CtrValidaInyeccion valida         = new CtrValidaInyeccion();
            string             mensajeFuncion = string.Empty;

            if (valida.htmlInyectionValida(this.txtUser.Text.Trim(), ref mensajeFuncion, "Usuario", ref this.txtUser))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.htmlInyectionValida(this.txtPass1.Text.Trim(), ref mensajeFuncion, "Contraseña", ref this.txtPass1))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.htmlInyectionValida(this.txtPass2.Text.Trim(), ref mensajeFuncion, "Contraseña", ref this.txtPass2))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.htmlInyectionValida(this.txtDate.Text.Trim(), ref mensajeFuncion, "Fecha de Ingreso", ref this.txtDate))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }

            return(true);
        }
Example #3
0
        private bool validaHtml(ref String _mensaje)

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

            if (valida.htmlInyectionValida(this.txtClaveUnica.Text.Trim(), ref mensajeFuncion, "Clave Única", 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, "Apellido Paterno", ref this.txtAPaterno))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.htmlInyectionValida(this.txtAMaterno.Text.Trim(), ref mensajeFuncion, "Apellido Materno", ref this.txtAMaterno))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.htmlInyectionValida(this.txtCorreoElectronico.Text.Trim(), ref mensajeFuncion, "Correo Eléctronico", ref this.txtCorreoElectronico))
            {
                _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);
            }
            return(true);
        }
        private bool validaSql(ref String _mensaje)
        {
            CtrValidaInyeccion valida = new CtrValidaInyeccion();

            string mensajeFuncion = string.Empty;

            if (valida.sqlInyectionValida(this.txtClaveUnica.Text.Trim(), ref mensajeFuncion, "Clave Unica", ref this.txtClaveUnica))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.sqlInyectionValida(this.txtNombre.Text.Trim(), ref mensajeFuncion, "Nombre", ref this.txtNombre))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.sqlInyectionValida(this.txtAPaterno.Text.Trim(), ref mensajeFuncion, "A Paterno", ref this.txtAPaterno))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.sqlInyectionValida(this.txtAMaterno.Text.Trim(), ref mensajeFuncion, "A Materno", ref this.txtAMaterno))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.sqlInyectionValida(this.txtCorreo.Text.Trim(), ref mensajeFuncion, "Correo Electronico", ref this.txtCorreo))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.sqlInyectionValida(this.txtCPostal.Text.Trim(), ref mensajeFuncion, "Codigo Postal", ref this.txtCPostal))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            if (valida.sqlInyectionValida(this.txtRFC.Text.Trim(), ref mensajeFuncion, "RFC", ref this.txtRFC))
            {
                _mensaje = mensajeFuncion;
                return(false);
            }
            return(true);
        }
        private bool validaHTML(ref String _mensaje)
        {
            CtrValidaInyeccion valida         = new CtrValidaInyeccion();
            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);
            }

            return(true);
        }