ParentRelationship property of BO


Author
Message
Scott
Scott
StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
Once the ParentRelationship property of a BO is set you can still use the BO independently,  right?  It only comes into play once you set the ParentBusinessObject property on the instance of the BO on that form (or if done with code)?

I have a one to many relationship, Quotes and QuoteDetails.  On the quotes form I am displaying the basic quote information along with a listview of all the quote details.  I have a quotebo and a qdetailbo on the form.  This is all working great.  I want to allow the user to click on a line item and have a quote detail form to allow changes,  can this same qdetailbo be used?  Any best practice recommendations?

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yes, the ParentBusinessObject and ParentRelationship work exactly as you said... the ParentRelationship doesn't come into use until the ParentBusinessObject is set and you can most certainly use a "child" business object without setting it's parent. As for best practice recommendations... I would use a "ChildFormDialog" for the window you want to use for changing the quote detail lines. You'll create a form in your project as if it was a standalone form (drop a quoteDetailBo on it and bind all of your fields). Then, drop a ChildFormDialog component on the "parent" form and configure it to call the "child" form. On the ChildFormDialog component, you'll configure the translation between the quotedetailbo on the parent form and the quotedetailbo on the child form. At runtime, the business object on the child form will be "translated" into the business object on the parent form (they'll be the exact same object reference); this allows you to use the same quotedetailbo on both forms without having to create a new one for the child form.



If that doesn't make since, the CHM help file has a better explaination of the ChildFormDialog under the UI Layer book Smile
Scott
Scott
StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
I found the childformdialog control, but can only find one reference to it in the documentaion.  I used the search feature and only found childformdialog mentioned under "controling standard form automation".

Thanks for the info I will start playing with it tomorrow.

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
The documentation is still not completely published and we are adding new documents all the time. This happens to be one of them. I will create you a sample project in the morning. What language are you working with and I will write it in your preferred language. The ChildFormDialog control is pretty straight forward once you see it in action. I know that if you see an example you will be able to make it work. I look forward to hearing from you. Let me know.Smile
Scott
Scott
StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)StrataFrame User (270 reputation)
Group: Forum Members
Posts: 176, Visits: 1.5K
That would be great.  I am working in C#.

Thanks

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
I will try and get you one by this afternoon sometime.  Thanks. Smile
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
There is now an update available from the My Account area of the website.  The update includes some enhancements and improvements to the framework as well as a ChildFormDialog sample. 

I hope this helps you get going.  In the sample you will also see an advanced ListView population method which uses an already populated business object by using the CopyDataFrom() method.

You MUST allow the databases to update when loading the new installation because a new table was added to the sample to show a simplified version of the ChildFormDialog control.  Let me know if you have any questions.  Thanks!Wink

StarkMike
StarkMike
Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)
Group: Forum Members
Posts: 436, Visits: 944
I couldn't find the ChildFormDialog sample in the MyAccount area.
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Mike,



The ChildFormDialog sample is part of the 1.4 installation. However, it's in C# only, so you'll find it under the Start menu for StrataFrame under the C# samples, not the VB.NET samples.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search