Exemplo n.º 1
0
        /// <summary>
        /// 删除角色
        /// </summary>
        /// <param name="roleNum"></param>
        /// <returns></returns>
        public int DeleteRole(string roleNum)
        {
            SysRoleEntity roleEntity = new SysRoleEntity();

            roleEntity.IsDelete = (int)EIsDelete.Deleted;
            roleEntity.IncludeIsDelete(true);
            roleEntity.Where(a => a.RoleNum == roleNum);
            int line = this.SysRole.Update(roleEntity);

            if (line > 0)
            {
                CacheHelper.Remove(CacheKey.JOOSHOW_SYSROLE_CACHE);
            }
            return(line);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 删除角色
        /// </summary>
        /// <param name="SnNum"></param>
        /// <returns></returns>
        public int DeleteRole(string SnNum)
        {
            string        key        = string.Format(CacheKey.JOOSHOW_SYSROLE_CACHE, this.CompanyID);
            SysRoleEntity roleEntity = new SysRoleEntity();

            roleEntity.IsDelete = (int)EIsDelete.Deleted;
            roleEntity.IncludeIsDelete(true);
            roleEntity.Where(a => a.SnNum == SnNum);
            int line = this.SysRole.Update(roleEntity);

            if (line > 0)
            {
                CacheHelper.Remove(key);
            }
            return(line);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 删除角色信息
        /// </summary>
        /// <param name="list"></param>
        /// <param name="CompanyID"></param>
        /// <returns></returns>
        public int DeleteRole(IEnumerable <string> list)
        {
            string        key        = string.Format(CacheKey.JOOSHOW_SYSROLE_CACHE, this.CompanyID);
            SysRoleEntity roleEntity = new SysRoleEntity();

            roleEntity.IsDelete = (int)EIsDelete.Deleted;
            roleEntity.IncludeIsDelete(true);
            roleEntity.Where("SnNum", ECondition.In, list.ToArray());
            roleEntity.And(a => a.CompanyID == CompanyID);
            int line = this.SysRole.Update(roleEntity);

            if (line > 0)
            {
                CacheHelper.Remove(key);
            }
            return(line);
        }