Пример #1
0
        /// <summary>
        /// 修改产品类别
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public int Update(ProductCategoryEntity entity)
        {
            entity.IncludeCateName(true).IncludeRemark(true)
            .Where(a => a.CateNum == entity.CateNum)
            ;
            int line = this.ProductCategory.Update(entity);

            if (line > 0)
            {
                CacheHelper.Remove(CacheKey.JOOSHOW_PRODUCTCATEGORY_CACHE);
            }
            return(line);
        }
Пример #2
0
        /// <summary>
        /// 修改产品类别
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public int Update(ProductCategoryEntity entity)
        {
            string Key = string.Format(CacheKey.JOOSHOW_PRODUCTCATEGORY_CACHE, this.CompanyID);

            entity.IncludeCateName(true).IncludeRemark(true)
            .Where(a => a.SnNum == entity.SnNum)
            ;
            int line = this.ProductCategory.Update(entity);

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