Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Duplicated Broken Rules Message at bottom page?
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01175129
Message ID:
01176738
Views:
9
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform