MS ReadOnly auch indexieren, ComboboxHandling

This commit is contained in:
SchreiberM 2021-03-17 13:28:05 +01:00
parent ec20b64500
commit 6a9e573900

View File

@ -660,11 +660,20 @@ Public Class frmValidator
MsgBox("Error in LoadSQLData: " & ex.Message, MsgBoxStyle.Critical, ADDITIONAL_TITLE) MsgBox("Error in LoadSQLData: " & ex.Message, MsgBoxStyle.Critical, ADDITIONAL_TITLE)
End Try End Try
End Sub End Sub
Private Function PreventNulletc(myObject As Object) Private Function PreventNulletc(myObject As Object, pType As String)
If IsDBNull(myObject) Then If IsDBNull(myObject) Then
If pType = "String" Then
Return String.Empty Return String.Empty
Else
Return 0
End If
ElseIf IsNothing(myObject) Then ElseIf IsNothing(myObject) Then
If pType = "String" Then
Return String.Empty Return String.Empty
Else
Return 0
End If
Else Else
Return myObject Return myObject
End If End If
@ -731,12 +740,9 @@ Public Class frmValidator
End Sub End Sub
#Region "CONTROL LIST" #Region "CONTROL LIST"
LOGGER.Debug("In add_ComboBox - GUID: " & oControlID) LOGGER.Debug("In add_ComboBox - GUID: " & oControlID)
Dim oCONID Dim oCONID As Integer
Try Try
oCONID = PreventNulletc(oControlRow.Item("CONNECTION_ID")) oCONID = PreventNulletc(oControlRow.Item("CONNECTION_ID"), "Integer")
If oCONID = String.Empty Then
oCONID = 0
End If
Catch ex As Exception Catch ex As Exception
oCONID = 0 oCONID = 0
End Try End Try
@ -753,7 +759,7 @@ Public Class frmValidator
If oCONID > 0 And oCommandSQL_UBPF <> String.Empty Then If oCONID > 0 And oCommandSQL_UBPF <> String.Empty Then
LOGGER.Debug("ConID > 0 And commandsql <> String.Empty") LOGGER.Debug("ConID > 0 And commandsql <> String.Empty")
Try Try
oSQL = PreventNulletc(oControlRow.Item("SQL_UEBERPRUEFUNG")) 'TBPM_PROFILE_CONTROLSTableAdapter.cmdGetSQL(ControlID) oSQL = PreventNulletc(oControlRow.Item("SQL_UEBERPRUEFUNG"), "String") 'TBPM_PROFILE_CONTROLSTableAdapter.cmdGetSQL(ControlID)
If clsPatterns.HasOnlySimplePatterns(oSQL) Then If clsPatterns.HasOnlySimplePatterns(oSQL) Then
LOGGER.Debug("SQL HasOnlySimplePatterns!") LOGGER.Debug("SQL HasOnlySimplePatterns!")
@ -4265,7 +4271,7 @@ Public Class frmValidator
Dim oOVERWRITE_DATA = oControlRow.Item("OVERWRITE_DATA") Dim oOVERWRITE_DATA = oControlRow.Item("OVERWRITE_DATA")
'Nur wenn der Name der Zeile entspricht und der Index READ_ONLY FALSE ist 'Nur wenn der Name der Zeile entspricht und der Index READ_ONLY FALSE ist
If oControlRow.Item("CTRL_NAME") = oControl.Name And (oIsReadOnly = False Or oSQLCheckCommand <> "") And oIndexName <> "DD PM-ONLY FOR DISPLAY" Then If oControlRow.Item("CTRL_NAME") = oControl.Name And oIndexName <> "DD PM-ONLY FOR DISPLAY" Then '(oIsReadOnly = False Or oSQLCheckCommand <> "") And
LOGGER.Debug("Indexierung für Control (" & oControlId & ") '" & oControlName & "' gestartet. Indexname '" & oIndexName & "'") LOGGER.Debug("Indexierung für Control (" & oControlId & ") '" & oControlName & "' gestartet. Indexname '" & oIndexName & "'")
If oIndexName = "" Then If oIndexName = "" Then
LOGGER.Info(" >> Indexname is unexpected empty.") LOGGER.Info(" >> Indexname is unexpected empty.")