ComboBOx Optimierung
This commit is contained in:
@@ -1062,16 +1062,19 @@ Public Class frmValidator
|
||||
MyValidationLogger.Debug("SQL HasOnlySimplePatterns!")
|
||||
oSQL = clsPatterns.ReplaceInternalValues(oSQL)
|
||||
oSQL = clsPatterns.ReplaceControlValues(oSQL, PanelValidatorControl, True)
|
||||
'Dim oDT As DataTable = ClassDatabase.Return_Datatable_ConId(oSQL, oCONID, $"CreateControls - oControlID: {oControlID}")
|
||||
Dim oDT As DataTable = DatabaseFallback.GetDatatable(New GetDatatableOptions(oSQL, DatabaseType.ECM) With {
|
||||
.ConnectionId = oCONID
|
||||
})
|
||||
|
||||
If Not IsNothing(oDT) Then
|
||||
Dim oDT As DataTable = GetCachedDatatable(oSQL, oCONID)
|
||||
oComboBox.BeginUpdate()
|
||||
oComboBox.DataSource = Nothing
|
||||
If Not IsNothing(oDT) AndAlso oDT.Rows.Count > 0 Then
|
||||
Dim list As New List(Of String)
|
||||
For Each oRow As DataRow In oDT.Rows
|
||||
oComboBox.Items.Add(oRow.Item(0))
|
||||
list.Add(oRow.Item(0))
|
||||
Next
|
||||
oComboBox.DataSource = list
|
||||
End If
|
||||
oComboBox.SelectedIndex = -1
|
||||
oComboBox.EndUpdate()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MyValidationLogger.Warn($"Unexpected error in CMB GetValues SQL - Error: {ex.Message}")
|
||||
|
||||
Reference in New Issue
Block a user