MS07062016
This commit is contained in:
@@ -261,23 +261,22 @@ Public Class frmConfig_Basic
|
||||
End Sub
|
||||
Sub CheckScanFolder(mypath As String)
|
||||
Try
|
||||
Try
|
||||
If (Not System.IO.Directory.Exists(mypath)) Then
|
||||
System.IO.Directory.CreateDirectory(mypath)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(" >> Fehler beim Erstellen des Folderwatchordners: " & mypath, False)
|
||||
ClassLogger.Add(" >> " & ex.Message, False)
|
||||
|
||||
MsgBox("Error in creating Hotfolder: " & mypath & vbNewLine & "Please check the rights!" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
|
||||
|
||||
Exit Sub
|
||||
End Try
|
||||
If mypath <> "" Then
|
||||
Try
|
||||
If (Not System.IO.Directory.Exists(mypath)) Then
|
||||
System.IO.Directory.CreateDirectory(mypath)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(" >> Fehler beim Erstellen des Folderwatchordners: " & mypath, False)
|
||||
ClassLogger.Add(" >> " & ex.Message, False)
|
||||
MsgBox("Error in creating Hotfolder: " & mypath & vbNewLine & "Please check the rights!" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Exit Sub
|
||||
End Try
|
||||
End If
|
||||
|
||||
Dim folderwatch = ClassDatabase.Execute_Scalar("SELECT GUID FROM TBPMO_FOLDERWATCH_USER WHERE USER_ID = " & USER_GUID & " AND FOLDER_TYPE = 'SCAN'", True)
|
||||
Dim sql As String
|
||||
If folderwatch Is Nothing Then
|
||||
If folderwatch Is Nothing And mypath <> "" Then
|
||||
sql = "INSERT INTO TBPMO_FOLDERWATCH_USER (USER_ID, FOLDER_PATH, FOLDER_TYPE, ADDED_WHO) VALUES (" & USER_GUID & ",'" & mypath & "','SCAN','" & Environment.UserName & "')"
|
||||
Else
|
||||
sql = "UPDATE TBPMO_FOLDERWATCH_USER SET FOLDER_PATH = '" & mypath & "', CHANGED_WHO = '" & Environment.UserName & "' where GUID = " & folderwatch
|
||||
@@ -403,4 +402,8 @@ Public Class frmConfig_Basic
|
||||
MsgBox("Log Mail was sent to Digital Data!", MsgBoxStyle.Information, "Success!")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub txtScanFolderWatch_TextChanged(sender As Object, e As EventArgs) Handles txtScanFolderWatch.TextChanged
|
||||
CheckScanFolder(txtScanFolderWatch.Text)
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user