Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiple view updates
Message
 
À
29/04/2001 14:05:07
Bill Breay
Custom Business Software
Arvada, Colorado, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00501257
Message ID:
00502839
Vues:
18
Bill,

>I guess talking about the problem helps. I got to thinking after my 2nd reply to you, so I added the view for the grades to the profile bizobj and if the class changed I requeryed (sp) the grade view and did a replace all to update the view class field from the lost focus of the class field.>

If I'm understanding the scenario correctly, you were on the right track with placing code in the PostSaveHook of the Profile object. The additional work of updating the "grade" records should be done from within the Profile object. However, rather than adding a secondary updatable view to the Profile object, it is cleaner to create a "Grade" business object that does the work instead.

If this is a "behind the scenes" operation (grade record info is not displayed on the form) simply instantiate the Grade business object in the PostSaveHook of the Profile object, have it do the work you need by calling its methods, then release the object at the bottom of the method.

If you'd like to keep an instance of the Grade object around, you can store it in a property of the Profile object and release the reference to the Grade Object in the "Cleanup()" method of the Profile object as follows:

This.oGrade.Release()
RETURN DODEFAULT()

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform