public virtual IEnumerable items() { if (Filter.Current == null) { yield break; } Items.Cache.Clear(); PXSelectBase <InventoryItem> select = new PXSelect <InventoryItem, Where2 <Match <Current <AccessInfo.userName> >, And <InventoryItem.pendingBasePriceDate, LessEqual <Current <ItemFilter.pendingBasePriceDate> > > > >(this); if (this.Filter.Current != null && !string.IsNullOrEmpty(this.Filter.Current.PriceClassID)) { select.WhereAnd <Where <InventoryItem.priceClassID, Equal <Current <ItemFilter.priceClassID> > > >(); } if (this.Filter.Current != null && this.Filter.Current.PriceManagerID != null) { select.WhereAnd <Where <InventoryItem.priceManagerID, Equal <Current <ItemFilter.priceManagerID> > > >(); } if (this.Filter.Current != null && this.Filter.Current.WorkGroupID != null) { select.WhereAnd <Where <InventoryItem.priceWorkgroupID, Equal <Current <ItemFilter.workGroupID> > > >(); } foreach (InventoryItem item in select.Select()) { UpdateBasePriceRecord record = new UpdateBasePriceRecord(); record.InventoryID = item.InventoryID; record.Descr = item.Descr; record.PendingBasePrice = item.PendingBasePrice; record.PendingBasePriceDate = item.PendingBasePriceDate; record.BasePrice = item.BasePrice; record.BasePriceDate = item.BasePriceDate; record.PriceClassID = item.PriceClassID; record.BaseUnit = item.BaseUnit; record.SalesUnit = item.SalesUnit; yield return(Items.Insert(record)); } Items.Cache.IsDirty = false; }
public static void UpdateBasePrice(INUpdateBasePriceProcess graph, UpdateBasePriceRecord item) { graph.UpdateBasePrice(item); }