This commit is contained in:
SchreiberM
2016-03-29 09:52:37 +02:00
parent 58788043c5
commit 49f2dc6f3f
18 changed files with 2619 additions and 815 deletions

View File

@@ -27,7 +27,8 @@ Public Class frmWD_Index_Dokart
Dim sql = "SELECT * FROM TBDD_INDEX_AUTOM WHERE ACTIVE = 1 AND UPPER(INDEXNAME) NOT LIKE UPPER('%ONLY %') AND DOCTYPE_ID = " & vDokart_ID
Dim dt As DataTable = ClassDatabase.Return_Datatable(sql)
Dim indexierung_erfolgreich As Boolean = False
If dt Is Nothing = False Then
'Einbauen dass auch Konfigurationen erlaubt sind wo der Doktyp und der Record fest gestzt sind
If dt Is Nothing = False dd Then
If dt.Rows.Count > 0 Then
Dim Count As Integer = 0
For Each row As DataRow In dt.Rows
@@ -59,6 +60,7 @@ Public Class frmWD_Index_Dokart
dt = ClassDatabase.Return_Datatable(sql)
If Not dt Is Nothing Then
If dt.Rows.Count = 1 Then
'den Entity-Key auslesen
Dim indexname = dt.Rows(0).Item("IDXNAME_ENTITYID").ToString
Dim idxvalue = CURRENT_FORM_ID
If LogErrorsOnly = False Then ClassLogger.Add(" - Entity-ID: " & idxvalue.ToString, False)
@@ -68,6 +70,7 @@ Public Class frmWD_Index_Dokart
MsgBox("Unexpected Error in indexing file Entity - See log", MsgBoxStyle.Critical)
Return False
End If
'den Parent-Key auslesen
indexname = dt.Rows(0).Item("IDXNAME_PARENTID").ToString
idxvalue = CURRENT_PARENT_ID
If LogErrorsOnly = False Then ClassLogger.Add(" - Parent-ID: " & idxvalue.ToString, False)
@@ -77,13 +80,39 @@ Public Class frmWD_Index_Dokart
MsgBox("Unexpected Error in indexing file Parent-ID - See log", MsgBoxStyle.Critical)
Return False
End If
'den Record-Key auslesen
indexname = dt.Rows(0).Item("IDXNAME_RECORDID").ToString
idxvalue = CURRENT_RECORD_ID
If LogErrorsOnly = False Then ClassLogger.Add(" - Record-ID: " & idxvalue.ToString, False)
indexierung_erfolgreich = ClassWindream.DateiIndexieren(CURRENT_FILEIN_WD, indexname, idxvalue)
If indexierung_erfolgreich = False Then
err = True
MsgBox("Unexpected Error in indexing file Record-ID - See log", MsgBoxStyle.Critical)
Return False
End If
'den Doctype-Key auslesen
indexname = dt.Rows(0).Item("IDXNAME_DOCTYPE").ToString
idxvalue = CURRENT_DOKARTSTRING
If LogErrorsOnly = False Then ClassLogger.Add(" - Doctype: " & idxvalue.ToString, False)
indexierung_erfolgreich = ClassWindream.DateiIndexieren(CURRENT_FILEIN_WD, indexname, idxvalue)
If indexierung_erfolgreich = False Then
err = True
MsgBox("Unexpected Error in indexing file Doctype - See log", MsgBoxStyle.Critical)
Return False
End If
End If
End If
If indexierung_erfolgreich = True Then
ClassLogger.Add(">> File was correctly imported and indexed: " & CURRENT_FILEIN_WD, False)
If multiindex = False Then MsgBox("Datei erfolgreich nach windream übertragen", MsgBoxStyle.Information, "Erfolgsmeldung")
Dim stg As String = "Datei erfolgreich nach windream übertragen"
Dim stg1 As String = "Erfolgsmeldung"
If USER_LANGUAGE <> "de-DE" Then
stg = "File was successfully transfered to windream"
stg1 = "Success:"
End If
If multiindex = False Then MsgBox(stg, MsgBoxStyle.Information, stg1)
ClassDatabase.Execute_Scalar("UPDATE TBPMO_FILES_USER SET WORKED = 1 WHERE GUID = " & CURRENT_FILEID)
'frmForm_Constructor.tsstatus_Detail_show(True, "Datei erfolgreich nach windream übertragen")
'Die Originaldatei löschen
If droptype = "dragdrop file" And indexierung_erfolgreich = True Then
If chkdelete_origin.Checked = True Then
@@ -260,7 +289,13 @@ Public Class frmWD_Index_Dokart
Next
Me.Cursor = Cursors.Default
If err = False Then
MsgBox("All files Alle Dateien wurden mit Multiindexing erfolgreich nach windream übertragen!", MsgBoxStyle.Information, "Erfolgsmeldung:")
Dim stg As String = "Alle Dateien wurden mit Multiindexing erfolgreich nach windream übertragen!"
Dim stg1 As String = "Erfolgsmeldung"
If USER_LANGUAGE <> "de-DE" Then
stg = "All files were transferred via Multiindexing to windream"
stg1 = "Success:"
End If
MsgBox(stg, MsgBoxStyle.Information, stg1)
Me.Close()
End If
End If
@@ -322,15 +357,23 @@ Public Class frmWD_Index_Dokart
If dt.Rows.Count = 1 Then
lvwIndices.Items.Add(dt.Rows(0).Item("IDXNAME_ENTITYID").ToString)
lvwIndices.Items(Count).SubItems.Add(CURRENT_FORM_ID)
Count = Count + 1
lvwIndices.Items.Add(dt.Rows(0).Item("IDXNAME_PARENTID").ToString)
Dim ParentID = ClassDatabase.Execute_Scalar("SELECT TOP 1 PARENT_ID FROM TBPMO_FORM WHERE GUID = " & CURRENT_FORM_ID, True)
Try
If IsNumeric(ParentID) And ParentID > 0 Then
lvwIndices.Items(Count + 1).SubItems.Add(ParentID)
lvwIndices.Items(Count).SubItems.Add(ParentID)
End If
Catch ex As Exception
MsgBox("Unexpected Error in Setting Parent-ID" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
Count = Count + 1
'den Record-Key auslesen
lvwIndices.Items.Add(dt.Rows(0).Item("IDXNAME_RECORDID").ToString)
lvwIndices.Items(Count).SubItems.Add(CURRENT_RECORD_ID)
Count = Count + 1
lvwIndices.Items.Add(dt.Rows(0).Item("IDXNAME_DOCTYPE").ToString)
lvwIndices.Items(Count).SubItems.Add(CURRENT_DOKARTSTRING)
End If
End If