/// <summary> /// 删除库位信息 /// </summary> /// <param name="storageNum"></param> /// <returns></returns> public int Delete(string LocalNum) { LocationEntity entity = new LocationEntity(); entity.IsDelete = (int)EIsDelete.Deleted; entity.IncludeIsDelete(true); entity.Where(a => a.LocalNum == LocalNum); int line = this.Location.Update(entity); if (line > 0) { Clear(); } return(line); }
/// <summary> /// 删除库位信息 /// </summary> /// <param name="storageNum"></param> /// <returns></returns> public int Delete(IEnumerable <string> list) { string Key = string.Format(CacheKey.JOOSHOW_LOCATION_CACHE, this.CompanyID); LocationEntity entity = new LocationEntity(); entity.IsDelete = (int)EIsDelete.Deleted; entity.IncludeIsDelete(true); entity.Where("LocalNum", ECondition.In, list.ToArray()); entity.And(a => a.CompanyID == this.CompanyID); int line = this.Location.Update(entity); if (line > 0) { CacheHelper.Remove(Key); } return(line); }