MS V 2.6.9 Indexierung Vektorfeld mit Vektor

This commit is contained in:
Developer01
2024-08-23 09:36:18 +02:00
parent 8c824f3f59
commit 48d21617c9
5 changed files with 105 additions and 62 deletions

View File

@@ -208,24 +208,16 @@ Public Class ClassPatterns
If oFoundControl IsNot Nothing Then
Dim oValue As String = String.Empty
Dim oTypeString = oFoundControl
LOGGER.Debug("Found Control [{0}], continuing with setting value..", oFoundControl.Name)
If TypeOf oFoundControl Is TextEdit Then
Try
oValue = DirectCast(oFoundControl, TextEdit).Text
Catch ex As Exception
LOGGER.Error(ex)
LOGGER.Warn("Control Value for TextBox [{0}] could not be retrieved!", oFoundControl.Name)
End Try
ElseIf TypeOf oFoundControl Is CheckBox Then
Try
oValue = IIf(DirectCast(oFoundControl, CheckBox).Checked, 1, 0)
Catch ex As Exception
LOGGER.Error(ex)
LOGGER.Warn("Control Value for CheckBox [{0}] could not be retrieved!", oFoundControl.Name)
End Try
ElseIf TypeOf oFoundControl Is LookupControl3 Then
If TypeOf (oFoundControl) Is LookupControl3 Then
LOGGER.Debug("oTypeString LookupControl3")
ElseIf TypeOf (oFoundControl) Is Checkbox Then
LOGGER.Debug("oTypeString CheckBox")
ElseIf TypeOf (oFoundControl) Is TextEdit Then
LOGGER.Debug("oTypeString TextEdit")
End If
If TypeOf (oFoundControl) Is LookupControl3 Then
Try
Dim oLookupControl = DirectCast(oFoundControl, LookupControl3)
@@ -234,8 +226,19 @@ Public Class ClassPatterns
Case ClassConstants.INDEX_TYPE_INTEGER
oValue = String.Join(",", oLookupControl.Properties.SelectedValues)
Case ClassConstants.INDEX_TYPE_VARCHAR
Dim oWrapped = oLookupControl.Properties.SelectedValues
oValue = String.Join(",", oWrapped)
Dim oIndex As Integer = 0
For Each oString As String In oLookupControl.Properties.SelectedValues
If oIndex = 0 Then
oValue = "'" + oString + "'"
Else
oValue += ", '" + oString + "'"
End If
oIndex += 1
Next
'Dim oWrapped = oLookupControl.Properties.SelectedValues
'oValue = String.Join(",", oWrapped)
Case Else
LOGGER.Warn("Lookup Control with [{0}] is not supported!", oFoundType)
End Select
@@ -246,6 +249,20 @@ Public Class ClassPatterns
LOGGER.Error(ex)
LOGGER.Warn("Control Value for LookupControl3 [{0}] could not be retrieved!", oFoundControl.Name)
End Try
ElseIf TypeOf (oFoundControl) Is TextEdit Then
Try
oValue = DirectCast(oFoundControl, TextEdit).Text
Catch ex As Exception
LOGGER.Error(ex)
LOGGER.Warn("Control Value for TextBox [{0}] could not be retrieved!", oFoundControl.Name)
End Try
ElseIf TypeOf (oFoundControl) Is CheckBox Then
Try
oValue = IIf(DirectCast(oFoundControl, CheckBox).Checked, 1, 0)
Catch ex As Exception
LOGGER.Error(ex)
LOGGER.Warn("Control Value for CheckBox [{0}] could not be retrieved!", oFoundControl.Name)
End Try
Else
LOGGER.Debug("Unknown Control type for type [{0}], setting value to empty string.", oFoundControl.Name)
oValue = ""