Group: Forum Members
Posts: 2,
Visits: 213
|
Here is the short version of my problem:
I have several maintenance screens in my project.
I have a set of BOs where there is a parent child relationship.
For ease of reading. I have BudgetBO (parent), ItemBO (child), and AmountBO (grandchild). On the parent maintenance form I have a parent BO and child BO.
If the user attempts to edit a child record, a ChildFormDialog passes the childBO to the Item (child) maintenance form. On that form, I have a child BO and a grandchild BO with the parent/child relationship defined at design time. However, unless I have a grandchild BO on the parent form, and use the BO translator to pass both the child and grandchild BOs, the grandchild's ParentBusinessObject property is always Nothing.
More drawn out version:
Parent-child relationship:
BudgetBO.budget_pk <-> ItemBO.item_budget_pk
Child-grandchild relationship:
ItemBO.item_pk <-> AmountBO.amt_item_pk
On my budget maintenance screen, I have instances of BudgetBO and ItemBO.
On my item maintenance screen, I have instances of ItemBO and AmountBO.
The parent/child relationships are set at design time in both the BOs themselves and in their particular instances on the forms.
In the budget maintenance screen (parent BO), if the user edits an Item, I have a ChildFormDialog that uses the BO Translator to pass ItemBO to the child maintenance form. However, the parentbusinessobject property of the grandchild BO instance, AmountBO1, is not being set to ItemBO1 at Form_Load of the child form.
If I put parent, child, and grandchild BOs on the parent maintenance form, and use the BO translator to pass the child and grandchildBOs to the child maintenance form, it appears that the relationship between child and grandchild is in tact at Form_Load.
Question:
Is this a problem with the BO translator? Is it expected that I would put all three BOs on the parent form? Should I set the ParentBusinessObject property in code at the Form_Load of the child form?
Thanks for your time.
Sean Kelly
County of Santa Cruz
|