/// <summary>
        /// 用户角色管理
        /// </summary>
        /// <returns></returns>
        public ActionResult UserRoleManage()
        {
            if (string.IsNullOrWhiteSpace(action))
            {
                return(View());
            }
            JsonResult     result      = new JsonResult();
            SysRoleService roleService = GetService <SysRoleService>();
            XT_UserService userService = GetService <XT_UserService>();

            List <XT_ROLE> roles  = null;
            string         roleId = null;

            switch (action)
            {
            case "GetRoles":
                roles = roleService.SelectByUser(GetCurrerUser().ID);
                List <ZTreeItemData> ztreeList = ZTreeItemData.CreateZTreeData("0", "根节点");

                foreach (XT_ROLE role in roles)
                {
                    ztreeList.Add(new ZTreeItemData()
                    {
                        name = role.ROLE_NAME,
                        Id   = role.ID,
                        PId  = role.PARENT_ID,
                    });
                }
                result.Data = ztreeList;
                break;

            case "GetAllUsers":
                //roles= roleService.SelectByUser(GetCurrerUser().ID);

                result.Data = userService.SelectAll();
                break;

            case "GetRoleUser":
                roleId      = GetParams("roleId");
                result.Data = userService.SelectByRoleId(roleId);
                break;

            case "saveUserRole":
                List <XT_USER_ROLE> user_role_list = GetParams <List <XT_USER_ROLE> >("user_role_list");
                roleId = GetParams("roleId");
                SysRoleUserService roleUserService = GetService <SysRoleUserService>();
                roleUserService.DeleteByRoleId(roleId);
                if (user_role_list != null)
                {
                    foreach (XT_USER_ROLE user_role in user_role_list)
                    {
                        user_role.ROLE_ID = roleId;
                        roleUserService.InsertOrUpdate(user_role);
                    }
                }
                result.Data = true;
                break;
            }
            return(result);
        }