Ejemplo n.º 1
0
        /// <summary>
        /// 修改角色信息
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public int UpdateRole(SysRoleEntity entity)
        {
            entity.IncludeRoleName(true).IncludeIsDelete(true).IncludeRemark(true)
            .Where(a => a.RoleNum == entity.RoleNum)
            ;
            int line = this.SysRole.Update(entity);

            if (line > 0)
            {
                CacheHelper.Remove(CacheKey.JOOSHOW_SYSROLE_CACHE);
            }
            return(line);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 修改角色信息
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public int UpdateRole(SysRoleEntity entity)
        {
            string key = string.Format(CacheKey.JOOSHOW_SYSROLE_CACHE, this.CompanyID);

            entity.IncludeRoleName(true).IncludeRemark(true);
            entity.Where(a => a.SnNum == entity.SnNum)
            .And(a => a.CompanyID == entity.CompanyID);
            int line = this.SysRole.Update(entity);

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