jj: vector fields support for name generation and auto index
This commit is contained in:
parent
d35106f7d6
commit
e9da638521
@ -931,11 +931,6 @@ Public Class ClassWindream
|
||||
|
||||
End If
|
||||
|
||||
'indexe &= indexname & " = " & werte & vbNewLine
|
||||
'Der Indexierungsvorgang
|
||||
' Dim indexErgebnis As ArrayList = Indexiere(filenameZiel, _Indexname, werte)
|
||||
'Me.singleInfoNode.Insert(0, Me.singleInfoNode(1))
|
||||
'Me.singleInfoNode.Insert(0, Me.singleInfoNode(0))
|
||||
Dim arrIndex() As String = Nothing
|
||||
Dim arrValue() As String = Nothing
|
||||
ReDim Preserve arrIndex(0)
|
||||
@ -944,8 +939,6 @@ Public Class ClassWindream
|
||||
arrValue(0) = _Value
|
||||
Return RunIndexing(WMObject, arrIndex, arrValue)
|
||||
|
||||
'MsgBox(arr(0) & vbNewLine & indexe)
|
||||
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Hinweis: Die Datei " & WD_File & " konnte nicht indexiert werden.")
|
||||
ClassLogger.Add("Fehler: " & ex.Message)
|
||||
@ -1148,6 +1141,8 @@ Public Class ClassWindream
|
||||
|
||||
Dim myArray()
|
||||
|
||||
|
||||
|
||||
'For Each row As DataRow In DT.Rows
|
||||
'MsgBox(aName & vbNewLine & row.Item("Indexname") & vbNewLine & CStr(row.Item("Wert")))
|
||||
'Next
|
||||
@ -1192,6 +1187,22 @@ Public Class ClassWindream
|
||||
|
||||
'Immer anfügen
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Check Existing Vektorvalues", False)
|
||||
|
||||
Dim indicies As New List(Of Object)
|
||||
|
||||
For Each element In myArray
|
||||
If TypeOf element Is String Then
|
||||
Dim splitted = element.ToString.Split(ClassConstants.VECTORSEPARATOR)
|
||||
For Each s In splitted
|
||||
indicies.Add(s)
|
||||
Next
|
||||
Else
|
||||
indicies.Add(element)
|
||||
End If
|
||||
Next
|
||||
|
||||
myArray = indicies.ToArray()
|
||||
|
||||
VektorArray = Return_VektorArray(oDocument, aName, myArray)
|
||||
|
||||
If VektorArray Is Nothing = False Then
|
||||
@ -1207,12 +1218,6 @@ Public Class ClassWindream
|
||||
oDocument.Save()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Else
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Vektorfeld wird mit MEHREREN Werten gefüllt ", False)
|
||||
' das ausgewählte Profil in _selectedProfile laden
|
||||
@ -1289,16 +1294,8 @@ Public Class ClassWindream
|
||||
oDocument.Save()
|
||||
Return True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
i += 1
|
||||
@ -1419,7 +1416,8 @@ Public Class ClassWindream
|
||||
''' <summary>
|
||||
''' Führt das eigendliche Indexieren aus
|
||||
''' </summary>
|
||||
''' <param name="filenameZiel">Dateiname der zu indexierenden Datei</param>
|
||||
''' <param name="filenameZiel">
|
||||
''' der zu indexierenden Datei</param>
|
||||
''' <param name="index">Name des zu indexierenden Indexfeldes</param>
|
||||
''' <param name="werte">Der Wert/die Werte die dem Index zugewiesen werden sollen</param>
|
||||
''' <returns>Liefert True wenn das Indexieren erfolgreich war, sonst False</returns>
|
||||
|
||||
@ -1131,7 +1131,9 @@ Public Class frmIndex
|
||||
Dim optional_index As Boolean = ClassDatabase.Execute_Scalar("SELECT OPTIONAL FROM TBDD_INDEX_MAN WHERE DOK_ID = " & CURRENT_DOKART_ID & " AND UPPER(NAME) = UPPER('" & Indexname & "')", MyConnectionString, True)
|
||||
Dim value As String = GetManIndex_Value(Indexname, "FILE", optional_index)
|
||||
If value <> String.Empty Then
|
||||
DATEINAME = DATEINAME.Replace(element.Value, value)
|
||||
Dim firstVectorValue = value.Split(ClassConstants.VECTORSEPARATOR).First()
|
||||
|
||||
DATEINAME = DATEINAME.Replace(element.Value, firstVectorValue)
|
||||
NewFileString = DATEINAME
|
||||
sql_history_INSERT_INTO = sql_history_INSERT_INTO & ", INDEX" & AnzahlIndexe.ToString
|
||||
AnzahlIndexe += 1
|
||||
@ -1382,6 +1384,17 @@ Public Class frmIndex
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Auto Indexname: " & indexname.ToString, False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Indexvalue: " & Indexvalue.ToString, False)
|
||||
Count += 1
|
||||
|
||||
' den Typ des Zielindexes auslesen
|
||||
Dim indexType As Integer = ClassWindream.GetTypeOfIndexAsIntByName(indexname)
|
||||
|
||||
If indexType < ClassWindream.WMObjectVariableValueTypeVector Then
|
||||
indexierung_erfolgreich = ClassWindream.DateiIndexieren(CURRENT_NEWFILENAME, indexname, Indexvalue)
|
||||
Else
|
||||
Dim indexArray = Split(Indexvalue, ClassConstants.VECTORSEPARATOR)
|
||||
indexierung_erfolgreich = ClassWindream.Indexiere(CURRENT_NEWFILENAME.Substring(2), indexname, indexArray)
|
||||
End If
|
||||
|
||||
indexierung_erfolgreich = ClassWindream.DateiIndexieren(CURRENT_NEWFILENAME, indexname, Indexvalue)
|
||||
If indexierung_erfolgreich = False Then
|
||||
MsgBox("Error in indexing file - See log", MsgBoxStyle.Critical)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user