LookUpControl Width wider

This commit is contained in:
Developer01
2025-05-02 08:32:19 +02:00
parent e8877ffc99
commit 21777d216b
6 changed files with 783 additions and 642 deletions

View File

@@ -1,4 +1,5 @@
Imports DigitalData.Modules.EDMI.API.Constants
Imports DevExpress.DataAccess.Native.Json
Imports DigitalData.Modules.EDMI.API.Constants
Imports DigitalData.Modules.EDMI.API.DatabaseWithFallback
Public Class ClassFinalizeDoc
@@ -18,10 +19,11 @@ Public Class ClassFinalizeDoc
'Jetzt finale Indexe setzen
LOGGER.Debug("working final indices for doc: " & WMObject.aName)
For Each dr As DataRow In CURRENT_DT_FINAL_INDEXING.Rows
Dim value As String = dr.Item("VALUE").ToString
Dim ovalueString As String = dr.Item("VALUE").ToString
Dim INDEXNAME = dr.Item("INDEXNAME").ToString
Dim oContinueOnIndifferentState As Boolean = CBool(dr.Item("CONTINUE_INDETERMINED"))
If value.ToUpper = "SQL-Command".ToUpper Then '###### Indexierung mit variablen SQL ###
Dim VektorBeahaviour = dr.Item("IF_VEKTOR_BEHAVIOUR").ToString
If ovalueString.ToUpper = "SQL-Command".ToUpper Then '###### Indexierung mit variablen SQL ###
LOGGER.Debug("indexing with dynamic sql...")
'Dim SQL_COMMAND = dr.Item("SQL_COMMAND")
'' Regulären Ausdruck zum Auslesen der Indexe definieren
@@ -52,32 +54,32 @@ Public Class ClassFinalizeDoc
LOGGER.Debug("sql after ReplaceAllValues: " & sql_Statement)
Dim oDynamic_value = DatabaseFallback.GetScalarValueECM(sql_Statement) ', CONNECTION_STRING_ECM, "Write_Final_Metadata/dynamic_value")
If Not IsNothing(oDynamic_value) Then
value = oDynamic_value
ovalueString = oDynamic_value
Else
Continue For
End If
Else
If value.StartsWith("v") Then
If ovalueString.StartsWith("v") Then
Select Case dr.Item("VALUE").ToString
Case "vDate"
value = Now.ToShortDateString
ovalueString = Now.ToShortDateString
Case "vUserName"
value = USER_USERNAME
ovalueString = USER_USERNAME
Case Else
value = dr.Item("VALUE")
ovalueString = dr.Item("VALUE")
End Select
End If
End If
Dim result() As String
ReDim Preserve result(0)
result(0) = value
result(0) = ovalueString
Dim oIndexType = WINDREAM.GetTypeOfIndex(INDEXNAME)
LOGGER.Debug($"oIndexType {oIndexType.ToString}")
If oIndexType > 4000 And oIndexType < 5000 Then
'Hier muss nun separat als Vektorfeld indexiert werden
If Indexiere_VektorfeldPM(value, INDEXNAME, WMObject) = True Then
If Indexiere_VektorfeldPM(ovalueString, INDEXNAME, WMObject) = True Then
LOGGER.Debug("FINALER INDEX '" & INDEXNAME.Replace("[%VKT", "") & "' WURDE ERFOLGREICH GESETZT")
Else
@@ -87,12 +89,13 @@ Public Class ClassFinalizeDoc
End If
Else
LOGGER.Debug("now indexing..")
If Indexiere_File(INDEXNAME, result, WMObject) = True Then
If WINDREAM_MOD.SetFileIndex(CURRENT_DOC_PATH, INDEXNAME, ovalueString, CURRENT_WMObjecttype) = True Then 'Indexiere_File(INDEXNAME, result, WMObject) = True Then
LOGGER.Debug("FINALER INDEX '" & INDEXNAME & "' WURDE ERFOLGREICH GESETZT")
LOGGER.Debug("")
'Nun das Logging
If CURRENT_PROFILE_LOG_INDEX <> "" Then
Dim logstr = Return_LOGString(value, "DDFINALINDEX", INDEXNAME)
Dim logstr = Return_LOGString(ovalueString, "DDFINALINDEX", INDEXNAME)
Indexiere_VektorfeldPM(logstr, CURRENT_PROFILE_LOG_INDEX, WMObject)
End If
@@ -120,39 +123,73 @@ Public Class ClassFinalizeDoc
End Try
End Function
Private Shared Function Indexiere_File(idxxname As String, idxvalue As Object, WMObject As WINDREAMLib.WMObject)
Dim File_indexiert As Boolean = False
Private Shared Function Indexiere_File(pIndexName As String, pIndexValues As Object, WMObject As WINDREAMLib.WMObject) As Boolean
LOGGER.Debug("### Indexiere_File Begin ###")
Dim indexierung_erfolgreich As Boolean = False
Try
Dim oIndexType As Integer = WINDREAM_MOD.GetIndexType(pIndexName)
If oIndexType > 4095 Then
LOGGER.Debug("Es Handelt sich um einen VektorIndex...")
Dim oExistingItems = WINDREAM_MOD.GetIndexValue(CURRENT_DOC_PATH, pIndexName)
Dim oListofString As New List(Of String)
If pIndexValues.Length = 0 Then
LOGGER.Debug("oSplitArray.Length = 0")
oListofString.Add(pIndexValues(0))
Else
LOGGER.Debug($"pIndexValues.Length is > 0 [{pIndexValues.length}] ...")
For Each oStr In pIndexValues
LOGGER.Debug("pIndexValues - oString : {0}", oStr)
oListofString.Add(oStr)
Next
End If
If oExistingItems.Count > 0 Then
LOGGER.Debug("oOverwrite = False and WMObject already contains [{0}] values in attribute,Values will be concatted", oExistingItems.Count)
oListofString = oExistingItems.Concat(oListofString).ToList()
End If
oListofString = oListofString.Distinct().ToList()
indexierung_erfolgreich = WINDREAM_MOD.SetFileIndexLoS(CURRENT_DOC_PATH, pIndexName, oListofString, CURRENT_WMObjecttype)
Else
Dim oStringValue As String = pIndexValues(0).ToString
indexierung_erfolgreich = WINDREAM_MOD.SetFileIndex(CURRENT_DOC_PATH, pIndexName, oStringValue, CURRENT_WMObjecttype)
End If
Return indexierung_erfolgreich
Catch ex As Exception
LOGGER.Warn("Unvorhergesehener Fehler bei Indexiere_File: " & ex.Message.ToString)
Return False
End Try
' Try
'Die Arrays vorbereiten
Dim arrIndex() As String = Nothing
Dim arrValue() As String = Nothing
arrIndex = Nothing
arrValue = Nothing
'Den Indexnamen übergeben
ReDim Preserve arrIndex(0)
arrIndex(0) = idxxname
'Das Array der Idnexwerte überprüfen
If idxvalue Is Nothing = False Then
If idxvalue.Length() > 1 Then
LOGGER.Debug("Indexing Index '" & idxxname & "' with Arrayvalue")
Dim anzahl As Integer = 0
For Each indexvalue As String In idxvalue
ReDim Preserve arrValue(anzahl)
arrValue(anzahl) = indexvalue
anzahl += 1
Next
Else
LOGGER.Debug("Indexing Index '" & idxxname & "' with value '" & idxvalue(0) & "'")
ReDim Preserve arrValue(0)
arrValue(0) = idxvalue(0).ToString
End If
'Dim _windreamPM As New ClassPMWindream
'Jetzt das eigentliche Indexieren der Datei
File_indexiert = WINDREAM.RunIndexing(WMObject, arrIndex, arrValue)
''Die Arrays vorbereiten
'Dim arrIndex() As String = Nothing
'Dim arrValue() As String = Nothing
'arrIndex = Nothing
'arrValue = Nothing
''Den Indexnamen übergeben
'ReDim Preserve arrIndex(0)
'arrIndex(0) = idxxname
''Das Array der Idnexwerte überprüfen
'If idxvalue Is Nothing = False Then
' If idxvalue.Length() > 1 Then
' LOGGER.Debug("Indexing Index '" & idxxname & "' with Arrayvalue")
' Dim anzahl As Integer = 0
' For Each indexvalue As String In idxvalue
' ReDim Preserve arrValue(anzahl)
' arrValue(anzahl) = indexvalue
' anzahl += 1
' Next
' Else
' LOGGER.Debug("Indexing Index '" & idxxname & "' with value '" & idxvalue(0) & "'")
' ReDim Preserve arrValue(0)
' arrValue(0) = idxvalue(0).ToString
' End If
' 'Dim _windreamPM As New ClassPMWindream
' 'Jetzt das eigentliche Indexieren der Datei
'File_indexiert = WINDREAM.RunIndexing(WMObject, arrIndex, arrValue)
Return File_indexiert
End If
'Return File_indexiert
' End If
'Catch ex As Exception
' LOGGER.Info("Unvorhergesehener Fehler bei Indexiere_File: " & ex.Message.ToString, True)