Initial commit
This commit is contained in:
60
Archiv/EDKB09 - Kopie (2)/Klassen/clsLog.vb
Normal file
60
Archiv/EDKB09 - Kopie (2)/Klassen/clsLog.vb
Normal file
@@ -0,0 +1,60 @@
|
||||
Imports System
|
||||
Imports System.Configuration
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.IO
|
||||
Imports System.ComponentModel
|
||||
|
||||
Public Class clsLog
|
||||
|
||||
#Region "Deklarationen"
|
||||
Dim m_journalid As Long
|
||||
Dim m_applikationid As Long
|
||||
|
||||
Dim clsapplikation As New edokadb.clsJounralApplikation
|
||||
Dim clsjournal As New edokadb.clsJournal
|
||||
Dim clsjournaleintrag As New edokadb.clsJournaleintrag
|
||||
|
||||
Public Enum Enum_InfoTyp
|
||||
Keine = 0
|
||||
Information = 1
|
||||
Warnung = 2
|
||||
Fehler = 3
|
||||
End Enum
|
||||
|
||||
#End Region
|
||||
|
||||
Public Sub Startlog(ByVal ApplicationID As Integer)
|
||||
clsapplikation.iApplikationnr = New SqlInt32(CType(ApplicationID, Int32))
|
||||
clsapplikation.cpMainConnectionProvider = conn_journale
|
||||
clsapplikation.SelectOne()
|
||||
Me.m_applikationid = clsapplikation.iApplikationnr.Value
|
||||
|
||||
clsjournal.daStart = New SqlDateTime(CType(Now, DateTime))
|
||||
clsjournal.iApplikationnr = New SqlInt32(CType(Me.m_applikationid, Int32))
|
||||
clsjournal.bFehlerhaft = New SqlBoolean(CType(False, Boolean))
|
||||
clsjournal.sFehlerbeschreibung = New SqlString(CType("", String))
|
||||
clsjournal.cpMainConnectionProvider = conn_journale
|
||||
conn_journale.OpenConnection()
|
||||
clsjournal.Insert()
|
||||
Me.m_journalid = clsjournal.iJournalnr.Value
|
||||
conn_journale.CloseConnection(True)
|
||||
End Sub
|
||||
|
||||
Public Sub InsertJournale(ByVal Message As String, ByVal sTyp As Enum_InfoTyp)
|
||||
|
||||
clsjournaleintrag.iJournalnr = New SqlInt32(CType(Me.m_journalid, Int32))
|
||||
clsjournaleintrag.daDatumzeit = New SqlDateTime(CType(Now, DateTime))
|
||||
clsjournaleintrag.sEintrag = New SqlString(CType(Message, String))
|
||||
clsjournaleintrag.cpMainConnectionProvider = conn_journale
|
||||
Console.WriteLine(Message)
|
||||
conn_journale.OpenConnection()
|
||||
clsjournaleintrag.Insert()
|
||||
conn_journale.CloseConnection(True)
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user