﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » Parent BO method that need to access child BO</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 16:21:59 GMT</lastBuildDate><ttl>20</ttl><item><title>Parent BO method that need to access child BO</title><link>http://forum.strataframe.net/FindPost6904.aspx</link><description>Hi,&lt;br&gt;
I want to create public method to calculate order total in OrderBO. It will sum up line items subtotal by loop thru LineItemsBO datarows. The method will be called before OrderBO.beforesave() event.&lt;br&gt;
&lt;br&gt;
My problem is, how could I access child BO - LineItemsBO in OrderBO? I can't set LineItemsBO to ParentBusinessObject property at OrderBO component designer.&lt;br&gt;
&lt;br&gt;
Any ideas?&lt;br&gt;
&lt;br&gt;
Thank you</description><pubDate>Mon, 19 Feb 2007 11:19:03 GMT</pubDate><dc:creator>Chan</dc:creator></item><item><title>RE: Parent BO method that need to access child BO</title><link>http://forum.strataframe.net/FindPost6958.aspx</link><description>Since the OrderBO is the parent of the LineItemBO (many lines items belong to an order), you'd set the parent relationship of LineItemBo to be an OrderBO in the LineItemBO designer. Then when using instances of these, you'd set the parent BO of a line item to the specific instance of the OrderBO.  However, I pretty sure there isn't a way to set a child BO in the parent. However, you could create a custom property in the OrderBO:&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Private _itemsBO as LineItemBO&lt;br&gt;
Public Property ItemsBO() As LineItemBO&lt;br&gt;
 Get&lt;br&gt;
   Return _itemsBO&lt;br&gt;
 End Get&lt;br&gt;
 Set(value as LineItemBO)&lt;br&gt;
   _itemsBO&lt;br&gt;
 End Set&lt;br&gt;
End Property&lt;br&gt;
&lt;br&gt;
This should show up on the properties window of your BO. Then you can set it and use it in your method.  I hope I've understood the problem and that this is helpful.</description><pubDate>Mon, 19 Feb 2007 11:19:03 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Parent BO method that need to access child BO</title><link>http://forum.strataframe.net/FindPost6957.aspx</link><description>Any feedback on this?&lt;/P&gt;&lt;P&gt;Thank you</description><pubDate>Mon, 19 Feb 2007 11:09:15 GMT</pubDate><dc:creator>Chan</dc:creator></item></channel></rss>