You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.9 KiB

Imports System.IO
Imports System.Reflection
'''<summary>Globale Variablen und FUnktionen</summary>
Module Globals
'''<summary>Datentabelle mit den EDOKA-Applikationsdaten</summary>
Public Applikationsdaten As DataTable
'''<summary>Datensatzzeiger in der Tabelle Applikationsdaten</summary>
Public AppldataRow As Integer
Public appPath As String = Path.GetDirectoryName([Assembly].GetEntryAssembly().Location) + "\"
'''<summary>Verbindung zur Daten EDOKA</summary>
Public sConnectionString_edoka As String
'''<summary>Verbindung zur Daten EDOKA_Journale</summary>
Public MailBody As String
'''<summary>Befehlszeilenargumente</summary>
Public args As String() = Environment.GetCommandLineArgs()
'''<summary>Connectionprovider für die Datenbank EDOKA</summary>
'''<seealso
'''cref="edokadb.clsConnectionProvider">edokadb.clsConnectionProvider</seealso>
Public conn_edoka As New edokadb.clsConnectionProvider()
'''<summary>Connectionprovider für die Datenbank EDOKA_Journale</summary>
'''<seealso
'''<summary>Connectionprovider für die Datenbank EDOKA_Journale</summary>
'''<seealso
'''cref="edokadb.clsConnectionProvider">edokadb.clsConnectionProvider</seealso>
Public conn_journale_Mail As New edokadb.clsConnectionProvider()
'''<summary>Instanz des Objektes DivFnkt</summary>
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
'''<summary>Hält die Applikationsdaten für ein zu importierendes Dokumente
'''fest</summary>
Public ApplData As New DataTable()
'''<summary>Ausgabe eines Strings mit vorgestelltem TimeStamp</summary>
'''<param name="s"></param>
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")
'''<summary>Eintrag ins EventLog von EDKB08 schreiben</summary>
'''<param name="message"></param>
'''<param name="eventmessage"></param>
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