예제 #1
0
        public string AjaxLogin(string user_name, string user_pwd)
        {
            int result = ub.AjaxLogin(user_name, user_pwd);

            if (result > 0)
            {
                Users user = ub.GetUsersByName(user_name);
                Session["user_name"] = user_name;
                Session["user_id"]   = user.user_id;
                return("登录成功.");
            }
            else
            {
                return("用户名或密码错误!");
            }
        }