Example #1
0
        public ContentResult RightsToConfig(int id, string[] idlist)
        {
            if (idlist == null || idlist.Length <= 0)
            {
                return(Content("分配角色权限失败,请选择要分配的权限!"));
            }
            List <int> rList = new List <int>();

            foreach (string sid in idlist)
            {
                int tid = 0;
                if (int.TryParse(sid, out tid))
                {
                    rList.Add(tid);
                }
            }
            if (B_Role.RelevanceRightsList(id, rList))
            {
                B_MenuRights.ClearHashMenuRights();
            }
            else
            {
                return(Content("分配角色权限失败!"));
            }
            return(Content("ok"));
        }