Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Duplicated Broken Rules Message at bottom page?
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01175129
Message ID:
01176738
Vues:
10
Liew,

You don't need to manually handle the transactions as you are doing in this example. All you need to do is register your one business object as a child of the other business object and the transaction handling happens automatically. All broken rules in any child/grandchild/etc. objects are bubbled up into the parent object and only one error message will be displayed.

For example, in your web form's Load() you can register the business objects like this:
Me.oAddress.RegisterChildBizObj(Me.MyChildBizObj)
Then all you have to do to save is this:
Me.Save(Me.oAddress
Also, make sure the AutoSaveOnParentSaved property of the business objects is set to true. You can set this at the ABusinessObject level so all your business objects behave this way when registered as child objects

Best 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