public void AddAll(EntityCollector otherEntityCollector) { if (otherEntityCollector == null) { return; } if (otherEntityCollector._demands.Any()) { _demands.AddAll(otherEntityCollector._demands); } if (otherEntityCollector._providers.Any()) { _providers.AddAll(otherEntityCollector._providers); } if (otherEntityCollector._demandToProviderTable.Any()) { _demandToProviderTable.AddAll(otherEntityCollector._demandToProviderTable); } if (otherEntityCollector._providerToDemandTable.Any()) { _providerToDemandTable.AddAll(otherEntityCollector._providerToDemandTable); } }
public Demands DemandsGetAll() { Demands demands = new Demands(); if (_productionOrderBoms.Any()) { demands.AddAll(_productionOrderBoms); } if (_stockExchangeDemands.Any()) { demands.AddAll(_stockExchangeDemands); } if (_customerOrderParts.Any()) { demands.AddAll(_customerOrderParts); } return(demands); }
private static void ArchiveFinishedCustomerOrderPartsAndDeleteTheirArrows( IDbTransactionData dbTransactionData, IAggregator aggregator) { Demands copyOfCustomerOrderParts = new Demands(); copyOfCustomerOrderParts.AddAll(dbTransactionData.CustomerOrderPartGetAll()); foreach (var demand in copyOfCustomerOrderParts) { CustomerOrderPart customerOrderPart = (CustomerOrderPart)demand; if (customerOrderPart.IsFinished()) { ArchiveCustomerOrder(customerOrderPart.GetCustomerOrderId()); // archive cop List <ILinkDemandAndProvider> arrows = aggregator.GetArrowsFrom(customerOrderPart); dbTransactionData.DeleteAllFrom(arrows); ArchiveDemandOrProvider(customerOrderPart, dbTransactionData, aggregator, false); } } }