Fix Crash in Lookup for Depending Controls

This commit is contained in:
Jonathan Jenne 2021-03-12 12:29:23 +01:00
parent db0bb54790
commit 60104989ab

View File

@ -1363,24 +1363,14 @@ Public Class frmValidator
End Try End Try
End Sub End Sub
Public Sub onLookUp0(sender As Object, e As System.EventArgs)
Dim oLookup As LookupControl3 = sender
Try
If Not IsNothing(oLookup.Properties.SelectedValues) Then
For Each ocont In oLookup.Properties.SelectedValues
Dim o = ocont
Next
End If
Catch ex As Exception
End Try
End Sub
Public Sub onLookUpselectedValue(sender As Object, SelectedValues As List(Of String)) Public Sub onLookUpselectedValue(sender As Object, SelectedValues As List(Of String))
LOGGER.Debug("onLookUpselectedValue") LOGGER.Debug("onLookUpselectedValue")
If FormLoaded = False Then If FormLoaded = False Then
Exit Sub Exit Sub
End If End If
Dim oLookup As LookupControl3 = sender Dim oRepositoryItem As RepositoryItemLookupControl3 = sender
Dim oLookup As LookupControl3 = oRepositoryItem.OwnerEdit
Try Try
If Not IsNothing(SelectedValues) Then If Not IsNothing(SelectedValues) Then
If SelectedValues.Count = 1 Then If SelectedValues.Count = 1 Then
@ -1437,7 +1427,8 @@ Public Class frmValidator
Exit Sub Exit Sub
End If End If
LOGGER.Debug("onLookUpselectedValue_Control2Set") LOGGER.Debug("onLookUpselectedValue_Control2Set")
Dim oLookup As LookupControl3 = sender Dim oRepositoryItem As RepositoryItemLookupControl3 = sender
Dim oLookup As LookupControl3 = oRepositoryItem.OwnerEdit
Try Try
If Not IsNothing(SelectedValues) Then If Not IsNothing(SelectedValues) Then
If SelectedValues.Count = 1 Then If SelectedValues.Count = 1 Then