Initial commit
This commit is contained in:
236
Archiv/EDKB02_old/Backup/Archivfnkt.vb
Normal file
236
Archiv/EDKB02_old/Backup/Archivfnkt.vb
Normal file
@@ -0,0 +1,236 @@
|
||||
Imports System.IO
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.ComponentModel
|
||||
|
||||
|
||||
Namespace EDOKA
|
||||
|
||||
#Region "Deklarationen"
|
||||
|
||||
#End Region
|
||||
|
||||
Public Class clsarchivfnkt
|
||||
|
||||
' 2004-12-06
|
||||
Public Sub copy_indexdata(ByVal dokumentid As String, ByVal Status As String)
|
||||
Dim sda As New SqlDataAdapter("select * from dokumentcoldindexwert where (indextyp=1 or indextyp=2) and dokumentid='" & dokumentid & "'", Globals.conn_edoka.scoDBConnection)
|
||||
Dim sda1 As New SqlDataAdapter("select * from dokumentcoldindexwert where dokumentid='" & dokumentid & "'", Globals.conn_edoka.scoDBConnection)
|
||||
Dim sda3 As New SqlDataAdapter("select max(indextyp) from dokumentcoldindexwert where dokumentid='" & dokumentid & "'", Globals.conn_edoka.scoDBConnection)
|
||||
Dim ds As New DataSet()
|
||||
Dim gds As New DataSet()
|
||||
sda.Fill(ds, "Dokumentcoldindexwert")
|
||||
sda1.Fill(gds, "Dokumentcoldindexwert")
|
||||
sda.Fill(ds, "DokumentcoldindexwertNeu")
|
||||
sda3.Fill(ds, "Maxwert")
|
||||
Dim i As Integer
|
||||
Dim Maxwert As Integer
|
||||
Maxwert = ds.Tables(2).Rows(0).Item(0)
|
||||
If Maxwert < 2 Then Maxwert = 2
|
||||
Dim i1 As Integer
|
||||
Dim i2 As Integer
|
||||
i1 = 0
|
||||
i2 = 0
|
||||
For i = 0 To ds.Tables(0).Rows.Count - 1
|
||||
If Not ds.Tables(0).Rows(i).Item("wert") Is System.DBNull.Value Then
|
||||
If ds.Tables(0).Rows(i).Item("cold_indexfeldnr") = 7 And (ds.Tables(0).Rows(i).Item("wert") = "Aktuell" Or ds.Tables(0).Rows(i).Item("wert") = "Alt") Then
|
||||
If ds.Tables(0).Rows(i).Item("indextyp") = 1 Then i1 = 1
|
||||
If ds.Tables(0).Rows(i).Item("indextyp") = 2 Then i2 = 1
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
For i = 0 To ds.Tables(0).Rows.Count - 1
|
||||
If Not ds.Tables(0).Rows(i).Item("wert") Is System.DBNull.Value Then
|
||||
If i1 = 1 And ds.Tables(0).Rows(i).Item("indextyp") = 1 Then
|
||||
ds.Tables(0).Rows(i).Item("indextyp") = Maxwert + 1
|
||||
If ds.Tables(0).Rows(i).Item("cold_indexfeldnr") = 7 Then ds.Tables(0).Rows(i).Item("wert") = Status
|
||||
End If
|
||||
If i2 = 1 And ds.Tables(0).Rows(i).Item("indextyp") = 2 Then
|
||||
ds.Tables(0).Rows(i).Item("indextyp") = Maxwert + 2
|
||||
If ds.Tables(0).Rows(i).Item("cold_indexfeldnr") = 7 Then ds.Tables(0).Rows(i).Item("wert") = Status
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
For i = 0 To ds.Tables(1).Rows.Count - 1
|
||||
If Not ds.Tables(0).Rows(i).Item("wert") Is System.DBNull.Value Then
|
||||
If i1 = 1 And ds.Tables(1).Rows(i).Item("indextyp") = 1 Then
|
||||
If ds.Tables(1).Rows(i).Item("cold_indexfeldnr") = 7 Or ds.Tables(1).Rows(i).Item("cold_indexfeldnr") = 7 Or ds.Tables(1).Rows(i).Item("cold_indexfeldnr") = 10 Then ds.Tables(1).Rows(i).Item("wert") = ""
|
||||
End If
|
||||
If i2 = 1 And ds.Tables(1).Rows(i).Item("indextyp") = 2 Then
|
||||
If ds.Tables(1).Rows(i).Item("cold_indexfeldnr") = 5 Or ds.Tables(1).Rows(i).Item("cold_indexfeldnr") = 7 Or ds.Tables(1).Rows(i).Item("cold_indexfeldnr") = 10 Then ds.Tables(1).Rows(i).Item("wert") = ""
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Dim cd As New SqlCommandBuilder(sda)
|
||||
sda.Update(ds, "Dokumentcoldindexwert")
|
||||
|
||||
Dim dw As New edokadb.clsDokumentcoldindexwert()
|
||||
dw.cpMainConnectionProvider = Globals.conn_edoka
|
||||
For i = 0 To ds.Tables(1).Rows.Count - 1
|
||||
If i1 = 1 And ds.Tables(1).Rows(i).Item("indextyp") = 1 Then
|
||||
dw.iIndextyp = New SqlInt32(CType(ds.Tables(1).Rows(i).Item(1), Int32))
|
||||
If Not ds.Tables(1).Rows(i).Item(2) Is System.DBNull.Value Then
|
||||
dw.sWert = New SqlString(CType(ds.Tables(1).Rows(i).Item(2), String))
|
||||
Else
|
||||
dw.sWert = New SqlString(CType("", String))
|
||||
End If
|
||||
dw.iMandantnr = New SqlInt32(CType(ds.Tables(1).Rows(i).Item(3), Int32))
|
||||
dw.bAktiv = New SqlBoolean(CType(ds.Tables(1).Rows(i).Item(4), Boolean))
|
||||
dw.daErstellt_am = New SqlDateTime(CType(Now, DateTime))
|
||||
dw.daMutiert_am = New SqlDateTime(CType(Now, DateTime))
|
||||
dw.iMutierer = New SqlInt32(CType(9999, Int32))
|
||||
dw.sDokumentid = New SqlString(CType(ds.Tables(1).Rows(i).Item(8), String))
|
||||
dw.iCold_indexfeldnr = New SqlInt32(CType(ds.Tables(1).Rows(i).Item(9), Int32))
|
||||
Globals.conn_edoka.OpenConnection()
|
||||
dw.Insert()
|
||||
Globals.conn_edoka.CloseConnection(True)
|
||||
End If
|
||||
If i2 = 1 And ds.Tables(1).Rows(i).Item("indextyp") = 2 Then
|
||||
dw.iIndextyp = New SqlInt32(CType(ds.Tables(1).Rows(i).Item(1), Int32))
|
||||
If Not ds.Tables(1).Rows(i).Item(2) Is System.DBNull.Value Then
|
||||
dw.sWert = New SqlString(CType(ds.Tables(1).Rows(i).Item(2), String))
|
||||
Else
|
||||
dw.sWert = New SqlString(CType("", String))
|
||||
End If
|
||||
' dw.sWert = New SqlString(CType(ds.Tables(1).Rows(i).Item(2), String))
|
||||
dw.iMandantnr = New SqlInt32(CType(ds.Tables(1).Rows(i).Item(3), Int32))
|
||||
dw.bAktiv = New SqlBoolean(CType(ds.Tables(1).Rows(i).Item(4), Boolean))
|
||||
dw.daErstellt_am = New SqlDateTime(CType(Now, DateTime))
|
||||
dw.daMutiert_am = New SqlDateTime(CType(Now, DateTime))
|
||||
dw.iMutierer = New SqlInt32(CType(9999, Int32))
|
||||
dw.sDokumentid = New SqlString(CType(ds.Tables(1).Rows(i).Item(8), String))
|
||||
dw.iCold_indexfeldnr = New SqlInt32(CType(ds.Tables(1).Rows(i).Item(9), Int32))
|
||||
Globals.conn_edoka.OpenConnection()
|
||||
dw.Insert()
|
||||
Globals.conn_edoka.CloseConnection(True)
|
||||
End If
|
||||
Next
|
||||
dw.Dispose()
|
||||
sda.Dispose()
|
||||
sda1.Dispose()
|
||||
sda3.Dispose()
|
||||
End Sub
|
||||
|
||||
Public Sub insert_coldupdate_status(ByVal dt As DataTable, ByVal dokumentid As String, ByVal neuerstatus As String)
|
||||
Dim i As Integer
|
||||
Dim colddokumentid As String
|
||||
Dim indextyp As Integer
|
||||
indextyp = 1
|
||||
colddokumentid = ""
|
||||
For i = 0 To dt.Rows.Count - 1
|
||||
If dt.Rows(i).Item("cold_indexfeldnr") = 10 Then colddokumentid = dt.Rows(i).Item("wert")
|
||||
If dt.Rows(i).Item("indextyp") <> indextyp Then
|
||||
insert_coldupdate("BESTA00", colddokumentid, dokumentid, "Aktuell", neuerstatus)
|
||||
indextyp = dt.Rows(i).Item("indextyp")
|
||||
End If
|
||||
Next
|
||||
insert_coldupdate("BESTA00", colddokumentid, dokumentid, "Aktuell", neuerstatus)
|
||||
End Sub
|
||||
|
||||
Public Sub insert_coldupdate(ByVal feldname As String, ByVal colddokumentid As String, ByVal dokumentid As String, ByVal alterwert As String, ByVal neuerwert As String)
|
||||
If colddokumentid = "" Then Exit Sub
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
Dim dtToReturn As DataTable = New DataTable()
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.CommandText = "dbo.sp_insert_coldupdate"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
scmCmdToExecute.Connection = Globals.conn_edoka.scoDBConnection
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@feldname", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, feldname))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@colddokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, colddokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@alterwert", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, alterwert))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@neuerwert", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, neuerwert))
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
Catch ex As Exception
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Function set_aufgehoben(ByVal dokumentid As String) As DataTable
|
||||
Dim dt As DataTable
|
||||
dt = get_coldindex_and_statusnr(dokumentid, True)
|
||||
insert_coldupdate_status(dt, dokumentid, "Alt")
|
||||
Return dt
|
||||
End Function
|
||||
|
||||
Public Function get_coldindex_and_statusnr(ByVal dokumentid As String, ByVal aufheben As Boolean) As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
Dim i As Integer
|
||||
Dim dtToReturn As DataTable = New DataTable()
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.CommandText = "dbo.sp_get_coldindex_and_aufhebungsstatus"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Try
|
||||
scmCmdToExecute.Connection = Globals.conn_edoka.scoDBConnection
|
||||
Catch
|
||||
End Try
|
||||
Globals.Aufgehoben = False
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@aufhebungsstatus", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, 0))
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
i = scmCmdToExecute.Parameters.Item("@aufhebungsstatus").Value
|
||||
If i <> 0 And aufheben Then
|
||||
insert_history_status(i, dokumentid, 9999)
|
||||
Dim d As New edokadb.clsDokument()
|
||||
d.cpMainConnectionProvider = Globals.conn_edoka
|
||||
d.sDokumentid = New SqlString(CType(dokumentid, String))
|
||||
d.SelectOne()
|
||||
d.iStatusnr = New SqlInt32(CType(i, Int32))
|
||||
Try
|
||||
conn_edoka.OpenConnection()
|
||||
Catch
|
||||
End Try
|
||||
d.Update()
|
||||
conn_edoka.CloseConnection(True)
|
||||
d.Dispose()
|
||||
Globals.Aufgehoben = True
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
Return Nothing
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Sub insert_history_status(ByVal statusnr As Integer, ByVal dokumentid As String, ByVal Verantwortlicher As Integer)
|
||||
Dim sh As New edokadb.clsStatushistory()
|
||||
sh.cpMainConnectionProvider = conn_edoka
|
||||
Dim dbkey As New edokadb.clsMyKey_Tabelle()
|
||||
Dim key As Long
|
||||
dbkey.cpMainConnectionProvider = conn_edoka
|
||||
Try
|
||||
conn_edoka.OpenConnection()
|
||||
Catch
|
||||
End Try
|
||||
key = dbkey.get_dbkey("statushistory")
|
||||
sh.iStatushistorynr = New SqlInt32(CType(key, Int32))
|
||||
sh.iStatus = New SqlInt32(CType(statusnr, Int32))
|
||||
sh.iMandantnr = New SqlInt32(CType(9999, Int32))
|
||||
sh.iMutierer = New SqlInt32(CType(9999, Int32))
|
||||
sh.bAktiv = New SqlBoolean(True)
|
||||
sh.daErstellt_am = New SqlDateTime(CType(Now, DateTime))
|
||||
sh.daMutiert_am = New SqlDateTime(CType(Now, DateTime))
|
||||
sh.sDokumentid = New SqlString(CType(dokumentid, String))
|
||||
sh.iVerantwortlich = New SqlInt32(CType(Verantwortlicher, Int32))
|
||||
Try
|
||||
conn_edoka.OpenConnection()
|
||||
Catch
|
||||
End Try
|
||||
sh.Insert()
|
||||
conn_edoka.CloseConnection(True)
|
||||
dbkey.Dispose()
|
||||
sh.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
31
Archiv/EDKB02_old/Backup/AssemblyInfo.vb
Normal file
31
Archiv/EDKB02_old/Backup/AssemblyInfo.vb
Normal file
@@ -0,0 +1,31 @@
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' Allgemeine Informationen über eine Assembly werden über die folgende
|
||||
' Attributgruppe gesteuert. Ändern Sie diese Attributwerte, um Informationen,
|
||||
' die mit einer Assembly verknüpft sind, zu bearbeiten.
|
||||
|
||||
' Die Werte der Assemblyattribute überprüfen
|
||||
|
||||
<Assembly: AssemblyTitle("")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("")>
|
||||
<Assembly: AssemblyCopyright("")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: CLSCompliant(True)>
|
||||
|
||||
'Die folgende GUID ist für die ID der Typbibliothek, wenn dieses Projekt in COM angezeigt wird
|
||||
<Assembly: Guid("802A7333-5246-42F6-BF70-C74AE6A39A4C")>
|
||||
|
||||
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
'
|
||||
' Haupversion
|
||||
' Nebenversion
|
||||
' Buildnummer
|
||||
' Revisionsnummer
|
||||
'
|
||||
' Sie können alle Werte angeben oder auf die standardmäßigen Build- und Revisionsnummern
|
||||
' zurückgreifen, indem Sie '*' wie unten angezeigt verwenden:
|
||||
|
||||
<Assembly: AssemblyVersion("2.0.*")>
|
||||
384
Archiv/EDKB02_old/Backup/ClsParameters.vb
Normal file
384
Archiv/EDKB02_old/Backup/ClsParameters.vb
Normal file
@@ -0,0 +1,384 @@
|
||||
Public Class ClsParameters
|
||||
|
||||
#Region "Deklarationen"
|
||||
|
||||
Dim m_applicationid As String
|
||||
Property ApplicationID() As String
|
||||
Get
|
||||
Return m_applicationid
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_applicationid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_pathCold As String
|
||||
Property PathColdDateien() As String
|
||||
Get
|
||||
Return m_pathCold
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_pathCold = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_paramfilebin As String
|
||||
Property ParameterFileBin() As String
|
||||
Get
|
||||
Return m_paramfilebin
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_paramfilebin = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_paramfiletxt As String
|
||||
Property ParameterFileTxt() As String
|
||||
Get
|
||||
Return m_paramfiletxt
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_paramfiletxt = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_filedtostart As String
|
||||
Property FileDtoStart() As String
|
||||
Get
|
||||
Return m_filedtostart
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_filedtostart = Value
|
||||
End Set
|
||||
End Property
|
||||
Dim m_FileColdReturn As String
|
||||
Property FileColdReturn() As String
|
||||
Get
|
||||
Return m_FileColdReturn
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_FileColdReturn = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_FileNeu As String
|
||||
Property FileNeu() As String
|
||||
Get
|
||||
Return m_FileNeu
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_FileNeu = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_FileUpdate As String
|
||||
Property FileUpdate() As String
|
||||
Get
|
||||
Return m_FileUpdate
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_FileUpdate = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_FileReturnCode As String
|
||||
Property FileReturnCode() As String
|
||||
Get
|
||||
Return m_FileReturnCode
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_FileReturnCode = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_FileGeneration As String
|
||||
Property FileGeneration() As String
|
||||
Get
|
||||
Return m_FileGeneration
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_FileGeneration = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_AnzahlGenerationen As String
|
||||
Property AnzahlGenerationen() As String
|
||||
Get
|
||||
Return m_AnzahlGenerationen
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_AnzahlGenerationen = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_Bankname As String
|
||||
Property Bankname() As String
|
||||
Get
|
||||
Return m_Bankname
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_Bankname = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_Printerdriver As String
|
||||
Property PrinterDriver() As String
|
||||
Get
|
||||
Return m_Printerdriver
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_Printerdriver = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_printtype As String
|
||||
Property Printtype() As String
|
||||
Get
|
||||
Return m_printtype
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_printtype = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_PathTif As String
|
||||
Property PathTif() As String
|
||||
Get
|
||||
Return m_PathTif
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_PathTif = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_AMSDriveLetter As String
|
||||
Property AMSDriveLetter() As String
|
||||
Get
|
||||
Return m_AMSDriveLetter
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_AMSDriveLetter = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_amsServer As String
|
||||
Property AMSServer() As String
|
||||
Get
|
||||
Return m_amsServer
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_amsServer = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_amsroot As String
|
||||
Property AMSRoot() As String
|
||||
Get
|
||||
Return m_amsroot
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_amsroot = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_coldfolder As String
|
||||
Property ColdFolder() As String
|
||||
Get
|
||||
Return m_coldfolder
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_coldfolder = Value
|
||||
End Set
|
||||
End Property
|
||||
Dim m_Schema As String
|
||||
Property Schema() As String
|
||||
Get
|
||||
Return m_Schema
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_Schema = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_Mailadresse As String
|
||||
Property MailAdresse() As String
|
||||
Get
|
||||
Return m_Mailadresse
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_Mailadresse = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_Mailadresse1 As String
|
||||
Property MailAdresse1() As String
|
||||
Get
|
||||
Return m_Mailadresse1
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_Mailadresse1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_pathtemp As String
|
||||
Property PathTemp() As String
|
||||
Get
|
||||
Return m_pathtemp
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_pathtemp = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_cmddatei As String
|
||||
Property CMDDatei() As String
|
||||
Get
|
||||
Return m_cmddatei
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_cmddatei = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_copystat As String
|
||||
Property CMDCopyStat() As String
|
||||
Get
|
||||
Return m_copystat
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_copystat = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_Zeitintervall As Integer
|
||||
Property Zeitintervall() As Integer
|
||||
Get
|
||||
Return m_Zeitintervall
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
m_Zeitintervall = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_test As String
|
||||
Property Test() As String
|
||||
Get
|
||||
Return m_test
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_test = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_PrinterdriverColor As String
|
||||
Property PrinterdriverColor() As String
|
||||
Get
|
||||
Return m_PrinterdriverColor
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_PrinterdriverColor = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_PrintFarbigAb As DateTime
|
||||
Property PrintFarbigAb() As DateTime
|
||||
Get
|
||||
Return m_PrintFarbigAb
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
m_PrintFarbigAb = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_bldeltime As String
|
||||
Property BlDelTime() As String
|
||||
Get
|
||||
Return m_bldeltime
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_bldeltime = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_office2010 As Boolean = True
|
||||
Property Offcie2010() As Boolean
|
||||
Get
|
||||
Return m_office2010
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
m_office2010 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_pdfpfad As String
|
||||
Property PDFPfad() As String
|
||||
Get
|
||||
Return m_pdfpfad
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
m_pdfpfad = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Public Function Loadparameters() As String
|
||||
Try
|
||||
oread = IO.File.OpenText(Globals.ApplicationPath + "parameters.cfg")
|
||||
Me.ApplicationID = ParamValue(oread.ReadLine)
|
||||
Me.PathColdDateien = ParamValue(oread.ReadLine)
|
||||
Me.ParameterFileBin = ParamValue(oread.ReadLine)
|
||||
Me.ParameterFileTxt = ParamValue(oread.ReadLine)
|
||||
Me.FileColdReturn = ParamValue(oread.ReadLine)
|
||||
Me.FileNeu = ParamValue(oread.ReadLine)
|
||||
Me.FileUpdate = ParamValue(oread.ReadLine)
|
||||
Me.FileDtoStart = ParamValue(oread.ReadLine)
|
||||
Me.FileReturnCode = ParamValue(oread.ReadLine)
|
||||
Me.CMDDatei = ParamValue(oread.ReadLine)
|
||||
Me.FileGeneration = ParamValue(oread.ReadLine)
|
||||
Me.AnzahlGenerationen = ParamValue(oread.ReadLine)
|
||||
Me.Bankname = ParamValue(oread.ReadLine)
|
||||
Me.PrinterDriver = ParamValue(oread.ReadLine)
|
||||
Me.Printtype = ParamValue(oread.ReadLine)
|
||||
Me.PathTif = ParamValue(oread.ReadLine)
|
||||
Me.AMSDriveLetter = ParamValue(oread.ReadLine)
|
||||
Me.AMSServer = ParamValue(oread.ReadLine)
|
||||
Me.AMSRoot = ParamValue(oread.ReadLine)
|
||||
Me.Schema = ParamValue(oread.ReadLine)
|
||||
Me.ColdFolder = ParamValue(oread.ReadLine)
|
||||
Me.MailAdresse = ParamValue(oread.ReadLine)
|
||||
Me.MailAdresse1 = ParamValue(oread.ReadLine)
|
||||
Me.PathTemp = ParamValue(oread.ReadLine)
|
||||
Me.CMDCopyStat = ParamValue(oread.ReadLine)
|
||||
Me.Zeitintervall = ParamValue(oread.ReadLine)
|
||||
Dim s As String
|
||||
s = ParamValue(oread.ReadLine)
|
||||
Me.Test = ParamValue(oread.ReadLine)
|
||||
Me.m_PrinterdriverColor = ParamValue(oread.ReadLine)
|
||||
SetTimeBack(ParamValue(oread.ReadLine))
|
||||
Me.BlDelTime = ParamValue(oread.ReadLine)
|
||||
Me.Offcie2010 = ParamValue(oread.ReadLine) = "True"
|
||||
Me.PDFPfad = ParamValue(oread.ReadLine)
|
||||
oread.Close()
|
||||
Return ""
|
||||
Catch ex As Exception
|
||||
Return ex.Message
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Sub SetTimeBack(ByVal sInputTime As String)
|
||||
Try
|
||||
m_PrintFarbigAb = DateTime.Parse(sInputTime)
|
||||
Catch ex As Exception
|
||||
m_PrintFarbigAb = Now().AddHours(1)
|
||||
m_log.Log("ClsParameters:GetTimeBack:" & ex.Message & ex.StackTrace, Common.Common.JournalEntryType.Error)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Function ParamValue(ByVal sinput As String) As String
|
||||
Dim splitter() As String
|
||||
splitter = Split(sinput, "=")
|
||||
ParamValue = splitter(1)
|
||||
End Function
|
||||
|
||||
End Class
|
||||
430
Archiv/EDKB02_old/Backup/Datenbank/clsApplikation.vb
Normal file
430
Archiv/EDKB02_old/Backup/Datenbank/clsApplikation.vb
Normal file
@@ -0,0 +1,430 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'Applikation'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 18. Mai 2003, 00:06:24
|
||||
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Data Access class for the table 'Applikation'.
|
||||
' /// </summary>
|
||||
Public Class clsApplikation
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_sBezeichnung As SqlString
|
||||
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
|
||||
Private m_iMutierer, m_iApplikationnr As SqlInt32
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iApplikationnr</LI>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Applikation_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.Char, 10, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iapplikationnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iApplikationnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iApplikationnr = scmCmdToExecute.Parameters.Item("@iapplikationnr").Value
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Applikation_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsApplikation::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Update method. This method will Update one existing row in the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iApplikationnr</LI>
|
||||
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Update() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Applikation_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iapplikationnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iApplikationnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.Char, 10, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Applikation_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsApplikation::Update::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iApplikationnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Delete() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Applikation_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iapplikationnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iApplikationnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Applikation_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsApplikation::Delete::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iApplikationnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iApplikationnr</LI>
|
||||
' /// <LI>sBezeichnung</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>iMutierer</LI>
|
||||
' /// </UL>
|
||||
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectOne() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Applikation_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("Applikation")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iapplikationnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iApplikationnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Applikation_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iApplikationnr = New SqlInt32(CType(dtToReturn.Rows(0)("applikationnr"), Integer))
|
||||
If dtToReturn.Rows(0)("bezeichnung") Is System.DBNull.Value Then
|
||||
m_sBezeichnung = SqlString.Null
|
||||
Else
|
||||
m_sBezeichnung = New SqlString(CType(dtToReturn.Rows(0)("bezeichnung"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
|
||||
m_daErstellt_am = SqlDateTime.Null
|
||||
Else
|
||||
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
|
||||
m_daMutiert_am = SqlDateTime.Null
|
||||
Else
|
||||
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
|
||||
m_iMutierer = SqlInt32.Null
|
||||
Else
|
||||
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
|
||||
End If
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsApplikation::SelectOne::Error occured." + ex.Message, ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Applikation_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("Applikation")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Applikation_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsApplikation::SelectAll::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public Property [iApplikationnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iApplikationnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iApplikationnrTmp As SqlInt32 = Value
|
||||
If iApplikationnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iApplikationnr", "iApplikationnr can't be NULL")
|
||||
End If
|
||||
m_iApplikationnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBezeichnung]() As SqlString
|
||||
Get
|
||||
Return m_sBezeichnung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBezeichnung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daErstellt_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daErstellt_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daErstellt_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daMutiert_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daMutiert_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daMutiert_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iMutierer]() As SqlInt32
|
||||
Get
|
||||
Return m_iMutierer
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iMutierer = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
489
Archiv/EDKB02_old/Backup/Datenbank/clsColdupdate.vb
Normal file
489
Archiv/EDKB02_old/Backup/Datenbank/clsColdupdate.vb
Normal file
@@ -0,0 +1,489 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'coldupdate'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Donnerstag, 5. Juni 2003, 22:13:30
|
||||
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Data Access class for the table 'coldupdate'.
|
||||
' /// </summary>
|
||||
Public Class clsColdupdate
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_iStatus, m_iStatusdatum, m_iNreintrag As SqlInt32
|
||||
Private m_sNeuerwert, m_sAlterwert, m_sDokumentid, m_sColddokumentid, m_sFeldname As SqlString
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>sDokumentid. May be SqlString.Null</LI>
|
||||
' /// <LI>sColddokumentid. May be SqlString.Null</LI>
|
||||
' /// <LI>sFeldname. May be SqlString.Null</LI>
|
||||
' /// <LI>sAlterwert. May be SqlString.Null</LI>
|
||||
' /// <LI>sNeuerwert. May be SqlString.Null</LI>
|
||||
' /// <LI>iStatus. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iStatusdatum. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iNreintrag</LI>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_coldupdate_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@scolddokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sColddokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfeldname", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFeldname))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@salterwert", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAlterwert))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sneuerwert", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNeuerwert))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatusdatum", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatusdatum))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iNreintrag = scmCmdToExecute.Parameters.Item("@inreintrag").Value
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_coldupdate_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsColdupdate::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Update method. This method will Update one existing row in the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iNreintrag</LI>
|
||||
' /// <LI>sDokumentid. May be SqlString.Null</LI>
|
||||
' /// <LI>sColddokumentid. May be SqlString.Null</LI>
|
||||
' /// <LI>sFeldname. May be SqlString.Null</LI>
|
||||
' /// <LI>sAlterwert. May be SqlString.Null</LI>
|
||||
' /// <LI>sNeuerwert. May be SqlString.Null</LI>
|
||||
' /// <LI>iStatus. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iStatusdatum. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Update() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_coldupdate_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@scolddokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sColddokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfeldname", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFeldname))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@salterwert", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAlterwert))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sneuerwert", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNeuerwert))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatusdatum", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatusdatum))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_coldupdate_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsColdupdate::Update::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iNreintrag</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Delete() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_coldupdate_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_coldupdate_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsColdupdate::Delete::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iNreintrag</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iNreintrag</LI>
|
||||
' /// <LI>sDokumentid</LI>
|
||||
' /// <LI>sColddokumentid</LI>
|
||||
' /// <LI>sFeldname</LI>
|
||||
' /// <LI>sAlterwert</LI>
|
||||
' /// <LI>sNeuerwert</LI>
|
||||
' /// <LI>iStatus</LI>
|
||||
' /// <LI>iStatusdatum</LI>
|
||||
' /// </UL>
|
||||
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectOne() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_coldupdate_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("coldupdate")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_coldupdate_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iNreintrag = New SqlInt32(CType(dtToReturn.Rows(0)("nreintrag"), Integer))
|
||||
If dtToReturn.Rows(0)("dokumentid") Is System.DBNull.Value Then
|
||||
m_sDokumentid = SqlString.Null
|
||||
Else
|
||||
m_sDokumentid = New SqlString(CType(dtToReturn.Rows(0)("dokumentid"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("colddokumentid") Is System.DBNull.Value Then
|
||||
m_sColddokumentid = SqlString.Null
|
||||
Else
|
||||
m_sColddokumentid = New SqlString(CType(dtToReturn.Rows(0)("colddokumentid"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("feldname") Is System.DBNull.Value Then
|
||||
m_sFeldname = SqlString.Null
|
||||
Else
|
||||
m_sFeldname = New SqlString(CType(dtToReturn.Rows(0)("feldname"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("alterwert") Is System.DBNull.Value Then
|
||||
m_sAlterwert = SqlString.Null
|
||||
Else
|
||||
m_sAlterwert = New SqlString(CType(dtToReturn.Rows(0)("alterwert"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("neuerwert") Is System.DBNull.Value Then
|
||||
m_sNeuerwert = SqlString.Null
|
||||
Else
|
||||
m_sNeuerwert = New SqlString(CType(dtToReturn.Rows(0)("neuerwert"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("status") Is System.DBNull.Value Then
|
||||
m_iStatus = SqlInt32.Null
|
||||
Else
|
||||
m_iStatus = New SqlInt32(CType(dtToReturn.Rows(0)("status"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("statusdatum") Is System.DBNull.Value Then
|
||||
m_iStatusdatum = SqlInt32.Null
|
||||
Else
|
||||
m_iStatusdatum = New SqlInt32(CType(dtToReturn.Rows(0)("statusdatum"), Integer))
|
||||
End If
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsColdupdate::SelectOne::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_coldupdate_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("coldupdate")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_coldupdate_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsColdupdate::SelectAll::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public Property [iNreintrag]() As SqlInt32
|
||||
Get
|
||||
Return m_iNreintrag
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iNreintragTmp As SqlInt32 = Value
|
||||
If iNreintragTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iNreintrag", "iNreintrag can't be NULL")
|
||||
End If
|
||||
m_iNreintrag = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDokumentid]() As SqlString
|
||||
Get
|
||||
Return m_sDokumentid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDokumentid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sColddokumentid]() As SqlString
|
||||
Get
|
||||
Return m_sColddokumentid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sColddokumentid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sFeldname]() As SqlString
|
||||
Get
|
||||
Return m_sFeldname
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sFeldname = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sAlterwert]() As SqlString
|
||||
Get
|
||||
Return m_sAlterwert
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sAlterwert = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNeuerwert]() As SqlString
|
||||
Get
|
||||
Return m_sNeuerwert
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNeuerwert = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iStatus]() As SqlInt32
|
||||
Get
|
||||
Return m_iStatus
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iStatus = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iStatusdatum]() As SqlInt32
|
||||
Get
|
||||
Return m_iStatusdatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iStatusdatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
291
Archiv/EDKB02_old/Backup/Datenbank/clsConnectionProvider.vb
Normal file
291
Archiv/EDKB02_old/Backup/Datenbank/clsConnectionProvider.vb
Normal file
@@ -0,0 +1,291 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Connection Provider class for Database connection sharing
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 18. Mai 2003, 00:06:25
|
||||
' // This class implements IDisposable.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Configuration
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Collections
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: provides a SqlConnection object which can be shared among data-access tier objects
|
||||
' /// to provide a way to do ADO.NET transaction coding without the hassling with SqlConnection objects
|
||||
' /// on a high level.
|
||||
' /// </summary>
|
||||
Public Class clsConnectionProvider
|
||||
Implements IDisposable
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_scoDBConnection As SqlConnection
|
||||
Private m_bIsTransactionPending, m_bIsDisposed As Boolean
|
||||
Private m_stCurrentTransaction As SqlTransaction
|
||||
Private m_alSavePoints As ArrayList
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Public Sub New()
|
||||
' // Init the class
|
||||
InitClass()
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the IDispose' method Dispose.
|
||||
' /// </summary>
|
||||
Overloads Public Sub Dispose() Implements IDisposable.Dispose
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the Dispose functionality.
|
||||
' /// </summary>
|
||||
Overridable Overloads Protected Sub Dispose(ByVal bIsDisposing As Boolean)
|
||||
' // Check to see if Dispose has already been called.
|
||||
If Not m_bIsDisposed Then
|
||||
If bIsDisposing Then
|
||||
' // Dispose managed resources.
|
||||
If Not (m_stCurrentTransaction Is Nothing) Then
|
||||
m_stCurrentTransaction.Dispose()
|
||||
m_stCurrentTransaction = Nothing
|
||||
End If
|
||||
If Not (m_scoDBConnection Is Nothing) Then
|
||||
' // closing the connection will abort (rollback) any pending transactions
|
||||
m_scoDBConnection.Close()
|
||||
m_scoDBConnection.Dispose()
|
||||
m_scoDBConnection = Nothing
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
m_bIsDisposed = True
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Initializes class members.
|
||||
' /// </summary>
|
||||
Private Sub InitClass()
|
||||
' // Create all the objects and initialize other members.
|
||||
m_scoDBConnection = new SqlConnection()
|
||||
m_bIsDisposed = False
|
||||
m_stCurrentTransaction = Nothing
|
||||
m_bIsTransactionPending = False
|
||||
m_alSavePoints = new ArrayList()
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Opens the connection object.
|
||||
' /// </summary>
|
||||
' /// <returns>True, if succeeded, otherwise an Exception exception is thrown.</returns>
|
||||
Public Function OpenConnection() As Boolean
|
||||
Try
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) > 0 Then
|
||||
' // It's already open.
|
||||
'STR/DUB 2006-07-19: connection schliessen wenn noch offen
|
||||
'Throw New Exception("OpenConnection::Connection is already open.")
|
||||
CloseConnection(True)
|
||||
End If
|
||||
m_scoDBConnection.Open()
|
||||
m_bIsTransactionPending = False
|
||||
m_alSavePoints.Clear()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Starts a new ADO.NET transaction using the open connection object of this class.
|
||||
' /// </summary>
|
||||
' /// <param name="sTransactionName">Name of the transaction to start</param>
|
||||
' /// <returns>True, if transaction is started correctly, otherwise an Exception exception is thrown</returns>
|
||||
Public Function BeginTransaction(sTransactionName As String) As Boolean
|
||||
Try
|
||||
If m_bIsTransactionPending Then
|
||||
' // no nested transactions allowed.
|
||||
Throw New Exception("BeginTransaction::Already transaction pending. Nesting not allowed")
|
||||
End If
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // no open connection
|
||||
Throw New Exception("BeginTransaction::Connection is not open.")
|
||||
End If
|
||||
' // begin the transaction and store the transaction object.
|
||||
m_stCurrentTransaction = m_scoDBConnection.BeginTransaction(IsolationLevel.ReadCommitted, sTransactionName)
|
||||
m_bIsTransactionPending = True
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Commits a pending transaction on the open connection object of this class.
|
||||
' /// </summary>
|
||||
' /// <returns>True, if commit was succesful, or an Exception exception is thrown</returns>
|
||||
Public Function CommitTransaction() As Boolean
|
||||
Try
|
||||
If Not m_bIsTransactionPending Then
|
||||
' // no transaction pending
|
||||
Throw New Exception("CommitTransaction::No transaction pending.")
|
||||
End If
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // no open connection
|
||||
Throw New Exception("CommitTransaction::Connection is not open.")
|
||||
End if
|
||||
' // commit the transaction
|
||||
m_stCurrentTransaction.Commit()
|
||||
m_bIsTransactionPending = False
|
||||
m_stCurrentTransaction.Dispose()
|
||||
m_stCurrentTransaction = Nothing
|
||||
m_alSavePoints.Clear()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Rolls back a pending transaction on the open connection object of this class,
|
||||
' /// or rolls back to the savepoint with the given name. Savepoints are created with SaveTransaction().
|
||||
' /// </summary>
|
||||
' /// <param name="sTransactionToRollback">Name of transaction to roll back. Can be name of savepoint</param>
|
||||
' /// <returns>True, if rollback was succesful, or an Exception exception is thrown</returns>
|
||||
Public Function RollbackTransaction(sTransactionToRollback As String) As Boolean
|
||||
Try
|
||||
If Not m_bIsTransactionPending Then
|
||||
' // no transaction pending
|
||||
Throw New Exception("RollbackTransaction::No transaction pending.")
|
||||
End If
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // no open connection
|
||||
Throw New Exception("RollbackTransaction::Connection is not open.")
|
||||
End If
|
||||
' // rollback the transaction
|
||||
m_stCurrentTransaction.Rollback(sTransactionToRollback)
|
||||
' // if this wasn't a savepoint, we've rolled back the complete transaction, so we
|
||||
' // can clean it up.
|
||||
If Not m_alSavePoints.Contains(sTransactionToRollback) Then
|
||||
' // it's not a savepoint
|
||||
m_bIsTransactionPending = False
|
||||
m_stCurrentTransaction.Dispose()
|
||||
m_stCurrentTransaction = Nothing
|
||||
m_alSavePoints.Clear()
|
||||
End If
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Saves a pending transaction on the open connection object of this class to a 'savepoint'
|
||||
' /// with the given name.
|
||||
' /// When a rollback is issued, the caller can rollback to this savepoint or roll back the complete transaction.
|
||||
' /// </summary>
|
||||
' /// <param name="sSavePointName">Name of the savepoint to store the current transaction under.</param>
|
||||
' /// <returns>True, if save was succesful, or an Exception exception is thrown</returns>
|
||||
Public Function SaveTransaction(sSavePointName As String) As Boolean
|
||||
Try
|
||||
If Not m_bIsTransactionPending Then
|
||||
' // no transaction pending
|
||||
Throw New Exception("SaveTransaction::No transaction pending.")
|
||||
End If
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // no open connection
|
||||
Throw New Exception("SaveTransaction::Connection is not open.")
|
||||
End If
|
||||
' // save the transaction
|
||||
m_stCurrentTransaction.Save(sSavePointName)
|
||||
' // Store the savepoint in the list.
|
||||
m_alSavePoints.Add(sSavePointName)
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Closes the open connection. Depending on bCommitPendingTransactions, a pending
|
||||
' /// transaction is commited, or aborted.
|
||||
' /// </summary>
|
||||
' /// <param name="bCommitPendingTransaction">Flag for what to do when a transaction is still pending. True
|
||||
' /// will commit the current transaction, False will abort (rollback) the complete current transaction.</param>
|
||||
' /// <returns>True, if close was succesful, False if connection was already closed, or an Exception exception is thrown when
|
||||
' /// an error occurs</returns>
|
||||
Public Function CloseConnection(bCommitPendingTransaction As Boolean) As Boolean
|
||||
Try
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // No open connection
|
||||
Return False
|
||||
End If
|
||||
If m_bIsTransactionPending Then
|
||||
If bCommitPendingTransaction Then
|
||||
' // Commit the pending transaction
|
||||
m_stCurrentTransaction.Commit()
|
||||
Else
|
||||
' // Rollback the pending transaction
|
||||
m_stCurrentTransaction.Rollback()
|
||||
End If
|
||||
m_bIsTransactionPending = False
|
||||
m_stCurrentTransaction.Dispose()
|
||||
m_stCurrentTransaction = Nothing
|
||||
m_alSavePoints.Clear()
|
||||
End If
|
||||
' // close the connection
|
||||
m_scoDBConnection.Close()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public ReadOnly Property stCurrentTransaction() As SqlTransaction
|
||||
Get
|
||||
Return m_stCurrentTransaction
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Public ReadOnly Property bIsTransactionPending() As Boolean
|
||||
Get
|
||||
Return m_bIsTransactionPending
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Public ReadOnly Property scoDBConnection() As SqlConnection
|
||||
Get
|
||||
Return m_scoDBConnection
|
||||
End Get
|
||||
End Property
|
||||
Public WriteOnly Property sConnectionString() As String
|
||||
Set (ByVal Value As String)
|
||||
m_scoDBConnection.ConnectionString = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
202
Archiv/EDKB02_old/Backup/Datenbank/clsDBInteractionBase.vb
Normal file
202
Archiv/EDKB02_old/Backup/Datenbank/clsDBInteractionBase.vb
Normal file
@@ -0,0 +1,202 @@
|
||||
' //////////////////////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Base class for Database Interaction.
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 18. Mai 2003, 00:06:25
|
||||
' // Because this class implements IDisposable, derived classes shouldn't do so.
|
||||
' //////////////////////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Configuration
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Data.SqlTypes
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Error Enums used by this LLBL library.
|
||||
' /// </summary>
|
||||
Public Enum LLBLError
|
||||
AllOk
|
||||
' // Add more here (check the comma's!)
|
||||
End Enum
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: General interface of the API generated. Contains only common methods of all classes.
|
||||
' /// </summary>
|
||||
Public Interface ICommonDBAccess
|
||||
Function Insert() As Boolean
|
||||
Function Update() As Boolean
|
||||
Function Delete() As Boolean
|
||||
Function SelectOne() As DataTable
|
||||
Function SelectAll() As DataTable
|
||||
End Interface
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Abstract base class for Database Interaction classes.
|
||||
' /// </summary>
|
||||
Public MustInherit Class clsDBInteractionBase
|
||||
Implements IDisposable
|
||||
Implements ICommonDBAccess
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Protected m_scoMainConnection As SqlConnection
|
||||
Protected m_iErrorCode As SqlInt32
|
||||
Protected m_bMainConnectionIsCreatedLocal As Boolean
|
||||
Protected m_cpMainConnectionProvider As clsConnectionProvider
|
||||
Private m_sConnectionString As String
|
||||
Private m_bIsDisposed As Boolean
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Initialize the class' members.
|
||||
InitClass()
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Initializes class members.
|
||||
' /// </summary>
|
||||
Private Sub InitClass()
|
||||
' // create all the objects and initialize other members.
|
||||
m_scoMainConnection = new SqlConnection()
|
||||
m_bMainConnectionIsCreatedLocal = True
|
||||
m_cpMainConnectionProvider = Nothing
|
||||
m_iErrorCode = New SqlInt32(LLBLError.AllOk)
|
||||
m_bIsDisposed = False
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the IDispose' method Dispose.
|
||||
' /// </summary>
|
||||
Overloads Public Sub Dispose() Implements IDisposable.Dispose
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the Dispose functionality.
|
||||
' /// </summary>
|
||||
Overridable Overloads Protected Sub Dispose(ByVal bIsDisposing As Boolean)
|
||||
' // Check to see if Dispose has already been called.
|
||||
If Not m_bIsDisposed Then
|
||||
If bIsDisposing Then
|
||||
' // Dispose managed resources.
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Object is created in this class, so destroy it here.
|
||||
m_scoMainConnection.Close()
|
||||
m_scoMainConnection.Dispose()
|
||||
m_bMainConnectionIsCreatedLocal = True
|
||||
End If
|
||||
m_cpMainConnectionProvider = Nothing
|
||||
m_scoMainConnection = Nothing
|
||||
End If
|
||||
End If
|
||||
m_bIsDisposed = True
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.Insert() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function Insert() As Boolean Implements ICommonDBAccess.Insert
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.Delete() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function Delete() As Boolean Implements ICommonDBAccess.Delete
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.Update() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function Update() As Boolean Implements ICommonDBAccess.Update
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.SelectOne() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function SelectOne() As DataTable Implements ICommonDBAccess.SelectOne
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.SelectAll() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function SelectAll() As DataTable Implements ICommonDBAccess.SelectAll
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public WriteOnly Property cpMainConnectionProvider() As clsConnectionProvider
|
||||
Set(ByVal Value As clsConnectionProvider)
|
||||
If Value Is Nothing Then
|
||||
' // Invalid value
|
||||
Throw New ArgumentNullException("cpMainConnectionProvider", "Nothing passed as value to this property which is not allowed.")
|
||||
End If
|
||||
|
||||
' // A connection provider object is passed to this class.
|
||||
' // Retrieve the SqlConnection object, if present and create a
|
||||
' // reference to it. If there is already a MainConnection object
|
||||
' // referenced by the membervar, destroy that one or simply
|
||||
' // remove the reference, based on the flag.
|
||||
If Not (m_scoMainConnection Is Nothing) Then
|
||||
' // First get rid of current connection object. Caller is responsible
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Is local created object, close it and dispose it.
|
||||
m_scoMainConnection.Close()
|
||||
m_scoMainConnection.Dispose()
|
||||
End If
|
||||
' // Remove reference.
|
||||
m_scoMainConnection = Nothing
|
||||
End If
|
||||
m_cpMainConnectionProvider = CType(Value, clsConnectionProvider)
|
||||
m_scoMainConnection = m_cpMainConnectionProvider.scoDBConnection
|
||||
m_bMainConnectionIsCreatedLocal = False
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public ReadOnly Property iErrorCode() As SqlInt32
|
||||
Get
|
||||
Return m_iErrorCode
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Public Property sConnectionString() As String
|
||||
Get
|
||||
Return m_sConnectionString
|
||||
End Get
|
||||
Set (ByVal Value As String)
|
||||
m_sConnectionString = Value
|
||||
m_scoMainConnection.ConnectionString = m_sConnectionString
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
1890
Archiv/EDKB02_old/Backup/Datenbank/clsDokument.vb
Normal file
1890
Archiv/EDKB02_old/Backup/Datenbank/clsDokument.vb
Normal file
File diff suppressed because it is too large
Load Diff
593
Archiv/EDKB02_old/Backup/Datenbank/clsDokument_status.vb
Normal file
593
Archiv/EDKB02_old/Backup/Datenbank/clsDokument_status.vb
Normal file
@@ -0,0 +1,593 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'dokument_status'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Montag, 9. Juni 2003, 08:18:09
|
||||
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Data Access class for the table 'dokument_status'.
|
||||
' /// </summary>
|
||||
Public Class clsDokument_status
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bDokument_bearbeitung_moeglich, m_bFolgestatus_durch_anderen_verantwortlichen, m_bDokument_ausgangsarchivierung, m_bAktiv, m_bDokument_bearbeitung_abgeschlossen As SqlBoolean
|
||||
Private m_daErstellt_am As SqlDateTime
|
||||
Private m_iDokument_statusnr, m_iMutierer, m_iStatus_bezeichnungnr, m_iErledigung_ab As SqlInt32
|
||||
Private m_sReihenfolge, m_sBezeichnung, m_sDokumenitid As SqlString
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>sDokumenitid. May be SqlString.Null</LI>
|
||||
' /// <LI>iStatus_bezeichnungnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
|
||||
' /// <LI>sReihenfolge. May be SqlString.Null</LI>
|
||||
' /// <LI>bFolgestatus_durch_anderen_verantwortlichen. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bDokument_bearbeitung_moeglich. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>iErledigung_ab. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bDokument_ausgangsarchivierung. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bDokument_bearbeitung_abgeschlossen. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iDokument_statusnr</LI>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_dokument_status_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumenitid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumenitid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus_bezeichnungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus_bezeichnungnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sreihenfolge", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReihenfolge))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bfolgestatus_durch_anderen_verantwortlichen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bFolgestatus_durch_anderen_verantwortlichen))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_bearbeitung_moeglich", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_bearbeitung_moeglich))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ierledigung_ab", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iErledigung_ab))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_ausgangsarchivierung", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_ausgangsarchivierung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_bearbeitung_abgeschlossen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_bearbeitung_abgeschlossen))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@idokument_statusnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iDokument_statusnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iDokument_statusnr = scmCmdToExecute.Parameters.Item("@idokument_statusnr").Value
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_dokument_status_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Threading.Thread.Sleep(1000)
|
||||
'MsgBox(ex.Message)
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
'Throw New Exception("clsDokument_status::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Update method. This method will Update one existing row in the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iDokument_statusnr</LI>
|
||||
' /// <LI>sDokumenitid. May be SqlString.Null</LI>
|
||||
' /// <LI>iStatus_bezeichnungnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
|
||||
' /// <LI>sReihenfolge. May be SqlString.Null</LI>
|
||||
' /// <LI>bFolgestatus_durch_anderen_verantwortlichen. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bDokument_bearbeitung_moeglich. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>iErledigung_ab. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bDokument_ausgangsarchivierung. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bDokument_bearbeitung_abgeschlossen. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Update() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_dokument_status_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokument_statusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokument_statusnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumenitid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumenitid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus_bezeichnungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus_bezeichnungnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sreihenfolge", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReihenfolge))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bfolgestatus_durch_anderen_verantwortlichen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bFolgestatus_durch_anderen_verantwortlichen))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_bearbeitung_moeglich", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_bearbeitung_moeglich))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ierledigung_ab", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iErledigung_ab))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_ausgangsarchivierung", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_ausgangsarchivierung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_bearbeitung_abgeschlossen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_bearbeitung_abgeschlossen))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_dokument_status_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsDokument_status::Update::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iDokument_statusnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Delete() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_dokument_status_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokument_statusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokument_statusnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_dokument_status_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsDokument_status::Delete::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iDokument_statusnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iDokument_statusnr</LI>
|
||||
' /// <LI>sDokumenitid</LI>
|
||||
' /// <LI>iStatus_bezeichnungnr</LI>
|
||||
' /// <LI>sBezeichnung</LI>
|
||||
' /// <LI>sReihenfolge</LI>
|
||||
' /// <LI>bFolgestatus_durch_anderen_verantwortlichen</LI>
|
||||
' /// <LI>bDokument_bearbeitung_moeglich</LI>
|
||||
' /// <LI>iErledigung_ab</LI>
|
||||
' /// <LI>bDokument_ausgangsarchivierung</LI>
|
||||
' /// <LI>bDokument_bearbeitung_abgeschlossen</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>iMutierer</LI>
|
||||
' /// </UL>
|
||||
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectOne() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_dokument_status_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("dokument_status")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@idokument_statusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokument_statusnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_dokument_status_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iDokument_statusnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokument_statusnr"), Integer))
|
||||
If dtToReturn.Rows(0)("dokumenitid") Is System.DBNull.Value Then
|
||||
m_sDokumenitid = SqlString.Null
|
||||
Else
|
||||
m_sDokumenitid = New SqlString(CType(dtToReturn.Rows(0)("dokumenitid"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("status_bezeichnungnr") Is System.DBNull.Value Then
|
||||
m_iStatus_bezeichnungnr = SqlInt32.Null
|
||||
Else
|
||||
m_iStatus_bezeichnungnr = New SqlInt32(CType(dtToReturn.Rows(0)("status_bezeichnungnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("bezeichnung") Is System.DBNull.Value Then
|
||||
m_sBezeichnung = SqlString.Null
|
||||
Else
|
||||
m_sBezeichnung = New SqlString(CType(dtToReturn.Rows(0)("bezeichnung"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("reihenfolge") Is System.DBNull.Value Then
|
||||
m_sReihenfolge = SqlString.Null
|
||||
Else
|
||||
m_sReihenfolge = New SqlString(CType(dtToReturn.Rows(0)("reihenfolge"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("folgestatus_durch_anderen_verantwortlichen") Is System.DBNull.Value Then
|
||||
m_bFolgestatus_durch_anderen_verantwortlichen = SqlBoolean.Null
|
||||
Else
|
||||
m_bFolgestatus_durch_anderen_verantwortlichen = New SqlBoolean(CType(dtToReturn.Rows(0)("folgestatus_durch_anderen_verantwortlichen"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("dokument_bearbeitung_moeglich") Is System.DBNull.Value Then
|
||||
m_bDokument_bearbeitung_moeglich = SqlBoolean.Null
|
||||
Else
|
||||
m_bDokument_bearbeitung_moeglich = New SqlBoolean(CType(dtToReturn.Rows(0)("dokument_bearbeitung_moeglich"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("erledigung_ab") Is System.DBNull.Value Then
|
||||
m_iErledigung_ab = SqlInt32.Null
|
||||
Else
|
||||
m_iErledigung_ab = New SqlInt32(CType(dtToReturn.Rows(0)("erledigung_ab"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("dokument_ausgangsarchivierung") Is System.DBNull.Value Then
|
||||
m_bDokument_ausgangsarchivierung = SqlBoolean.Null
|
||||
Else
|
||||
m_bDokument_ausgangsarchivierung = New SqlBoolean(CType(dtToReturn.Rows(0)("dokument_ausgangsarchivierung"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("dokument_bearbeitung_abgeschlossen") Is System.DBNull.Value Then
|
||||
m_bDokument_bearbeitung_abgeschlossen = SqlBoolean.Null
|
||||
Else
|
||||
m_bDokument_bearbeitung_abgeschlossen = New SqlBoolean(CType(dtToReturn.Rows(0)("dokument_bearbeitung_abgeschlossen"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
|
||||
m_bAktiv = SqlBoolean.Null
|
||||
Else
|
||||
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
|
||||
m_daErstellt_am = SqlDateTime.Null
|
||||
Else
|
||||
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
|
||||
m_iMutierer = SqlInt32.Null
|
||||
Else
|
||||
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
|
||||
End If
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsDokument_status::SelectOne::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_dokument_status_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("dokument_status")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_dokument_status_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsDokument_status::SelectAll::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public Property [iDokument_statusnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iDokument_statusnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iDokument_statusnrTmp As SqlInt32 = Value
|
||||
If iDokument_statusnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iDokument_statusnr", "iDokument_statusnr can't be NULL")
|
||||
End If
|
||||
m_iDokument_statusnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDokumenitid]() As SqlString
|
||||
Get
|
||||
Return m_sDokumenitid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDokumenitid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iStatus_bezeichnungnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iStatus_bezeichnungnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iStatus_bezeichnungnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBezeichnung]() As SqlString
|
||||
Get
|
||||
Return m_sBezeichnung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBezeichnung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sReihenfolge]() As SqlString
|
||||
Get
|
||||
Return m_sReihenfolge
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sReihenfolge = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bFolgestatus_durch_anderen_verantwortlichen]() As SqlBoolean
|
||||
Get
|
||||
Return m_bFolgestatus_durch_anderen_verantwortlichen
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bFolgestatus_durch_anderen_verantwortlichen = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bDokument_bearbeitung_moeglich]() As SqlBoolean
|
||||
Get
|
||||
Return m_bDokument_bearbeitung_moeglich
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bDokument_bearbeitung_moeglich = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iErledigung_ab]() As SqlInt32
|
||||
Get
|
||||
Return m_iErledigung_ab
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iErledigung_ab = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bDokument_ausgangsarchivierung]() As SqlBoolean
|
||||
Get
|
||||
Return m_bDokument_ausgangsarchivierung
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bDokument_ausgangsarchivierung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bDokument_bearbeitung_abgeschlossen]() As SqlBoolean
|
||||
Get
|
||||
Return m_bDokument_bearbeitung_abgeschlossen
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bDokument_bearbeitung_abgeschlossen = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bAktiv]() As SqlBoolean
|
||||
Get
|
||||
Return m_bAktiv
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daErstellt_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daErstellt_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daErstellt_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iMutierer]() As SqlInt32
|
||||
Get
|
||||
Return m_iMutierer
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iMutierer = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
663
Archiv/EDKB02_old/Backup/Datenbank/clsDokumentcoldindexwert.vb
Normal file
663
Archiv/EDKB02_old/Backup/Datenbank/clsDokumentcoldindexwert.vb
Normal file
@@ -0,0 +1,663 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'dokumentcoldindexwert'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 24. Juni 2003, 23:10:00
|
||||
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Data Access class for the table 'dokumentcoldindexwert'.
|
||||
' /// </summary>
|
||||
Public Class clsDokumentcoldindexwert
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bAktiv As SqlBoolean
|
||||
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
|
||||
Private m_iIndextyp, m_iMutierer, m_iCold_indexfeldnr, m_iCold_indexfeldnrOld, m_iMandantnr, m_iColdindexwertnr As SqlInt32
|
||||
Private m_sWert, m_sDokumentid As SqlString
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iIndextyp. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sWert. May be SqlString.Null</LI>
|
||||
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sDokumentid. May be SqlString.Null</LI>
|
||||
' /// <LI>iCold_indexfeldnr. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iColdindexwertnr</LI>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_dokumentcoldindexwert_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iindextyp", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iIndextyp))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@swert", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sWert))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@icold_indexfeldnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCold_indexfeldnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@icoldindexwertnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iColdindexwertnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iColdindexwertnr = scmCmdToExecute.Parameters.Item("@icoldindexwertnr").Value
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_dokumentcoldindexwert_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsDokumentcoldindexwert::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Update method. This method will Update one existing row in the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iColdindexwertnr</LI>
|
||||
' /// <LI>iIndextyp. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sWert. May be SqlString.Null</LI>
|
||||
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sDokumentid. May be SqlString.Null</LI>
|
||||
' /// <LI>iCold_indexfeldnr. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Update() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_dokumentcoldindexwert_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@icoldindexwertnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iColdindexwertnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iindextyp", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iIndextyp))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@swert", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sWert))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@icold_indexfeldnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCold_indexfeldnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_dokumentcoldindexwert_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsDokumentcoldindexwert::Update::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Update method for updating one or more rows using the Foreign Key 'cold_indexfeldnr.
|
||||
' /// This method will Update one or more existing rows in the database. It will reset the field 'cold_indexfeldnr' in
|
||||
' /// all rows which have as value for this field the value as set in property 'iCold_indexfeldnrOld' to
|
||||
' /// the value as set in property 'iCold_indexfeldnr'.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iCold_indexfeldnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iCold_indexfeldnrOld. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Public Function UpdateAllWcold_indexfeldnrLogic() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_dokumentcoldindexwert_UpdateAllWcold_indexfeldnrLogic]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@icold_indexfeldnr", SqlDbType.Int, 4, ParameterDirection.Input, false, 10, 0, "", DataRowVersion.Proposed, m_iCold_indexfeldnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@icold_indexfeldnrOld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCold_indexfeldnrOld))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, Integer))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_dokumentcoldindexwert_UpdateAllWcold_indexfeldnrLogic' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsDokumentcoldindexwert::UpdateAllWcold_indexfeldnrLogic::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iColdindexwertnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Delete() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_dokumentcoldindexwert_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@icoldindexwertnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iColdindexwertnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_dokumentcoldindexwert_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsDokumentcoldindexwert::Delete::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iColdindexwertnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iColdindexwertnr</LI>
|
||||
' /// <LI>iIndextyp</LI>
|
||||
' /// <LI>sWert</LI>
|
||||
' /// <LI>iMandantnr</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>iMutierer</LI>
|
||||
' /// <LI>sDokumentid</LI>
|
||||
' /// <LI>iCold_indexfeldnr</LI>
|
||||
' /// </UL>
|
||||
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectOne() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_dokumentcoldindexwert_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("dokumentcoldindexwert")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@icoldindexwertnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iColdindexwertnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_dokumentcoldindexwert_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iColdindexwertnr = New SqlInt32(CType(dtToReturn.Rows(0)("coldindexwertnr"), Integer))
|
||||
If dtToReturn.Rows(0)("indextyp") Is System.DBNull.Value Then
|
||||
m_iIndextyp = SqlInt32.Null
|
||||
Else
|
||||
m_iIndextyp = New SqlInt32(CType(dtToReturn.Rows(0)("indextyp"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("wert") Is System.DBNull.Value Then
|
||||
m_sWert = SqlString.Null
|
||||
Else
|
||||
m_sWert = New SqlString(CType(dtToReturn.Rows(0)("wert"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then
|
||||
m_iMandantnr = SqlInt32.Null
|
||||
Else
|
||||
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
|
||||
m_bAktiv = SqlBoolean.Null
|
||||
Else
|
||||
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
|
||||
m_daErstellt_am = SqlDateTime.Null
|
||||
Else
|
||||
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
|
||||
m_daMutiert_am = SqlDateTime.Null
|
||||
Else
|
||||
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
|
||||
m_iMutierer = SqlInt32.Null
|
||||
Else
|
||||
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("dokumentid") Is System.DBNull.Value Then
|
||||
m_sDokumentid = SqlString.Null
|
||||
Else
|
||||
m_sDokumentid = New SqlString(CType(dtToReturn.Rows(0)("dokumentid"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("cold_indexfeldnr") Is System.DBNull.Value Then
|
||||
m_iCold_indexfeldnr = SqlInt32.Null
|
||||
Else
|
||||
m_iCold_indexfeldnr = New SqlInt32(CType(dtToReturn.Rows(0)("cold_indexfeldnr"), Integer))
|
||||
End If
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsDokumentcoldindexwert::SelectOne::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_dokumentcoldindexwert_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("dokumentcoldindexwert")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_dokumentcoldindexwert_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsDokumentcoldindexwert::SelectAll::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Select method for a foreign key. This method will Select one or more rows from the database, based on the Foreign Key 'cold_indexfeldnr'
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iCold_indexfeldnr. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Public Function SelectAllWcold_indexfeldnrLogic() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_dokumentcoldindexwert_SelectAllWcold_indexfeldnrLogic]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("dokumentcoldindexwert")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@icold_indexfeldnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCold_indexfeldnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, Integer))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_dokumentcoldindexwert_SelectAllWcold_indexfeldnrLogic' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsDokumentcoldindexwert::SelectAllWcold_indexfeldnrLogic::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public Property [iColdindexwertnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iColdindexwertnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iColdindexwertnrTmp As SqlInt32 = Value
|
||||
If iColdindexwertnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iColdindexwertnr", "iColdindexwertnr can't be NULL")
|
||||
End If
|
||||
m_iColdindexwertnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iIndextyp]() As SqlInt32
|
||||
Get
|
||||
Return m_iIndextyp
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iIndextyp = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sWert]() As SqlString
|
||||
Get
|
||||
Return m_sWert
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sWert = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iMandantnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iMandantnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iMandantnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bAktiv]() As SqlBoolean
|
||||
Get
|
||||
Return m_bAktiv
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daErstellt_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daErstellt_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daErstellt_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daMutiert_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daMutiert_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daMutiert_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iMutierer]() As SqlInt32
|
||||
Get
|
||||
Return m_iMutierer
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iMutierer = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDokumentid]() As SqlString
|
||||
Get
|
||||
Return m_sDokumentid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDokumentid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iCold_indexfeldnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iCold_indexfeldnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iCold_indexfeldnr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property [iCold_indexfeldnrOld]() As SqlInt32
|
||||
Get
|
||||
Return m_iCold_indexfeldnrOld
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iCold_indexfeldnrOld = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
491
Archiv/EDKB02_old/Backup/Datenbank/clsDokumentersetzen.vb
Normal file
491
Archiv/EDKB02_old/Backup/Datenbank/clsDokumentersetzen.vb
Normal file
@@ -0,0 +1,491 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'dokumentersetzen'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 18. Mai 2003, 21:36:00
|
||||
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Data Access class for the table 'dokumentersetzen'.
|
||||
' /// </summary>
|
||||
Public Class clsDokumentersetzen
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bAktiv As SqlBoolean
|
||||
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
|
||||
Private m_iMutierer, m_iColdstatus, m_iDokumentersetzennr As SqlInt32
|
||||
Private m_sDokumentid, m_sHauptdokumentid As SqlString
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>sHauptdokumentid. May be SqlString.Null</LI>
|
||||
' /// <LI>sDokumentid. May be SqlString.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iColdstatus. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iDokumentersetzennr</LI>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_dokumentersetzen_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@shauptdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sHauptdokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@icoldstatus", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iColdstatus))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@idokumentersetzennr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentersetzennr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iDokumentersetzennr = scmCmdToExecute.Parameters.Item("@idokumentersetzennr").Value
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_dokumentersetzen_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsDokumentersetzen::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Update method. This method will Update one existing row in the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iDokumentersetzennr</LI>
|
||||
' /// <LI>sHauptdokumentid. May be SqlString.Null</LI>
|
||||
' /// <LI>sDokumentid. May be SqlString.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iColdstatus. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Update() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_dokumentersetzen_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentersetzennr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentersetzennr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@shauptdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sHauptdokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@icoldstatus", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iColdstatus))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_dokumentersetzen_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsDokumentersetzen::Update::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iDokumentersetzennr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Delete() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_dokumentersetzen_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentersetzennr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentersetzennr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_dokumentersetzen_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsDokumentersetzen::Delete::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iDokumentersetzennr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iDokumentersetzennr</LI>
|
||||
' /// <LI>sHauptdokumentid</LI>
|
||||
' /// <LI>sDokumentid</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>iMutierer</LI>
|
||||
' /// <LI>iColdstatus</LI>
|
||||
' /// </UL>
|
||||
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectOne() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_dokumentersetzen_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("dokumentersetzen")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@idokumentersetzennr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentersetzennr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_dokumentersetzen_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iDokumentersetzennr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumentersetzennr"), Integer))
|
||||
If dtToReturn.Rows(0)("hauptdokumentid") Is System.DBNull.Value Then
|
||||
m_sHauptdokumentid = SqlString.Null
|
||||
Else
|
||||
m_sHauptdokumentid = New SqlString(CType(dtToReturn.Rows(0)("hauptdokumentid"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("dokumentid") Is System.DBNull.Value Then
|
||||
m_sDokumentid = SqlString.Null
|
||||
Else
|
||||
m_sDokumentid = New SqlString(CType(dtToReturn.Rows(0)("dokumentid"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
|
||||
m_bAktiv = SqlBoolean.Null
|
||||
Else
|
||||
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
|
||||
m_daErstellt_am = SqlDateTime.Null
|
||||
Else
|
||||
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
|
||||
m_daMutiert_am = SqlDateTime.Null
|
||||
Else
|
||||
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
|
||||
m_iMutierer = SqlInt32.Null
|
||||
Else
|
||||
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("coldstatus") Is System.DBNull.Value Then
|
||||
m_iColdstatus = SqlInt32.Null
|
||||
Else
|
||||
m_iColdstatus = New SqlInt32(CType(dtToReturn.Rows(0)("coldstatus"), Integer))
|
||||
End If
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsDokumentersetzen::SelectOne::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_dokumentersetzen_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("dokumentersetzen")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_dokumentersetzen_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsDokumentersetzen::SelectAll::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public Property [iDokumentersetzennr]() As SqlInt32
|
||||
Get
|
||||
Return m_iDokumentersetzennr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iDokumentersetzennrTmp As SqlInt32 = Value
|
||||
If iDokumentersetzennrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iDokumentersetzennr", "iDokumentersetzennr can't be NULL")
|
||||
End If
|
||||
m_iDokumentersetzennr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sHauptdokumentid]() As SqlString
|
||||
Get
|
||||
Return m_sHauptdokumentid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sHauptdokumentid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDokumentid]() As SqlString
|
||||
Get
|
||||
Return m_sDokumentid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDokumentid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bAktiv]() As SqlBoolean
|
||||
Get
|
||||
Return m_bAktiv
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daErstellt_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daErstellt_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daErstellt_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daMutiert_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daMutiert_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daMutiert_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iMutierer]() As SqlInt32
|
||||
Get
|
||||
Return m_iMutierer
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iMutierer = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iColdstatus]() As SqlInt32
|
||||
Get
|
||||
Return m_iColdstatus
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iColdstatus = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
649
Archiv/EDKB02_old/Backup/Datenbank/clsDokumentstatus.vb
Normal file
649
Archiv/EDKB02_old/Backup/Datenbank/clsDokumentstatus.vb
Normal file
@@ -0,0 +1,649 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'dokumentstatus'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Samstag, 8. März 2003, 22:06:47
|
||||
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Data Access class for the table 'dokumentstatus'.
|
||||
' /// </summary>
|
||||
Public Class clsDokumentstatus
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bDokumentbearbeitung_moeglich, m_bFolgestatus_durch_anderen_verantwortlichen, m_bDokument_bearbeitung_abgeschlossen, m_bDokument_ausgangsarchivieren, m_bAktiv As SqlBoolean
|
||||
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
|
||||
Private m_iStatustyp, m_iMutierer, m_iMandantnr, m_iStatustypnr, m_iDokumenttypnr, m_iDokumentstatusnr, m_iErledigung_ab, m_iReihenfolge, m_iStatus_bezeichnungnr As SqlInt32
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iDokumentstatusnr</LI>
|
||||
' /// <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iStatustypnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iStatus_bezeichnungnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iReihenfolge</LI>
|
||||
' /// <LI>bFolgestatus_durch_anderen_verantwortlichen</LI>
|
||||
' /// <LI>bDokumentbearbeitung_moeglich</LI>
|
||||
' /// <LI>iErledigung_ab</LI>
|
||||
' /// <LI>bDokument_ausgangsarchivieren. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bDokument_bearbeitung_abgeschlossen. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iStatustyp. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_dokumentstatus_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentstatusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatusnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatustypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatustypnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus_bezeichnungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus_bezeichnungnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireihenfolge", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReihenfolge))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bfolgestatus_durch_anderen_verantwortlichen", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bFolgestatus_durch_anderen_verantwortlichen))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokumentbearbeitung_moeglich", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bDokumentbearbeitung_moeglich))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ierledigung_ab", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iErledigung_ab))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_ausgangsarchivieren", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_ausgangsarchivieren))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_bearbeitung_abgeschlossen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_bearbeitung_abgeschlossen))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatustyp", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatustyp))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_dokumentstatus_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsDokumentstatus::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Update method. This method will Update one existing row in the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iDokumentstatusnr</LI>
|
||||
' /// <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iStatustypnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iStatus_bezeichnungnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iReihenfolge</LI>
|
||||
' /// <LI>bFolgestatus_durch_anderen_verantwortlichen</LI>
|
||||
' /// <LI>bDokumentbearbeitung_moeglich</LI>
|
||||
' /// <LI>iErledigung_ab</LI>
|
||||
' /// <LI>bDokument_ausgangsarchivieren. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bDokument_bearbeitung_abgeschlossen. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iStatustyp. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Update() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_dokumentstatus_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentstatusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatusnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatustypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatustypnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus_bezeichnungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus_bezeichnungnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireihenfolge", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReihenfolge))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bfolgestatus_durch_anderen_verantwortlichen", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bFolgestatus_durch_anderen_verantwortlichen))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokumentbearbeitung_moeglich", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bDokumentbearbeitung_moeglich))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ierledigung_ab", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iErledigung_ab))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_ausgangsarchivieren", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_ausgangsarchivieren))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_bearbeitung_abgeschlossen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_bearbeitung_abgeschlossen))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatustyp", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatustyp))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_dokumentstatus_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsDokumentstatus::Update::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iDokumentstatusnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Delete() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_dokumentstatus_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentstatusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatusnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_dokumentstatus_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsDokumentstatus::Delete::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iDokumentstatusnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iDokumentstatusnr</LI>
|
||||
' /// <LI>iDokumenttypnr</LI>
|
||||
' /// <LI>iStatustypnr</LI>
|
||||
' /// <LI>iStatus_bezeichnungnr</LI>
|
||||
' /// <LI>iReihenfolge</LI>
|
||||
' /// <LI>bFolgestatus_durch_anderen_verantwortlichen</LI>
|
||||
' /// <LI>bDokumentbearbeitung_moeglich</LI>
|
||||
' /// <LI>iErledigung_ab</LI>
|
||||
' /// <LI>bDokument_ausgangsarchivieren</LI>
|
||||
' /// <LI>bDokument_bearbeitung_abgeschlossen</LI>
|
||||
' /// <LI>iMandantnr</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>iMutierer</LI>
|
||||
' /// <LI>iStatustyp</LI>
|
||||
' /// </UL>
|
||||
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectOne() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_dokumentstatus_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("dokumentstatus")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@idokumentstatusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatusnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_dokumentstatus_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iDokumentstatusnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumentstatusnr"), Integer))
|
||||
If dtToReturn.Rows(0)("dokumenttypnr") Is System.DBNull.Value Then
|
||||
m_iDokumenttypnr = SqlInt32.Null
|
||||
Else
|
||||
m_iDokumenttypnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumenttypnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("statustypnr") Is System.DBNull.Value Then
|
||||
m_iStatustypnr = SqlInt32.Null
|
||||
Else
|
||||
m_iStatustypnr = New SqlInt32(CType(dtToReturn.Rows(0)("statustypnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("status_bezeichnungnr") Is System.DBNull.Value Then
|
||||
m_iStatus_bezeichnungnr = SqlInt32.Null
|
||||
Else
|
||||
m_iStatus_bezeichnungnr = New SqlInt32(CType(dtToReturn.Rows(0)("status_bezeichnungnr"), Integer))
|
||||
End If
|
||||
m_iReihenfolge = New SqlInt32(CType(dtToReturn.Rows(0)("reihenfolge"), Integer))
|
||||
m_bFolgestatus_durch_anderen_verantwortlichen = New SqlBoolean(CType(dtToReturn.Rows(0)("folgestatus_durch_anderen_verantwortlichen"), Boolean))
|
||||
m_bDokumentbearbeitung_moeglich = New SqlBoolean(CType(dtToReturn.Rows(0)("dokumentbearbeitung_moeglich"), Boolean))
|
||||
m_iErledigung_ab = New SqlInt32(CType(dtToReturn.Rows(0)("erledigung_ab"), Integer))
|
||||
If dtToReturn.Rows(0)("dokument_ausgangsarchivieren") Is System.DBNull.Value Then
|
||||
m_bDokument_ausgangsarchivieren = SqlBoolean.Null
|
||||
Else
|
||||
m_bDokument_ausgangsarchivieren = New SqlBoolean(CType(dtToReturn.Rows(0)("dokument_ausgangsarchivieren"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("dokument_bearbeitung_abgeschlossen") Is System.DBNull.Value Then
|
||||
m_bDokument_bearbeitung_abgeschlossen = SqlBoolean.Null
|
||||
Else
|
||||
m_bDokument_bearbeitung_abgeschlossen = New SqlBoolean(CType(dtToReturn.Rows(0)("dokument_bearbeitung_abgeschlossen"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then
|
||||
m_iMandantnr = SqlInt32.Null
|
||||
Else
|
||||
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
|
||||
m_bAktiv = SqlBoolean.Null
|
||||
Else
|
||||
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
|
||||
m_daErstellt_am = SqlDateTime.Null
|
||||
Else
|
||||
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
|
||||
m_daMutiert_am = SqlDateTime.Null
|
||||
Else
|
||||
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
|
||||
m_iMutierer = SqlInt32.Null
|
||||
Else
|
||||
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("statustyp") Is System.DBNull.Value Then
|
||||
m_iStatustyp = SqlInt32.Null
|
||||
Else
|
||||
m_iStatustyp = New SqlInt32(CType(dtToReturn.Rows(0)("statustyp"), Integer))
|
||||
End If
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsDokumentstatus::SelectOne::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_dokumentstatus_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("dokumentstatus")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_dokumentstatus_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsDokumentstatus::SelectAll::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public Property [iDokumentstatusnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iDokumentstatusnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iDokumentstatusnrTmp As SqlInt32 = Value
|
||||
If iDokumentstatusnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iDokumentstatusnr", "iDokumentstatusnr can't be NULL")
|
||||
End If
|
||||
m_iDokumentstatusnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iDokumenttypnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iDokumenttypnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iDokumenttypnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iStatustypnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iStatustypnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iStatustypnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iStatus_bezeichnungnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iStatus_bezeichnungnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iStatus_bezeichnungnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iReihenfolge]() As SqlInt32
|
||||
Get
|
||||
Return m_iReihenfolge
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iReihenfolgeTmp As SqlInt32 = Value
|
||||
If iReihenfolgeTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iReihenfolge", "iReihenfolge can't be NULL")
|
||||
End If
|
||||
m_iReihenfolge = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bFolgestatus_durch_anderen_verantwortlichen]() As SqlBoolean
|
||||
Get
|
||||
Return m_bFolgestatus_durch_anderen_verantwortlichen
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
Dim bFolgestatus_durch_anderen_verantwortlichenTmp As SqlBoolean = Value
|
||||
If bFolgestatus_durch_anderen_verantwortlichenTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("bFolgestatus_durch_anderen_verantwortlichen", "bFolgestatus_durch_anderen_verantwortlichen can't be NULL")
|
||||
End If
|
||||
m_bFolgestatus_durch_anderen_verantwortlichen = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bDokumentbearbeitung_moeglich]() As SqlBoolean
|
||||
Get
|
||||
Return m_bDokumentbearbeitung_moeglich
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
Dim bDokumentbearbeitung_moeglichTmp As SqlBoolean = Value
|
||||
If bDokumentbearbeitung_moeglichTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("bDokumentbearbeitung_moeglich", "bDokumentbearbeitung_moeglich can't be NULL")
|
||||
End If
|
||||
m_bDokumentbearbeitung_moeglich = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iErledigung_ab]() As SqlInt32
|
||||
Get
|
||||
Return m_iErledigung_ab
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iErledigung_abTmp As SqlInt32 = Value
|
||||
If iErledigung_abTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iErledigung_ab", "iErledigung_ab can't be NULL")
|
||||
End If
|
||||
m_iErledigung_ab = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bDokument_ausgangsarchivieren]() As SqlBoolean
|
||||
Get
|
||||
Return m_bDokument_ausgangsarchivieren
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bDokument_ausgangsarchivieren = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bDokument_bearbeitung_abgeschlossen]() As SqlBoolean
|
||||
Get
|
||||
Return m_bDokument_bearbeitung_abgeschlossen
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bDokument_bearbeitung_abgeschlossen = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iMandantnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iMandantnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iMandantnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bAktiv]() As SqlBoolean
|
||||
Get
|
||||
Return m_bAktiv
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daErstellt_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daErstellt_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daErstellt_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daMutiert_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daMutiert_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daMutiert_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iMutierer]() As SqlInt32
|
||||
Get
|
||||
Return m_iMutierer
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iMutierer = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iStatustyp]() As SqlInt32
|
||||
Get
|
||||
Return m_iStatustyp
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iStatustyp = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
1872
Archiv/EDKB02_old/Backup/Datenbank/clsDokumenttyp.vb
Normal file
1872
Archiv/EDKB02_old/Backup/Datenbank/clsDokumenttyp.vb
Normal file
File diff suppressed because it is too large
Load Diff
679
Archiv/EDKB02_old/Backup/Datenbank/clsEDEX_BL_BLIndex.vb
Normal file
679
Archiv/EDKB02_old/Backup/Datenbank/clsEDEX_BL_BLIndex.vb
Normal file
@@ -0,0 +1,679 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'EDEX_BL_BLIndex'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Freitag, 24. Juni 2005, 14:00:44
|
||||
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Data Access class for the table 'EDEX_BL_BLIndex'.
|
||||
' /// </summary>
|
||||
Public Class clsEDEX_BL_BLIndex
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bAktiv As SqlBoolean
|
||||
Private m_daScandatum, m_daErstellt_am, m_daMutiert_am As SqlDateTime
|
||||
Private m_iMutierer, m_iBl_status, m_iBLIndexnr, m_iBatch_status, m_iAuslieferungnr As SqlInt32
|
||||
Private m_sBedrdokumentid, m_sOriginaldokumentid, m_sStapelnr, m_sUser_id, m_sDokumentid, m_sCold_dokumentid, m_sRes3, m_sRes2, m_sRes1 As SqlString
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>sDokumentid</LI>
|
||||
' /// <LI>iBl_status</LI>
|
||||
' /// <LI>sUser_id. May be SqlString.Null</LI>
|
||||
' /// <LI>sStapelnr. May be SqlString.Null</LI>
|
||||
' /// <LI>daScandatum. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>sCold_dokumentid. May be SqlString.Null</LI>
|
||||
' /// <LI>sRes1. May be SqlString.Null</LI>
|
||||
' /// <LI>sRes2. May be SqlString.Null</LI>
|
||||
' /// <LI>sRes3. May be SqlString.Null</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iAuslieferungnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iBatch_status. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sOriginaldokumentid. May be SqlString.Null</LI>
|
||||
' /// <LI>sBedrdokumentid. May be SqlString.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iBLIndexnr</LI>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_EDEX_BL_BLIndex_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibl_status", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBl_status))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@suser_id", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sUser_id))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sstapelnr", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStapelnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dascandatum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daScandatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@scold_dokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCold_dokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRes1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRes2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres3", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRes3))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iauslieferungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAuslieferungnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibatch_status", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBatch_status))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@soriginaldokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sOriginaldokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbedrdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBedrdokumentid))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iBLIndexnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iBLIndexnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iBLIndexnr = scmCmdToExecute.Parameters.Item("@iBLIndexnr").Value
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_edex_bl_EDEX_BL_BLIndex_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsEDEX_BL_BLIndex::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Update method. This method will Update one existing row in the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iBLIndexnr</LI>
|
||||
' /// <LI>sDokumentid</LI>
|
||||
' /// <LI>iBl_status</LI>
|
||||
' /// <LI>sUser_id. May be SqlString.Null</LI>
|
||||
' /// <LI>sStapelnr. May be SqlString.Null</LI>
|
||||
' /// <LI>daScandatum. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>sCold_dokumentid. May be SqlString.Null</LI>
|
||||
' /// <LI>sRes1. May be SqlString.Null</LI>
|
||||
' /// <LI>sRes2. May be SqlString.Null</LI>
|
||||
' /// <LI>sRes3. May be SqlString.Null</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iAuslieferungnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iBatch_status. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sOriginaldokumentid. May be SqlString.Null</LI>
|
||||
' /// <LI>sBedrdokumentid. May be SqlString.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Update() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_EDEX_BL_BLIndex_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iBLIndexnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBLIndexnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibl_status", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBl_status))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@suser_id", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sUser_id))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sstapelnr", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStapelnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dascandatum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daScandatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@scold_dokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCold_dokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRes1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRes2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres3", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRes3))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iauslieferungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAuslieferungnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibatch_status", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBatch_status))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@soriginaldokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sOriginaldokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbedrdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBedrdokumentid))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_edex_bl_EDEX_BL_BLIndex_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsEDEX_BL_BLIndex::Update::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iBLIndexnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Delete() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_EDEX_BL_BLIndex_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iBLIndexnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBLIndexnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_edex_bl_EDEX_BL_BLIndex_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsEDEX_BL_BLIndex::Delete::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iBLIndexnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iBLIndexnr</LI>
|
||||
' /// <LI>sDokumentid</LI>
|
||||
' /// <LI>iBl_status</LI>
|
||||
' /// <LI>sUser_id</LI>
|
||||
' /// <LI>sStapelnr</LI>
|
||||
' /// <LI>daScandatum</LI>
|
||||
' /// <LI>sCold_dokumentid</LI>
|
||||
' /// <LI>sRes1</LI>
|
||||
' /// <LI>sRes2</LI>
|
||||
' /// <LI>sRes3</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>iMutierer</LI>
|
||||
' /// <LI>iAuslieferungnr</LI>
|
||||
' /// <LI>iBatch_status</LI>
|
||||
' /// <LI>sOriginaldokumentid</LI>
|
||||
' /// <LI>sBedrdokumentid</LI>
|
||||
' /// </UL>
|
||||
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectOne() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_EDEX_BL_BLIndex_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("EDEX_BL_BLIndex")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iBLIndexnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBLIndexnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_edex_bl_EDEX_BL_BLIndex_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iBLIndexnr = New SqlInt32(CType(dtToReturn.Rows(0)("BLIndexnr"), Integer))
|
||||
m_sDokumentid = New SqlString(CType(dtToReturn.Rows(0)("Dokumentid"), String))
|
||||
m_iBl_status = New SqlInt32(CType(dtToReturn.Rows(0)("bl_status"), Integer))
|
||||
If dtToReturn.Rows(0)("user_id") Is System.DBNull.Value Then
|
||||
m_sUser_id = SqlString.Null
|
||||
Else
|
||||
m_sUser_id = New SqlString(CType(dtToReturn.Rows(0)("user_id"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("stapelnr") Is System.DBNull.Value Then
|
||||
m_sStapelnr = SqlString.Null
|
||||
Else
|
||||
m_sStapelnr = New SqlString(CType(dtToReturn.Rows(0)("stapelnr"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("scandatum") Is System.DBNull.Value Then
|
||||
m_daScandatum = SqlDateTime.Null
|
||||
Else
|
||||
m_daScandatum = New SqlDateTime(CType(dtToReturn.Rows(0)("scandatum"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("cold_dokumentid") Is System.DBNull.Value Then
|
||||
m_sCold_dokumentid = SqlString.Null
|
||||
Else
|
||||
m_sCold_dokumentid = New SqlString(CType(dtToReturn.Rows(0)("cold_dokumentid"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("res1") Is System.DBNull.Value Then
|
||||
m_sRes1 = SqlString.Null
|
||||
Else
|
||||
m_sRes1 = New SqlString(CType(dtToReturn.Rows(0)("res1"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("res2") Is System.DBNull.Value Then
|
||||
m_sRes2 = SqlString.Null
|
||||
Else
|
||||
m_sRes2 = New SqlString(CType(dtToReturn.Rows(0)("res2"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("res3") Is System.DBNull.Value Then
|
||||
m_sRes3 = SqlString.Null
|
||||
Else
|
||||
m_sRes3 = New SqlString(CType(dtToReturn.Rows(0)("res3"), String))
|
||||
End If
|
||||
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
|
||||
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
|
||||
m_daMutiert_am = SqlDateTime.Null
|
||||
Else
|
||||
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
|
||||
End If
|
||||
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
|
||||
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
|
||||
m_iMutierer = SqlInt32.Null
|
||||
Else
|
||||
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("auslieferungnr") Is System.DBNull.Value Then
|
||||
m_iAuslieferungnr = SqlInt32.Null
|
||||
Else
|
||||
m_iAuslieferungnr = New SqlInt32(CType(dtToReturn.Rows(0)("auslieferungnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("batch_status") Is System.DBNull.Value Then
|
||||
m_iBatch_status = SqlInt32.Null
|
||||
Else
|
||||
m_iBatch_status = New SqlInt32(CType(dtToReturn.Rows(0)("batch_status"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("originaldokumentid") Is System.DBNull.Value Then
|
||||
m_sOriginaldokumentid = SqlString.Null
|
||||
Else
|
||||
m_sOriginaldokumentid = New SqlString(CType(dtToReturn.Rows(0)("originaldokumentid"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("bedrdokumentid") Is System.DBNull.Value Then
|
||||
m_sBedrdokumentid = SqlString.Null
|
||||
Else
|
||||
m_sBedrdokumentid = New SqlString(CType(dtToReturn.Rows(0)("bedrdokumentid"), String))
|
||||
End If
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsEDEX_BL_BLIndex::SelectOne::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_EDEX_BL_BLIndex_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("EDEX_BL_BLIndex")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_edex_bl_EDEX_BL_BLIndex_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsEDEX_BL_BLIndex::SelectAll::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public Property [iBLIndexnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iBLIndexnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iBLIndexnrTmp As SqlInt32 = Value
|
||||
If iBLIndexnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iBLIndexnr", "iBLIndexnr can't be NULL")
|
||||
End If
|
||||
m_iBLIndexnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDokumentid]() As SqlString
|
||||
Get
|
||||
Return m_sDokumentid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sDokumentidTmp As SqlString = Value
|
||||
If sDokumentidTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sDokumentid", "sDokumentid can't be NULL")
|
||||
End If
|
||||
m_sDokumentid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iBl_status]() As SqlInt32
|
||||
Get
|
||||
Return m_iBl_status
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iBl_status = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sUser_id]() As SqlString
|
||||
Get
|
||||
Return m_sUser_id
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sUser_id = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sStapelnr]() As SqlString
|
||||
Get
|
||||
Return m_sStapelnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sStapelnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daScandatum]() As SqlDateTime
|
||||
Get
|
||||
Return m_daScandatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daScandatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sCold_dokumentid]() As SqlString
|
||||
Get
|
||||
Return m_sCold_dokumentid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sCold_dokumentid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sRes1]() As SqlString
|
||||
Get
|
||||
Return m_sRes1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sRes1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sRes2]() As SqlString
|
||||
Get
|
||||
Return m_sRes2
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sRes2 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sRes3]() As SqlString
|
||||
Get
|
||||
Return m_sRes3
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sRes3 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daErstellt_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daErstellt_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daErstellt_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daMutiert_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daMutiert_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daMutiert_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bAktiv]() As SqlBoolean
|
||||
Get
|
||||
Return m_bAktiv
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iMutierer]() As SqlInt32
|
||||
Get
|
||||
Return m_iMutierer
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iMutierer = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iAuslieferungnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iAuslieferungnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iAuslieferungnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iBatch_status]() As SqlInt32
|
||||
Get
|
||||
Return m_iBatch_status
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iBatch_status = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sOriginaldokumentid]() As SqlString
|
||||
Get
|
||||
Return m_sOriginaldokumentid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sOriginaldokumentid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBedrdokumentid]() As SqlString
|
||||
Get
|
||||
Return m_sBedrdokumentid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBedrdokumentid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
453
Archiv/EDKB02_old/Backup/Datenbank/clsJournal.vb
Normal file
453
Archiv/EDKB02_old/Backup/Datenbank/clsJournal.vb
Normal file
@@ -0,0 +1,453 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'Journal'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 18. Mai 2003, 00:06:24
|
||||
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Data Access class for the table 'Journal'.
|
||||
' /// </summary>
|
||||
Public Class clsJournal
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bFehlerhaft As SqlBoolean
|
||||
Private m_daEnde, m_daStart As SqlDateTime
|
||||
Private m_iJournalnr, m_iApplikationnr As SqlInt32
|
||||
Private m_sFehlerbeschreibung As SqlString
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iApplikationnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>daStart. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daEnde. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>bFehlerhaft. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>sFehlerbeschreibung. May be SqlString.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iJournalnr</LI>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journal_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iapplikationnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iApplikationnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dastart", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daStart))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daende", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daEnde))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bfehlerhaft", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bFehlerhaft))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfehlerbeschreibung", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFehlerbeschreibung))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@ijournalnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iJournalnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iJournalnr = scmCmdToExecute.Parameters.Item("@ijournalnr").Value
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Journal_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Threading.Thread.Sleep(1000)
|
||||
' MsgBox(ex.Message)
|
||||
' Throw New Exception("clsJournal::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Update method. This method will Update one existing row in the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iJournalnr</LI>
|
||||
' /// <LI>iApplikationnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>daStart. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daEnde. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>bFehlerhaft. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>sFehlerbeschreibung. May be SqlString.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Update() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journal_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournalnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournalnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iapplikationnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iApplikationnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dastart", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daStart))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daende", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daEnde))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bfehlerhaft", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bFehlerhaft))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfehlerbeschreibung", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFehlerbeschreibung))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Journal_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsJournal::Update::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iJournalnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Delete() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journal_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournalnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournalnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Journal_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsJournal::Delete::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iJournalnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iJournalnr</LI>
|
||||
' /// <LI>iApplikationnr</LI>
|
||||
' /// <LI>daStart</LI>
|
||||
' /// <LI>daEnde</LI>
|
||||
' /// <LI>bFehlerhaft</LI>
|
||||
' /// <LI>sFehlerbeschreibung</LI>
|
||||
' /// </UL>
|
||||
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectOne() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journal_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("Journal")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@ijournalnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournalnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Journal_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iJournalnr = New SqlInt32(CType(dtToReturn.Rows(0)("journalnr"), Integer))
|
||||
If dtToReturn.Rows(0)("applikationnr") Is System.DBNull.Value Then
|
||||
m_iApplikationnr = SqlInt32.Null
|
||||
Else
|
||||
m_iApplikationnr = New SqlInt32(CType(dtToReturn.Rows(0)("applikationnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("start") Is System.DBNull.Value Then
|
||||
m_daStart = SqlDateTime.Null
|
||||
Else
|
||||
m_daStart = New SqlDateTime(CType(dtToReturn.Rows(0)("start"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("ende") Is System.DBNull.Value Then
|
||||
m_daEnde = SqlDateTime.Null
|
||||
Else
|
||||
m_daEnde = New SqlDateTime(CType(dtToReturn.Rows(0)("ende"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("fehlerhaft") Is System.DBNull.Value Then
|
||||
m_bFehlerhaft = SqlBoolean.Null
|
||||
Else
|
||||
m_bFehlerhaft = New SqlBoolean(CType(dtToReturn.Rows(0)("fehlerhaft"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("fehlerbeschreibung") Is System.DBNull.Value Then
|
||||
m_sFehlerbeschreibung = SqlString.Null
|
||||
Else
|
||||
m_sFehlerbeschreibung = New SqlString(CType(dtToReturn.Rows(0)("fehlerbeschreibung"), String))
|
||||
End If
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsJournal::SelectOne::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journal_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("Journal")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Journal_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsJournal::SelectAll::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public Property [iJournalnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iJournalnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iJournalnrTmp As SqlInt32 = Value
|
||||
If iJournalnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iJournalnr", "iJournalnr can't be NULL")
|
||||
End If
|
||||
m_iJournalnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iApplikationnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iApplikationnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iApplikationnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daStart]() As SqlDateTime
|
||||
Get
|
||||
Return m_daStart
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daStart = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daEnde]() As SqlDateTime
|
||||
Get
|
||||
Return m_daEnde
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daEnde = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bFehlerhaft]() As SqlBoolean
|
||||
Get
|
||||
Return m_bFehlerhaft
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bFehlerhaft = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sFehlerbeschreibung]() As SqlString
|
||||
Get
|
||||
Return m_sFehlerbeschreibung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sFehlerbeschreibung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
437
Archiv/EDKB02_old/Backup/Datenbank/clsJournaldatei.vb
Normal file
437
Archiv/EDKB02_old/Backup/Datenbank/clsJournaldatei.vb
Normal file
@@ -0,0 +1,437 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'Journaldatei'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 18. Mai 2003, 00:06:25
|
||||
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Data Access class for the table 'Journaldatei'.
|
||||
' /// </summary>
|
||||
Public Class clsJournaldatei
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_blobDatei As SqlBinary
|
||||
Private m_iJournalnr, m_iJournaldateinr As SqlInt32
|
||||
Private m_sDateiname, m_sBezeichnung As SqlString
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iJournaldateinr</LI>
|
||||
' /// <LI>iJournalnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
|
||||
' /// <LI>blobDatei. May be SqlBinary.Null</LI>
|
||||
' /// <LI>sDateiname. May be SqlString.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journaldatei_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournaldateinr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournaldateinr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournalnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iJournalnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
Dim iLength As Integer = 0
|
||||
If Not m_blobDatei.IsNull Then
|
||||
iLength = m_blobDatei.Length
|
||||
End If
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobdatei", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobDatei))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdateiname", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateiname))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Journaldatei_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsJournaldatei::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Update method. This method will Update one existing row in the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iJournaldateinr</LI>
|
||||
' /// <LI>iJournalnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
|
||||
' /// <LI>blobDatei. May be SqlBinary.Null</LI>
|
||||
' /// <LI>sDateiname. May be SqlString.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Update() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journaldatei_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournaldateinr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournaldateinr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournalnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iJournalnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
Dim iLength As Integer = 0
|
||||
If Not m_blobDatei.IsNull Then
|
||||
iLength = m_blobDatei.Length
|
||||
End If
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobdatei", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobDatei))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdateiname", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateiname))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Journaldatei_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsJournaldatei::Update::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iJournaldateinr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Delete() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journaldatei_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournaldateinr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournaldateinr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Journaldatei_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsJournaldatei::Delete::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iJournaldateinr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iJournaldateinr</LI>
|
||||
' /// <LI>iJournalnr</LI>
|
||||
' /// <LI>sBezeichnung</LI>
|
||||
' /// <LI>blobDatei</LI>
|
||||
' /// <LI>sDateiname</LI>
|
||||
' /// </UL>
|
||||
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectOne() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journaldatei_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("Journaldatei")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@ijournaldateinr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournaldateinr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Journaldatei_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iJournaldateinr = New SqlInt32(CType(dtToReturn.Rows(0)("journaldateinr"), Integer))
|
||||
If dtToReturn.Rows(0)("journalnr") Is System.DBNull.Value Then
|
||||
m_iJournalnr = SqlInt32.Null
|
||||
Else
|
||||
m_iJournalnr = New SqlInt32(CType(dtToReturn.Rows(0)("journalnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("bezeichnung") Is System.DBNull.Value Then
|
||||
m_sBezeichnung = SqlString.Null
|
||||
Else
|
||||
m_sBezeichnung = New SqlString(CType(dtToReturn.Rows(0)("bezeichnung"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("datei") Is System.DBNull.Value Then
|
||||
m_blobDatei = SqlBinary.Null
|
||||
Else
|
||||
m_blobDatei = New SqlBinary(CType(dtToReturn.Rows(0)("datei"), Byte()))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("dateiname") Is System.DBNull.Value Then
|
||||
m_sDateiname = SqlString.Null
|
||||
Else
|
||||
m_sDateiname = New SqlString(CType(dtToReturn.Rows(0)("dateiname"), String))
|
||||
End If
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsJournaldatei::SelectOne::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journaldatei_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("Journaldatei")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Journaldatei_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsJournaldatei::SelectAll::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public Property [iJournaldateinr]() As SqlInt32
|
||||
Get
|
||||
Return m_iJournaldateinr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iJournaldateinrTmp As SqlInt32 = Value
|
||||
If iJournaldateinrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iJournaldateinr", "iJournaldateinr can't be NULL")
|
||||
End If
|
||||
m_iJournaldateinr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iJournalnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iJournalnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iJournalnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBezeichnung]() As SqlString
|
||||
Get
|
||||
Return m_sBezeichnung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBezeichnung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [blobDatei]() As SqlBinary
|
||||
Get
|
||||
Return m_blobDatei
|
||||
End Get
|
||||
Set(ByVal Value As SqlBinary)
|
||||
m_blobDatei = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDateiname]() As SqlString
|
||||
Get
|
||||
Return m_sDateiname
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDateiname = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
410
Archiv/EDKB02_old/Backup/Datenbank/clsJournaleintrag.vb
Normal file
410
Archiv/EDKB02_old/Backup/Datenbank/clsJournaleintrag.vb
Normal file
@@ -0,0 +1,410 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'Journaleintrag'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 18. Mai 2003, 09:14:59
|
||||
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Data Access class for the table 'Journaleintrag'.
|
||||
' /// </summary>
|
||||
Public Class clsJournaleintrag
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_daDatumzeit As SqlDateTime
|
||||
Private m_iJournalnr, m_iJournaleintragnr As SqlInt32
|
||||
Private m_sEintrag As SqlString
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iJournalnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sEintrag. May be SqlString.Null</LI>
|
||||
' /// <LI>daDatumzeit. May be SqlDateTime.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iJournaleintragnr</LI>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journaleintrag_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournalnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iJournalnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@seintrag", SqlDbType.VarChar, 2048, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEintrag))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dadatumzeit", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDatumzeit))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@ijournaleintragnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iJournaleintragnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iJournaleintragnr = scmCmdToExecute.Parameters.Item("@ijournaleintragnr").Value
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Journaleintrag_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsJournaleintrag::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Update method. This method will Update one existing row in the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iJournaleintragnr</LI>
|
||||
' /// <LI>iJournalnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sEintrag. May be SqlString.Null</LI>
|
||||
' /// <LI>daDatumzeit. May be SqlDateTime.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Update() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journaleintrag_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournaleintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournaleintragnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournalnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iJournalnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@seintrag", SqlDbType.VarChar, 2048, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEintrag))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dadatumzeit", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDatumzeit))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Journaleintrag_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsJournaleintrag::Update::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iJournaleintragnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Delete() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journaleintrag_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournaleintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournaleintragnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Journaleintrag_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsJournaleintrag::Delete::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iJournaleintragnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iJournaleintragnr</LI>
|
||||
' /// <LI>iJournalnr</LI>
|
||||
' /// <LI>sEintrag</LI>
|
||||
' /// <LI>daDatumzeit</LI>
|
||||
' /// </UL>
|
||||
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectOne() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journaleintrag_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("Journaleintrag")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@ijournaleintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournaleintragnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Journaleintrag_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iJournaleintragnr = New SqlInt32(CType(dtToReturn.Rows(0)("journaleintragnr"), Integer))
|
||||
If dtToReturn.Rows(0)("journalnr") Is System.DBNull.Value Then
|
||||
m_iJournalnr = SqlInt32.Null
|
||||
Else
|
||||
m_iJournalnr = New SqlInt32(CType(dtToReturn.Rows(0)("journalnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("eintrag") Is System.DBNull.Value Then
|
||||
m_sEintrag = SqlString.Null
|
||||
Else
|
||||
m_sEintrag = New SqlString(CType(dtToReturn.Rows(0)("eintrag"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("datumzeit") Is System.DBNull.Value Then
|
||||
m_daDatumzeit = SqlDateTime.Null
|
||||
Else
|
||||
m_daDatumzeit = New SqlDateTime(CType(dtToReturn.Rows(0)("datumzeit"), Date))
|
||||
End If
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsJournaleintrag::SelectOne::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journaleintrag_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("Journaleintrag")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Journaleintrag_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsJournaleintrag::SelectAll::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public Property [iJournaleintragnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iJournaleintragnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iJournaleintragnrTmp As SqlInt32 = Value
|
||||
If iJournaleintragnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iJournaleintragnr", "iJournaleintragnr can't be NULL")
|
||||
End If
|
||||
m_iJournaleintragnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iJournalnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iJournalnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iJournalnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sEintrag]() As SqlString
|
||||
Get
|
||||
Return m_sEintrag
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sEintrag = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daDatumzeit]() As SqlDateTime
|
||||
Get
|
||||
Return m_daDatumzeit
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daDatumzeit = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
490
Archiv/EDKB02_old/Backup/Datenbank/clsKey_tabelle.vb
Normal file
490
Archiv/EDKB02_old/Backup/Datenbank/clsKey_tabelle.vb
Normal file
@@ -0,0 +1,490 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'key_tabelle'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Samstag, 7. Dezember 2002, 22:50:12
|
||||
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Data Access class for the table 'key_tabelle'.
|
||||
' /// </summary>
|
||||
Public Class clsKey_tabelle
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bAktiv As SqlBoolean
|
||||
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
|
||||
Private m_iMutierer, m_iKeynr, m_iKey_wert, m_iMandantnr As SqlInt32
|
||||
Private m_sBeschreibung As SqlString
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iKeynr</LI>
|
||||
' /// <LI>sBeschreibung</LI>
|
||||
' /// <LI>iKey_wert</LI>
|
||||
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_key_tabelle_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikeynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKeynr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikey_wert", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKey_wert))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_key_tabelle_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsKey_tabelle::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Update method. This method will Update one existing row in the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iKeynr</LI>
|
||||
' /// <LI>sBeschreibung</LI>
|
||||
' /// <LI>iKey_wert</LI>
|
||||
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Update() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_key_tabelle_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikeynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKeynr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikey_wert", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKey_wert))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_key_tabelle_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsKey_tabelle::Update::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iKeynr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Delete() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_key_tabelle_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikeynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKeynr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_key_tabelle_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsKey_tabelle::Delete::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iKeynr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iKeynr</LI>
|
||||
' /// <LI>sBeschreibung</LI>
|
||||
' /// <LI>iKey_wert</LI>
|
||||
' /// <LI>iMandantnr</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>iMutierer</LI>
|
||||
' /// </UL>
|
||||
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectOne() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_key_tabelle_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("key_tabelle")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@ikeynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKeynr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_key_tabelle_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iKeynr = New SqlInt32(CType(dtToReturn.Rows(0)("keynr"), Integer))
|
||||
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("beschreibung"), String))
|
||||
m_iKey_wert = New SqlInt32(CType(dtToReturn.Rows(0)("key_wert"), Integer))
|
||||
If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then
|
||||
m_iMandantnr = SqlInt32.Null
|
||||
Else
|
||||
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
|
||||
m_bAktiv = SqlBoolean.Null
|
||||
Else
|
||||
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
|
||||
m_daErstellt_am = SqlDateTime.Null
|
||||
Else
|
||||
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
|
||||
m_daMutiert_am = SqlDateTime.Null
|
||||
Else
|
||||
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
|
||||
m_iMutierer = SqlInt32.Null
|
||||
Else
|
||||
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
|
||||
End If
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsKey_tabelle::SelectOne::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_key_tabelle_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("key_tabelle")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_key_tabelle_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsKey_tabelle::SelectAll::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public Property [iKeynr]() As SqlInt32
|
||||
Get
|
||||
Return m_iKeynr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iKeynrTmp As SqlInt32 = Value
|
||||
If iKeynrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iKeynr", "iKeynr can't be NULL")
|
||||
End If
|
||||
m_iKeynr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBeschreibung]() As SqlString
|
||||
Get
|
||||
Return m_sBeschreibung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sBeschreibungTmp As SqlString = Value
|
||||
If sBeschreibungTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sBeschreibung", "sBeschreibung can't be NULL")
|
||||
End If
|
||||
m_sBeschreibung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iKey_wert]() As SqlInt32
|
||||
Get
|
||||
Return m_iKey_wert
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iKey_wertTmp As SqlInt32 = Value
|
||||
If iKey_wertTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iKey_wert", "iKey_wert can't be NULL")
|
||||
End If
|
||||
m_iKey_wert = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iMandantnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iMandantnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iMandantnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bAktiv]() As SqlBoolean
|
||||
Get
|
||||
Return m_bAktiv
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daErstellt_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daErstellt_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daErstellt_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daMutiert_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daMutiert_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daMutiert_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iMutierer]() As SqlInt32
|
||||
Get
|
||||
Return m_iMutierer
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iMutierer = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
261
Archiv/EDKB02_old/Backup/Datenbank/clsMehrfachscann.vb
Normal file
261
Archiv/EDKB02_old/Backup/Datenbank/clsMehrfachscann.vb
Normal file
@@ -0,0 +1,261 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'mehrfachscann'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 19. Juli 2006, 15:16:33
|
||||
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Data Access class for the table 'mehrfachscann'.
|
||||
' /// </summary>
|
||||
Public Class clsMehrfachscann
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bAktiv As SqlBoolean
|
||||
Private m_daStatusdatum, m_daMutiert_am, m_daErstellt_am, m_daMutationsdatum As SqlDateTime
|
||||
Private m_iMutierer, m_iNreintrag, m_iStatus, m_iMandantnr As SqlInt32
|
||||
Private m_sDokumentid, m_sStapelnr, m_sColddokumentid As SqlString
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iNreintrag</LI>
|
||||
' /// <LI>daMutationsdatum</LI>
|
||||
' /// <LI>sColddokumentid. May be SqlString.Null</LI>
|
||||
' /// <LI>sStapelnr</LI>
|
||||
' /// <LI>iStatus</LI>
|
||||
' /// <LI>daStatusdatum</LI>
|
||||
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sDokumentid. May be SqlString.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
'scmCmdToExecute.CommandText = "dbo.[pv_mehrfachscann_Insert]"
|
||||
scmCmdToExecute.CommandText = "dbo.[pv_mehrfachscann_Insert_EDKB02]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutationsdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daMutationsdatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@scolddokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sColddokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sstapelnr", SqlDbType.VarChar, 20, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sStapelnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dastatusdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daStatusdatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pv_mehrfachscann_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsMehrfachscann::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public Property [iNreintrag]() As SqlInt32
|
||||
Get
|
||||
Return m_iNreintrag
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iNreintragTmp As SqlInt32 = Value
|
||||
If iNreintragTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iNreintrag", "iNreintrag can't be NULL")
|
||||
End If
|
||||
m_iNreintrag = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daMutationsdatum]() As SqlDateTime
|
||||
Get
|
||||
Return m_daMutationsdatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
Dim daMutationsdatumTmp As SqlDateTime = Value
|
||||
If daMutationsdatumTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("daMutationsdatum", "daMutationsdatum can't be NULL")
|
||||
End If
|
||||
m_daMutationsdatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sColddokumentid]() As SqlString
|
||||
Get
|
||||
Return m_sColddokumentid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sColddokumentid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sStapelnr]() As SqlString
|
||||
Get
|
||||
Return m_sStapelnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sStapelnrTmp As SqlString = Value
|
||||
If sStapelnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sStapelnr", "sStapelnr can't be NULL")
|
||||
End If
|
||||
m_sStapelnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iStatus]() As SqlInt32
|
||||
Get
|
||||
Return m_iStatus
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iStatusTmp As SqlInt32 = Value
|
||||
If iStatusTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iStatus", "iStatus can't be NULL")
|
||||
End If
|
||||
m_iStatus = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daStatusdatum]() As SqlDateTime
|
||||
Get
|
||||
Return m_daStatusdatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
Dim daStatusdatumTmp As SqlDateTime = Value
|
||||
If daStatusdatumTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("daStatusdatum", "daStatusdatum can't be NULL")
|
||||
End If
|
||||
m_daStatusdatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iMandantnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iMandantnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iMandantnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bAktiv]() As SqlBoolean
|
||||
Get
|
||||
Return m_bAktiv
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daErstellt_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daErstellt_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daErstellt_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daMutiert_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daMutiert_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daMutiert_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iMutierer]() As SqlInt32
|
||||
Get
|
||||
Return m_iMutierer
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iMutierer = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDokumentid]() As SqlString
|
||||
Get
|
||||
Return m_sDokumentid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDokumentid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
62
Archiv/EDKB02_old/Backup/Datenbank/clsMyKey_Tabelle.vb
Normal file
62
Archiv/EDKB02_old/Backup/Datenbank/clsMyKey_Tabelle.vb
Normal file
@@ -0,0 +1,62 @@
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
Namespace edokadb
|
||||
Public Class clsMyKey_Tabelle
|
||||
Inherits edokadb.clsKey_tabelle
|
||||
|
||||
Public Function get_dbkey(ByVal Tablename As String) As Long
|
||||
Dim m_dbkey As Long = 0
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[sp_get_dbkey]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@Tablename", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, Tablename))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dbkey", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_dbkey))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
Try
|
||||
scmCmdToExecute.Connection.Open()
|
||||
Catch ex As Exception
|
||||
|
||||
Finally
|
||||
End Try
|
||||
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_dbkey = scmCmdToExecute.Parameters.Item("@dbkey").Value
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
scmCmdToExecute.Connection.Close()
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'sp_get_dbkey' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return m_dbkey
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsKey_tabelle::get_dbkey::Error occured." + ex.Message, ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
1150
Archiv/EDKB02_old/Backup/Datenbank/clsPartner.vb
Normal file
1150
Archiv/EDKB02_old/Backup/Datenbank/clsPartner.vb
Normal file
File diff suppressed because it is too large
Load Diff
1151
Archiv/EDKB02_old/Backup/Datenbank/clsPartner_sik.vb
Normal file
1151
Archiv/EDKB02_old/Backup/Datenbank/clsPartner_sik.vb
Normal file
File diff suppressed because it is too large
Load Diff
38
Archiv/EDKB02_old/Backup/Datenbank/db_connection.vb
Normal file
38
Archiv/EDKB02_old/Backup/Datenbank/db_connection.vb
Normal file
@@ -0,0 +1,38 @@
|
||||
Imports System.ComponentModel
|
||||
Imports Microsoft.VisualBasic
|
||||
|
||||
Namespace EDOKA
|
||||
Public Class DB_Connection
|
||||
Shared Sub New()
|
||||
'Edoka
|
||||
oread = IO.File.OpenText(Globals.ApplicationPath + "edokaconn.cfg")
|
||||
sConnectionString_edoka = oread.ReadLine
|
||||
'sConnectionString_edoka = Crypto.DecryptText(sConnectionString, "HutterundMueller")
|
||||
'sConnectionString_edoka = Left(sConnectionString, Len(sConnectionString) - 1)
|
||||
Globals.sConnectionString_edoka = sConnectionString_edoka
|
||||
oread.Close()
|
||||
|
||||
'Journale
|
||||
oread = IO.File.OpenText(Globals.ApplicationPath + "journaleconn.cfg")
|
||||
sConnectionString_journale = oread.ReadLine
|
||||
'sConnectionString_journale = Crypto.DecryptText(sConnectionString, "HutterundMueller")
|
||||
'sConnectionString_journale = Left(sConnectionString, Len(sConnectionString) - 1)
|
||||
Globals.sConnectionString_journale = sConnectionString_journale
|
||||
oread.Close()
|
||||
'AMS
|
||||
oread = IO.File.OpenText(Globals.ApplicationPath + "amsconn.cfg")
|
||||
sConnectionString_ams = oread.ReadLine
|
||||
'sConnectionString_ams = Crypto.DecryptText(sConnectionString, "HutterundMueller")
|
||||
'sConnectionString_ams = Left(sConnectionString, Len(sConnectionString) - 1)
|
||||
Globals.sConnectionString_ams = sConnectionString_ams
|
||||
oread.Close()
|
||||
|
||||
Globals.conn_edoka.sConnectionString = sConnectionString_edoka
|
||||
Globals.conn_journale.sConnectionString = sConnectionString_journale
|
||||
Globals.conn_ams.sConnectionString = sConnectionString_ams
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
End Namespace
|
||||
284
Archiv/EDKB02_old/Backup/Datenzugriffe.vb
Normal file
284
Archiv/EDKB02_old/Backup/Datenzugriffe.vb
Normal file
@@ -0,0 +1,284 @@
|
||||
Imports System.IO.File
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.ComponentModel
|
||||
Imports System.SystemException
|
||||
Module Datenzugriffe
|
||||
|
||||
Public Function Generic_Select(ByVal typ As Integer) As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
Select Case typ
|
||||
Case 1
|
||||
scmCmdToExecute.CommandText = "dbo.SP_Archiv_Eingangsarchivierte_Dokumente"
|
||||
Case 2
|
||||
scmCmdToExecute.CommandText = "dbo.sp_archiv_bereit_zur_ausgangsarchivierung"
|
||||
Case 3
|
||||
scmCmdToExecute.CommandText = "dbo.sp_archiv_get_coldindex"
|
||||
Case 4
|
||||
scmCmdToExecute.CommandText = "dbo.sp_archiv_get_doctype"
|
||||
Case 5
|
||||
scmCmdToExecute.CommandText = "dbo.sp_archiv_MehrfachScan"
|
||||
Case 6
|
||||
scmCmdToExecute.CommandText = "dbo.sp_archiv_MehrfachScan_Done"
|
||||
Case 7
|
||||
scmCmdToExecute.CommandText = "dbo.sp_archiv_get_coldupdate"
|
||||
Case 8
|
||||
scmCmdToExecute.CommandText = "dbo.sp_archiv_coldupdate_done"
|
||||
Case 9
|
||||
scmCmdToExecute.CommandText = "dbo.sp_archiv_dokumente_ersetzen"
|
||||
Case 10
|
||||
scmCmdToExecute.CommandText = "dbo.sp_update_archivierung"
|
||||
Case 11
|
||||
scmCmdToExecute.CommandText = "dbo.sp_archiv_MehrfachScan"
|
||||
Case 12
|
||||
scmCmdToExecute.CommandText = "dbo.sp_archiv_MehrfachScan_Done"
|
||||
Case 13
|
||||
scmCmdToExecute.CommandText = "dbo.sp_archiv_Get_Prozess"
|
||||
Case 14
|
||||
scmCmdToExecute.CommandText = "dbo.sp_archiv_Get_Archivdatum"
|
||||
Case 15
|
||||
scmCmdToExecute.CommandText = "dbo.sp_archiv_bereit_zur_ausgangsarchivierung"
|
||||
Case Else
|
||||
End Select
|
||||
'BUD - 2006.10.31 - Timeout verlängern auf 100 Sekunden
|
||||
Select Case typ
|
||||
Case 1, 2, 5, 7, 11, 15
|
||||
scmCmdToExecute.CommandTimeout = 100
|
||||
End Select
|
||||
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
Select Case typ
|
||||
Case 3
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.DokumentID))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@indextyp", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.Indextyp))
|
||||
Case 4
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.DokumentID))
|
||||
Case 5
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@typ", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.DokumentID))
|
||||
Case 6
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@typ", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@nreintrag", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.KeyNr))
|
||||
Case 8
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@nreintrag", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.KeyNr))
|
||||
Case 9
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.DokumentID))
|
||||
Case 11
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@typ", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, ""))
|
||||
Case 12
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@typ", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@nreintrag", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.KeyNr))
|
||||
Case 13
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.DokumentID))
|
||||
Case 14
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.DokumentID))
|
||||
Case 15
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@Typ", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 1))
|
||||
Case Else
|
||||
End Select
|
||||
If typ <> 10 Then
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
|
||||
Else
|
||||
scmCmdToExecute.Connection = conn_ams.scoDBConnection
|
||||
End If
|
||||
Try
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("Dokumenterstellung::Generic_Select::" & scmCmdToExecute.CommandText + "::Typ:" + typ.ToString + "::Error occured." & ex.Message, ex)
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Update_DokumentColdIndexwert(ByVal dokumentid As String, ByVal Indextyp As Integer, ByVal indexfeld As Integer, ByVal wert As String) As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.SP_Archiv_Update_DokumentColdIndexwert"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable()
|
||||
conn_edoka.OpenConnection()
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.DokumentID))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@indextyp", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Indextyp))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@indexfeld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, indexfeld))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@wert", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, wert))
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
Try
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("Dokumenterstellung::Generic_Select::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
conn_edoka.CloseConnection(True)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Insert_ColdUpdate(ByVal dokumentid As String, ByVal colddokumentid As String, ByVal indextyp As Integer, ByVal feldnr As Integer, ByVal wert As String) As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.SP_Archiv_insert_coldupdate"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable()
|
||||
conn_edoka.OpenConnection()
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@colddokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, colddokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@indextyp", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, indextyp))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@feldnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, feldnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@neuerwert", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, wert))
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
Try
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
Threading.Thread.Sleep(1000)
|
||||
|
||||
' MsgBox(ex.Message)
|
||||
'Throw New Exception("Dokumenterstellung::Generic_Select::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
||||
Return Nothing
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
conn_edoka.CloseConnection(True)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'Public Function Sendmail(ByVal email As String, ByVal betreff As String, ByVal meldung As String) As Boolean
|
||||
' Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
' scmCmdToExecute.CommandText = "dbo.SP_SendMail"
|
||||
' scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
' Dim dtToReturn As DataTable = New DataTable()
|
||||
' scmCmdToExecute.Parameters.Add(New SqlParameter("@email", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, email))
|
||||
' scmCmdToExecute.Parameters.Add(New SqlParameter("@betreff", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, betreff))
|
||||
' scmCmdToExecute.Parameters.Add(New SqlParameter("@meldung", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, meldung))
|
||||
' scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
' Try
|
||||
' conn_edoka.OpenConnection()
|
||||
' Catch
|
||||
' End Try
|
||||
' Sendmail = True
|
||||
' Try
|
||||
' scmCmdToExecute.ExecuteNonQuery()
|
||||
' Catch ex As Exception
|
||||
' Sendmail = False
|
||||
' Finally
|
||||
' scmCmdToExecute.Dispose()
|
||||
' conn_edoka.CloseConnection(True)
|
||||
' End Try
|
||||
'End Function
|
||||
|
||||
Public Function AMS_New_DBKey(ByVal Keytype As Integer) As Integer
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "SP_New_DBKey"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
conn_ams.OpenConnection()
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@xKeyType", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, keytype))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@NewKey", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, 0))
|
||||
scmCmdToExecute.Connection = conn_ams.scoDBConnection
|
||||
Try
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
AMS_New_DBKey = scmCmdToExecute.Parameters("@NewKey").Value
|
||||
Catch ex As Exception
|
||||
' MsgBox(ex.Message)
|
||||
Threading.Thread.Sleep(1000)
|
||||
|
||||
'Throw New Exception("Neuer Schlüssel für AMS_Cold_Update (53) konnte nicht gelöst werden")
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
conn_ams.CloseConnection(True)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function AMS_Check_Edoka_Dokument(ByVal dokumentid As String) As Integer
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.SP_Archiv_ams_check_edoka_dokument"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable()
|
||||
Try
|
||||
conn_edoka.OpenConnection()
|
||||
Catch
|
||||
End Try
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@return", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 0))
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
Try
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
AMS_Check_Edoka_Dokument = scmCmdToExecute.Parameters("@return").Value
|
||||
Catch ex As Exception
|
||||
' MsgBox(ex.Message)
|
||||
Threading.Thread.Sleep(1000)
|
||||
|
||||
'Throw New Exception("Dokumenterstellung::Generic_Select::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
conn_edoka.CloseConnection(True)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function bereits_eingangsarchiviert(ByVal dokumentid As String) As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.SP_Archiv_check_eingangsarchiviert"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable()
|
||||
Try
|
||||
conn_edoka.OpenConnection()
|
||||
Catch
|
||||
End Try
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@eingangsarchiviert", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, 0))
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
Try
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
If scmCmdToExecute.Parameters("@eingangsarchiviert").Value > 0 Then bereits_eingangsarchiviert = True Else bereits_eingangsarchiviert = False
|
||||
Catch ex As Exception
|
||||
' MsgBox(ex.Message)
|
||||
Threading.Thread.Sleep(1000)
|
||||
'Throw New Exception("Dokumenterstellung::Generic_Select::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
conn_edoka.CloseConnection(True)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function GetColdData(ByVal datum As String) As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.sp_archiv_get_coldupdate_bydatum"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable()
|
||||
Try
|
||||
conn_edoka.OpenConnection()
|
||||
Catch
|
||||
End Try
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@datum", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, datum))
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
Try
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' MsgBox(ex.Message)
|
||||
Threading.Thread.Sleep(1000)
|
||||
' Throw New Exception("Dokumenterstellung::Generic_Select::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
||||
Return Nothing
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
conn_edoka.CloseConnection(True)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
End Module
|
||||
162
Archiv/EDKB02_old/Backup/DocMgmt.vb
Normal file
162
Archiv/EDKB02_old/Backup/DocMgmt.vb
Normal file
@@ -0,0 +1,162 @@
|
||||
'DocMgmt Klasse
|
||||
'Autor: Stefan Hutter, Unternehmensberatung
|
||||
'
|
||||
'01.04.2003
|
||||
'
|
||||
Imports System
|
||||
Imports System.IO
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.ComponentModel
|
||||
|
||||
Public Class DocMgmt
|
||||
|
||||
#Region "Deklarationen"
|
||||
Dim m_dokumentname As String
|
||||
Dim m_dokumentid As String
|
||||
|
||||
Property Dokumentname() As String
|
||||
Get
|
||||
Return m_dokumentname
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_dokumentname = Value
|
||||
End Set
|
||||
End Property
|
||||
Property DokumentID() As String
|
||||
Get
|
||||
Return m_dokumentid
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_dokumentid = Value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "Save"
|
||||
Public Function Save_To_DB(ByVal sDokumentID As String, ByVal sDokumentName As String) As Boolean
|
||||
Me.DokumentID = sDokumentID
|
||||
Me.Dokumentname = sDokumentName
|
||||
|
||||
Dim Connection As New SqlConnection()
|
||||
Dim DA As New SqlDataAdapter("select * from doks where dokumentid='" + Me.DokumentID + "'", Connection)
|
||||
Dim cb As SqlCommandBuilder = New SqlCommandBuilder(DA)
|
||||
Dim ds As New DataSet()
|
||||
Dim fs As New FileStream(Me.Dokumentname, FileMode.OpenOrCreate, FileAccess.Read)
|
||||
Dim mydata(fs.Length) As Byte
|
||||
|
||||
fs.Read(mydata, 0, fs.Length)
|
||||
fs.Close()
|
||||
Try
|
||||
'Connectionstring zur Datenbank
|
||||
Connection.ConnectionString = Globals.sConnectionString_edoka
|
||||
Connection.Open()
|
||||
DA.Fill(ds, "docs")
|
||||
Dim myRow As DataRow
|
||||
If ds.Tables(0).Rows.Count = 0 Then
|
||||
' Neues Dokument speichern
|
||||
myRow = ds.Tables(0).NewRow
|
||||
myRow.Item(0) = Me.DokumentID
|
||||
myRow.Item(1) = mydata
|
||||
ds.Tables(0).Rows.Add(myRow)
|
||||
DA.Update(ds, "docs")
|
||||
Else
|
||||
'Bestehendes Dokument sichenr
|
||||
myRow = ds.Tables(0).Rows(0)
|
||||
myRow.Item(1) = mydata
|
||||
DA.Update(ds, "docs")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
'MsgBox(ex.Message)
|
||||
Threading.Thread.Sleep(1000)
|
||||
Return False
|
||||
End Try
|
||||
fs = Nothing
|
||||
cb = Nothing
|
||||
ds = Nothing
|
||||
DA = Nothing
|
||||
|
||||
Connection.Close()
|
||||
Connection = Nothing
|
||||
Return True
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
Public Function Get_AMS_From_DB(ByVal sdokumentid As String, ByVal sdokumentname As String) As Boolean
|
||||
Me.DokumentID = sDokumentID
|
||||
Me.Dokumentname = sDokumentName
|
||||
|
||||
Dim connection As New SqlConnection()
|
||||
Dim da As New SqlDataAdapter("Select * From dokUMENTE where DokumentNR='" + Me.DokumentID + "'", Globals.sConnectionString_ams)
|
||||
Dim CB As SqlCommandBuilder = New SqlCommandBuilder(da)
|
||||
Dim ds As New DataSet()
|
||||
Try
|
||||
'Connectionstring zur Datenbank
|
||||
connection.ConnectionString = Globals.sConnectionString_ams
|
||||
connection.Open()
|
||||
da.Fill(ds, "docs")
|
||||
Dim myRow As DataRow
|
||||
myRow = ds.Tables(0).Rows(0)
|
||||
Dim MyData() As Byte
|
||||
MyData = myRow.Item(1)
|
||||
Dim K As Long
|
||||
K = UBound(MyData)
|
||||
Dim fs As New FileStream(sdokumentname, FileMode.OpenOrCreate, FileAccess.Write)
|
||||
fs.Write(MyData, 0, K)
|
||||
fs.Close()
|
||||
fs = Nothing
|
||||
Catch ex As Exception
|
||||
'MsgBox(ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
CB = Nothing
|
||||
ds = Nothing
|
||||
da = Nothing
|
||||
connection.Close()
|
||||
connection = Nothing
|
||||
Return True
|
||||
End Function
|
||||
#Region "Get"
|
||||
Public Function Get_From_DB(ByVal sDokumentID As String, ByVal sDokumentName As String) As Boolean
|
||||
Me.DokumentID = sDokumentID
|
||||
Me.Dokumentname = sDokumentName
|
||||
|
||||
Dim connection As New SqlConnection()
|
||||
Dim da As New SqlDataAdapter("Select * From doks where DokumentID='" + Me.DokumentID + "'", connection)
|
||||
Dim CB As SqlCommandBuilder = New SqlCommandBuilder(da)
|
||||
Dim ds As New DataSet()
|
||||
|
||||
Try
|
||||
'Connectionstring zur Datenbank
|
||||
connection.ConnectionString = Globals.sConnectionString_edoka
|
||||
connection.Open()
|
||||
da.Fill(ds, "docs")
|
||||
Dim myRow As DataRow
|
||||
myRow = ds.Tables(0).Rows(0)
|
||||
Dim MyData() As Byte
|
||||
MyData = myRow.Item(1)
|
||||
Dim K As Long
|
||||
K = UBound(MyData)
|
||||
Dim fs As New FileStream(sDokumentName, FileMode.OpenOrCreate, FileAccess.Write)
|
||||
fs.Write(MyData, 0, K)
|
||||
fs.Close()
|
||||
fs = Nothing
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
End Try
|
||||
CB = Nothing
|
||||
ds = Nothing
|
||||
da = Nothing
|
||||
connection.Close()
|
||||
connection = Nothing
|
||||
Return True
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
19
Archiv/EDKB02_old/Backup/EDKB02.sln
Normal file
19
Archiv/EDKB02_old/Backup/EDKB02.sln
Normal file
@@ -0,0 +1,19 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EDKB02", "EDKB02.vbproj", "{84538FD7-A88E-4278-956E-458AB627BE48}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{84538FD7-A88E-4278-956E-458AB627BE48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{84538FD7-A88E-4278-956E-458AB627BE48}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{84538FD7-A88E-4278-956E-458AB627BE48}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{84538FD7-A88E-4278-956E-458AB627BE48}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
BIN
Archiv/EDKB02_old/Backup/EDKB02.v11.suo
Normal file
BIN
Archiv/EDKB02_old/Backup/EDKB02.v11.suo
Normal file
Binary file not shown.
243
Archiv/EDKB02_old/Backup/EDKB02.vbproj
Normal file
243
Archiv/EDKB02_old/Backup/EDKB02.vbproj
Normal file
@@ -0,0 +1,243 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{84538FD7-A88E-4278-956E-458AB627BE48}</ProjectGuid>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>EDKB02</AssemblyName>
|
||||
<AssemblyOriginatorKeyFile>
|
||||
</AssemblyOriginatorKeyFile>
|
||||
<AssemblyOriginatorKeyMode>None</AssemblyOriginatorKeyMode>
|
||||
<DefaultClientScript>JScript</DefaultClientScript>
|
||||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Exe</OutputType>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
<RootNamespace>EDKB02</RootNamespace>
|
||||
<StartupObject>EDKB02.ModMain</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<MyType>Console</MyType>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationVersion>2.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DocumentationFile>EDKB02.xml</DocumentationFile>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DocumentationFile>EDKB02.xml</DocumentationFile>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<Optimize>true</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
|
||||
<DebugType>none</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="BMS, Version=2.0.4126.29238, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\EDKB10\BMS\BMSDll\bin\BMS.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Common, Version=2.0.4126.29238, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\EDKB10\BMS\BMSDll\bin\Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ICSharpCode.SharpZipLib, Version=0.85.0.0, Culture=neutral, PublicKeyToken=1b03e6acf1164f73">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>.\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Office.Interop.Excel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Office.Interop.Word, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System">
|
||||
<Name>System</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<Name>System.Data</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<Name>System.XML</Name>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Archivfnkt.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="AssemblyInfo.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="clsJournal.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="clsLog.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ClsParameters.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="clsStatushistory.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Datenbank\clsApplikation.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Datenbank\clsColdupdate.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Datenbank\clsConnectionProvider.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Datenbank\clsDBInteractionBase.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Datenbank\clsDokument.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Datenbank\clsDokumentcoldindexwert.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Datenbank\clsDokumentersetzen.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Datenbank\clsDokumentstatus.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Datenbank\clsDokumenttyp.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Datenbank\clsDokument_status.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Datenbank\clsEDEX_BL_BLIndex.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Datenbank\clsJournal.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Datenbank\clsJournaldatei.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Datenbank\clsJournaleintrag.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Datenbank\clsKey_tabelle.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Datenbank\clsMehrfachscann.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Datenbank\clsMyKey_Tabelle.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Datenbank\clsPartner.vb" />
|
||||
<Compile Include="Datenbank\clsPartner_sik.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Datenbank\db_connection.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Datenzugriffe.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DocMgmt.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ModMain.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MyObjects\clsFileCounter.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MyObjects\Globals.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Statushandling.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="My Project\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
17
Archiv/EDKB02_old/Backup/EDKB02.vbproj.user
Normal file
17
Archiv/EDKB02_old/Backup/EDKB02.vbproj.user
Normal file
@@ -0,0 +1,17 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishUrlHistory>publish\</PublishUrlHistory>
|
||||
<InstallUrlHistory>
|
||||
</InstallUrlHistory>
|
||||
<SupportUrlHistory>
|
||||
</SupportUrlHistory>
|
||||
<UpdateUrlHistory>
|
||||
</UpdateUrlHistory>
|
||||
<BootstrapperUrlHistory>
|
||||
</BootstrapperUrlHistory>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<FallbackCulture>de-DE</FallbackCulture>
|
||||
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
2611
Archiv/EDKB02_old/Backup/ModMain.vb
Normal file
2611
Archiv/EDKB02_old/Backup/ModMain.vb
Normal file
File diff suppressed because it is too large
Load Diff
51
Archiv/EDKB02_old/Backup/MyObjects/Globals.vb
Normal file
51
Archiv/EDKB02_old/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
Archiv/EDKB02_old/Backup/MyObjects/clsFileCounter.vb
Normal file
133
Archiv/EDKB02_old/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
|
||||
|
||||
|
||||
771
Archiv/EDKB02_old/Backup/Statushandling.vb
Normal file
771
Archiv/EDKB02_old/Backup/Statushandling.vb
Normal file
@@ -0,0 +1,771 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.ComponentModel
|
||||
|
||||
Public Class Statushandling
|
||||
|
||||
#Region "Deklarationen"
|
||||
|
||||
Dim m_aktuellerstatus As Integer
|
||||
Dim m_neuerstatus As Integer
|
||||
Dim m_abgeschlossen As Boolean
|
||||
Dim m_ausgangsarchivierung As Boolean
|
||||
Dim m_eingangsarchivierung As Boolean
|
||||
Dim m_folgestatus As Boolean
|
||||
Dim m_dokumentid As String
|
||||
|
||||
'SHU 2004-12-01
|
||||
Dim m_datum_erneute_bearbeitung As DateTime
|
||||
Dim m_erneute_bearbeitung As Boolean = False
|
||||
Property Erneute_Bearbeitung() As Boolean
|
||||
Get
|
||||
Return m_erneute_bearbeitung
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
m_erneute_bearbeitung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_erneut_bza As Integer = 0
|
||||
Property Erneut_BZA() As Integer
|
||||
Get
|
||||
Return m_erneut_bza
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
m_erneut_bza = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Property Dokumentid() As String
|
||||
Get
|
||||
Return m_dokumentid
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_dokumentid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property AktullerStatus() As Integer
|
||||
Get
|
||||
Return m_aktuellerstatus
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
m_aktuellerstatus = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property NeuerStatus() As Integer
|
||||
Get
|
||||
Return m_neuerstatus
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
m_neuerstatus = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Ablgeschossen() As Boolean
|
||||
Get
|
||||
Return m_abgeschlossen
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
m_abgeschlossen = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Ausgangsarchivierung() As Boolean
|
||||
Get
|
||||
Return m_ausgangsarchivierung
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
m_ausgangsarchivierung = Value
|
||||
End Set
|
||||
End Property
|
||||
Property Eingangsarchivierung() As Boolean
|
||||
Get
|
||||
Return m_eingangsarchivierung
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
m_eingangsarchivierung = Value
|
||||
End Set
|
||||
End Property
|
||||
Property Folgestatus() As Boolean
|
||||
Get
|
||||
Return m_folgestatus
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
m_folgestatus = Value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
Dim dokumentwerte As DataTable
|
||||
|
||||
#Region "Meldungen"
|
||||
|
||||
Public Sub Meldung_Verantwortlicher(ByVal dokumentid As String, ByVal verantwortlicher As Integer)
|
||||
Try
|
||||
dokumentwerte = GetDokumentwerte(dokumentid, 100, 0)
|
||||
insert_Message(1, dokumentid, Meldungstext_aufbereiten, parstext(dokumentwerte.Rows(0).Item("betreff")), 9999, verantwortlicher, 0)
|
||||
Catch
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Sub Meldung_Verantwortlicher_aufhebung(ByVal dokumentid As String, ByVal verantwortlicher As Integer)
|
||||
Try
|
||||
dokumentwerte = GetDokumentwerte(dokumentid, 110, 0)
|
||||
insert_Message(1, dokumentid, Meldungstext_aufbereiten, parstext(dokumentwerte.Rows(0).Item("betreff")), 9999, verantwortlicher, 0)
|
||||
Catch
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub Meldung_Status(ByVal dokumentid As String, ByVal status As String)
|
||||
Try
|
||||
dokumentwerte = GetDokumentwerte(dokumentid, 0, status)
|
||||
insert_Message(0, dokumentid, Meldungstext_aufbereiten, parstext(dokumentwerte.Rows(0).Item("betreff")), 9999, 0, status)
|
||||
Catch
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Sub Meldung_Eingang(ByVal dokumentid As String, ByVal status As Integer, ByVal empfaenger As Integer)
|
||||
'BUD - 2006.10.05 - Try
|
||||
Try
|
||||
dokumentwerte = GetDokumentwerte(dokumentid, 104, 0)
|
||||
insert_Message(2, dokumentid, Meldungstext_aufbereiten, parstext(dokumentwerte.Rows(0).Item("betreff")), 9999, empfaenger, 0)
|
||||
Catch ex As Exception
|
||||
m_log.Log("Statushandling:Meldung_Eingang:DokID=" & dokumentid & "::" & ex.Message & ex.StackTrace, Common.Common.JournalEntryType.Warning)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Sub Meldung_FehlerVerantwortlicher(ByVal dokumentid As String, ByVal Fehlernr As Integer)
|
||||
dokumentwerte = GetDokumentwerte(dokumentid, Fehlernr, 0)
|
||||
Try
|
||||
insert_Message(3, dokumentid, Meldungstext_aufbereiten, parstext(dokumentwerte.Rows(0).Item("betreff")), 9999, 0, 0)
|
||||
Catch
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Function Meldungstext_aufbereiten() As String
|
||||
Dim s As String
|
||||
s = ""
|
||||
Try
|
||||
s = dokumentwerte.Rows(0).Item("meldung") + vbCrLf + dokumentwerte.Rows(0).Item("idvmeldung") + vbCrLf + dokumentwerte.Rows(0).Item("footer")
|
||||
s = parstext(s)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
Meldungstext_aufbereiten = s
|
||||
End Function
|
||||
|
||||
Public Function parstext(ByVal s As String) As String
|
||||
s = s.Replace("&dokumentid&", dokumentwerte.Rows(0).Item("dokumentid"))
|
||||
s = s.Replace("&nrpar00&", dokumentwerte.Rows(0).Item("nrpar00"))
|
||||
s = s.Replace("&bkpar00&", dokumentwerte.Rows(0).Item("bkpar00"))
|
||||
s = s.Replace("&dokumenttyp&", dokumentwerte.Rows(0).Item("bezeichnung"))
|
||||
s = s.Replace("&status&", dokumentwerte.Rows(0).Item("status"))
|
||||
s = s.Replace("&statusdatum&", Today)
|
||||
s = s.Replace("&verantwortlich&", dokumentwerte.Rows(0).Item("verantwortlich"))
|
||||
s = s.Replace("&absender&", dokumentwerte.Rows(0).Item("absender"))
|
||||
s = s.Replace("&empfaenger&", dokumentwerte.Rows(0).Item("empfaenger"))
|
||||
Return s
|
||||
End Function
|
||||
|
||||
Public Function GetDokumentwerte(ByVal Dokumentid As String, ByVal typ As Integer, ByVal status As Integer) As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand
|
||||
Dim dtToReturn As DataTable = New DataTable
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.CommandText = "dbo.SP_message_getdokumentwerte"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
scmCmdToExecute.Connection = Globals.conn_edoka.scoDBConnection
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Dokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@mitarbeiternr", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 9999))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@typ", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, typ))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@status", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, status))
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
'MsgBox(ex.Message)
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Threading.Thread.Sleep(1000)
|
||||
'Throw New Exception("Dokument_Information_Wert::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
||||
Return Nothing
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function insert_Message(ByVal typ As Integer, ByVal Dokumentid As String, ByVal message As String, ByVal betreff As String, _
|
||||
ByVal absender As Integer, ByVal empfaenger As Integer, ByVal status As Integer) As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand
|
||||
Dim dtToReturn As DataTable = New DataTable
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.CommandText = "dbo.SP_message_insert"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@absender", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, absender))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@empfaenger", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, empfaenger))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@betreff", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, betreff))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@meldung", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, message))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Dokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@status", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, status))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@weiterleiten", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 0))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@typ", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, typ))
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("Dokument_Information_Wert::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Datenzugriffe"
|
||||
Private Function Generic_Select(ByVal typ As Integer) As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
Select Case typ
|
||||
Case 1
|
||||
scmCmdToExecute.CommandText = "dbo.SP_Dokumentstatus_statushandling_Select"
|
||||
Case Else
|
||||
End Select
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable()
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
Try
|
||||
Select Case typ
|
||||
Case 1
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.Dokumentid))
|
||||
Case Else
|
||||
End Select
|
||||
If typ = 1 Then
|
||||
End If
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("Dokumenterstellung::Generic_Select::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Archivierung"
|
||||
|
||||
Public Function Set_Ausgangsarchiviert(ByVal dokumentid As String) As Integer
|
||||
Dim da As DataTable
|
||||
Dim currentstatus As Integer
|
||||
Dim i, i1 As Integer
|
||||
Me.Dokumentid = dokumentid
|
||||
da = Generic_Select(1)
|
||||
currentstatus = da.Rows(0).Item("dokument_statusnr")
|
||||
For i = 0 To da.Rows.Count - 1
|
||||
If da.Rows(i).Item("status_bezeichnungnr") = 3 Then
|
||||
For i1 = 0 To da.Rows.Count - 1
|
||||
If da.Rows(i1).Item("status_bezeichnungnr") = 4 Or _
|
||||
da.Rows(i1).Item("status_bezeichnungnr") = 5 Then
|
||||
'SHU 2004-12-01
|
||||
If Check_Erneute_Bearbeitung(dokumentid) = True Then
|
||||
Me.Erneute_Bearbeitung = True
|
||||
Me.insert_history_status(da.Rows(i1).Item("dokument_statusnr"), dokumentid, 9999, Me.m_datum_erneute_bearbeitung)
|
||||
Me.set_ausgangsarchivierung_ende(dokumentid)
|
||||
Return 0
|
||||
'Return da.Rows(i1).Item("dokument_statusnr")
|
||||
Else
|
||||
Me.insert_history_status(da.Rows(i1).Item("dokument_statusnr"), dokumentid, 9999)
|
||||
Me.set_ausgangsarchivierung_ende(dokumentid)
|
||||
Return da.Rows(i1).Item("dokument_statusnr")
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
da.Dispose()
|
||||
End Function
|
||||
|
||||
'SHU 2004-12-01
|
||||
Public Function Check_Erneute_Bearbeitung(ByVal dokumentid As String) As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand
|
||||
Dim dtToReturn As DataTable = New DataTable
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.CommandText = "dbo.SP_archiv_check_erneute_bearbeitung"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@erneut_bearbeitet", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, 0))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@erneut_bza", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, 0))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@datumzeit", SqlDbType.DateTime, 8, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, Now))
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
If scmCmdToExecute.Parameters("@erneut_bza").Value = 1 Then
|
||||
Me.Erneut_BZA = 1
|
||||
Else
|
||||
Me.Erneut_BZA = 0
|
||||
End If
|
||||
If scmCmdToExecute.Parameters("@erneut_bearbeitet").Value > 0 Then
|
||||
Me.m_datum_erneute_bearbeitung = scmCmdToExecute.Parameters("@datumzeit").Value
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("Dokument_Information_Wert::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
'SHU 2004-12-01
|
||||
Public Sub set_ausgangsarchivierung_ende(ByVal dokumentid As String)
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand
|
||||
Dim dtToReturn As DataTable = New DataTable
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.CommandText = "dbo.SP_archiv_set_ausgangsarchivierung_ende"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dokumentid))
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
Catch ex As Exception
|
||||
Throw New Exception("Dokument_Information_Wert::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Function Set_Eingangsarchiviert(ByVal dokumentid As String) As Integer
|
||||
'BUD - 2006.10.05 - Try
|
||||
Try
|
||||
Dim da As DataTable
|
||||
Dim currentstatus As Integer
|
||||
Dim i1 As Integer
|
||||
Me.Dokumentid = dokumentid
|
||||
da = Generic_Select(1)
|
||||
currentstatus = da.Rows(0).Item("dokument_statusnr")
|
||||
For i1 = 0 To da.Rows.Count - 1
|
||||
If da.Rows(i1).Item("status_bezeichnungnr") = 6 Or _
|
||||
da.Rows(i1).Item("status_bezeichnungnr") = 7 Then
|
||||
' da.Rows(i1).Item("status_bezeichnungnr") = 11 Then
|
||||
Me.insert_history_status(da.Rows(i1).Item("dokument_statusnr"), dokumentid, 9999)
|
||||
Return da.Rows(i1).Item("dokument_statusnr")
|
||||
End If
|
||||
Next
|
||||
da.Dispose()
|
||||
Catch ex As Exception
|
||||
m_log.Log("Statushandling:Set_Eingangsarchiviert:" & ex.Message & ex.StackTrace, Common.Common.JournalEntryType.Warning)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Set_Eingangsarchiviert(ByVal dokumentid As String, ByVal datum As DateTime) As Integer
|
||||
'BUD - 2006.10.05 - Try
|
||||
Try
|
||||
Dim da As DataTable
|
||||
Dim currentstatus As Integer
|
||||
Dim i1 As Integer
|
||||
Me.Dokumentid = dokumentid
|
||||
da = Generic_Select(1)
|
||||
currentstatus = da.Rows(0).Item("dokument_statusnr")
|
||||
For i1 = 0 To da.Rows.Count - 1
|
||||
If da.Rows(i1).Item("status_bezeichnungnr") = 6 Or _
|
||||
da.Rows(i1).Item("status_bezeichnungnr") = 7 Then
|
||||
' da.Rows(i1).Item("status_bezeichnungnr") = 11 Then
|
||||
Me.insert_history_status(da.Rows(i1).Item("dokument_statusnr"), dokumentid, 9999, datum)
|
||||
Return da.Rows(i1).Item("dokument_statusnr")
|
||||
End If
|
||||
Next
|
||||
da.Dispose()
|
||||
Catch ex As Exception
|
||||
m_log.Log("Statushandling:Set_Eingangsarchiviert_2Param:" & ex.Message & ex.StackTrace, Common.Common.JournalEntryType.Warning)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'EDEX Banklagernd
|
||||
Public Function Set_Eingangsarchiviert_blindex(ByVal dokumentid As String) As Integer
|
||||
Dim da As DataTable
|
||||
Dim currentstatus As Integer
|
||||
Dim i1 As Integer
|
||||
Me.Dokumentid = dokumentid
|
||||
da = Generic_Select(1)
|
||||
If da.Rows.Count > 0 Then
|
||||
currentstatus = da.Rows(0).Item("dokument_statusnr")
|
||||
For i1 = 0 To da.Rows.Count - 1
|
||||
If da.Rows(i1).Item("status_bezeichnungnr") = 12 Or _
|
||||
da.Rows(i1).Item("status_bezeichnungnr") = 13 Then
|
||||
Me.insert_history_status(da.Rows(i1).Item("dokument_statusnr"), dokumentid, 9999)
|
||||
Return da.Rows(i1).Item("dokument_statusnr")
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
da.Dispose()
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
Dim ds As New edokadb.clsDokument_status
|
||||
|
||||
Public Sub Dispose()
|
||||
ds.Dispose()
|
||||
End Sub
|
||||
|
||||
Public Sub Check_Neuer_Status()
|
||||
ds.cpMainConnectionProvider = conn_edoka
|
||||
ds.iDokument_statusnr = New SqlInt32(CType(Me.NeuerStatus, Int32))
|
||||
ds.SelectOne()
|
||||
|
||||
If ds.bFolgestatus_durch_anderen_verantwortlichen.Value = True Then
|
||||
Me.Folgestatus = True
|
||||
End If
|
||||
Me.Ausgangsarchivierung = False
|
||||
If ds.iStatus_bezeichnungnr.Value = 3 Or ds.bDokument_ausgangsarchivierung.Value = True Then
|
||||
Me.Ausgangsarchivierung = True
|
||||
End If
|
||||
If ds.bDokument_bearbeitung_abgeschlossen.Value = True Then
|
||||
Me.Ablgeschossen = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub insert_history_status(ByVal statusnr As Integer, ByVal dokumentid As String, ByVal Verantwortlicher As Integer)
|
||||
Try
|
||||
Dim sh As New edokadb.clsStatushistory
|
||||
Dim dbkey As New edokadb.clsMyKey_Tabelle
|
||||
Dim key As Long
|
||||
dbkey.cpMainConnectionProvider = conn_edoka
|
||||
conn_edoka.OpenConnection()
|
||||
key = dbkey.get_dbkey("statushistory")
|
||||
Try
|
||||
conn_edoka.CloseConnection(True)
|
||||
Catch
|
||||
End Try
|
||||
sh.cpMainConnectionProvider = conn_edoka
|
||||
sh.iStatushistorynr = New SqlInt32(CType(key, Int32))
|
||||
sh.iStatus = New SqlInt32(CType(statusnr, Int32))
|
||||
sh.iMandantnr = New SqlInt32(CType(1, Int32))
|
||||
sh.iMutierer = New SqlInt32(CType(9999, Int32))
|
||||
sh.bAktiv = New SqlBoolean(True)
|
||||
sh.daErstellt_am = New SqlDateTime(CType(Now, DateTime))
|
||||
sh.daMutiert_am = New SqlDateTime(CType(Now, DateTime))
|
||||
sh.sDokumentid = New SqlString(CType(dokumentid, String))
|
||||
sh.iVerantwortlich = New SqlInt32(CType(Verantwortlicher, Int32))
|
||||
conn_edoka.OpenConnection()
|
||||
sh.Insert()
|
||||
conn_edoka.CloseConnection(True)
|
||||
dbkey.Dispose()
|
||||
sh.Dispose()
|
||||
Catch ex As Exception
|
||||
Threading.Thread.Sleep(1000)
|
||||
|
||||
'MsgBox(ex.Message)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub insert_history_status(ByVal statusnr As Integer, ByVal dokumentid As String, ByVal Verantwortlicher As Integer, ByVal datum As DateTime)
|
||||
Try
|
||||
Dim sh As New edokadb.clsStatushistory
|
||||
Dim dbkey As New edokadb.clsMyKey_Tabelle
|
||||
Dim key As Long
|
||||
dbkey.cpMainConnectionProvider = conn_edoka
|
||||
conn_edoka.OpenConnection()
|
||||
key = dbkey.get_dbkey("statushistory")
|
||||
Try
|
||||
conn_edoka.CloseConnection(True)
|
||||
Catch
|
||||
End Try
|
||||
sh.cpMainConnectionProvider = conn_edoka
|
||||
sh.iStatushistorynr = New SqlInt32(CType(key, Int32))
|
||||
sh.iStatus = New SqlInt32(CType(statusnr, Int32))
|
||||
sh.iMandantnr = New SqlInt32(CType(1, Int32))
|
||||
sh.iMutierer = New SqlInt32(CType(9999, Int32))
|
||||
sh.bAktiv = New SqlBoolean(True)
|
||||
sh.daErstellt_am = New SqlDateTime(CType(datum, DateTime))
|
||||
sh.daMutiert_am = New SqlDateTime(CType(datum, DateTime))
|
||||
sh.sDokumentid = New SqlString(CType(dokumentid, String))
|
||||
sh.iVerantwortlich = New SqlInt32(CType(Verantwortlicher, Int32))
|
||||
conn_edoka.OpenConnection()
|
||||
sh.Insert()
|
||||
conn_edoka.CloseConnection(True)
|
||||
dbkey.Dispose()
|
||||
sh.Dispose()
|
||||
Catch ex As Exception
|
||||
Threading.Thread.Sleep(1000)
|
||||
|
||||
'MsgBox(ex.Message)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Public Function Alle_Status(ByVal Dokumentid As String) As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand
|
||||
Dim dtToReturn As DataTable = New DataTable
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.CommandText = "dbo.SP_Trefferliste_Select_Status"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, ""))
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("Dokument_Information_Wert::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
Public Function Status_Erstellen(ByVal dokumentid As String) As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand
|
||||
Dim dtToReturn As DataTable = New DataTable
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.CommandText = "dbo.sp_dokumentberabeigung_status_erstellen"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bck", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 0))
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("Dokument_Information_Wert::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function check_abschluss(ByVal dokumentid As String, ByVal mitarbeiternr As Integer) As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand
|
||||
Dim i As Integer
|
||||
Dim dtToReturn As DataTable = New DataTable
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.CommandText = "dbo.sp_dokumentberarbeitung_abschluss"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@abschlussstatus", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, 0))
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
i = scmCmdToExecute.Parameters.Item("@abschlussstatus").Value
|
||||
If i <> 0 Then
|
||||
insert_history_status(i, dokumentid, mitarbeiternr)
|
||||
Dokument_Abschliessen(dokumentid, i)
|
||||
End If
|
||||
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
Threading.Thread.Sleep(1000)
|
||||
'MsgBox(ex.Message)
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("Dokument_Information_Wert::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'Public Function Dokument_Abschliessen(ByVal dokumentid As String, ByVal status As Integer)
|
||||
' Dim dok As New edokadb.clsDokument()
|
||||
' dok.cpMainConnectionProvider = conn_edoka
|
||||
|
||||
' dok.sDokumentid = New SqlString(CType(dokumentid, String))
|
||||
' Try
|
||||
' dok.SelectOne()
|
||||
' conn_edoka.OpenConnection()
|
||||
' dok.iStatusnr = New SqlInt32(CType(status, Integer))
|
||||
' dok.iVerantwortlich = New SqlInt32(CType(9999, Integer))
|
||||
' dok.Update()
|
||||
' conn_edoka.CloseConnection(True)
|
||||
' Meldung_Status(dokumentid, status)
|
||||
' Catch ex As Exception
|
||||
' MsgBox(ex.Message)
|
||||
' End Try
|
||||
'End Function
|
||||
|
||||
Public Sub Dokument_Abschliessen(ByVal dokumentid As String, ByVal status As Integer)
|
||||
Dim dok As New edokadb.clsDokument
|
||||
Dim dt As New edokadb.clsDokumenttyp
|
||||
Dim par As New edokadb.clsPartner
|
||||
Dim loeschung As Boolean = False
|
||||
Dim verantwortlich As Integer = 0
|
||||
|
||||
dok.cpMainConnectionProvider = conn_edoka
|
||||
par.cpMainConnectionProvider = conn_edoka
|
||||
dt.cpMainConnectionProvider = conn_edoka
|
||||
|
||||
dok.sDokumentid = New SqlString(CType(dokumentid, String))
|
||||
Try
|
||||
dok.SelectOne()
|
||||
|
||||
par.iNRPAR00 = New SqlInt32(CType(dok.iNrpar00.Value, Int32))
|
||||
par.SelectOne()
|
||||
If par.bSaldiert.Value = True Then
|
||||
'Meldung_Aufhebung(dok.sDokumentid.Value, Globals.MitarbeiterNr)
|
||||
loeschung = True
|
||||
End If
|
||||
|
||||
conn_edoka.OpenConnection()
|
||||
dok.iStatusnr = New SqlInt32(CType(status, Integer))
|
||||
verantwortlich = dok.iVerantwortlich.Value
|
||||
dok.iVerantwortlich = New SqlInt32(CType(9999, Integer))
|
||||
dok.Update()
|
||||
conn_edoka.CloseConnection(True)
|
||||
Meldung_Status(dokumentid, status)
|
||||
|
||||
dt.iDokumenttypnr = New SqlInt32(CType(dok.iDokumenttypnr.Value, Int32))
|
||||
dt.SelectOne()
|
||||
If dt.bVertrag.Value = True Then
|
||||
If loeschung Then
|
||||
If loeschart(dok.sDokumentid.Value) = 1 Then
|
||||
Insert_Note(dok.sDokumentid.Value, "Dokument automatisch aufgehoben, da Partner saldiert ist.")
|
||||
set_aufgehoben(dok.sDokumentid.Value)
|
||||
Else
|
||||
Insert_Note(dok.sDokumentid.Value, "Dokument automatisch gelöscht, da Partner saldiert ist.")
|
||||
set_geloescht(dok.sDokumentid.Value)
|
||||
End If
|
||||
Me.Meldung_Verantwortlicher_aufhebung(dok.sDokumentid.Value, verantwortlich)
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
'MsgBox(ex.Message)
|
||||
End Try
|
||||
Try
|
||||
dok.Dispose()
|
||||
par.Dispose()
|
||||
dt.Dispose()
|
||||
Catch
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Function loeschart(ByVal dokid As String) As Integer
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand
|
||||
scmCmdToExecute.CommandText = "dbo.SP_check_aufhebung_loeschung"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
conn_edoka.OpenConnection()
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dokid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@res", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, 0))
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
Return scmCmdToExecute.Parameters("@res").Value
|
||||
Catch ex As Exception
|
||||
Throw New Exception("Dokument_Information_Wert::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
conn_edoka.CloseConnection(True)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Sub set_geloescht(ByVal dokid As String)
|
||||
Dim archivfnkt As New EDOKA.clsarchivfnkt
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand
|
||||
scmCmdToExecute.CommandText = "dbo.SP_Dokument_delete"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
conn_edoka.OpenConnection()
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dokid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@mitarbeiter", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 9999))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@loeschgrund", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, "Gelöscht, da Partner saldiert ist"))
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
Catch ex As Exception
|
||||
Throw New Exception("Dokument_Information_Wert::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
conn_edoka.CloseConnection(True)
|
||||
Dim dt As DataTable
|
||||
dt = get_coldindex_and_statusnr(dokid, False, False)
|
||||
archivfnkt.insert_coldupdate_status(dt, dokid, "Alt")
|
||||
End Try
|
||||
archivfnkt = Nothing
|
||||
End Sub
|
||||
|
||||
Public Sub set_aufgehoben(ByVal dokumentid As String)
|
||||
Dim archivfnkt As New EDOKA.clsarchivfnkt
|
||||
Dim dt As DataTable
|
||||
dt = get_coldindex_and_statusnr(dokumentid, True, False)
|
||||
archivfnkt.insert_coldupdate_status(dt, dokumentid, "Alt")
|
||||
archivfnkt = Nothing
|
||||
End Sub
|
||||
|
||||
Public Function get_coldindex_and_statusnr(ByVal dokumentid As String, ByVal aufheben As Boolean, ByVal reaktivieren As Boolean) As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand
|
||||
Dim i As Integer
|
||||
Dim dtToReturn As DataTable = New DataTable
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
scmCmdToExecute.CommandText = "dbo.sp_get_coldindex_and_aufhebungsstatus"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@reaktivieren", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, reaktivieren))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@aufhebungsstatus", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, 0))
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
i = scmCmdToExecute.Parameters.Item("@aufhebungsstatus").Value
|
||||
If (i <> 0 And aufheben) Or (i <> 0 And reaktivieren) Then
|
||||
insert_history_status(i, dokumentid, 9999)
|
||||
Dim d As New edokadb.clsDokument
|
||||
d.cpMainConnectionProvider = conn_edoka
|
||||
d.sDokumentid = New SqlString(CType(dokumentid, String))
|
||||
d.SelectOne()
|
||||
d.iStatusnr = New SqlInt32(CType(i, Int32))
|
||||
conn_edoka.OpenConnection()
|
||||
d.Update()
|
||||
conn_edoka.CloseConnection(True)
|
||||
d.Dispose()
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
Threading.Thread.Sleep(1000)
|
||||
'MsgBox(ex.Message)
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("Dokument_Information_Wert::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Sub Insert_Note(ByVal dokumentid As String, ByVal meldung As String)
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand
|
||||
scmCmdToExecute.CommandText = "dbo.SP_Dokument_Notizen"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
scmCmdToExecute.Connection.Open()
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@notiznr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 0))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@betreff", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, meldung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@value", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, meldung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@aktiv", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 1))
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
Catch ex As Exception
|
||||
'MsgBox(ex.Message)
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Threading.Thread.Sleep(1000)
|
||||
|
||||
'Throw New Exception("Dokument_Information_Wert::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
||||
Finally
|
||||
scmCmdToExecute.Connection.Close()
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
117
Archiv/EDKB02_old/Backup/clsJournal.vb
Normal file
117
Archiv/EDKB02_old/Backup/clsJournal.vb
Normal file
@@ -0,0 +1,117 @@
|
||||
Imports System.IO.File
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.ComponentModel
|
||||
Imports System.SystemException
|
||||
Imports System.Threading
|
||||
|
||||
Public Class clsJournal
|
||||
|
||||
#Region " Deklarationen"
|
||||
|
||||
Dim m_protokolltyp As Integer
|
||||
Property ProtokollTyp() As Integer
|
||||
Get
|
||||
Return m_protokolltyp
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
m_protokolltyp = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_objekt As String
|
||||
Property Objekt() As String
|
||||
Get
|
||||
Return m_objekt
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_objekt = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_ereignis As String
|
||||
Property Ereignis() As String
|
||||
Get
|
||||
Return m_ereignis
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_ereignis = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_id As String
|
||||
Property IDBez() As String
|
||||
Get
|
||||
Return m_id
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_id = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Public Sub Journaleintrag(ByVal typ As Integer, ByVal tablename As String, ByVal keyfeld As String, ByVal keyvalue As String, ByVal ereignis As String, ByVal where As String, ByVal obj As String, ByVal idvalue As String)
|
||||
Dim inpdata As New DataSet
|
||||
Dim i As Integer
|
||||
Dim o As Integer
|
||||
|
||||
Select Case typ
|
||||
Case 1
|
||||
Dim inp As New SqlDataAdapter("Select * from " & tablename, Globals.sConnectionString_edoka)
|
||||
inp.Fill(inpdata, "Table1")
|
||||
Case 2
|
||||
Dim inp As New SqlDataAdapter("select * from " & tablename & where, Globals.sConnectionString_edoka)
|
||||
inp.Fill(inpdata, "Table1")
|
||||
Case 3
|
||||
Dim inp As New SqlDataAdapter("Select * from " & tablename & " where " & keyfeld & " = " & keyvalue, Globals.sConnectionString_edoka)
|
||||
inp.Fill(inpdata, "Table1")
|
||||
Case Else
|
||||
End Select
|
||||
|
||||
For i = 0 To inpdata.Tables(0).Rows.Count - 1
|
||||
For o = 0 To inpdata.Tables(0).Columns.Count - 1
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand
|
||||
Select Case obj
|
||||
Case "Dokument"
|
||||
scmCmdToExecute.CommandText = "dbo.sp_revisionsjournal_Dokument_insert"
|
||||
Case "Dokument_Status"
|
||||
scmCmdToExecute.CommandText = "dbo.sp_revisionsjournal_Dokument_Status_insert"
|
||||
Case "Dokumentcoldindexwert"
|
||||
scmCmdToExecute.CommandText = "dbo.sp_revisionsjournal_Dokumentcoldindexwert_insert"
|
||||
Case "Statushistory"
|
||||
scmCmdToExecute.CommandText = "dbo.sp_revisionsjournal_Statushistory_insert"
|
||||
Case Else
|
||||
scmCmdToExecute.CommandText = "dbo.SP_Revisionsjournal_Insert"
|
||||
End Select
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
Try
|
||||
'BUD - 2006.11.22 - Umbau auf weniger Zeichen in der Tabelle, da sowiso nicht benötigt.
|
||||
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||
conn_edoka.OpenConnection()
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ereignis", SqlDbType.VarChar, 32, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Left(ereignis, 31)))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@objekt", SqlDbType.VarChar, 64, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Left(obj, 63)))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@id", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Left(idvalue, 254)))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@feld", SqlDbType.VarChar, 64, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Left(inpdata.Tables(0).Columns(o).ColumnName, 63)))
|
||||
If inpdata.Tables(0).Rows(i).Item(o) Is System.DBNull.Value Then
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@value", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, "<NULL>"))
|
||||
Else
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@value", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Left(CType(inpdata.Tables(0).Rows(i).Item(o), String), 254)))
|
||||
End If
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
conn_edoka.CloseConnection(True)
|
||||
Catch ex As Exception
|
||||
Thread.Sleep(500)
|
||||
Console.WriteLine("Fehler:" + ex.Message)
|
||||
'BUD - 2006-11-20
|
||||
m_log.Log("clsJournal:Journaleintrag:" & ex.Message & ex.StackTrace, Common.Common.JournalEntryType.Warning)
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
Next
|
||||
Next
|
||||
inpdata.Dispose()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
97
Archiv/EDKB02_old/Backup/clsLog.vb
Normal file
97
Archiv/EDKB02_old/Backup/clsLog.vb
Normal file
@@ -0,0 +1,97 @@
|
||||
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.clsApplikation
|
||||
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)
|
||||
If sTyp <> Enum_InfoTyp.Keine Then
|
||||
m_log.Log(Message, sTyp)
|
||||
End If
|
||||
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
|
||||
|
||||
Public Function insert_journaldatei(ByVal dateiname As String, ByVal physicalfile As String) As Boolean
|
||||
Dim Connection As New SqlConnection
|
||||
Dim DA As New SqlDataAdapter("select * from journaldatei where journaldateinr > 99999999", Globals.sConnectionString_journale)
|
||||
Dim cb As SqlCommandBuilder = New SqlCommandBuilder(DA)
|
||||
Dim ds As New DataSet
|
||||
Try
|
||||
Dim fs As New FileStream(physicalfile, FileMode.OpenOrCreate, FileAccess.Read)
|
||||
Dim mydata(fs.Length) As Byte
|
||||
fs.Read(mydata, 0, fs.Length)
|
||||
fs.Close()
|
||||
Try
|
||||
Connection.ConnectionString = Globals.sConnectionString_journale
|
||||
Connection.Open()
|
||||
DA.Fill(ds, "docs")
|
||||
Dim myRow As DataRow
|
||||
myRow = ds.Tables(0).NewRow
|
||||
myRow.Item(1) = Me.m_journalid
|
||||
myRow.Item(2) = dateiname
|
||||
myRow.Item(3) = mydata
|
||||
myRow.Item(4) = physicalfile
|
||||
ds.Tables(0).Rows.Add(myRow)
|
||||
DA.Update(ds, "docs")
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
End Try
|
||||
fs = Nothing
|
||||
cb = Nothing
|
||||
ds = Nothing
|
||||
DA = Nothing
|
||||
|
||||
Connection.Close()
|
||||
Connection = Nothing
|
||||
Catch
|
||||
End Try
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
510
Archiv/EDKB02_old/Backup/clsStatushistory.vb
Normal file
510
Archiv/EDKB02_old/Backup/clsStatushistory.vb
Normal file
@@ -0,0 +1,510 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'statushistory'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 25. Mai 2003, 21:40:11
|
||||
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Data Access class for the table 'statushistory'.
|
||||
' /// </summary>
|
||||
Public Class clsStatushistory
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bAktiv As SqlBoolean
|
||||
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
|
||||
Private m_iMutierer, m_iVerantwortlich, m_iStatushistorynr, m_iMandantnr, m_iStatus As SqlInt32
|
||||
Private m_sDokumentid As SqlString
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iStatushistorynr</LI>
|
||||
' /// <LI>iStatus</LI>
|
||||
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sDokumentid. May be SqlString.Null</LI>
|
||||
' /// <LI>iVerantwortlich. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_statushistory_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatushistorynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatushistorynr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iverantwortlich", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerantwortlich))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_statushistory_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsStatushistory::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Update method. This method will Update one existing row in the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iStatushistorynr</LI>
|
||||
' /// <LI>iStatus</LI>
|
||||
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sDokumentid. May be SqlString.Null</LI>
|
||||
' /// <LI>iVerantwortlich. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Update() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_statushistory_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatushistorynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatushistorynr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iverantwortlich", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerantwortlich))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_statushistory_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsStatushistory::Update::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iStatushistorynr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Delete() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_statushistory_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatushistorynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatushistorynr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_statushistory_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsStatushistory::Delete::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iStatushistorynr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iStatushistorynr</LI>
|
||||
' /// <LI>iStatus</LI>
|
||||
' /// <LI>iMandantnr</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>iMutierer</LI>
|
||||
' /// <LI>sDokumentid</LI>
|
||||
' /// <LI>iVerantwortlich</LI>
|
||||
' /// </UL>
|
||||
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectOne() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_statushistory_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("statushistory")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@istatushistorynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatushistorynr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_statushistory_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iStatushistorynr = New SqlInt32(CType(dtToReturn.Rows(0)("statushistorynr"), Integer))
|
||||
m_iStatus = New SqlInt32(CType(dtToReturn.Rows(0)("status"), Integer))
|
||||
If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then
|
||||
m_iMandantnr = SqlInt32.Null
|
||||
Else
|
||||
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
|
||||
m_bAktiv = SqlBoolean.Null
|
||||
Else
|
||||
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
|
||||
m_daErstellt_am = SqlDateTime.Null
|
||||
Else
|
||||
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
|
||||
m_daMutiert_am = SqlDateTime.Null
|
||||
Else
|
||||
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
|
||||
m_iMutierer = SqlInt32.Null
|
||||
Else
|
||||
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("dokumentid") Is System.DBNull.Value Then
|
||||
m_sDokumentid = SqlString.Null
|
||||
Else
|
||||
m_sDokumentid = New SqlString(CType(dtToReturn.Rows(0)("dokumentid"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("verantwortlich") Is System.DBNull.Value Then
|
||||
m_iVerantwortlich = SqlInt32.Null
|
||||
Else
|
||||
m_iVerantwortlich = New SqlInt32(CType(dtToReturn.Rows(0)("verantwortlich"), Integer))
|
||||
End If
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsStatushistory::SelectOne::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_statushistory_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("statushistory")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_statushistory_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsStatushistory::SelectAll::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public Property [iStatushistorynr]() As SqlInt32
|
||||
Get
|
||||
Return m_iStatushistorynr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iStatushistorynrTmp As SqlInt32 = Value
|
||||
If iStatushistorynrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iStatushistorynr", "iStatushistorynr can't be NULL")
|
||||
End If
|
||||
m_iStatushistorynr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iStatus]() As SqlInt32
|
||||
Get
|
||||
Return m_iStatus
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iStatusTmp As SqlInt32 = Value
|
||||
If iStatusTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iStatus", "iStatus can't be NULL")
|
||||
End If
|
||||
m_iStatus = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iMandantnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iMandantnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iMandantnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bAktiv]() As SqlBoolean
|
||||
Get
|
||||
Return m_bAktiv
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daErstellt_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daErstellt_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daErstellt_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daMutiert_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daMutiert_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daMutiert_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iMutierer]() As SqlInt32
|
||||
Get
|
||||
Return m_iMutierer
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iMutierer = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDokumentid]() As SqlString
|
||||
Get
|
||||
Return m_sDokumentid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDokumentid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iVerantwortlich]() As SqlInt32
|
||||
Get
|
||||
Return m_iVerantwortlich
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iVerantwortlich = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
Reference in New Issue
Block a user