Esempio n. 1
0
        protected void Unnamed1_Click(object sender, EventArgs e)
        {
            LogInDAOSQL clases = new LogInDAOSQL();

            if (clases.ExisteUsuario(txtCorreo.Text))
            {
                if (clases.ValidarUsuario(txtContraseña.Text, txtCorreo.Text))
                {
                    Session["matricula"] = txtCorreo.Text;
                    Server.Transfer("formulario_1.aspx", true);
                }
                else
                {
                    Type   cstype = this.GetType();
                    string script = "<script language='javascript'>alert('!!CONTRASEÑA INCORRECTA!!')</script>";
                    this.ClientScript.RegisterStartupScript(cstype, Guid.NewGuid().ToString(), script, false);
                }
            }
            else
            {
                Type   cstype = this.GetType();
                string script = "<script language='javascript'>alert('NO PUEDE ENTRAR! SU PAGO NO ESTA REGISTRADO EN EL SISTEMA')</script>";
                this.ClientScript.RegisterStartupScript(cstype, Guid.NewGuid().ToString(), script, false);
            }
        }
Esempio n. 2
0
        protected void btnIngresar_Click(object sender, EventArgs e)
        {
            LogInDAOSQL clases = new LogInDAOSQL();

            if (clases.ExisteUsuario(alu_NumControl.Text))
            {
                if (clases.ValidarUsuario(alu_NumControl.Text))
                {
                    Session["alu_NumControl"] = alu_NumControl.Text;
                    Server.Transfer("DatosPersonales1.aspx", true);
                }
                else
                {
                    lblMensaje.Text = "Su pago no esta registrado en el sistema";
                }
            }
            else
            {
                lblMensaje.Text = "Matrícula no encontrada";
            }
        }