Landed Cost. Bookin Activated
I need to do something when a bookin has been activated.
So far I have the code
But as soon as I load the bookin form, I get an error "Unable to cast object of type JiwaFinancials.Jiwa.JiwaLandedCostUI.BookIn.BookIn to type JiwaFinancials.Jiwa.JiwaLandedCost.BookIn.BookIn.
I know the error lies in the Dim within the Sub but I cannot find the correct syntax to use.
Regards
Danny
So far I have the code
- Code: Select all
Public Sub Setup(ByVal JiwaForm As JiwaApplication.IJiwaForm, ByVal Plugin As JiwaApplication.Plugin.Plugin) Implements JiwaApplication.IJiwaFormPlugin.Setup
Dim BookInForm As JiwaLandedCostUI.BookIn.BookIn = DirectCast(JiwaForm, JiwaApplication.IJiwaForm)
AddHandler BookInForm.Activated, AddressOf BookIn_Activated
End Sub
Sub BookIn_Activated (sender As Object, e As System.eventargs)
Dim BookIn As JiwaLandedCost.BookIn.BookIn = DirectCast( sender , JiwaLandedCost.BookIn.BookIn)
msgbox(BookIn.BookInNo)
End Sub
But as soon as I load the bookin form, I get an error "Unable to cast object of type JiwaFinancials.Jiwa.JiwaLandedCostUI.BookIn.BookIn to type JiwaFinancials.Jiwa.JiwaLandedCost.BookIn.BookIn.
I know the error lies in the Dim within the Sub but I cannot find the correct syntax to use.
Regards
Danny