Vor ClassFolderwatcher delete
This commit is contained in:
@@ -4,6 +4,7 @@ Imports System.Security.Principal
|
||||
Imports System.Data.SqlClient
|
||||
Imports Oracle.ManagedDataAccess.Client
|
||||
Imports DigitalData.Modules.Windream
|
||||
Imports System.ComponentModel
|
||||
|
||||
Public Class frmWM_IndexFile
|
||||
Dim droptype As String
|
||||
@@ -11,6 +12,7 @@ Public Class frmWM_IndexFile
|
||||
Dim MULTIFILES As Integer = 0
|
||||
Dim formloaded As Boolean = False
|
||||
Dim DTVWPMO_DOKUMENTTYPES As DataTable
|
||||
Dim FILE_WORKED As Boolean = False
|
||||
|
||||
Public Class SW
|
||||
Public label As String
|
||||
@@ -140,10 +142,10 @@ Public Class frmWM_IndexFile
|
||||
End If
|
||||
|
||||
sw.Done()
|
||||
If DT_AUTO_INDEXE Is Nothing = False Then 'CHECK DD
|
||||
If DT_AUTO_INDEXE.Rows.Count > 0 Then
|
||||
Dim Count As Integer = 0
|
||||
For Each row As DataRow In DT_AUTO_INDEXE.Rows
|
||||
If DT_AUTO_INDEXE Is Nothing = False Then 'CHECK DD
|
||||
If DT_AUTO_INDEXE.Rows.Count > 0 Then
|
||||
Dim Count As Integer = 0
|
||||
For Each row As DataRow In DT_AUTO_INDEXE.Rows
|
||||
Dim oAutoIndexname = row.Item("INDEXNAME").ToString
|
||||
Dim oAutoIndexValue = row.Item("VALUE")
|
||||
If oAutoIndexValue.ToString.StartsWith("@") Then
|
||||
@@ -372,7 +374,7 @@ Public Class frmWM_IndexFile
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
Sub Handle_File(doctype_id As Integer)
|
||||
Private Function Handle_File(doctype_id As Integer) As Boolean
|
||||
Try
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
SaveMySettingsValue("WD_IndexDeleteDocs", WD_IndexDeleteDocs, "ConfigMain")
|
||||
@@ -387,6 +389,7 @@ Public Class frmWM_IndexFile
|
||||
If Not DTFiles2Work Is Nothing Then
|
||||
Dim err = False
|
||||
For Each filerow As DataRow In DTFiles2Work.Rows
|
||||
FILE_WORKED = False
|
||||
CURRENT_FILEID = filerow.Item("GUID")
|
||||
CURRENT_FILENAME = filerow.Item("FILENAME2WORK")
|
||||
Dim HandleType As String = filerow.Item("HANDLE_TYPE")
|
||||
@@ -403,6 +406,8 @@ Public Class frmWM_IndexFile
|
||||
If WORK_FILE(CURRENT_FILENAME, Me.PATHTextBox.Text, doctype_id, My.Settings.WD_INDEXDOKART_SAVE, True) = False Then
|
||||
err = True
|
||||
Exit For
|
||||
Else
|
||||
FILE_WORKED = True
|
||||
End If
|
||||
Next
|
||||
Me.Cursor = Cursors.Default
|
||||
@@ -415,6 +420,7 @@ Public Class frmWM_IndexFile
|
||||
stg1 = "Success:"
|
||||
End If
|
||||
MsgBox(stg, MsgBoxStyle.Information, stg1)
|
||||
FILE_WORKED = True
|
||||
Me.Close()
|
||||
End If
|
||||
End If
|
||||
@@ -424,6 +430,7 @@ Public Class frmWM_IndexFile
|
||||
Else 'No MULTI INDEX
|
||||
If WORK_FILE(Me.txtFilepath.Text, Me.PATHTextBox.Text, doctype_id, My.Settings.WD_INDEXDOKART_SAVE, False) = True Then
|
||||
NEW_FILES_ADDED = True
|
||||
FILE_WORKED = True
|
||||
Me.Close()
|
||||
Else
|
||||
MessageBox.Show("Import to windream was not successful." & vbNewLine & "Check the log for further information!", "Unexpected Error in windream-Stream:", MessageBoxButtons.OK, MessageBoxIcon.Error)
|
||||
@@ -433,7 +440,7 @@ Public Class frmWM_IndexFile
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Indexing_File:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
End Sub
|
||||
End Function
|
||||
Private Sub cmbDokumentart_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbDokumentart.SelectedIndexChanged
|
||||
Try
|
||||
CURRENT_DOKARTID = 0
|
||||
@@ -1067,7 +1074,7 @@ Public Class frmWM_IndexFile
|
||||
ElseIf HandleType = "SCAM" Then
|
||||
droptype = "scan"
|
||||
End If
|
||||
Dim sql = String.Format("SELECT FORMVIEW_ID, FORM_ID, FORM_TITLE, DOKUMENTTYPE_ID, DOKUMENTTYPE, PATH, SHORTNAME, OBJECT_TYPE, FW_DOCTYPE_ID FROM VWPMO_DOKUMENTTYPES WHERE (FORMVIEW_ID = {0}) " & _
|
||||
Dim sql = String.Format("SELECT FORMVIEW_ID, FORM_ID, FORM_TITLE, DOKUMENTTYPE_ID, DOKUMENTTYPE, PATH, SHORTNAME, OBJECT_TYPE, FW_DOCTYPE_ID FROM VWPMO_DOKUMENTTYPES WHERE (FORMVIEW_ID = {0}) " &
|
||||
"ORDER BY SEQUENCE, DOKUMENTTYPE", CURRENT_FORMVIEW_ID)
|
||||
DTVWPMO_DOKUMENTTYPES = MYDB_ECM.GetDatatable(sql)
|
||||
|
||||
@@ -1147,4 +1154,11 @@ Public Class frmWM_IndexFile
|
||||
Private Sub txtSubfolder_TextChanged(sender As Object, e As EventArgs) Handles txtSubfolder.TextChanged
|
||||
CURRENT_SUBFOLDER = txtSubfolder.Text
|
||||
End Sub
|
||||
|
||||
Private Sub frmWM_IndexFile_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
|
||||
If FILE_WORKED = False Then
|
||||
Dim oDelete = "DELETE FROM TBPMO_FILES_USER WHERE GUID = " & CURRENT_FILEID
|
||||
MYDB_ECM.ExecuteNonQuery(oDelete)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user