This commit is contained in:
SchreiberM
2017-02-07 13:46:55 +01:00
parent e772d0cd57
commit acc6e2ebb3
9 changed files with 122 additions and 66 deletions

View File

@@ -45,7 +45,7 @@ Public Class frmWD_IndexFile
CURRENT_FILEIN_WD = CURRENT_NEWFILENAME
Dim sql = "SELECT * FROM TBDD_INDEX_AUTOM WHERE ACTIVE = 1 AND UPPER(INDEXNAME) NOT LIKE UPPER('%ONLY %') AND SQL_ACTIVE = 0 AND DOCTYPE_ID = " & vDokart_ID
Dim DT_AUTO_INDEXE As DataTable = ClassDatabase.Return_Datatable(sql, True)
Dim indexierung_erfolgreich As Boolean = False
Dim indexierung_erfolgreich As Boolean = True
'Erst die Objekttyp-Indices indexieren
'den Entity-Key auslesen
Dim DT As DataTable
@@ -201,6 +201,7 @@ Public Class frmWD_IndexFile
sql = String.Format("SELECT DocID FROM VWPMO_DOC_SYNC WHERE UPPER(FULL_FILENAME) = UPPER('{0}') AND CONVERT(DATE,Change_DateTime) = CONVERT(DATE,GETDATE())", CURRENT_FILEIN_WD)
CURRENT_DOC_ID = ClassDatabase.Execute_Scalar(sql)
If Not IsNothing(CURRENT_DOC_ID) Then
ClassLogger.Add(String.Format(">> File-Import was finished - DocID: {0} ", CURRENT_DOC_ID), False)
Dim delete = False
'Die Originaldatei löschen
If droptype = "dragdrop file" And indexierung_erfolgreich = True Then
@@ -222,7 +223,6 @@ Public Class frmWD_IndexFile
End If
Next
End If
If clsWindream.Create_Session() = False Then
MsgBox("Could not create a windream-session!", MsgBoxStyle.Critical)
@@ -245,7 +245,6 @@ Public Class frmWD_IndexFile
stg = "Unerwarteter Fehler: Der Record-Link konnte nicht erzeugt werden! Überprüfen Sie das Log."
If USER_LANGUAGE <> "de-DE" Then
stg = "Unexpected Error: Could not create the recordlink! Please check the log."
End If
MsgBox(stg, MsgBoxStyle.Critical, stg1)
End If
@@ -393,14 +392,14 @@ Public Class frmWD_IndexFile
If cmbDokumentart.SelectedIndex <> -1 Then
My.Settings.WD_INDEXDOKART_SAVE = cmbDokumentart.Text
My.Settings.Save()
Indexing_File(cmbDokumentart.SelectedValue)
Handle_File(cmbDokumentart.SelectedValue)
End If
Catch ex As Exception
MsgBox("Unexpected Error in Prepare indexing: " & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Sub Indexing_File(doctype_id As Integer)
Sub Handle_File(doctype_id As Integer)
Try
Me.Cursor = Cursors.WaitCursor
SaveMySettingsValue("WD_IndexDeleteDocs", WD_IndexDeleteDocs, "ConfigMain")