﻿<?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 » WinForms (How do I?)  » Two Business oblect on a Single Form</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Fri, 12 Jun 2026 00:58:45 GMT</lastBuildDate><ttl>20</ttl><item><title>Two Business oblect on a Single Form</title><link>http://forum.strataframe.net/FindPost26086.aspx</link><description>i m using ThemedLinkMenu ,PanelManager,CustomerBusinessObject n CompanyBusinessObject on a&amp;nbsp; Form.&lt;/P&gt;&lt;P&gt;PaneManager Hav Two pages Page1 nPage2.&lt;/P&gt;&lt;P&gt;Page1 Hav MaintenanceFormToolStrip and show.Save.Edit n Delete&amp;nbsp;Customers using CustomerBusinessObject.&lt;/P&gt;&lt;P&gt;Page2 also Hav MaintenanceFormToolStrip and show.Save.Edit n Delete&amp;nbsp;Company using CompanyBusinessObject.&lt;/P&gt;&lt;P&gt;but when i create a new Company it automatic generate new CustomerId in Customers Table.&lt;/P&gt;&lt;P&gt;i set PrimaryBusinessObject property of Form None.&lt;/P&gt;&lt;P&gt;but problem is still&lt;/P&gt;&lt;P&gt;please solve this issue</description><pubDate>Thu, 18 Feb 2010 10:39:22 GMT</pubDate><dc:creator>Vikas Gupta</dc:creator></item><item><title>RE: Two Business oblect on a Single Form</title><link>http://forum.strataframe.net/FindPost26102.aspx</link><description>[quote][b]Vikas Gupta (02/18/2010)[/b][hr]...I set PrimaryBusinessObject property of Form None. but problem is still[/quote]&lt;br&gt;
&lt;br&gt;
I Vikas,&lt;br&gt;
&lt;br&gt;
If you want to go this route, then in the PanelManager.PageActivated event set the Form.PrimaryBusinessObject to the corresponding BO.  Something like this may work, I have not tested :hehe:&lt;br&gt;
&lt;br&gt;
[codesnippet]&lt;br&gt;
 Private Sub PanelManager1_PageActivated(ByVal e As MicroFour.StrataFrame.UI.Windows.Forms.PanelPageEventArgs) Handles PanelManager1.PageActivated&lt;br&gt;
        Select Case Me.PanelManager1.CurrentPage.Name&lt;br&gt;
            Case Is = PageCustomers.Name&lt;br&gt;
                Me.PrimaryBusinessObject = Me.CustomersBO1&lt;br&gt;
&lt;br&gt;
            Case Is = PageOrders.Name&lt;br&gt;
                Me.PrimaryBusinessObject = Me.OrdersBO1&lt;br&gt;
&lt;br&gt;
            Case Is = PageOrderItems.Name&lt;br&gt;
                Me.PrimaryBusinessObject = Me.OrderItemsBO1&lt;br&gt;
        End Select&lt;br&gt;
    End Sub&lt;br&gt;
[/codesnippet]</description><pubDate>Thu, 18 Feb 2010 10:39:22 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Two Business oblect on a Single Form</title><link>http://forum.strataframe.net/FindPost26087.aspx</link><description>Good morning,&lt;br&gt;
&lt;br&gt;
The MaintenanceFormToolstrip manages the PrimaryBusinessObject of the form.  A second MaintenanceFormToolstrip will manage the same business object.  You will need to wire up your own themedtoolstrip/themedlinkmenu in order for you to handle a second business object.  It is not that hard.  Check out Les Pinter's article for some additional support (http://www.lespinter.com/FoxToNet/ShowArticle.aspx?ArtNum=410).&lt;br&gt;
&lt;br&gt;
Have a great day!&lt;br&gt;
Bill</description><pubDate>Thu, 18 Feb 2010 07:30:47 GMT</pubDate><dc:creator>Bill Cunnien</dc:creator></item></channel></rss>