Beispiel #1
0
        /// <summary>
        /// 删除产品信息
        /// </summary>
        /// <param name="snNum"></param>
        /// <returns></returns>
        public int Delete(string snNum)
        {
            ProductEntity entity = new ProductEntity();

            entity.IsDelete = (int)EIsDelete.Deleted;
            entity.Where(a => a.SnNum == snNum);
            entity.IncludeIsDelete(true);
            int line = this.Product.Update(entity);

            if (line > 0)
            {
                CacheHelper.Remove(CacheKey.JOOSHOW_PRODUCT_CACHE);
            }
            return(line);
        }
Beispiel #2
0
        /// <summary>
        /// 根据产品的唯一编号删除产品
        /// </summary>
        /// <param name="SnNum"></param>
        /// <returns></returns>
        public int Delete(string SnNum)
        {
            string Key = string.Format(CacheKey.JOOSHOW_PRODUCT_CACHE, this.CompanyID);

            ProductEntity entity = new ProductEntity();

            entity.IsDelete = (int)EIsDelete.Deleted;
            entity.IncludeIsDelete(true);
            entity.Where(item => item.SnNum == SnNum);
            entity.And(a => a.CompanyID == this.CompanyID);
            int line = this.Product.Update(entity);

            if (line > 0)
            {
                CacheHelper.Remove(Key);
            }
            return(line);
        }
Beispiel #3
0
        /// <summary>
        /// 删除产品信息
        /// </summary>
        /// <param name="snNum"></param>
        /// <returns></returns>
        public int Delete(IEnumerable <string> list)
        {
            string Key = string.Format(CacheKey.JOOSHOW_PRODUCT_CACHE, this.CompanyID);

            ProductEntity entity = new ProductEntity();

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

            if (line > 0)
            {
                CacheHelper.Remove(Key);
            }
            return(line);
        }
        /// <summary>
        /// 根据产品唯一编号删除产品
        /// </summary>
        /// <param name="SnNum"></param>
        /// <returns></returns>
        public int DeleteProduct(string SnNum)
        {
            ProductEntity entity = new ProductEntity();

            entity.IsDelete = (int)EIsDelete.Deleted;
            entity.IncludeIsDelete(true);
            entity.Where(item => item.SnNum == SnNum)
            .And(item => item.CompanyID == this.CompanyID)
            ;
            int line = this.Product.Update(entity);

            ProductSkuEntity skuEntity = new ProductSkuEntity();

            skuEntity.IsDelete = (int)EIsDelete.Deleted;
            skuEntity.IncludeIsDelete(true);
            skuEntity.Where(item => item.ProductNum == SnNum)
            .And(item => item.CompanyID == this.CompanyID)
            ;
            line += this.ProductSku.Update(skuEntity);

            return(line);
        }