Initial commit
This commit is contained in:
51
EDKB02/Backup/MyObjects/Globals.vb
Normal file
51
EDKB02/Backup/MyObjects/Globals.vb
Normal file
@@ -0,0 +1,51 @@
|
||||
'*
|
||||
' Modul Globals
|
||||
'
|
||||
' Dieses Modul beinhaltet Public Objekte und Variablen, welche während der gesamten
|
||||
' Luafzeit von EDOKA benötigt werden
|
||||
'
|
||||
' Autor: Stefan Hutter
|
||||
' Datum: 2.12.2002
|
||||
'*
|
||||
Imports System.Reflection
|
||||
Imports System.IO
|
||||
|
||||
Module Globals
|
||||
'Datenbankvariablen
|
||||
Public Indextyp As Integer = 1
|
||||
Public Applikationsdaten As DataTable
|
||||
Public AppldataRow As Integer
|
||||
|
||||
Public sConnectionString_edoka As String
|
||||
Public sConnectionString_journale As String
|
||||
Public sConnectionString_ams As String
|
||||
|
||||
Public args As String() = Environment.GetCommandLineArgs()
|
||||
|
||||
Public conn_edoka As New edokadb.clsConnectionProvider()
|
||||
Public conn_journale As New edokadb.clsConnectionProvider()
|
||||
Public conn_ams As New edokadb.clsConnectionProvider()
|
||||
|
||||
Public Fehler 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 ofile As System.IO.File
|
||||
Public oread As System.IO.StreamReader
|
||||
Public Aufgehoben As Boolean
|
||||
Public edokadokumentid As String
|
||||
Public dokumenttyp As Integer
|
||||
Public save_dokumentid As String
|
||||
|
||||
Public ArchivierteDokumente As Integer = 0
|
||||
|
||||
|
||||
Public Function ApplicationPath() As String
|
||||
'Return Path.GetDirectoryName([Assembly].GetExecutingAssembly().Location)
|
||||
Return Path.GetDirectoryName([Assembly].GetEntryAssembly().Location) + "\"
|
||||
End Function
|
||||
|
||||
End Module
|
||||
133
EDKB02/Backup/MyObjects/clsFileCounter.vb
Normal file
133
EDKB02/Backup/MyObjects/clsFileCounter.vb
Normal file
@@ -0,0 +1,133 @@
|
||||
Public Class clsFileCounter
|
||||
Dim Al As New ArrayList()
|
||||
|
||||
Dim m_sent As Integer
|
||||
Property Sent() As Integer
|
||||
Get
|
||||
Return m_sent
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
m_sent = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_got As Integer
|
||||
Property got() As Integer
|
||||
Get
|
||||
Return m_got
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
m_got = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub Add(ByVal Application As String, ByVal counter As Integer)
|
||||
Dim i As Integer
|
||||
Dim setvalue As Boolean = False
|
||||
Dim d As New GenericList("", 0)
|
||||
For i = 0 To Me.Al.Count - 1
|
||||
d = Al.Item(i)
|
||||
If d.Application = Application Then
|
||||
d.Counter = d.Counter + counter
|
||||
Al(i) = d
|
||||
setvalue = True
|
||||
End If
|
||||
Next
|
||||
If Not setvalue Then
|
||||
Al.Add(New GenericList(Application, counter))
|
||||
End If
|
||||
d = Nothing
|
||||
End Sub
|
||||
|
||||
Public Sub Write_File(ByVal log As clsLog)
|
||||
Dim i As Integer
|
||||
Dim d As New GenericList("", 0)
|
||||
FileOpen(11, Params.PathColdDateien + "FileCount.txt", OpenMode.Output)
|
||||
For i = 0 To Al.Count - 1
|
||||
d = Al(i)
|
||||
PrintLine(11, d.Application & ": " & LTrim(Str(d.Counter)))
|
||||
ArchivierteDokumente = d.Counter
|
||||
log.InsertJournale("Anzahl Dokumente - " & d.Application & ": " & LTrim(Str(d.Counter)), clsLog.Enum_InfoTyp.Information)
|
||||
Next
|
||||
FileClose(11)
|
||||
Al.Clear()
|
||||
End Sub
|
||||
|
||||
Public Function CountReturnfiles(ByVal log As clsLog) As Boolean
|
||||
FileOpen(11, Params.PathColdDateien + "FileCount.txt", OpenMode.Input)
|
||||
Dim total1 As Integer = 0
|
||||
Dim total2 As Integer = 0
|
||||
Dim i As Integer
|
||||
Dim s As String = ""
|
||||
Try
|
||||
Input(11, s)
|
||||
While s <> Nothing Or EOF(11)
|
||||
s = Right(s, Len(s) - 12)
|
||||
i = Val(s)
|
||||
total1 = total1 + i
|
||||
Input(11, s)
|
||||
End While
|
||||
Catch
|
||||
Finally
|
||||
FileClose(11)
|
||||
End Try
|
||||
FileOpen(11, Params.PathColdDateien + Params.FileReturnCode, OpenMode.Input)
|
||||
Try
|
||||
Input(11, s)
|
||||
Input(11, s)
|
||||
While s <> Nothing Or EOF(11)
|
||||
s = Right(s, Len(s) - 11)
|
||||
i = Val(s)
|
||||
total2 = total2 + i
|
||||
Input(11, s)
|
||||
End While
|
||||
Catch
|
||||
Finally
|
||||
FileClose(11)
|
||||
End Try
|
||||
Me.Sent = total1
|
||||
Me.got = total2
|
||||
If total2 > total1 Then
|
||||
log.InsertJournale("COLD-Return: Warnung: Anzahl zurückgemeldete Dateien stimmt nicht mit der Anz. gesendeten überein: Anzahl Return: " & Str(total2) & " - gesendet: " & Str(total1), clsLog.Enum_InfoTyp.Information)
|
||||
Return True
|
||||
Else
|
||||
If total2 <> total1 Then
|
||||
log.InsertJournale("COLD-Return: Anzahl zurückgemeldete Dateien stimmt nicht mit der Anz. gesendeten überein: Anzahl Return: " & Str(total2) & " - gesendet: " & Str(total1), clsLog.Enum_InfoTyp.Information)
|
||||
Return False
|
||||
End If
|
||||
Return True
|
||||
End If
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Public Class GenericList
|
||||
Private _Application As String
|
||||
Private _counter As Integer
|
||||
|
||||
Property Application() As String
|
||||
Get
|
||||
Return _Application
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_Application = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Counter() As Integer
|
||||
Get
|
||||
Return _counter
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_counter = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub New(ByVal Application As String, ByVal Counter As Integer)
|
||||
Me.Application = Application
|
||||
Me.Counter = Counter
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user