Пример #1
0
 /// <summary>移除权限 
 /// </summary>
 /// <param name="roleId">角色Id</param>
 /// <param name="rightId">权限Id</param>
 /// <returns></returns>
 public bool RemoveRight(int roleId, int rightId)
 {
     RoleDal roleDal = new RoleDal();
     return roleDal.RemoveRight(roleId, rightId);
 }
Пример #2
0
        /// <summary>删除权限,真删,同时移出角色表中的权限
        /// </summary>
        /// <param name="rightId"></param>
        /// <returns></returns>
        public bool DeleteRightRel(List<int> rightIds)
        {
            foreach (var item in rightIds)
            {
                //在角色表中移出权限
                RoleDal roleDal = new RoleDal();
                roleDal.RemoveRight(item);
            }

            //删除权限
            RightDal rightDal = new RightDal();
            return rightDal.DeleteRightRel(rightIds);
        }