Imports System.IO
Imports System.Reflection
'''Globale Variablen und FUnktionen
Module Globals
'''Datentabelle mit den EDOKA-Applikationsdaten
Public Applikationsdaten As DataTable
'''Datensatzzeiger in der Tabelle Applikationsdaten
Public AppldataRow As Integer
Public appPath As String = Path.GetDirectoryName([Assembly].GetEntryAssembly().Location) + "\"
'''Verbindung zur Daten EDOKA
Public sConnectionString_edoka As String
'''Verbindung zur Daten EDOKA_Journale
Public MailBody As String
'''Befehlszeilenargumente
Public args As String() = Environment.GetCommandLineArgs()
'''Connectionprovider für die Datenbank EDOKA
'''edokadb.clsConnectionProvider
Public conn_edoka As New edokadb.clsConnectionProvider()
'''Connectionprovider für die Datenbank EDOKA_Journale
'''Connectionprovider für die Datenbank EDOKA_Journale
'''edokadb.clsConnectionProvider
Public conn_journale_Mail As New edokadb.clsConnectionProvider()
'''Instanz des Objektes DivFnkt
Public DivFnkt As New clsDivFnkt()
Public xFehler As Integer = 0
Public Warning As Integer = 0
Public DokumentID As String
Public ColdDokumentID As String
Public KeyNr As Long
Public Params As New ClsParameters()
Public temp_indexdaten As DataTable
Public ofile As System.IO.File
Public oread As System.IO.StreamReader
'''Hält die Applikationsdaten für ein zu importierendes Dokumente
'''fest
Public ApplData As New DataTable()
'''Ausgabe eines Strings mit vorgestelltem TimeStamp
'''
Public Sub PrintOut(ByVal s As String)
'Console.WriteLine(Format(Now, "yyyyMMddHHmmss") + ": " + s)
PrintLog(Format(Now, "yyyyMMddHHmmss") + ": " + s, EventLogEntryType.Information)
End Sub
Public Sub Printout(ByVal s As String, ByVal LogEntryType As EventLogEntryType)
PrintLog(Format(Now, "yyyyMMddHHmmss") + ": " + s, LogEntryType)
End Sub
Dim EVLog As New EventLog("Log_EDKB08")
'''Eintrag ins EventLog von EDKB08 schreiben
'''
'''
Public Sub PrintLog(ByVal message As String, Optional ByVal eventmessage As EventLogEntryType = EventLogEntryType.Information)
#If CONFIG = "Release" Then
If Not EventLog.SourceExists("EDKB08") Then
EventLog.CreateEventSource("EDKB08", "EDKB08 Log")
End If
EVLog.Source = "EDKB08 Log"
EventLog.WriteEntry(EVLog.Source, message, eventmessage)
#Else
#End If
End Sub
End Module