/// <summary> /// 删除 /// </summary> /// <param name="userCode"></param> /// <returns></returns> public int Delete(string supNum) { SupplierEntity entity = new SupplierEntity(); entity.IsDelete = (int)EIsDelete.Deleted; entity.IncludeIsDelete(true); entity.Where(a => a.SupNum == supNum); int line = this.Supplier.Update(entity); if (line > 0) { CacheHelper.Remove(CacheKey.JOOSHOW_SUPPLIER_CACHE); } return(line); }
/// <summary> /// 删除 /// </summary> /// <param name="userCode"></param> /// <returns></returns> public int Delete(IEnumerable <string> list) { string key = string.Format(CacheKey.JOOSHOW_SUPPLIER_CACHE, this.CompanyID); SupplierEntity entity = new SupplierEntity(); 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.Supplier.Update(entity); if (line > 0) { CacheHelper.Remove(key); } return(line); }