BOTranslation from component to childForm


Author
Message
Chan
Chan
Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

In my lookedit_ButtonClicked event, I need to launch childform. My BO is created in this event, but not dropped on form.

How could I "translate" my BO to childform?



Thank you
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
You have three options, first, just pass the craeted BO over as a parameter to the child form.   Second, manually add the item to the translation collection.

   
    '-- Decalre this as a private on Form1   
    Private _MyBO As MySourceBO   

    '-- Manually add the translation
    Dim loItem As New MicroFour.StrataFrame.UI.Windows.Forms.BusinessObjectTranslationItem()
    loItem.SourceBusinessObject = "Form1._MyBO"
    loItem.DestinationBusinessObject = "Form2._DestBO"
    Me.ChildFormDialog1.BusinessObjectTranslations.Add(loItem)

Last option, manually translate the BOs yourself by calling the translater directly.

MicroFour.StrataFrame.UI.Windows.Forms.BusinessObjectTranslator.TranslateBusinessObjects(SourceBO,DestBO,"DestBOInstanceName",Form1,Form2)

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