I have a windows form that calls a business object, which in turns searches through a list of items and then needs to display a modal form upon a certain type of item being found. This modal form then needs to return a value to the object so that it can continue processing.
So far I have approached the problem as below:
My problem is that vb.net (or my lack of knowledge) is restricting me from returning a value when using RaiseEvent and an event handler. I have been looking around on the web and found some info on using a non multicast delegate, but haven't a clue.
Any help would be greatly appreciatted.....
So far I have approached the problem as below:
Code:
----- Form --------
Dim WithEvents objTest As New BUS.BusRequirements()
Dim decCost As Decimal
decCost = objTest.Process()
----- End Form -----
----- Class -------
Public Event RaiseScreen(ByVal intItemID As Integer)
Private Sub Process()
.....
processing of part list
Upon certain condition
RaiseEvent RaiseScreen(intItemID)
continue processing
......
----- End Class -----
----- Form ---------
Private Sub ModalForm(ByVal intItemID As Integer) Handles objTest.RaiseScreen
Launch New Modal Form
User Selects Item
****Need to Return Value to calling Object******
----- End Form ------
My problem is that vb.net (or my lack of knowledge) is restricting me from returning a value when using RaiseEvent and an event handler. I have been looking around on the web and found some info on using a non multicast delegate, but haven't a clue.
Any help would be greatly appreciatted.....