This commit is contained in:
SchreiberM
2017-02-01 12:33:22 +01:00
parent 877eaa2411
commit 5023a28d75
52 changed files with 7752 additions and 3992 deletions

View File

@@ -88,20 +88,13 @@ Public Class ClassFolderWatcher
Else
Console.WriteLine("File existiert bereits")
End If
Create_USER_FILE_TABLE()
ClassHelper.Create_USER_FILE_TABLE()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei folder_watch_Created")
End Try
End Sub
Public Shared Sub Create_USER_FILE_TABLE()
Try
Dim sql = String.Format("SELECT * FROM TBPMO_FILES_USER WHERE (UPPER(USER_WORK) = UPPER('{0}')) AND WORKED = 0", USER_USERNAME)
Dim CURRENT_TBPMO_FILES_USER As DataTable = ClassDatabase.Return_Datatable(sql, True)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected error while creating User_File_Table")
End Try
End Sub
Public Shared Function FileExistsinDropTable(Filename As String)
Dim check As String
Try
@@ -117,7 +110,6 @@ Public Class ClassFolderWatcher
Public Shared Function Insert_USER_File(filename As String, handleType As String)
Try
Dim filename_only As String = Path.GetFileName(filename)
Dim ins As String = String.Format("INSERT INTO TBPMO_FILES_USER (FILENAME2WORK, USER_WORK,HANDLE_TYPE,FILENAME_ONLY) VALUES ('{0}','{1}','{2}','{3}')", filename, USER_USERNAME, handleType, filename_only)
Return ClassDatabase.Execute_non_Query(ins, True)
Catch ex As Exception
@@ -128,7 +120,6 @@ Public Class ClassFolderWatcher
Public Shared Function DELETE_SCAN_File(filename As String)
Try
Dim filename_only As String = Path.GetFileName(filename)
Dim del As String = String.Format("DELETE FROM TBPMO_FILES_USER WHERE UPPER(FILENAME2WORK) = UPPER('{0}')", filename)
Return ClassDatabase.Execute_non_Query(del, True)
Catch ex As Exception
@@ -145,7 +136,7 @@ Public Class ClassFolderWatcher
Return False
End Try
End Function
Public Shared Function Check_Scan_Files()
Try
Dim sql1 As String = String.Format("select * from TBPMO_FILES_USER where HANDLE_TYPE = 'SCAN' and WORKED = 0 AND UPPER(USER_WORK) = '{0}'", USER_USERNAME)