jj: Write Vector fields \o/

This commit is contained in:
Jonathan Jenne
2018-10-29 13:26:57 +01:00
parent ac8709a0f9
commit 52966dcc47
10 changed files with 290 additions and 264 deletions

View File

@@ -608,6 +608,7 @@ Public Class frmIndex
AddHandler lookupButton.Click, Sub()
Dim frm As New frmLookupGrid()
frm.FormBorderStyle = FormBorderStyle.SizableToolWindow
frm.MultiSelect = False
frm.DataSource = table
frm.StartPosition = FormStartPosition.Manual
@@ -907,8 +908,9 @@ Public Class frmIndex
End If
If ctrl.Name.StartsWith("cmbMulti") Then
Dim cmbMulti As DevExpress.XtraEditors.GridLookUpEdit = ctrl
Dim values As List(Of Object) = cmbMulti.Properties.DataSource
If cmbMulti.Text = "" Then
If values.Count = 0 Then
Dim optional_index As Boolean = ClassDatabase.Execute_Scalar("SELECT OPTIONAL FROM TBDD_INDEX_MAN WHERE DOK_ID = " & dokartid & " AND NAME = '" & Replace(cmbMulti.Name, "cmbMulti", "") & "'", MyConnectionString, True)
If optional_index = False Then
@@ -920,9 +922,25 @@ Public Class frmIndex
result = True
End If
Else
Indexwert_Postprocessing(Replace(cmbMulti.Name, "cmbMulti", ""), cmbMulti.Text)
result = True
Dim vectorValue = String.Join(";", values)
Indexwert_Postprocessing(Replace(cmbMulti.Name, "cmbMulti", ""), vectorValue)
End If
'If cmbMulti.Text = "" Then
' Dim optional_index As Boolean = ClassDatabase.Execute_Scalar("SELECT OPTIONAL FROM TBDD_INDEX_MAN WHERE DOK_ID = " & dokartid & " AND NAME = '" & Replace(cmbMulti.Name, "cmbMulti", "") & "'", MyConnectionString, True)
' If optional_index = False Then
' MsgBox("Bitte wählen Sie einen Wert aus der Combobox.", MsgBoxStyle.Exclamation)
' cmbMulti.Focus()
' Return False
' Else
' Indexwert_Postprocessing(Replace(cmbMulti.Name, "cmbMulti", ""), "")
' result = True
' End If
'Else
' Indexwert_Postprocessing(Replace(cmbMulti.Name, "cmbMulti", ""), cmbMulti.Text)
' result = True
'End If
ElseIf ctrl.Name.StartsWith("cmbSingle") Then
Dim cmbSingle As TextBox = ctrl
@@ -1308,14 +1326,25 @@ Public Class frmIndex
If LogErrorsOnly = False Then ClassLogger.Add(" >> Manueller Indexvalue: " & idxvalue.ToString, False)
Count += 1
indexierung_erfolgreich = ClassWindream.DateiIndexieren(CURRENT_NEWFILENAME, indexname, idxvalue)
' den Typ des Zielindexes auslesen
Dim indexType As Integer = ClassWindream.GetTypeOfIndexAsIntByName(indexname)
If indexType < ClassWindream.WMObjectVariableValueTypeVector Then
indexierung_erfolgreich = ClassWindream.DateiIndexieren(CURRENT_NEWFILENAME, indexname, idxvalue)
Else
Dim indexArray = Split(idxvalue, ";")
indexierung_erfolgreich = ClassWindream.Indexiere(CURRENT_NEWFILENAME.Substring(2), indexname, indexArray)
End If
'indexierung_erfolgreich = ClassWindream.DateiIndexieren(CURRENT_NEWFILENAME, indexname, idxvalue)
If indexierung_erfolgreich = False Then
MsgBox("Error in Indexing file - See log", MsgBoxStyle.Critical)
Return False
Exit For
End If
Else
If LogErrorsOnly = False Then
If LogErrorsOnly = False Then
ClassLogger.Add(" >> No Indexing: indexname: " & indexname, False)
ClassLogger.Add(" >> No Indexing: is optional? " & optional_Index.ToString, False)
End If