Hello,
I have a L2S SalesOrder entity with a child set of LineItems. Using winforms, on my Sales Order form I have a datagridview bound to the LineItems and it works like a dream. If the user changes a LineItem quantity (for instance), my LineItem partial class handles the OnQuantityChanged and recalculates the LineItem SubTotal field and the grid is automagically updated. I'm ecstatic with how clean and neat it is.
Now I would like to have a calculated field on my SalesOrder object called "Total" that is the total of all the LineItems' SubTotal fields (plus a few other things like tax and shipping, but don't worry about that for now). What is the best/cleanest way for the SalesOrder's Total field to be automagically updated whenever a LineItem is changed? If someone could just point me in the right direction on this I would be most appreciative.
Don't know if it makes a difference but I'm using Rick Strahl's Linq To SQL business framework (and it is fantastic, BTW!).
Thanks!