예제 #1
0
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            string user = txtusuario.Text;
            string pass = txtclave.Text;

            int Login = ClLogin.IniciarSesion(user, pass);

            if (Login == 0)
            {
                Response.Write("<script>alert('Usuario Incorrecto')</script>");
            }
            else
            {
                Response.Redirect("Menu.aspx");
                Response.Write("<script>alert('Usuario Correcto')</script>");
            }
        }
예제 #2
0
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            string user = txtcorreo.Text;
            string pass = txtclave.Text;

            int Login = ClLogin.IniciarSesion(user, pass);

            if (Login == 2)
            {
                Response.Write("<script>alert('Usuario Correcto')</script>");
                Response.Redirect("Usuario/Menu.aspx");
            }
            else if (Login == 1)
            {
                Response.Write("<script>alert('Administrador Correcto')</script>");
                Response.Redirect("Admin/MenuAdmin.aspx");
            }
            else
            {
                Response.Write("<script>alert('Usuario o contraseña incorrecta')</script>");
            }
        }
예제 #3
0
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            string user = txtusuario.Text;
            string pass = txtclave.Text;

            int Login = ClLogin.IniciarSesion(user, pass);

            switch (Login)
            {
            case 1:
                Response.Redirect("Menu.aspx");
                break;

            case 2:
                Response.Redirect("Menu2.aspx");
                break;

            default:
                Response.Write("<script>alert('Usuario no existe')</script>");
                break;
            }
        }