determine businessobject on FormNavigated


Author
Message
Fabian R Silva, -
Fabian R Silva, -
StrataFrame User (317 reputation)StrataFrame User (317 reputation)StrataFrame User (317 reputation)StrataFrame User (317 reputation)StrataFrame User (317 reputation)StrataFrame User (317 reputation)StrataFrame User (317 reputation)StrataFrame User (317 reputation)StrataFrame User (317 reputation)
Group: StrataFrame Users
Posts: 153, Visits: 1.2K
I have two BOs (a primary and a "not primary", I have to put a handler of primarybusinessobject.navigated to a method on a form to refresh the "not primary" child BO fill manually...



the question is if I have a property or something else that determine if the navigate object is the primary (the eventarg MicroFour.StrataFrame.Business.NavigatedEventArgs in the formnavigate event doesn't have a reference to the business object that raise the navigate)



pd: I not use the BO's property "parentrelationship" and "parentbusinessobject" because I inherited from a intermediate BO and this give me problems with the property (parentrelationship)... then I cut the parent - child features and handle the navigate / transaction stuff manually...



thanks for any idea on this.
Reply
Paul Chase
Paul Chase
Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Fabian,

I "wrapped" the strataframe events that did not pass a sender into custom events that pass the sender though so I could tell where it came from. I'm not sure why they didnt pass the sender through

#Region " Events"

'---> Add events that mirror StrataFrame Events as they do not pass a sender so I can't tell which BO intitiated the event

Public Event AL_Navigated(ByVal sender As Object, ByVal e As MicroFour.StrataFrame.Business.NavigatedEventArgs)

Public Event AL_AfterAddNew(ByVal sender As Object, ByVal e As System.EventArgs)

Public Event AL_AfterDeleted(ByVal sender As Object, ByVal e As MicroFour.StrataFrame.Business.AfterDeleteEventArgs)

Public Event AL_BeforeDeleted(ByVal sender As Object, ByVal e As MicroFour.StrataFrame.Business.BeforeDeleteEventArgs)

#End Region

#Region " Wrapped Events"

''' <summary>

''' Wraps the After Add New event

''' </summary>

''' <param name="e"></param>

''' <remarks></remarks>

Private Sub BaseBiz_AfterAddNew(ByVal e As System.EventArgs) Handles Me.AfterAddNew

'Bubble up th SF event

RaiseEvent AL_AfterAddNew(Me, e)

End Sub

''' <summary>

''' Wraps the After Delete event

''' </summary>

''' <param name="e"></param>

''' <remarks></remarks>

Private Sub BaseBiz_AfterDelete(ByVal e As MicroFour.StrataFrame.Business.AfterDeleteEventArgs) Handles Me.AfterDelete

'Bubble up th SF event

RaiseEvent AL_AfterDeleted(Me, e)

End Sub

''' <summary>

''' Wraps the Befoew Delete event

''' </summary>

''' <param name="e"></param>

''' <remarks></remarks>

Private Sub BaseBiz_BeforeDelete(ByVal e As MicroFour.StrataFrame.Business.BeforeDeleteEventArgs) Handles Me.BeforeDelete

'Bubble up th SF event

RaiseEvent AL_BeforeDeleted(Me, e)

End Sub

Private Sub AL_BusinessObjectBase_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Disposed

End Sub

''' <summary>

''' Handle The is Dirty Changed Event to Enable Disable Buttons

''' </summary>

''' <param name="sender"></param>

''' <param name="e"></param>

''' <remarks></remarks>

Private Sub AL_BusinessObjectBase_IsDirtyChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.IsDirtyChanged

'Nothing here for now this will enable us to trap for changes and then flip buttons

' Base.Common.MainForm.HandleEditingStateChanged()

End Sub

''' <summary>

''' Wraps the Navigated event

''' </summary>

''' <param name="e"></param>

''' <remarks></remarks>

Private Sub BaseBiz_Navigated(ByVal e As MicroFour.StrataFrame.Business.NavigatedEventArgs) Handles Me.Navigated

'Bubble up th SF event

RaiseEvent AL_Navigated(Me, e)

End Sub

#End Region


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