MS_07.03.2016
This commit is contained in:
@@ -80,6 +80,7 @@ Public Class frmWD_Index_Dokart
|
||||
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")
|
||||
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")
|
||||
@@ -211,62 +212,66 @@ Public Class frmWD_Index_Dokart
|
||||
|
||||
Private Sub btnindex_Click(sender As Object, e As EventArgs) Handles btnindex.Click
|
||||
If CURRENT_RECORD_ID = 0 Then
|
||||
MsgBox("No Record chosen or the docuemnttype was not chosen!", MsgBoxStyle.Information)
|
||||
MsgBox("No Record chosen or the documenttype was not chosen!", MsgBoxStyle.Information)
|
||||
Exit Sub
|
||||
End If
|
||||
If lvwIndices.Items.Count = 0 Then
|
||||
MsgBox("Bitte eine Dokumentart wählen!", MsgBoxStyle.Information)
|
||||
MsgBox("Please choose a documenttxpe!", MsgBoxStyle.Information)
|
||||
Exit Sub
|
||||
End If
|
||||
Indexing_File()
|
||||
If cmbDokumentart.SelectedIndex <> -1 Then
|
||||
My.Settings.WD_INDEXDOKART_SAVE = cmbDokumentart.Text
|
||||
My.Settings.Save()
|
||||
Indexing_File(cmbDokumentart.SelectedValue)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Sub Indexing_File()
|
||||
Sub Indexing_File(doctype_id As Integer)
|
||||
Try
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
SaveMySettingsValue("WD_IndexDeleteDocs", WD_IndexDeleteDocs, "ConfigMain")
|
||||
|
||||
If cmbDokumentart.SelectedIndex <> -1 Then
|
||||
My.Settings.WD_INDEXDOKART_SAVE = cmbDokumentart.Text
|
||||
My.Settings.Save()
|
||||
ClassWindream._WDObjekttyp = Me.OBJECT_TYPETextBox.Text
|
||||
If chkMultiIndexer.Visible = True And chkMultiIndexer.Checked = True Then
|
||||
'Die erste Datei indexieren
|
||||
If WORK_FILE(Me.txtFilepath.Text, Me.PATHTextBox.Text, cmbDokumentart.SelectedValue, cmbDokumentart.Text, True) = True Then
|
||||
'Und nun die folgenden
|
||||
Dim DTFiles2Work As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBPMO_FILES_USER WHERE WORKED = 0 AND GUID <> " & CURRENT_FILEID & " AND UPPER(USER_WORK) = UPPER('" & Environment.UserName & "')")
|
||||
If Not DTFiles2Work Is Nothing Then
|
||||
Dim err = False
|
||||
For Each filerow As DataRow In DTFiles2Work.Rows
|
||||
CURRENT_FILEID = filerow.Item("GUID")
|
||||
CURRENT_FILENAME = filerow.Item("FILENAME2WORK")
|
||||
Dim HandleType As String = filerow.Item("HANDLE_TYPE")
|
||||
aktFiledropped = CURRENT_FILENAME
|
||||
If HandleType = "@DROPFROMFSYSTEM@" Then
|
||||
droptype = "dragdrop file"
|
||||
ElseIf HandleType = "@OUTLOOK_ATTMNT@" Then
|
||||
droptype = "dragdrop attachment"
|
||||
ElseIf HandleType = "@OUTLOOKMESSAGE@" Then
|
||||
droptype = "dragdrop message"
|
||||
End If
|
||||
If WORK_FILE(CURRENT_FILENAME, Me.PATHTextBox.Text, cmbDokumentart.SelectedValue, cmbDokumentart.Text, True) = False Then
|
||||
err = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Me.Cursor = Cursors.Default
|
||||
If err = False Then
|
||||
MsgBox("All files Alle Dateien wurden mit Multiindexing erfolgreich nach windream übertragen!", MsgBoxStyle.Information, "Erfolgsmeldung:")
|
||||
Me.Close()
|
||||
|
||||
|
||||
ClassWindream._WDObjekttyp = Me.OBJECT_TYPETextBox.Text
|
||||
If chkMultiIndexer.Visible = True And chkMultiIndexer.Checked = True Then
|
||||
'Die erste Datei indexieren
|
||||
If WORK_FILE(Me.txtFilepath.Text, Me.PATHTextBox.Text, doctype_id, My.Settings.WD_INDEXDOKART_SAVE, True) = True Then
|
||||
'Und nun die folgenden
|
||||
Dim DTFiles2Work As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM TBPMO_FILES_USER WHERE WORKED = 0 AND GUID <> " & CURRENT_FILEID & " AND UPPER(USER_WORK) = UPPER('" & Environment.UserName & "')")
|
||||
If Not DTFiles2Work Is Nothing Then
|
||||
Dim err = False
|
||||
For Each filerow As DataRow In DTFiles2Work.Rows
|
||||
CURRENT_FILEID = filerow.Item("GUID")
|
||||
CURRENT_FILENAME = filerow.Item("FILENAME2WORK")
|
||||
Dim HandleType As String = filerow.Item("HANDLE_TYPE")
|
||||
aktFiledropped = CURRENT_FILENAME
|
||||
If HandleType = "@DROPFROMFSYSTEM@" Then
|
||||
droptype = "dragdrop file"
|
||||
ElseIf HandleType = "@OUTLOOK_ATTMNT@" Then
|
||||
droptype = "dragdrop attachment"
|
||||
ElseIf HandleType = "@OUTLOOKMESSAGE@" Then
|
||||
droptype = "dragdrop message"
|
||||
End If
|
||||
If WORK_FILE(CURRENT_FILENAME, Me.PATHTextBox.Text, doctype_id, My.Settings.WD_INDEXDOKART_SAVE, True) = False Then
|
||||
err = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Me.Cursor = Cursors.Default
|
||||
If err = False Then
|
||||
MsgBox("All files Alle Dateien wurden mit Multiindexing erfolgreich nach windream übertragen!", MsgBoxStyle.Information, "Erfolgsmeldung:")
|
||||
Me.Close()
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
Else
|
||||
If WORK_FILE(Me.txtFilepath.Text, Me.PATHTextBox.Text, cmbDokumentart.SelectedValue, cmbDokumentart.Text, False) = True Then Me.Close()
|
||||
|
||||
|
||||
End If
|
||||
Me.Cursor = Cursors.Default
|
||||
Else
|
||||
If WORK_FILE(Me.txtFilepath.Text, Me.PATHTextBox.Text, doctype_id, My.Settings.WD_INDEXDOKART_SAVE, False) = True Then Me.Close()
|
||||
End If
|
||||
Me.Cursor = Cursors.Default
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Indexing_File:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
Reference in New Issue
Block a user