Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Auto save of Child Business Objects
Message
From
01/06/2010 16:38:19
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
01/06/2010 15:20:55
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01466945
Message ID:
01466953
Views:
56
>Once I register a BO as a child object, shouldn't any changes made to the child get saved when the parent is saved? Or do I need to do something special?
>
>Here's my code:
>
>
            this.oPolicy = (Policy)this.RegisterPrimaryBizObj(new Policy());
>
>            this.oBeneficiary = (Beneficiary)this.RegisterBizObj(new Beneficiary());
>            this.oPolicy.RegisterChildBizObj(this.oBeneficiary);
>
>Now when I make changes in the gridview that has the Beneficaries in it, those changes are not getting saved.

Hi Frank,

Yes, you need to setup code in the child business object so it responds to the parent when registered. If you check the business object jump start where the Order Details is being enhanced you will see the items you need. For saving, it some properties such as AutoSaveOnParentSaved = true etc. Check out step 8 of the business object jump start.

There is also some override methods you may want/ need if you want a child business object to refresh when the parent refreshes type stuff.
Tim
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform