Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BizObj: parent -> child -> grandchild -> great-grandchil
Message
From
05/05/2004 23:10:03
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00898863
Message ID:
00901440
Views:
32
Kevin,

To avoid the complication of describing the requirements of my bio-medical related application, I will use MM.NET Jump Start WinForm “Order System” to demonstrate what I want to solve.

I have three biz objects: Customer, Orders and OrderDetail

Customer is not originally in the jump start and I constructed it with a single method GetAllCustomer() retrieving all the customers

For Orders, I added HookParentRetrieved() and HookParentNavigated(), both call GetOrdersByCustomerID() in the original jump start.

OrderDetail is exactly same as in the jump start.

I have one form, CustomerOrderForm on which OrderDetail is made a child of Orders, which in turn is made a child of Customer. Three grids, grdCustomer, grdOrders and grdOrderDetail, are put on the form and are bund to Customer, Orders and OrderDetail respectively. It is nice to see when Customer.GetAllCustomer() is called, Orders’ HookParentRetrieved() is fired, and than OrderDetail’s HookParentRetrieved() is fired, and all grids are populated.

Now, I arrive at the part that bothers me. I can either set NavControl to grdCustomer or to grdOrders (It does not make sense to set it to grdOrderDetail.)

If I set NavControl to grdCustomer, I am happy that when record pointer in grdCustomer is moved, Orders’ HookParentNavigated() is fired and then OrderDetail’s HookParentRetrieved() is fired. BUT, when I move record pointer in grdOrders, the grdOrderDetail does not get refreshed (grdOrderDetail’s HookParentNavigated() does not fire). I think it is reasonable to show the user the correct order details when a different order is selected and I want to find ways to cause this to happen.

If I set NavControl to grdOrders. Record pointer position change in grdOrder does cause OrderDetail’s HookParentNavigated() fire and the correct order details are shown. However, the form is stuck on a single customer: now the movement of record pointer in grdCustomer does not cause the refreshment of grdOrders. In my opinion, the form is broken this way.

I really wish that I expressed my problems.

Cheers
Chen Nan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform