Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grids, Views and cBizObjForms
Message
De
16/09/2004 16:45:06
 
 
À
16/09/2004 14:14:27
June Kendrick
Kendrick Associates, Inc.
New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00941406
Message ID:
00943109
Vues:
14
>I've got an order form with the orders bizobj on it. For whatever reason, I want to assign or change the customer associated with the order at any time (in my app. they aren't orders or customers, but the analogy seems to work here). I have a button on the orders form that calls up a modal form that has a grid that lists the customers. I pass in a reference to the calling form and use the default data session. I pick a customer and the modal form sends the id back to the orders form. The order form displays the pertinent customer data. from the customer view. The orders bizobj has a view of the customers as an "associated data access object" - i.e. a lookup view in the DE.

Customer-orders-lineitems is a popular demonstration model. But why change the parent once you have the child? Seems like a bad design or bad analogy.

>Is this a "bad" way of doing this? I should really set up an instance of the customer bizobj on the modal form with the lookup view in a lookup DE, leaving the maintenance DE alone? If I do, then I still need the customer view in the orders bizobj so I can display the customer data.

Forms aren't limited to a single bizobj; you could have both Orders and Customers on the original form. Just pay attention to their lPrimaryBizObj properties.

In my bizobjs, I have a parameterized view on the uniqueid that's updatable, and usually a second lookup view, both in the same DE. I might be able to benefit from multiple DEs, but that's too hard for me right now. ;)

>I guess from an OOP point of view, the customer lookup form should be stand-alone and not be dependent on the order form providing it with the lookup view.

If you want to make the form independent and use it elsewhere, you should probably consider a private datasession for it, to ensure it doesn't change anything on the other form. On the other hand, if this is its only use, sharing the datasession and manipulating the same bizobj, you shouldn't have to pass the value back, just set it how you want it from the modal form.

>Thanks for helping me to sort this out. Getting my mind wrapped around some of the OOP concepts is an effort at times <g>

No problem. I find object thinking pretty easy, the hard part is figuring out how to tell MM to do what I want it to.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform