Exemple #1
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        Userinfo userl = new Userinfo();

        switch (userl.UserLogin(this.username.Value.Trim(), DESEncrypt.Encrypt(this.password.Value)))
        {
        case "true":
            base.ClientScript.RegisterStartupScript(base.ClientScript.GetType(), "myscript", "<script>var manager = $.ligerDialog.waitting('登录成功,正在跳转...');setTimeout(function (){ ll(); }, 1000);;</script>");
            break;

        case "pwd":
            base.ClientScript.RegisterStartupScript(base.ClientScript.GetType(), "myscript", "<script>  f_alert2('warn', '输入密码错误!');</script>");
            break;

        case "user":
            base.ClientScript.RegisterStartupScript(base.ClientScript.GetType(), "myscript", "<script>f_alert2('warn', '用户名不存在!');</script>");
            break;
        }
    }