MS Initial without WM
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Data.OracleClient
|
||||
Imports System.IO
|
||||
Imports WINDREAMLib
|
||||
|
||||
Public Class ClassAllgemeineFunktionen
|
||||
Public Shared Function GUI_LANGUAGE_INFO(pTITLE As String)
|
||||
Dim oFilteredDatatable As DataTable = BASEDATA_DT_GUI_LANGUAGE_PHRASES.Clone()
|
||||
@@ -149,82 +147,8 @@ Public Class ClassAllgemeineFunktionen
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Public Function Delete_xffres(originFile As String, clsWD As ClassWindream_allgemein)
|
||||
Try
|
||||
Dim Stammname As String = System.IO.Path.GetFileNameWithoutExtension(originFile)
|
||||
Dim Path As String = System.IO.Path.GetDirectoryName(originFile)
|
||||
Dim xffres As String = Path & "\" & Stammname & ".xffres"
|
||||
If file_exists(xffres, clsWD) = True Then
|
||||
System.IO.File.Delete(xffres)
|
||||
LOGGER.Info("Datei " & xffres & " erfolgreich gelöscht")
|
||||
Return True
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info(" Fehler bei Delete_xffres", True)
|
||||
LOGGER.Info("Fehlermeldung: " & ex.Message)
|
||||
End Try
|
||||
End Function
|
||||
'Public Function Delete_File(originFile As String)
|
||||
' Try
|
||||
|
||||
' If file_exists(originFile, False) = True Then
|
||||
' System.IO.File.Delete(originFile)
|
||||
' LOGGER.Info("Manuelles Löschen: Datei " & originFile & " erfolgreich gelöscht", False)
|
||||
' Return True
|
||||
' Else
|
||||
' MsgBox("Die Datei konnte nicht gelsöcht werden. File NOT EXISTS", MsgBoxStyle.Exclamation)
|
||||
' Return False
|
||||
' End If
|
||||
' Catch ex As Exception
|
||||
' LOGGER.Info(" Fehler bei Delete_File", True)
|
||||
' LOGGER.Info("Fehlermeldung: " & ex.Message)
|
||||
' End Try
|
||||
'End Function
|
||||
|
||||
Public Function Move2Folder(ByVal vMove_File As String, ByVal vZiel_Pfad As String, Profile_ID As Integer, clsWD As ClassWindream_allgemein)
|
||||
Try
|
||||
|
||||
Dim extension As String = IO.Path.GetExtension(vMove_File)
|
||||
Dim Filename As String = IO.Path.GetFileName(vMove_File)
|
||||
Dim path As String = IO.Path.GetDirectoryName(vMove_File)
|
||||
Dim _Ziel As String
|
||||
_Ziel = vZiel_Pfad & "\" & Filename
|
||||
Dim version As Integer = 1
|
||||
If vZiel_Pfad <> path Then
|
||||
Dim Stammname As String = IO.Path.GetFileNameWithoutExtension(vMove_File)
|
||||
Do While file_exists(_Ziel, clsWD) = True
|
||||
Dim neuername As String = Stammname & "~" & version & extension
|
||||
_Ziel = neuername
|
||||
version = version + 1
|
||||
Loop
|
||||
My.Computer.FileSystem.MoveFile(vMove_File, _Ziel)
|
||||
LOGGER.Info("Datei erfolgreich verschoben - Ziel: " & _Ziel)
|
||||
Else
|
||||
LOGGER.Info("Ziel und Quellpfad sind identisch!")
|
||||
End If
|
||||
|
||||
Return ""
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Fehler bei Move2Folder", True)
|
||||
LOGGER.Info("Fehlermeldung")
|
||||
LOGGER.Info(ex.Message)
|
||||
Insert_LogEntry($"ERROR {ex.Message}")
|
||||
Return ex.Message
|
||||
End Try
|
||||
End Function
|
||||
Public Function file_exists(ByVal _file As String, clsWD As ClassWindream_allgemein)
|
||||
Try
|
||||
Return clsWD.CheckFileExists(_file)
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
LOGGER.Info("Fehler in Funktion file_exists - Fehler: ", ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Public Function checkValue_Exists(sqlbefehl As String, Replace_value As String, Check_value As String, Typ As String, connString As String, profilid As Integer)
|
||||
Try
|
||||
Dim sql As String
|
||||
|
||||
Reference in New Issue
Block a user