Exemplo n.º 1
0
        protected void ClientLogin(string userName, string userPass, string vCode)
        {
            if (vCode.ToLower() != Session["SafeCode"].ToS().ToLower())
            {
                Js.AlertAndGoback("验证码错误!");
                return;
            }

            Result r = SysUserAction.UserLogin(userName, userPass, "", "");

            if (r.Success)
            {
                Response.Redirect("~/e/admin/");
            }
            else
            {
                Js.AlertAndGoback(r.Text);
            }
        }
Exemplo n.º 2
0
        protected void btn_Login_Click(object sender, EventArgs e)
        {
            string userName = txt_UserName.Text.TrimDbDangerousChar();
            string userPass = txt_Userpass.Text.TrimDbDangerousChar();
            string vCode    = txt_VCode.Text.TrimDbDangerousChar();

            if (vCode.ToLower() != Session["SafeCode"].ToS())
            {
                Js.AlertAndGoback("验证码错误!");
                return;
            }

            Result r = SysUserAction.UserLogin(userName, userPass, "", "");

            if (r.Success)
            {
                Response.Redirect("~/e/admin/");
            }
            else
            {
                Js.AlertAndGoback(r.Text);
            }
        }