llbl 2.0.0.61127
adapter
.net 2.0
sqlserver 2000
my DB structur is as follows:
customer -> order -> order line item -> line item commission <- broker
This represents a customer having many orders. Orders have many line items, line items having many commission (1 per broker) and commissions relating to a single broker. If this doesn't seem quite right it took me a while to understand as well.
Essentially an order can have multiple brokers because a broker relates to a customer/item pair. a customer/item pair can have many brokers. All brokers get a commission when an order for that customer/item pair. Messy... I know... but that's the model.
So I need to display some aggrated data to the user to select orders for commission payment. I can generate 2 seperate TypedLists 1 for the order/borker/commission amount [ListA] (unique by order/broker) and a TypedList of order/total [ListB] (unique by order).
is there a way to merge the ListB into ListA to return 1 result set? I'm thinking along the lines of Frans post [http://weblogs.asp.net/fbouma/archive/2006/06/09/llblgen-pro-v2.0-with-asp.net-2.0.aspx] Step 6. extending the entity.
Could i use some sort of scalar sub select total joined on the order number within an aggregated TypedList?
Sample Results:
Order Order Total Broker Commission
001 $100.00 B1 $5.00
002 $150.00 B2 $6.50
002 $150.00 B3 $4.00