Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Auto save of Child Business Objects
Message
De
01/06/2010 16:38:19
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
01/06/2010 15:20:55
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01466945
Message ID:
01466953
Vues:
57
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform