fix LookupGrid not using selected values for depending controls
This commit is contained in:
parent
8fe526f5c0
commit
e258dc568e
@ -313,7 +313,7 @@ Public Class frmMassValidator
|
|||||||
Dim oExpression = $"SQL_UEBERPRUEFUNG like '%#CTRL#{ctrl.Name}%'"
|
Dim oExpression = $"SQL_UEBERPRUEFUNG like '%#CTRL#{ctrl.Name}%'"
|
||||||
DTCONTROLS.Select(oExpression).CopyToDataTable(filteredData, LoadOption.PreserveChanges)
|
DTCONTROLS.Select(oExpression).CopyToDataTable(filteredData, LoadOption.PreserveChanges)
|
||||||
If filteredData.Rows.Count = 1 Then
|
If filteredData.Rows.Count = 1 Then
|
||||||
AddHandler lookup.EditValueChanged, AddressOf onLookUp1
|
AddHandler lookup.SelectedValuesChanged, AddressOf onLookUp1
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -355,15 +355,15 @@ Public Class frmMassValidator
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub onLookUp1(sender As Object, e As System.EventArgs)
|
Public Sub onLookUp1(sender As Object, SelectedValues As List(Of String))
|
||||||
If FORM_Shown = False Then
|
If FORM_Shown = False Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Dim oLookup As LookupControl2 = sender
|
Dim oLookup As LookupControl2 = sender
|
||||||
Try
|
Try
|
||||||
If Not IsNothing(oLookup.SelectedValues) Then
|
If Not IsNothing(SelectedValues) Then
|
||||||
If oLookup.SelectedValues.Count = 1 Then
|
If SelectedValues.Count = 1 Then
|
||||||
Dim oLOOKUPValue = oLookup.SelectedValues.Item(0)
|
Dim oLOOKUPValue = SelectedValues.Item(0)
|
||||||
Dim oLOOKUPName = oLookup.Name
|
Dim oLOOKUPName = oLookup.Name
|
||||||
|
|
||||||
Dim oControlID = oLookup.Tag
|
Dim oControlID = oLookup.Tag
|
||||||
|
|||||||
@ -780,7 +780,8 @@ Public Class frmValidator
|
|||||||
Dim oExpression = $"SQL_UEBERPRUEFUNG like '%#CTRL#{ctrl.Name}%'"
|
Dim oExpression = $"SQL_UEBERPRUEFUNG like '%#CTRL#{ctrl.Name}%'"
|
||||||
DTCONTROLS.Select(oExpression).CopyToDataTable(filteredData, LoadOption.PreserveChanges)
|
DTCONTROLS.Select(oExpression).CopyToDataTable(filteredData, LoadOption.PreserveChanges)
|
||||||
If filteredData.Rows.Count = 1 Then
|
If filteredData.Rows.Count = 1 Then
|
||||||
AddHandler lookup.EditValueChanged, AddressOf onLookUp1
|
'AddHandler lookup.EditValueChanged, AddressOf onLookUp1
|
||||||
|
AddHandler lookup.SelectedValuesChanged, AddressOf onLookUp1
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@ -1002,15 +1003,15 @@ Public Class frmValidator
|
|||||||
|
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub onLookUp1(sender As Object, e As System.EventArgs)
|
Public Sub onLookUp1(sender As Object, SelectedValues As List(Of String))
|
||||||
If FormLoaded = False Then
|
If FormLoaded = False Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Dim oLookup As LookupControl2 = sender
|
Dim oLookup As LookupControl2 = sender
|
||||||
Try
|
Try
|
||||||
If Not IsNothing(oLookup.SelectedValues) Then
|
If Not IsNothing(SelectedValues) Then
|
||||||
If oLookup.SelectedValues.Count = 1 Then
|
If SelectedValues.Count = 1 Then
|
||||||
Dim oLOOKUPValue = oLookup.SelectedValues.Item(0)
|
Dim oLOOKUPValue = SelectedValues.Item(0)
|
||||||
Dim oLOOKUPName = oLookup.Name
|
Dim oLOOKUPName = oLookup.Name
|
||||||
|
|
||||||
Dim oControlID = oLookup.Tag
|
Dim oControlID = oLookup.Tag
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user