Exemplo n.º 1
0
        public JavaScriptResult UserReset(int id, string name)
        {
            User user = Session["user"] as User;

            if (user != null && user.Id == id)
            {
                SysUser.ResetPass(id);
                return(JavaScript("alert('当前账号密码已重置, 请重新登录');self.location.href = '../Login/Index';"));
            }
            SysUser.ResetPass(id);
            return(JavaScript(string.Format("alert('账号:{0} 的密码已重置')", name)));
        }