This commit is contained in:
2022-12-27 08:48:16 +01:00
commit cd4d5f55f1
143 changed files with 26392 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
Module Avaloq
End Module

View File

@@ -0,0 +1,417 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'Import_Daten'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Freitag, 15. April 2005, 13:41:18
' // 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 'Import_Daten'.
' /// </summary>
Public Class clsImport_Daten
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_blobDaten As SqlBinary
Private m_iImport_Jobnr, m_iImport_Data_Nr As SqlInt32
Private m_sDatenformat 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>iImport_Data_Nr</LI>
' /// <LI>iImport_Jobnr. May be SqlInt32.Null</LI>
' /// <LI>sDatenformat. May be SqlString.Null</LI>
' /// <LI>blobDaten. May be SqlBinary.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_inport_Import_Daten_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_Data_Nr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_Data_Nr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_Jobnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImport_Jobnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdatenformat", SqlDbType.VarChar, 3, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDatenformat))
Dim iLength As Integer = 0
If Not m_blobDaten.IsNull Then
iLength = m_blobDaten.Length
End If
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobdaten", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobDaten))
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_inport_Import_Daten_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("clsImport_Daten::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>iImport_Data_Nr</LI>
' /// <LI>iImport_Jobnr. May be SqlInt32.Null</LI>
' /// <LI>sDatenformat. May be SqlString.Null</LI>
' /// <LI>blobDaten. May be SqlBinary.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_inport_Import_Daten_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_Data_Nr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_Data_Nr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_Jobnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImport_Jobnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdatenformat", SqlDbType.VarChar, 3, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDatenformat))
Dim iLength As Integer = 0
If Not m_blobDaten.IsNull Then
iLength = m_blobDaten.Length
End If
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobdaten", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobDaten))
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_inport_Import_Daten_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("clsImport_Daten::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>iImport_Data_Nr</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_inport_Import_Daten_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_Data_Nr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_Data_Nr))
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_inport_Import_Daten_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("clsImport_Daten::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>iImport_Data_Nr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iImport_Data_Nr</LI>
' /// <LI>iImport_Jobnr</LI>
' /// <LI>sDatenformat</LI>
' /// <LI>blobDaten</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_inport_Import_Daten_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Import_Daten")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iImport_Data_Nr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_Data_Nr))
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_inport_Import_Daten_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iImport_Data_Nr = New SqlInt32(CType(dtToReturn.Rows(0)("Import_Data_Nr"), Integer))
If dtToReturn.Rows(0)("Import_Jobnr") Is System.DBNull.Value Then
m_iImport_Jobnr = SqlInt32.Null
Else
m_iImport_Jobnr = New SqlInt32(CType(dtToReturn.Rows(0)("Import_Jobnr"), Integer))
End If
If dtToReturn.Rows(0)("datenformat") Is System.DBNull.Value Then
m_sDatenformat = SqlString.Null
Else
m_sDatenformat = New SqlString(CType(dtToReturn.Rows(0)("datenformat"), String))
End If
If dtToReturn.Rows(0)("daten") Is System.DBNull.Value Then
m_blobDaten = SqlBinary.Null
Else
m_blobDaten = New SqlBinary(CType(dtToReturn.Rows(0)("daten"), Byte()))
End If
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsImport_Daten::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_inport_Import_Daten_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Import_Daten")
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_inport_Import_Daten_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("clsImport_Daten::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 [iImport_Data_Nr]() As SqlInt32
Get
Return m_iImport_Data_Nr
End Get
Set(ByVal Value As SqlInt32)
Dim iImport_Data_NrTmp As SqlInt32 = Value
If iImport_Data_NrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iImport_Data_Nr", "iImport_Data_Nr can't be NULL")
End If
m_iImport_Data_Nr = Value
End Set
End Property
Public Property [iImport_Jobnr]() As SqlInt32
Get
Return m_iImport_Jobnr
End Get
Set(ByVal Value As SqlInt32)
m_iImport_Jobnr = Value
End Set
End Property
Public Property [sDatenformat]() As SqlString
Get
Return m_sDatenformat
End Get
Set(ByVal Value As SqlString)
m_sDatenformat = Value
End Set
End Property
Public Property [blobDaten]() As SqlBinary
Get
Return m_blobDaten
End Get
Set(ByVal Value As SqlBinary)
m_blobDaten = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,590 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'Import_Eintrag'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Donnerstag, 14. April 2005, 21:41:01
' // 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 'Import_Eintrag'.
' /// </summary>
Public Class clsImport_Eintrag
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_daTS As SqlDateTime
Private m_iImport_Eintragnr, m_iImport_JobNr As SqlInt32
Private m_sEDOKA_Dokumentid, m_sStatustext, m_sEDOKA_Dokumenttyp, m_sIndexdaten, m_sApplikationsnr, m_sPartnernr, m_sRecordNo, m_sDateityp, m_sStatus, m_sDateiname 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>iImport_JobNr. May be SqlInt32.Null</LI>
' /// <LI>daTS. May be SqlDateTime.Null</LI>
' /// <LI>sRecordNo. May be SqlString.Null</LI>
' /// <LI>sPartnernr. May be SqlString.Null</LI>
' /// <LI>sDateityp. May be SqlString.Null</LI>
' /// <LI>sDateiname. May be SqlString.Null</LI>
' /// <LI>sStatus. May be SqlString.Null</LI>
' /// <LI>sStatustext. May be SqlString.Null</LI>
' /// <LI>sEDOKA_Dokumentid. May be SqlString.Null</LI>
' /// <LI>sEDOKA_Dokumenttyp. May be SqlString.Null</LI>
' /// <LI>sApplikationsnr. May be SqlString.Null</LI>
' /// <LI>sIndexdaten. May be SqlString.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iImport_Eintragnr</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_inport_Import_Eintrag_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_JobNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImport_JobNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daTS", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daTS))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sRecordNo", SqlDbType.VarChar, 4, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRecordNo))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sPartnernr", SqlDbType.VarChar, 9, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDateityp", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateityp))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDateiname", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateiname))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sStatus", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStatus))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sStatustext", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStatustext))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sEDOKA_Dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEDOKA_Dokumentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sEDOKA_Dokumenttyp", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEDOKA_Dokumenttyp))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sApplikationsnr", SqlDbType.VarChar, 4, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sApplikationsnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sIndexdaten", SqlDbType.VarChar, 4096, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sIndexdaten))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iImport_Eintragnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iImport_Eintragnr))
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_iImport_Eintragnr = scmCmdToExecute.Parameters.Item("@iImport_Eintragnr").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_inport_Import_Eintrag_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("clsImport_Eintrag::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>iImport_Eintragnr</LI>
' /// <LI>iImport_JobNr. May be SqlInt32.Null</LI>
' /// <LI>daTS. May be SqlDateTime.Null</LI>
' /// <LI>sRecordNo. May be SqlString.Null</LI>
' /// <LI>sPartnernr. May be SqlString.Null</LI>
' /// <LI>sDateityp. May be SqlString.Null</LI>
' /// <LI>sDateiname. May be SqlString.Null</LI>
' /// <LI>sStatus. May be SqlString.Null</LI>
' /// <LI>sStatustext. May be SqlString.Null</LI>
' /// <LI>sEDOKA_Dokumentid. May be SqlString.Null</LI>
' /// <LI>sEDOKA_Dokumenttyp. May be SqlString.Null</LI>
' /// <LI>sApplikationsnr. May be SqlString.Null</LI>
' /// <LI>sIndexdaten. 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_inport_Import_Eintrag_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_Eintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_Eintragnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_JobNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImport_JobNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daTS", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daTS))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sRecordNo", SqlDbType.VarChar, 4, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRecordNo))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sPartnernr", SqlDbType.VarChar, 9, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDateityp", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateityp))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDateiname", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateiname))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sStatus", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStatus))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sStatustext", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStatustext))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sEDOKA_Dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEDOKA_Dokumentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sEDOKA_Dokumenttyp", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEDOKA_Dokumenttyp))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sApplikationsnr", SqlDbType.VarChar, 4, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sApplikationsnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sIndexdaten", SqlDbType.VarChar, 4096, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sIndexdaten))
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_inport_Import_Eintrag_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("clsImport_Eintrag::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>iImport_Eintragnr</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_inport_Import_Eintrag_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_Eintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_Eintragnr))
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_inport_Import_Eintrag_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("clsImport_Eintrag::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>iImport_Eintragnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iImport_Eintragnr</LI>
' /// <LI>iImport_JobNr</LI>
' /// <LI>daTS</LI>
' /// <LI>sRecordNo</LI>
' /// <LI>sPartnernr</LI>
' /// <LI>sDateityp</LI>
' /// <LI>sDateiname</LI>
' /// <LI>sStatus</LI>
' /// <LI>sStatustext</LI>
' /// <LI>sEDOKA_Dokumentid</LI>
' /// <LI>sEDOKA_Dokumenttyp</LI>
' /// <LI>sApplikationsnr</LI>
' /// <LI>sIndexdaten</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_inport_Import_Eintrag_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Import_Eintrag")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iImport_Eintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_Eintragnr))
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_inport_Import_Eintrag_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iImport_Eintragnr = New SqlInt32(CType(dtToReturn.Rows(0)("Import_Eintragnr"), Integer))
If dtToReturn.Rows(0)("Import_JobNr") Is System.DBNull.Value Then
m_iImport_JobNr = SqlInt32.Null
Else
m_iImport_JobNr = New SqlInt32(CType(dtToReturn.Rows(0)("Import_JobNr"), Integer))
End If
If dtToReturn.Rows(0)("TS") Is System.DBNull.Value Then
m_daTS = SqlDateTime.Null
Else
m_daTS = New SqlDateTime(CType(dtToReturn.Rows(0)("TS"), Date))
End If
If dtToReturn.Rows(0)("RecordNo") Is System.DBNull.Value Then
m_sRecordNo = SqlString.Null
Else
m_sRecordNo = New SqlString(CType(dtToReturn.Rows(0)("RecordNo"), String))
End If
If dtToReturn.Rows(0)("Partnernr") Is System.DBNull.Value Then
m_sPartnernr = SqlString.Null
Else
m_sPartnernr = New SqlString(CType(dtToReturn.Rows(0)("Partnernr"), String))
End If
If dtToReturn.Rows(0)("Dateityp") Is System.DBNull.Value Then
m_sDateityp = SqlString.Null
Else
m_sDateityp = New SqlString(CType(dtToReturn.Rows(0)("Dateityp"), String))
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
If dtToReturn.Rows(0)("Status") Is System.DBNull.Value Then
m_sStatus = SqlString.Null
Else
m_sStatus = New SqlString(CType(dtToReturn.Rows(0)("Status"), String))
End If
If dtToReturn.Rows(0)("Statustext") Is System.DBNull.Value Then
m_sStatustext = SqlString.Null
Else
m_sStatustext = New SqlString(CType(dtToReturn.Rows(0)("Statustext"), String))
End If
If dtToReturn.Rows(0)("EDOKA_Dokumentid") Is System.DBNull.Value Then
m_sEDOKA_Dokumentid = SqlString.Null
Else
m_sEDOKA_Dokumentid = New SqlString(CType(dtToReturn.Rows(0)("EDOKA_Dokumentid"), String))
End If
If dtToReturn.Rows(0)("EDOKA_Dokumenttyp") Is System.DBNull.Value Then
m_sEDOKA_Dokumenttyp = SqlString.Null
Else
m_sEDOKA_Dokumenttyp = New SqlString(CType(dtToReturn.Rows(0)("EDOKA_Dokumenttyp"), String))
End If
If dtToReturn.Rows(0)("Applikationsnr") Is System.DBNull.Value Then
m_sApplikationsnr = SqlString.Null
Else
m_sApplikationsnr = New SqlString(CType(dtToReturn.Rows(0)("Applikationsnr"), String))
End If
If dtToReturn.Rows(0)("Indexdaten") Is System.DBNull.Value Then
m_sIndexdaten = SqlString.Null
Else
m_sIndexdaten = New SqlString(CType(dtToReturn.Rows(0)("Indexdaten"), 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("clsImport_Eintrag::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_inport_Import_Eintrag_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Import_Eintrag")
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_inport_Import_Eintrag_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("clsImport_Eintrag::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 [iImport_Eintragnr]() As SqlInt32
Get
Return m_iImport_Eintragnr
End Get
Set(ByVal Value As SqlInt32)
Dim iImport_EintragnrTmp As SqlInt32 = Value
If iImport_EintragnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iImport_Eintragnr", "iImport_Eintragnr can't be NULL")
End If
m_iImport_Eintragnr = Value
End Set
End Property
Public Property [iImport_JobNr]() As SqlInt32
Get
Return m_iImport_JobNr
End Get
Set(ByVal Value As SqlInt32)
m_iImport_JobNr = Value
End Set
End Property
Public Property [daTS]() As SqlDateTime
Get
Return m_daTS
End Get
Set(ByVal Value As SqlDateTime)
m_daTS = Value
End Set
End Property
Public Property [sRecordNo]() As SqlString
Get
Return m_sRecordNo
End Get
Set(ByVal Value As SqlString)
m_sRecordNo = Value
End Set
End Property
Public Property [sPartnernr]() As SqlString
Get
Return m_sPartnernr
End Get
Set(ByVal Value As SqlString)
m_sPartnernr = Value
End Set
End Property
Public Property [sDateityp]() As SqlString
Get
Return m_sDateityp
End Get
Set(ByVal Value As SqlString)
m_sDateityp = 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
Public Property [sStatus]() As SqlString
Get
Return m_sStatus
End Get
Set(ByVal Value As SqlString)
m_sStatus = Value
End Set
End Property
Public Property [sStatustext]() As SqlString
Get
Return m_sStatustext
End Get
Set(ByVal Value As SqlString)
m_sStatustext = Value
End Set
End Property
Public Property [sEDOKA_Dokumentid]() As SqlString
Get
Return m_sEDOKA_Dokumentid
End Get
Set(ByVal Value As SqlString)
m_sEDOKA_Dokumentid = Value
End Set
End Property
Public Property [sEDOKA_Dokumenttyp]() As SqlString
Get
Return m_sEDOKA_Dokumenttyp
End Get
Set(ByVal Value As SqlString)
m_sEDOKA_Dokumenttyp = Value
End Set
End Property
Public Property [sApplikationsnr]() As SqlString
Get
Return m_sApplikationsnr
End Get
Set(ByVal Value As SqlString)
m_sApplikationsnr = Value
End Set
End Property
Public Property [sIndexdaten]() As SqlString
Get
Return m_sIndexdaten
End Get
Set(ByVal Value As SqlString)
m_sIndexdaten = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,469 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'Import_Job'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 5. April 2005, 22:50: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 'Import_Job'.
' /// </summary>
Public Class clsImport_Job
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_daEnde_TS, m_daStart_TS, m_daJournal_Datum As SqlDateTime
Private m_iJournal_Ausgeliefert, m_iApplikationNr, m_iImport_JobNr, m_iFeherhaft 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>daStart_TS. May be SqlDateTime.Null</LI>
' /// <LI>daEnde_TS. May be SqlDateTime.Null</LI>
' /// <LI>iFeherhaft. May be SqlInt32.Null</LI>
' /// <LI>iApplikationNr. May be SqlInt32.Null</LI>
' /// <LI>iJournal_Ausgeliefert. May be SqlInt32.Null</LI>
' /// <LI>daJournal_Datum. May be SqlDateTime.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iImport_JobNr</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Import_Job_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@daStart_TS", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daStart_TS))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daEnde_TS", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daEnde_TS))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iFeherhaft", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFeherhaft))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iApplikationNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iApplikationNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iJournal_Ausgeliefert", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iJournal_Ausgeliefert))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daJournal_Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daJournal_Datum))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iImport_JobNr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iImport_JobNr))
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_iImport_JobNr = scmCmdToExecute.Parameters.Item("@iImport_JobNr").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_Import_Job_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("clsImport_Job::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>iImport_JobNr</LI>
' /// <LI>daStart_TS. May be SqlDateTime.Null</LI>
' /// <LI>daEnde_TS. May be SqlDateTime.Null</LI>
' /// <LI>iFeherhaft. May be SqlInt32.Null</LI>
' /// <LI>iApplikationNr. May be SqlInt32.Null</LI>
' /// <LI>iJournal_Ausgeliefert. May be SqlInt32.Null</LI>
' /// <LI>daJournal_Datum. 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_Import_Job_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_JobNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_JobNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daStart_TS", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daStart_TS))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daEnde_TS", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daEnde_TS))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iFeherhaft", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFeherhaft))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iApplikationNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iApplikationNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iJournal_Ausgeliefert", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iJournal_Ausgeliefert))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daJournal_Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daJournal_Datum))
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_Import_Job_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("clsImport_Job::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>iImport_JobNr</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_Import_Job_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_JobNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_JobNr))
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_Import_Job_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("clsImport_Job::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>iImport_JobNr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iImport_JobNr</LI>
' /// <LI>daStart_TS</LI>
' /// <LI>daEnde_TS</LI>
' /// <LI>iFeherhaft</LI>
' /// <LI>iApplikationNr</LI>
' /// <LI>iJournal_Ausgeliefert</LI>
' /// <LI>daJournal_Datum</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_Import_Job_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Import_Job")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iImport_JobNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_JobNr))
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_Import_Job_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iImport_JobNr = New SqlInt32(CType(dtToReturn.Rows(0)("Import_JobNr"), Integer))
If dtToReturn.Rows(0)("Start_TS") Is System.DBNull.Value Then
m_daStart_TS = SqlDateTime.Null
Else
m_daStart_TS = New SqlDateTime(CType(dtToReturn.Rows(0)("Start_TS"), Date))
End If
If dtToReturn.Rows(0)("Ende_TS") Is System.DBNull.Value Then
m_daEnde_TS = SqlDateTime.Null
Else
m_daEnde_TS = New SqlDateTime(CType(dtToReturn.Rows(0)("Ende_TS"), Date))
End If
If dtToReturn.Rows(0)("Feherhaft") Is System.DBNull.Value Then
m_iFeherhaft = SqlInt32.Null
Else
m_iFeherhaft = New SqlInt32(CType(dtToReturn.Rows(0)("Feherhaft"), Integer))
End If
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)("Journal_Ausgeliefert") Is System.DBNull.Value Then
m_iJournal_Ausgeliefert = SqlInt32.Null
Else
m_iJournal_Ausgeliefert = New SqlInt32(CType(dtToReturn.Rows(0)("Journal_Ausgeliefert"), Integer))
End If
If dtToReturn.Rows(0)("Journal_Datum") Is System.DBNull.Value Then
m_daJournal_Datum = SqlDateTime.Null
Else
m_daJournal_Datum = New SqlDateTime(CType(dtToReturn.Rows(0)("Journal_Datum"), 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("clsImport_Job::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_Import_Job_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Import_Job")
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_Import_Job_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("clsImport_Job::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 [iImport_JobNr]() As SqlInt32
Get
Return m_iImport_JobNr
End Get
Set(ByVal Value As SqlInt32)
Dim iImport_JobNrTmp As SqlInt32 = Value
If iImport_JobNrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iImport_JobNr", "iImport_JobNr can't be NULL")
End If
m_iImport_JobNr = Value
End Set
End Property
Public Property [daStart_TS]() As SqlDateTime
Get
Return m_daStart_TS
End Get
Set(ByVal Value As SqlDateTime)
m_daStart_TS = Value
End Set
End Property
Public Property [daEnde_TS]() As SqlDateTime
Get
Return m_daEnde_TS
End Get
Set(ByVal Value As SqlDateTime)
m_daEnde_TS = Value
End Set
End Property
Public Property [iFeherhaft]() As SqlInt32
Get
Return m_iFeherhaft
End Get
Set(ByVal Value As SqlInt32)
m_iFeherhaft = 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 [iJournal_Ausgeliefert]() As SqlInt32
Get
Return m_iJournal_Ausgeliefert
End Get
Set(ByVal Value As SqlInt32)
m_iJournal_Ausgeliefert = Value
End Set
End Property
Public Property [daJournal_Datum]() As SqlDateTime
Get
Return m_daJournal_Datum
End Get
Set(ByVal Value As SqlDateTime)
m_daJournal_Datum = Value
End Set
End Property
#End Region
End Class
End Namespace

Binary file not shown.

View File

@@ -0,0 +1,390 @@
Imports System
Imports System.Data
Imports System.Data.OracleClient
Namespace Avaloq
Public Class SST
Const queryString As String = "k.tkb$out_dsp_in#.edoka_in"
Const queryStringGetValues As String = "k.tkb$out_dsp_in#.edoka_get_values"
Const queryStringOpenSession As String = "k.session#.open_session"
Const queryStringCloseSession As String = "k.session#.close_session"
Const avqOracleUser As String = "TKB$I_EDOKA"
Const avqSecUserId As Integer = 34
Const avqBuId As Integer = 1
Const edkFaDokTyp As String = "1688"
'Const edkDokBezeichnungKey As String = "edk_bez"
'Const edkDokBezeichnungDflt As String = "Antworttalon"
Dim connStrg As String
Private _hasErrors As Boolean
Private _dlvEDK As Boolean
Private _dlvAVQ As Boolean
Private _edkDokNr As String
Private _edkDokTypOvr As Boolean
Private _edkDokBezeichnung As String
Private _qrcode As String
Private _bpnr As String
Public Sub New()
oread = System.IO.File.OpenText(DivFnkt.ApplicationPath + "avaloqconn.cfg")
connStrg = oread.ReadLine
oread.Close()
End Sub
Public ReadOnly Property hasErrors() As Boolean
Get
Return _hasErrors
End Get
End Property
Public ReadOnly Property DeliverToEDK As Boolean
Get
Return _dlvEDK
End Get
End Property
Public ReadOnly Property DeliverToAVQ As Boolean
Get
Return _dlvAVQ
End Get
End Property
Public ReadOnly Property BPNr As String
Get
Return _bpnr
End Get
End Property
Public ReadOnly Property edkDokNr As String
Get
Return _edkDokNr
End Get
End Property
Public ReadOnly Property edkDokTypOvr As Boolean
Get
Return _edkDokTypOvr
End Get
End Property
Public ReadOnly Property edkDokBezeichnung As String
Get
Return _edkDokBezeichnung
End Get
End Property
Private Sub InitItem()
_hasErrors = False
_dlvEDK = True
_dlvAVQ = True
_bpnr = Nothing
_edkDokNr = Nothing
_edkDokTypOvr = False
_edkDokBezeichnung = Nothing
_qrcode = Nothing
End Sub
Public Sub Prepare(ByVal BPNr As String, ByVal XmlDokTypNr As String, ByVal Instructions As String, ByVal dlvEDK As String, ByVal dlvAVQ As String)
PrintOut("AVQ Prepare Start")
InitItem()
If Instructions.IndexOf("dms_id:;bp_nr:;attr1:") > -1 Then
Instructions = Instructions.Replace("dms_id:;bp_nr:;attr1:", "")
End If
_qrcode = Instructions
If Len(XmlDokTypNr) > 0 Then
If XmlDokTypNr <> edkFaDokTyp Then
'DokTyp ist ein Edoka-Doktyp
_edkDokNr = XmlDokTypNr
_edkDokTypOvr = True
End If
End If
If dlvEDK = "0" Then
_dlvEDK = False
End If
If dlvAVQ = "0" Then
_dlvAVQ = False
End If
If Len(_qrcode) > 0 Then
End If
If _dlvAVQ = True Or _dlvEDK = True Then
GetAvqData(BPNr, Instructions)
If Len(BPNr) > 0 And BPNr <> _bpnr Then
'Wahrscheinlich falsch manuell indexiert
End If
End If
'If Len(_qrcode) > 0 Then
' _hasQrCode = True
'
''EDOKA-Dokument-Bezeichnung auslesen
'Try
'For Each pairs As String In _qrcode.Split(";"c)
'Dim values As String() = pairs.Split(":"c)
'If values(0) = edkDokBezeichnungKey Then
' _edkDokBezeichnung = values(1)
' End If
' Next
' Catch ex As Exception
' _hasErrors = True
' _edkDokBezeichnung = edkDokBezeichnungDflt
' End Try
' Else
' _hasErrors = True
' _edkDokBezeichnung = edkDokBezeichnungDflt
' End If
PrintOut("AVQ Prepare Ende")
End Sub
Private Sub GetAvqData(ByVal BPNr As String, ByVal Instructions As String)
PrintOut("GetAVQData Start")
Dim dataReader As OracleDataReader
Dim connectionSession As New OracleConnection
connectionSession.ConnectionString = connStrg
'OracleConnection.ClearAllPools()
Dim command As OracleCommand = connectionSession.CreateCommand()
command.Parameters.Clear()
command.CommandText = queryStringOpenSession
command.CommandType = CommandType.StoredProcedure
command.Parameters.Add(New OracleParameter("i_sec_user_id", OracleType.Int32)).Value = avqSecUserId
command.Parameters.Add(New OracleParameter("i_oracle_user", OracleType.VarChar)).Value = avqOracleUser
command.Parameters.Add(New OracleParameter("i_bu_id", OracleType.Int32)).Value = avqBuId
Try
connectionSession.Open()
command.ExecuteReader()
'dataReader.Read()
'dataReader.Close()
'dataReader.Dispose()
Catch ex As Exception
PrintOut("Get_AVQ_Data (1):" + ex.Message)
If connectionSession.State = ConnectionState.Closed Then
connectionSession.Open()
command.ExecuteReader()
End If
End Try
command.Parameters.Clear()
command.CommandText = queryStringGetValues
command.CommandType = CommandType.StoredProcedure
command.Parameters.Add(New OracleParameter("i_bp_nr", OracleType.VarChar)).Value = BPNr
command.Parameters.Add(New OracleParameter("i_instructions", OracleType.VarChar)).Value = Instructions
command.Parameters.Add(New OracleParameter("o_bp_nr", OracleType.Char, 4000)).Direction = ParameterDirection.Output
command.Parameters.Add(New OracleParameter("o_edk_dok_nr", OracleType.Char, 4000)).Direction = ParameterDirection.Output
command.Parameters.Add(New OracleParameter("o_edk_dok_bez", OracleType.Char, 4000)).Direction = ParameterDirection.Output
command.Parameters.Add(New OracleParameter("o_ret_val", OracleType.Char, 4000)).Direction = ParameterDirection.Output
Try
If connectionSession.State = ConnectionState.Open Then
'nothing
Else
connectionSession.Open()
End If
dataReader = command.ExecuteReader()
dataReader.Read()
Dim rbpnr As String = Trim(command.Parameters.Item(2).Value)
Dim rdoktypnr As String = Trim(command.Parameters.Item(3).Value)
Dim rdokbez As String = Trim(command.Parameters.Item(4).Value)
Dim ret As String = Trim(command.Parameters.Item(5).Value)
If ret = "OK" Then
_hasErrors = False
Else
_hasErrors = True
End If
_bpnr = rbpnr
_edkDokBezeichnung = rdokbez 'Edoka-Dokumentbezeichnung für allfälligen Override UND für den Standard-Fall
If _edkDokTypOvr = False Then
'Falls Doktyp-Override aus Scanning kommt, ist Definition in Avaloq-Table-Editor irrelevant
If Len(rdoktypnr) > 0 And rdoktypnr <> edkFaDokTyp Then
_edkDokNr = rdoktypnr
_edkDokTypOvr = True
End If
End If
dataReader.Close()
dataReader.Dispose()
connectionSession.Close()
connectionSession.Dispose()
'ACHTUNG
connectionSession = Nothing
dataReader = Nothing
command = Nothing
'ACHTUNG
Catch ex As Exception
PrintOut("Get_AVQ_Data (2):" + ex.Message)
Console.WriteLine(ex.Message)
If connectionSession.State = ConnectionState.Open Then
command.Parameters.Clear()
command.CommandText = "k.session#.close_session"
command.CommandType = CommandType.StoredProcedure
Try
dataReader = command.ExecuteReader()
dataReader.Read()
dataReader.Close()
dataReader.Dispose()
Catch ex1 As Exception
End Try
command.Dispose()
connectionSession.Close()
connectionSession.Dispose()
Console.WriteLine(connectionSession.State)
End If
End Try
PrintOut("GetAVQData Ende")
End Sub
Public Sub SendData()
PrintOut("AVQ Sendata Start")
If Len(_bpnr) = 0 Or Len(_qrcode) = 0 Then
_hasErrors = True
Return
End If
_hasErrors = True 'wird bei erfolgreicher Übermittlung auf false gesetellt
Dim dataReader As OracleDataReader
Dim connectionSession As New OracleConnection
connectionSession.ConnectionString = connStrg
'OracleConnection.ClearAllPools()
Dim command As OracleCommand = connectionSession.CreateCommand()
command.Parameters.Clear()
command.CommandText = queryStringOpenSession
command.CommandType = CommandType.StoredProcedure
command.Parameters.Add(New OracleParameter("i_sec_user_id", OracleType.Int32)).Value = avqSecUserId
command.Parameters.Add(New OracleParameter("i_oracle_user", OracleType.VarChar)).Value = avqOracleUser
command.Parameters.Add(New OracleParameter("i_bu_id", OracleType.Int32)).Value = avqBuId
Try
connectionSession.Open()
'connectionSession.Open()
'connectionSession.open
'dataReader =
command.ExecuteReader()
'dataReader.Read()
'dataReader.Close()
'dataReader.Dispose()
Catch ex As Exception
PrintOut("AVQ Send_Data (1):" + ex.Message)
If connectionSession.State = ConnectionState.Closed Then
connectionSession.Open()
command.ExecuteReader()
End If
End Try
command.Parameters.Clear()
command.CommandText = queryString
command.CommandType = CommandType.StoredProcedure
command.Parameters.Add(New OracleParameter("i_bp_nr", OracleType.VarChar)).Value = _bpnr
command.Parameters.Add(New OracleParameter("i_instructions", OracleType.VarChar)).Value = _qrcode
command.Parameters.Add(New OracleParameter("o_ret_val", OracleType.VarChar, 20)).Direction = ParameterDirection.Output
Try
If connectionSession.State = ConnectionState.Open Then
'nothing
Else
connectionSession.Open()
End If
dataReader = command.ExecuteReader()
dataReader.Read()
Dim result As String = command.Parameters.Item(2).Value
If result = "OK" Then
_hasErrors = False
Else
_hasErrors = True
End If
dataReader.Close()
dataReader.Dispose()
connectionSession.Close()
connectionSession.Dispose()
'ACHTUNG
connectionSession = Nothing
dataReader = Nothing
command = Nothing
'ACHTUNG
Catch ex As Exception
PrintOut("AVQ Send_Data (2):" + ex.Message)
Console.WriteLine(ex.Message)
If connectionSession.State = ConnectionState.Open Then
command.Parameters.Clear()
command.CommandText = "k.session#.close_session"
command.CommandType = CommandType.StoredProcedure
Try
dataReader = command.ExecuteReader()
dataReader.Read()
dataReader.Close()
dataReader.Dispose()
Catch ex1 As Exception
End Try
command.Dispose()
connectionSession.Close()
connectionSession.Dispose()
Console.WriteLine(connectionSession.State)
End If
End Try
PrintOut("AVQ Sendata Ende")
End Sub
End Class
End Namespace

View File

@@ -0,0 +1,289 @@
' ///////////////////////////////////////////////////////////////////////////
' // 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.
Throw New Exception("OpenConnection::Connection is already open.")
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

View 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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,591 @@
' ///////////////////////////////////////////////////////////////////////////
' // 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
' // 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

View File

@@ -0,0 +1,751 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'dokumentcoldindexwert'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 6. April 2005, 10:10:46
' // 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_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iIndextyp, m_iColdindexwertnr, m_iMutierer, m_iMandantnr As SqlInt32
Private m_sNRSTA00, m_sNRDOC00, m_sBEGSF00, m_sBERES03, m_sBEUSR00, m_sBKPAR00, m_sNAVVG00, m_sDokumentid, m_sNRPAR00, m_sBEBEZ00, m_sBESTA00, m_sBEORT00, m_sDMSTA01, m_sBEDAT00 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>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>sDokumentid. May be SqlString.Null</LI>
' /// <LI>sNRPAR00. May be SqlString.Null</LI>
' /// <LI>sBKPAR00. May be SqlString.Null</LI>
' /// <LI>sNAVVG00. May be SqlString.Null</LI>
' /// <LI>sBEBEZ00. May be SqlString.Null</LI>
' /// <LI>sDMSTA01. May be SqlString.Null</LI>
' /// <LI>sBEDAT00. May be SqlString.Null</LI>
' /// <LI>sBESTA00. May be SqlString.Null</LI>
' /// <LI>sBEORT00. May be SqlString.Null</LI>
' /// <LI>sNRDOC00. May be SqlString.Null</LI>
' /// <LI>sNRSTA00. May be SqlString.Null</LI>
' /// <LI>sBEGSF00. May be SqlString.Null</LI>
' /// <LI>sBEUSR00. May be SqlString.Null</LI>
' /// <LI>sBERES03. 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>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iColdindexwertnr</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Overrides 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("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRPAR00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRPAR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBKPAR00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBKPAR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNAVVG00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNAVVG00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEBEZ00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEBEZ00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDMSTA01", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDMSTA01))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEDAT00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEDAT00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBESTA00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBESTA00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEORT00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEORT00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRDOC00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRDOC00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRSTA00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRSTA00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEGSF00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEGSF00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEUSR00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEUSR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBERES03", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBERES03))
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("@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>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>sDokumentid. May be SqlString.Null</LI>
' /// <LI>sNRPAR00. May be SqlString.Null</LI>
' /// <LI>sBKPAR00. May be SqlString.Null</LI>
' /// <LI>sNAVVG00. May be SqlString.Null</LI>
' /// <LI>sBEBEZ00. May be SqlString.Null</LI>
' /// <LI>sDMSTA01. May be SqlString.Null</LI>
' /// <LI>sBEDAT00. May be SqlString.Null</LI>
' /// <LI>sBESTA00. May be SqlString.Null</LI>
' /// <LI>sBEORT00. May be SqlString.Null</LI>
' /// <LI>sNRDOC00. May be SqlString.Null</LI>
' /// <LI>sNRSTA00. May be SqlString.Null</LI>
' /// <LI>sBEGSF00. May be SqlString.Null</LI>
' /// <LI>sBEUSR00. May be SqlString.Null</LI>
' /// <LI>sBERES03. 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>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Overrides 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("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRPAR00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRPAR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBKPAR00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBKPAR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNAVVG00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNAVVG00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEBEZ00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEBEZ00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDMSTA01", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDMSTA01))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEDAT00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEDAT00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBESTA00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBESTA00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEORT00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEORT00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRDOC00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRDOC00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRSTA00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRSTA00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEGSF00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEGSF00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEUSR00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEUSR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBERES03", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBERES03))
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_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: 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>
Public Overrides 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>iMandantnr</LI>
' /// <LI>sDokumentid</LI>
' /// <LI>sNRPAR00</LI>
' /// <LI>sBKPAR00</LI>
' /// <LI>sNAVVG00</LI>
' /// <LI>sBEBEZ00</LI>
' /// <LI>sDMSTA01</LI>
' /// <LI>sBEDAT00</LI>
' /// <LI>sBESTA00</LI>
' /// <LI>sBEORT00</LI>
' /// <LI>sNRDOC00</LI>
' /// <LI>sNRSTA00</LI>
' /// <LI>sBEGSF00</LI>
' /// <LI>sBEUSR00</LI>
' /// <LI>sBERES03</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>
Public Overrides 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)("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)("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)("NRPAR00") Is System.DBNull.Value Then
m_sNRPAR00 = SqlString.Null
Else
m_sNRPAR00 = New SqlString(CType(dtToReturn.Rows(0)("NRPAR00"), String))
End If
If dtToReturn.Rows(0)("BKPAR00") Is System.DBNull.Value Then
m_sBKPAR00 = SqlString.Null
Else
m_sBKPAR00 = New SqlString(CType(dtToReturn.Rows(0)("BKPAR00"), String))
End If
If dtToReturn.Rows(0)("NAVVG00") Is System.DBNull.Value Then
m_sNAVVG00 = SqlString.Null
Else
m_sNAVVG00 = New SqlString(CType(dtToReturn.Rows(0)("NAVVG00"), String))
End If
If dtToReturn.Rows(0)("BEBEZ00") Is System.DBNull.Value Then
m_sBEBEZ00 = SqlString.Null
Else
m_sBEBEZ00 = New SqlString(CType(dtToReturn.Rows(0)("BEBEZ00"), String))
End If
If dtToReturn.Rows(0)("DMSTA01") Is System.DBNull.Value Then
m_sDMSTA01 = SqlString.Null
Else
m_sDMSTA01 = New SqlString(CType(dtToReturn.Rows(0)("DMSTA01"), String))
End If
If dtToReturn.Rows(0)("BEDAT00") Is System.DBNull.Value Then
m_sBEDAT00 = SqlString.Null
Else
m_sBEDAT00 = New SqlString(CType(dtToReturn.Rows(0)("BEDAT00"), String))
End If
If dtToReturn.Rows(0)("BESTA00") Is System.DBNull.Value Then
m_sBESTA00 = SqlString.Null
Else
m_sBESTA00 = New SqlString(CType(dtToReturn.Rows(0)("BESTA00"), String))
End If
If dtToReturn.Rows(0)("BEORT00") Is System.DBNull.Value Then
m_sBEORT00 = SqlString.Null
Else
m_sBEORT00 = New SqlString(CType(dtToReturn.Rows(0)("BEORT00"), String))
End If
If dtToReturn.Rows(0)("NRDOC00") Is System.DBNull.Value Then
m_sNRDOC00 = SqlString.Null
Else
m_sNRDOC00 = New SqlString(CType(dtToReturn.Rows(0)("NRDOC00"), String))
End If
If dtToReturn.Rows(0)("NRSTA00") Is System.DBNull.Value Then
m_sNRSTA00 = SqlString.Null
Else
m_sNRSTA00 = New SqlString(CType(dtToReturn.Rows(0)("NRSTA00"), String))
End If
If dtToReturn.Rows(0)("BEGSF00") Is System.DBNull.Value Then
m_sBEGSF00 = SqlString.Null
Else
m_sBEGSF00 = New SqlString(CType(dtToReturn.Rows(0)("BEGSF00"), String))
End If
If dtToReturn.Rows(0)("BEUSR00") Is System.DBNull.Value Then
m_sBEUSR00 = SqlString.Null
Else
m_sBEUSR00 = New SqlString(CType(dtToReturn.Rows(0)("BEUSR00"), String))
End If
If dtToReturn.Rows(0)("BERES03") Is System.DBNull.Value Then
m_sBERES03 = SqlString.Null
Else
m_sBERES03 = New SqlString(CType(dtToReturn.Rows(0)("BERES03"), 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
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>
Public Overrides 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
#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 [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr = 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 [sNRPAR00]() As SqlString
Get
Return m_sNRPAR00
End Get
Set(ByVal Value As SqlString)
m_sNRPAR00 = Value
End Set
End Property
Public Property [sBKPAR00]() As SqlString
Get
Return m_sBKPAR00
End Get
Set(ByVal Value As SqlString)
m_sBKPAR00 = Value
End Set
End Property
Public Property [sNAVVG00]() As SqlString
Get
Return m_sNAVVG00
End Get
Set(ByVal Value As SqlString)
m_sNAVVG00 = Value
End Set
End Property
Public Property [sBEBEZ00]() As SqlString
Get
Return m_sBEBEZ00
End Get
Set(ByVal Value As SqlString)
m_sBEBEZ00 = Value
End Set
End Property
Public Property [sDMSTA01]() As SqlString
Get
Return m_sDMSTA01
End Get
Set(ByVal Value As SqlString)
m_sDMSTA01 = Value
End Set
End Property
Public Property [sBEDAT00]() As SqlString
Get
Return m_sBEDAT00
End Get
Set(ByVal Value As SqlString)
m_sBEDAT00 = Value
End Set
End Property
Public Property [sBESTA00]() As SqlString
Get
Return m_sBESTA00
End Get
Set(ByVal Value As SqlString)
m_sBESTA00 = Value
End Set
End Property
Public Property [sBEORT00]() As SqlString
Get
Return m_sBEORT00
End Get
Set(ByVal Value As SqlString)
m_sBEORT00 = Value
End Set
End Property
Public Property [sNRDOC00]() As SqlString
Get
Return m_sNRDOC00
End Get
Set(ByVal Value As SqlString)
m_sNRDOC00 = Value
End Set
End Property
Public Property [sNRSTA00]() As SqlString
Get
Return m_sNRSTA00
End Get
Set(ByVal Value As SqlString)
m_sNRSTA00 = Value
End Set
End Property
Public Property [sBEGSF00]() As SqlString
Get
Return m_sBEGSF00
End Get
Set(ByVal Value As SqlString)
m_sBEGSF00 = Value
End Set
End Property
Public Property [sBEUSR00]() As SqlString
Get
Return m_sBEUSR00
End Get
Set(ByVal Value As SqlString)
m_sBEUSR00 = Value
End Set
End Property
Public Property [sBERES03]() As SqlString
Get
Return m_sBERES03
End Get
Set(ByVal Value As SqlString)
m_sBERES03 = 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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,891 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'edex_sb_serienbrief'
' // Generated by LLBLGen v1.21.2003.712 Final on: Montag, 13. September 2010, 16:18:43
' // 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_sb_serienbrief'.
''' </summary>
Public Class clsEdex_sb_serienbrief
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daArchivdatum, m_daTermin, m_daDokumentdatum, m_daMutiert_am As SqlDateTime
Private m_iDokumenttypnr, m_iWindowheight, m_iWindowwidth, m_iTreewidth, m_iBestaetigt, m_iAusgeloest, m_iBldossier, m_iGedruckt, m_iFehlerhaft, m_iInBearbeitung, m_iErstellt, m_iUnterschriftlinks, m_iUnterschriftrechts, m_iZustaendig, m_iVerantwortlich, m_iPostzustellung, m_iMutierer, m_iStatus, m_iSerienbriefnr, m_iTeam As SqlInt32
Private m_sBezeichnung, m_sBemerkung 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>sBezeichnung. May be SqlString.Null</LI>
''' <LI>iVerantwortlich. May be SqlInt32.Null</LI>
''' <LI>iPostzustellung. May be SqlInt32.Null</LI>
''' <LI>daDokumentdatum. May be SqlDateTime.Null</LI>
''' <LI>iZustaendig. May be SqlInt32.Null</LI>
''' <LI>iUnterschriftlinks. May be SqlInt32.Null</LI>
''' <LI>iUnterschriftrechts. May be SqlInt32.Null</LI>
''' <LI>iTeam. May be SqlInt32.Null</LI>
''' <LI>daArchivdatum. May be SqlDateTime.Null</LI>
''' <LI>daTermin. May be SqlDateTime.Null</LI>
''' <LI>sBemerkung. 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>
''' <LI>bAktiv. May be SqlBoolean.Null</LI>
''' <LI>iStatus. May be SqlInt32.Null</LI>
''' <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
''' <LI>iWindowwidth. May be SqlInt32.Null</LI>
''' <LI>iWindowheight. May be SqlInt32.Null</LI>
''' <LI>iTreewidth. May be SqlInt32.Null</LI>
''' <LI>iFehlerhaft. May be SqlInt32.Null</LI>
''' <LI>iInBearbeitung. May be SqlInt32.Null</LI>
''' <LI>iErstellt. May be SqlInt32.Null</LI>
''' <LI>iGedruckt. May be SqlInt32.Null</LI>
''' <LI>iBestaetigt. May be SqlInt32.Null</LI>
''' <LI>iAusgeloest. May be SqlInt32.Null</LI>
''' <LI>iBldossier. May be SqlInt32.Null</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iSerienbriefnr</LI>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_edex_sb_serienbrief_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iverantwortlich", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerantwortlich))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ipostzustellung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iPostzustellung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dadokumentdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daDokumentdatum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@izustaendig", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iZustaendig))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iunterschriftlinks", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iUnterschriftlinks))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iunterschriftrechts", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iUnterschriftrechts))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iteam", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iTeam))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daarchivdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daArchivdatum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@datermin", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daTermin))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbemerkung", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBemerkung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", 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("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iwindowwidth", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iWindowwidth))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iwindowheight", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iWindowheight))
scmCmdToExecute.Parameters.Add(New SqlParameter("@itreewidth", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iTreewidth))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifehlerhaft", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFehlerhaft))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iinBearbeitung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iInBearbeitung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ierstellt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iErstellt))
scmCmdToExecute.Parameters.Add(New SqlParameter("@igedruckt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iGedruckt))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibestaetigt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBestaetigt))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iausgeloest", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAusgeloest))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibldossier", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBldossier))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iserienbriefnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iSerienbriefnr))
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_iSerienbriefnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iserienbriefnr").Value, SqlInt32))
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_edex_sb_serienbrief_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_sb_serienbrief::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>iSerienbriefnr</LI>
''' <LI>sBezeichnung. May be SqlString.Null</LI>
''' <LI>iVerantwortlich. May be SqlInt32.Null</LI>
''' <LI>iPostzustellung. May be SqlInt32.Null</LI>
''' <LI>daDokumentdatum. May be SqlDateTime.Null</LI>
''' <LI>iZustaendig. May be SqlInt32.Null</LI>
''' <LI>iUnterschriftlinks. May be SqlInt32.Null</LI>
''' <LI>iUnterschriftrechts. May be SqlInt32.Null</LI>
''' <LI>iTeam. May be SqlInt32.Null</LI>
''' <LI>daArchivdatum. May be SqlDateTime.Null</LI>
''' <LI>daTermin. May be SqlDateTime.Null</LI>
''' <LI>sBemerkung. 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>
''' <LI>bAktiv. May be SqlBoolean.Null</LI>
''' <LI>iStatus. May be SqlInt32.Null</LI>
''' <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
''' <LI>iWindowwidth. May be SqlInt32.Null</LI>
''' <LI>iWindowheight. May be SqlInt32.Null</LI>
''' <LI>iTreewidth. May be SqlInt32.Null</LI>
''' <LI>iFehlerhaft. May be SqlInt32.Null</LI>
''' <LI>iInBearbeitung. May be SqlInt32.Null</LI>
''' <LI>iErstellt. May be SqlInt32.Null</LI>
''' <LI>iGedruckt. May be SqlInt32.Null</LI>
''' <LI>iBestaetigt. May be SqlInt32.Null</LI>
''' <LI>iAusgeloest. May be SqlInt32.Null</LI>
''' <LI>iBldossier. 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_edex_sb_serienbrief_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iserienbriefnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSerienbriefnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iverantwortlich", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerantwortlich))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ipostzustellung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iPostzustellung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dadokumentdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daDokumentdatum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@izustaendig", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iZustaendig))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iunterschriftlinks", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iUnterschriftlinks))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iunterschriftrechts", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iUnterschriftrechts))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iteam", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iTeam))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daarchivdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daArchivdatum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@datermin", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daTermin))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbemerkung", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBemerkung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", 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("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iwindowwidth", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iWindowwidth))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iwindowheight", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iWindowheight))
scmCmdToExecute.Parameters.Add(New SqlParameter("@itreewidth", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iTreewidth))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifehlerhaft", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFehlerhaft))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iinBearbeitung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iInBearbeitung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ierstellt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iErstellt))
scmCmdToExecute.Parameters.Add(New SqlParameter("@igedruckt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iGedruckt))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibestaetigt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBestaetigt))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iausgeloest", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAusgeloest))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibldossier", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBldossier))
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, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_edex_sb_serienbrief_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_sb_serienbrief::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>iSerienbriefnr</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_sb_serienbrief_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iserienbriefnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSerienbriefnr))
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, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_edex_sb_serienbrief_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_sb_serienbrief::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>iSerienbriefnr</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
''' <LI>iSerienbriefnr</LI>
''' <LI>sBezeichnung</LI>
''' <LI>iVerantwortlich</LI>
''' <LI>iPostzustellung</LI>
''' <LI>daDokumentdatum</LI>
''' <LI>iZustaendig</LI>
''' <LI>iUnterschriftlinks</LI>
''' <LI>iUnterschriftrechts</LI>
''' <LI>iTeam</LI>
''' <LI>daArchivdatum</LI>
''' <LI>daTermin</LI>
''' <LI>sBemerkung</LI>
''' <LI>daErstellt_am</LI>
''' <LI>daMutiert_am</LI>
''' <LI>iMutierer</LI>
''' <LI>bAktiv</LI>
''' <LI>iStatus</LI>
''' <LI>iDokumenttypnr</LI>
''' <LI>iWindowwidth</LI>
''' <LI>iWindowheight</LI>
''' <LI>iTreewidth</LI>
''' <LI>iFehlerhaft</LI>
''' <LI>iInBearbeitung</LI>
''' <LI>iErstellt</LI>
''' <LI>iGedruckt</LI>
''' <LI>iBestaetigt</LI>
''' <LI>iAusgeloest</LI>
''' <LI>iBldossier</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_sb_serienbrief_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("edex_sb_serienbrief")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iserienbriefnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSerienbriefnr))
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, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_edex_sb_serienbrief_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iSerienbriefnr = New SqlInt32(CType(dtToReturn.Rows(0)("serienbriefnr"), 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)("verantwortlich") Is System.DBNull.Value Then
m_iVerantwortlich = SqlInt32.Null
Else
m_iVerantwortlich = New SqlInt32(CType(dtToReturn.Rows(0)("verantwortlich"), Integer))
End If
If dtToReturn.Rows(0)("postzustellung") Is System.DBNull.Value Then
m_iPostzustellung = SqlInt32.Null
Else
m_iPostzustellung = New SqlInt32(CType(dtToReturn.Rows(0)("postzustellung"), Integer))
End If
If dtToReturn.Rows(0)("dokumentdatum") Is System.DBNull.Value Then
m_daDokumentdatum = SqlDateTime.Null
Else
m_daDokumentdatum = New SqlDateTime(CType(dtToReturn.Rows(0)("dokumentdatum"), Date))
End If
If dtToReturn.Rows(0)("zustaendig") Is System.DBNull.Value Then
m_iZustaendig = SqlInt32.Null
Else
m_iZustaendig = New SqlInt32(CType(dtToReturn.Rows(0)("zustaendig"), Integer))
End If
If dtToReturn.Rows(0)("unterschriftlinks") Is System.DBNull.Value Then
m_iUnterschriftlinks = SqlInt32.Null
Else
m_iUnterschriftlinks = New SqlInt32(CType(dtToReturn.Rows(0)("unterschriftlinks"), Integer))
End If
If dtToReturn.Rows(0)("unterschriftrechts") Is System.DBNull.Value Then
m_iUnterschriftrechts = SqlInt32.Null
Else
m_iUnterschriftrechts = New SqlInt32(CType(dtToReturn.Rows(0)("unterschriftrechts"), Integer))
End If
If dtToReturn.Rows(0)("team") Is System.DBNull.Value Then
m_iTeam = SqlInt32.Null
Else
m_iTeam = New SqlInt32(CType(dtToReturn.Rows(0)("team"), Integer))
End If
If dtToReturn.Rows(0)("archivdatum") Is System.DBNull.Value Then
m_daArchivdatum = SqlDateTime.Null
Else
m_daArchivdatum = New SqlDateTime(CType(dtToReturn.Rows(0)("archivdatum"), Date))
End If
If dtToReturn.Rows(0)("termin") Is System.DBNull.Value Then
m_daTermin = SqlDateTime.Null
Else
m_daTermin = New SqlDateTime(CType(dtToReturn.Rows(0)("termin"), Date))
End If
If dtToReturn.Rows(0)("bemerkung") Is System.DBNull.Value Then
m_sBemerkung = SqlString.Null
Else
m_sBemerkung = New SqlString(CType(dtToReturn.Rows(0)("bemerkung"), 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
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)("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)("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)("windowwidth") Is System.DBNull.Value Then
m_iWindowwidth = SqlInt32.Null
Else
m_iWindowwidth = New SqlInt32(CType(dtToReturn.Rows(0)("windowwidth"), Integer))
End If
If dtToReturn.Rows(0)("windowheight") Is System.DBNull.Value Then
m_iWindowheight = SqlInt32.Null
Else
m_iWindowheight = New SqlInt32(CType(dtToReturn.Rows(0)("windowheight"), Integer))
End If
If dtToReturn.Rows(0)("treewidth") Is System.DBNull.Value Then
m_iTreewidth = SqlInt32.Null
Else
m_iTreewidth = New SqlInt32(CType(dtToReturn.Rows(0)("treewidth"), Integer))
End If
If dtToReturn.Rows(0)("fehlerhaft") Is System.DBNull.Value Then
m_iFehlerhaft = SqlInt32.Null
Else
m_iFehlerhaft = New SqlInt32(CType(dtToReturn.Rows(0)("fehlerhaft"), Integer))
End If
If dtToReturn.Rows(0)("inBearbeitung") Is System.DBNull.Value Then
m_iInBearbeitung = SqlInt32.Null
Else
m_iInBearbeitung = New SqlInt32(CType(dtToReturn.Rows(0)("inBearbeitung"), Integer))
End If
If dtToReturn.Rows(0)("erstellt") Is System.DBNull.Value Then
m_iErstellt = SqlInt32.Null
Else
m_iErstellt = New SqlInt32(CType(dtToReturn.Rows(0)("erstellt"), Integer))
End If
If dtToReturn.Rows(0)("gedruckt") Is System.DBNull.Value Then
m_iGedruckt = SqlInt32.Null
Else
m_iGedruckt = New SqlInt32(CType(dtToReturn.Rows(0)("gedruckt"), Integer))
End If
If dtToReturn.Rows(0)("bestaetigt") Is System.DBNull.Value Then
m_iBestaetigt = SqlInt32.Null
Else
m_iBestaetigt = New SqlInt32(CType(dtToReturn.Rows(0)("bestaetigt"), Integer))
End If
If dtToReturn.Rows(0)("ausgeloest") Is System.DBNull.Value Then
m_iAusgeloest = SqlInt32.Null
Else
m_iAusgeloest = New SqlInt32(CType(dtToReturn.Rows(0)("ausgeloest"), Integer))
End If
If dtToReturn.Rows(0)("bldossier") Is System.DBNull.Value Then
m_iBldossier = SqlInt32.Null
Else
m_iBldossier = New SqlInt32(CType(dtToReturn.Rows(0)("bldossier"), 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("clsEdex_sb_serienbrief::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_sb_serienbrief_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("edex_sb_serienbrief")
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 = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_edex_sb_serienbrief_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_sb_serienbrief::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 [iSerienbriefnr]() As SqlInt32
Get
Return m_iSerienbriefnr
End Get
Set(ByVal Value As SqlInt32)
Dim iSerienbriefnrTmp As SqlInt32 = Value
If iSerienbriefnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iSerienbriefnr", "iSerienbriefnr can't be NULL")
End If
m_iSerienbriefnr = 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 [iVerantwortlich]() As SqlInt32
Get
Return m_iVerantwortlich
End Get
Set(ByVal Value As SqlInt32)
m_iVerantwortlich = Value
End Set
End Property
Public Property [iPostzustellung]() As SqlInt32
Get
Return m_iPostzustellung
End Get
Set(ByVal Value As SqlInt32)
m_iPostzustellung = Value
End Set
End Property
Public Property [daDokumentdatum]() As SqlDateTime
Get
Return m_daDokumentdatum
End Get
Set(ByVal Value As SqlDateTime)
m_daDokumentdatum = Value
End Set
End Property
Public Property [iZustaendig]() As SqlInt32
Get
Return m_iZustaendig
End Get
Set(ByVal Value As SqlInt32)
m_iZustaendig = Value
End Set
End Property
Public Property [iUnterschriftlinks]() As SqlInt32
Get
Return m_iUnterschriftlinks
End Get
Set(ByVal Value As SqlInt32)
m_iUnterschriftlinks = Value
End Set
End Property
Public Property [iUnterschriftrechts]() As SqlInt32
Get
Return m_iUnterschriftrechts
End Get
Set(ByVal Value As SqlInt32)
m_iUnterschriftrechts = Value
End Set
End Property
Public Property [iTeam]() As SqlInt32
Get
Return m_iTeam
End Get
Set(ByVal Value As SqlInt32)
m_iTeam = Value
End Set
End Property
Public Property [daArchivdatum]() As SqlDateTime
Get
Return m_daArchivdatum
End Get
Set(ByVal Value As SqlDateTime)
m_daArchivdatum = Value
End Set
End Property
Public Property [daTermin]() As SqlDateTime
Get
Return m_daTermin
End Get
Set(ByVal Value As SqlDateTime)
m_daTermin = Value
End Set
End Property
Public Property [sBemerkung]() As SqlString
Get
Return m_sBemerkung
End Get
Set(ByVal Value As SqlString)
m_sBemerkung = 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 [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
m_bAktiv = 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 [iDokumenttypnr]() As SqlInt32
Get
Return m_iDokumenttypnr
End Get
Set(ByVal Value As SqlInt32)
m_iDokumenttypnr = Value
End Set
End Property
Public Property [iWindowwidth]() As SqlInt32
Get
Return m_iWindowwidth
End Get
Set(ByVal Value As SqlInt32)
m_iWindowwidth = Value
End Set
End Property
Public Property [iWindowheight]() As SqlInt32
Get
Return m_iWindowheight
End Get
Set(ByVal Value As SqlInt32)
m_iWindowheight = Value
End Set
End Property
Public Property [iTreewidth]() As SqlInt32
Get
Return m_iTreewidth
End Get
Set(ByVal Value As SqlInt32)
m_iTreewidth = Value
End Set
End Property
Public Property [iFehlerhaft]() As SqlInt32
Get
Return m_iFehlerhaft
End Get
Set(ByVal Value As SqlInt32)
m_iFehlerhaft = Value
End Set
End Property
Public Property [iInBearbeitung]() As SqlInt32
Get
Return m_iInBearbeitung
End Get
Set(ByVal Value As SqlInt32)
m_iInBearbeitung = Value
End Set
End Property
Public Property [iErstellt]() As SqlInt32
Get
Return m_iErstellt
End Get
Set(ByVal Value As SqlInt32)
m_iErstellt = Value
End Set
End Property
Public Property [iGedruckt]() As SqlInt32
Get
Return m_iGedruckt
End Get
Set(ByVal Value As SqlInt32)
m_iGedruckt = Value
End Set
End Property
Public Property [iBestaetigt]() As SqlInt32
Get
Return m_iBestaetigt
End Get
Set(ByVal Value As SqlInt32)
m_iBestaetigt = Value
End Set
End Property
Public Property [iAusgeloest]() As SqlInt32
Get
Return m_iAusgeloest
End Get
Set(ByVal Value As SqlInt32)
m_iAusgeloest = Value
End Set
End Property
Public Property [iBldossier]() As SqlInt32
Get
Return m_iBldossier
End Get
Set(ByVal Value As SqlInt32)
m_iBldossier = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,711 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'FA_APPL'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Montag, 4. April 2005, 23:36: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 'FA_APPL'.
' /// </summary>
Public Class clsFA_APPL
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bLog_In_DB, m_bLog_Per_Mail, m_bAktiv, m_bLog_Mit_DTO As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iVerarbeitungsart, m_iMail_Periodizitaet, m_iMandantnr, m_iMutierer, m_iApplNr, m_iEDOKA_Mitarbeiter As SqlInt32
Private m_sReserve_2, m_sOutputFormat, m_sReserve_1, m_sInputverzeichnis, m_sMail_Empfaneger, m_sBezeichnung, m_sDTO_Parameter 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>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>iEDOKA_Mitarbeiter. May be SqlInt32.Null</LI>
' /// <LI>sDTO_Parameter. May be SqlString.Null</LI>
' /// <LI>sReserve_1. May be SqlString.Null</LI>
' /// <LI>sReserve_2. May be SqlString.Null</LI>
' /// <LI>sInputverzeichnis. May be SqlString.Null</LI>
' /// <LI>bLog_Per_Mail. May be SqlBoolean.Null</LI>
' /// <LI>bLog_In_DB. May be SqlBoolean.Null</LI>
' /// <LI>bLog_Mit_DTO. May be SqlBoolean.Null</LI>
' /// <LI>sMail_Empfaneger. May be SqlString.Null</LI>
' /// <LI>iMail_Periodizitaet. May be SqlInt32.Null</LI>
' /// <LI>iVerarbeitungsart. May be SqlInt32.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>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>sOutputFormat. May be SqlString.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iApplNr</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_edokaimport_FA_APPL_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iEDOKA_Mitarbeiter", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iEDOKA_Mitarbeiter))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDTO_Parameter", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDTO_Parameter))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sReserve_1", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReserve_1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sReserve_2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReserve_2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sInputverzeichnis", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sInputverzeichnis))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bLog_Per_Mail", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bLog_Per_Mail))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bLog_In_DB", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bLog_In_DB))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bLog_Mit_DTO", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bLog_Mit_DTO))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sMail_Empfaneger", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sMail_Empfaneger))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iMail_Periodizitaet", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMail_Periodizitaet))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iVerarbeitungsart", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerarbeitungsart))
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("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sOutputFormat", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sOutputFormat))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iApplNr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iApplNr))
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_iApplNr = scmCmdToExecute.Parameters.Item("@iApplNr").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_edokaimport_FA_APPL_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("clsFA_APPL::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>iApplNr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>iEDOKA_Mitarbeiter. May be SqlInt32.Null</LI>
' /// <LI>sDTO_Parameter. May be SqlString.Null</LI>
' /// <LI>sReserve_1. May be SqlString.Null</LI>
' /// <LI>sReserve_2. May be SqlString.Null</LI>
' /// <LI>sInputverzeichnis. May be SqlString.Null</LI>
' /// <LI>bLog_Per_Mail. May be SqlBoolean.Null</LI>
' /// <LI>bLog_In_DB. May be SqlBoolean.Null</LI>
' /// <LI>bLog_Mit_DTO. May be SqlBoolean.Null</LI>
' /// <LI>sMail_Empfaneger. May be SqlString.Null</LI>
' /// <LI>iMail_Periodizitaet. May be SqlInt32.Null</LI>
' /// <LI>iVerarbeitungsart. May be SqlInt32.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>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>sOutputFormat. 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_edokaimport_FA_APPL_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iApplNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iApplNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iEDOKA_Mitarbeiter", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iEDOKA_Mitarbeiter))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDTO_Parameter", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDTO_Parameter))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sReserve_1", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReserve_1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sReserve_2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReserve_2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sInputverzeichnis", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sInputverzeichnis))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bLog_Per_Mail", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bLog_Per_Mail))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bLog_In_DB", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bLog_In_DB))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bLog_Mit_DTO", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bLog_Mit_DTO))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sMail_Empfaneger", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sMail_Empfaneger))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iMail_Periodizitaet", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMail_Periodizitaet))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iVerarbeitungsart", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerarbeitungsart))
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("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sOutputFormat", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sOutputFormat))
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_edokaimport_FA_APPL_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("clsFA_APPL::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>iApplNr</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_edokaimport_FA_APPL_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iApplNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iApplNr))
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_edokaimport_FA_APPL_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("clsFA_APPL::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>iApplNr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iApplNr</LI>
' /// <LI>sBezeichnung</LI>
' /// <LI>iEDOKA_Mitarbeiter</LI>
' /// <LI>sDTO_Parameter</LI>
' /// <LI>sReserve_1</LI>
' /// <LI>sReserve_2</LI>
' /// <LI>sInputverzeichnis</LI>
' /// <LI>bLog_Per_Mail</LI>
' /// <LI>bLog_In_DB</LI>
' /// <LI>bLog_Mit_DTO</LI>
' /// <LI>sMail_Empfaneger</LI>
' /// <LI>iMail_Periodizitaet</LI>
' /// <LI>iVerarbeitungsart</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>bAktiv</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>sOutputFormat</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_edokaimport_FA_APPL_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("FA_APPL")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iApplNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iApplNr))
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_edokaimport_FA_APPL_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iApplNr = New SqlInt32(CType(dtToReturn.Rows(0)("ApplNr"), 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)("EDOKA_Mitarbeiter") Is System.DBNull.Value Then
m_iEDOKA_Mitarbeiter = SqlInt32.Null
Else
m_iEDOKA_Mitarbeiter = New SqlInt32(CType(dtToReturn.Rows(0)("EDOKA_Mitarbeiter"), Integer))
End If
If dtToReturn.Rows(0)("DTO_Parameter") Is System.DBNull.Value Then
m_sDTO_Parameter = SqlString.Null
Else
m_sDTO_Parameter = New SqlString(CType(dtToReturn.Rows(0)("DTO_Parameter"), String))
End If
If dtToReturn.Rows(0)("Reserve_1") Is System.DBNull.Value Then
m_sReserve_1 = SqlString.Null
Else
m_sReserve_1 = New SqlString(CType(dtToReturn.Rows(0)("Reserve_1"), String))
End If
If dtToReturn.Rows(0)("Reserve_2") Is System.DBNull.Value Then
m_sReserve_2 = SqlString.Null
Else
m_sReserve_2 = New SqlString(CType(dtToReturn.Rows(0)("Reserve_2"), String))
End If
If dtToReturn.Rows(0)("Inputverzeichnis") Is System.DBNull.Value Then
m_sInputverzeichnis = SqlString.Null
Else
m_sInputverzeichnis = New SqlString(CType(dtToReturn.Rows(0)("Inputverzeichnis"), String))
End If
If dtToReturn.Rows(0)("Log_Per_Mail") Is System.DBNull.Value Then
m_bLog_Per_Mail = SqlBoolean.Null
Else
m_bLog_Per_Mail = New SqlBoolean(CType(dtToReturn.Rows(0)("Log_Per_Mail"), Boolean))
End If
If dtToReturn.Rows(0)("Log_In_DB") Is System.DBNull.Value Then
m_bLog_In_DB = SqlBoolean.Null
Else
m_bLog_In_DB = New SqlBoolean(CType(dtToReturn.Rows(0)("Log_In_DB"), Boolean))
End If
If dtToReturn.Rows(0)("Log_Mit_DTO") Is System.DBNull.Value Then
m_bLog_Mit_DTO = SqlBoolean.Null
Else
m_bLog_Mit_DTO = New SqlBoolean(CType(dtToReturn.Rows(0)("Log_Mit_DTO"), Boolean))
End If
If dtToReturn.Rows(0)("Mail_Empfaneger") Is System.DBNull.Value Then
m_sMail_Empfaneger = SqlString.Null
Else
m_sMail_Empfaneger = New SqlString(CType(dtToReturn.Rows(0)("Mail_Empfaneger"), String))
End If
If dtToReturn.Rows(0)("Mail_Periodizitaet") Is System.DBNull.Value Then
m_iMail_Periodizitaet = SqlInt32.Null
Else
m_iMail_Periodizitaet = New SqlInt32(CType(dtToReturn.Rows(0)("Mail_Periodizitaet"), Integer))
End If
If dtToReturn.Rows(0)("Verarbeitungsart") Is System.DBNull.Value Then
m_iVerarbeitungsart = SqlInt32.Null
Else
m_iVerarbeitungsart = New SqlInt32(CType(dtToReturn.Rows(0)("Verarbeitungsart"), Integer))
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)("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)("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)("OutputFormat") Is System.DBNull.Value Then
m_sOutputFormat = SqlString.Null
Else
m_sOutputFormat = New SqlString(CType(dtToReturn.Rows(0)("OutputFormat"), 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("clsFA_APPL::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_edokaimport_FA_APPL_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("FA_APPL")
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_edokaimport_FA_APPL_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("clsFA_APPL::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 [iApplNr]() As SqlInt32
Get
Return m_iApplNr
End Get
Set(ByVal Value As SqlInt32)
Dim iApplNrTmp As SqlInt32 = Value
If iApplNrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iApplNr", "iApplNr can't be NULL")
End If
m_iApplNr = 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 [iEDOKA_Mitarbeiter]() As SqlInt32
Get
Return m_iEDOKA_Mitarbeiter
End Get
Set(ByVal Value As SqlInt32)
m_iEDOKA_Mitarbeiter = Value
End Set
End Property
Public Property [sDTO_Parameter]() As SqlString
Get
Return m_sDTO_Parameter
End Get
Set(ByVal Value As SqlString)
m_sDTO_Parameter = Value
End Set
End Property
Public Property [sReserve_1]() As SqlString
Get
Return m_sReserve_1
End Get
Set(ByVal Value As SqlString)
m_sReserve_1 = Value
End Set
End Property
Public Property [sReserve_2]() As SqlString
Get
Return m_sReserve_2
End Get
Set(ByVal Value As SqlString)
m_sReserve_2 = Value
End Set
End Property
Public Property [sInputverzeichnis]() As SqlString
Get
Return m_sInputverzeichnis
End Get
Set(ByVal Value As SqlString)
m_sInputverzeichnis = Value
End Set
End Property
Public Property [bLog_Per_Mail]() As SqlBoolean
Get
Return m_bLog_Per_Mail
End Get
Set(ByVal Value As SqlBoolean)
m_bLog_Per_Mail = Value
End Set
End Property
Public Property [bLog_In_DB]() As SqlBoolean
Get
Return m_bLog_In_DB
End Get
Set(ByVal Value As SqlBoolean)
m_bLog_In_DB = Value
End Set
End Property
Public Property [bLog_Mit_DTO]() As SqlBoolean
Get
Return m_bLog_Mit_DTO
End Get
Set(ByVal Value As SqlBoolean)
m_bLog_Mit_DTO = Value
End Set
End Property
Public Property [sMail_Empfaneger]() As SqlString
Get
Return m_sMail_Empfaneger
End Get
Set(ByVal Value As SqlString)
m_sMail_Empfaneger = Value
End Set
End Property
Public Property [iMail_Periodizitaet]() As SqlInt32
Get
Return m_iMail_Periodizitaet
End Get
Set(ByVal Value As SqlInt32)
m_iMail_Periodizitaet = Value
End Set
End Property
Public Property [iVerarbeitungsart]() As SqlInt32
Get
Return m_iVerarbeitungsart
End Get
Set(ByVal Value As SqlInt32)
m_iVerarbeitungsart = 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 [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
m_bAktiv = 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 [sOutputFormat]() As SqlString
Get
Return m_sOutputFormat
End Get
Set(ByVal Value As SqlString)
m_sOutputFormat = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,491 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'FA_BCImport'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Montag, 4. April 2005, 23:36: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 'FA_BCImport'.
' /// </summary>
Public Class clsFA_BCImport
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iStatus, m_iFabcimportnr As SqlInt32
Private m_sDateiformat, m_sDateiname, 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>sDokumentid. May be SqlString.Null</LI>
' /// <LI>sDateiname. May be SqlString.Null</LI>
' /// <LI>iStatus. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>sDateiformat. May be SqlString.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iFabcimportnr</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_edokaimport_FA_BCImport_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("@sdateiname", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateiname))
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
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("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdateiformat", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateiformat))
scmCmdToExecute.Parameters.Add(new SqlParameter("@ifabcimportnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iFabcimportnr))
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_iFabcimportnr = scmCmdToExecute.Parameters.Item("@ifabcimportnr").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_edokaimport_FA_BCImport_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("clsFA_BCImport::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>iFabcimportnr</LI>
' /// <LI>sDokumentid. May be SqlString.Null</LI>
' /// <LI>sDateiname. May be SqlString.Null</LI>
' /// <LI>iStatus. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>sDateiformat. 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_edokaimport_FA_BCImport_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifabcimportnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFabcimportnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdateiname", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateiname))
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
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("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdateiformat", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateiformat))
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_edokaimport_FA_BCImport_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("clsFA_BCImport::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>iFabcimportnr</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_edokaimport_FA_BCImport_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifabcimportnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFabcimportnr))
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_edokaimport_FA_BCImport_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("clsFA_BCImport::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>iFabcimportnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iFabcimportnr</LI>
' /// <LI>sDokumentid</LI>
' /// <LI>sDateiname</LI>
' /// <LI>iStatus</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>bAktiv</LI>
' /// <LI>sDateiformat</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_edokaimport_FA_BCImport_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("FA_BCImport")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@ifabcimportnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFabcimportnr))
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_edokaimport_FA_BCImport_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iFabcimportnr = New SqlInt32(CType(dtToReturn.Rows(0)("fabcimportnr"), 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)("dateiname") Is System.DBNull.Value Then
m_sDateiname = SqlString.Null
Else
m_sDateiname = New SqlString(CType(dtToReturn.Rows(0)("dateiname"), 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)("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)("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)("dateiformat") Is System.DBNull.Value Then
m_sDateiformat = SqlString.Null
Else
m_sDateiformat = New SqlString(CType(dtToReturn.Rows(0)("dateiformat"), 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("clsFA_BCImport::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_edokaimport_FA_BCImport_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("FA_BCImport")
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_edokaimport_FA_BCImport_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("clsFA_BCImport::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 [iFabcimportnr]() As SqlInt32
Get
Return m_iFabcimportnr
End Get
Set(ByVal Value As SqlInt32)
Dim iFabcimportnrTmp As SqlInt32 = Value
If iFabcimportnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iFabcimportnr", "iFabcimportnr can't be NULL")
End If
m_iFabcimportnr = 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 [sDateiname]() As SqlString
Get
Return m_sDateiname
End Get
Set(ByVal Value As SqlString)
m_sDateiname = 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 [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 [sDateiformat]() As SqlString
Get
Return m_sDateiformat
End Get
Set(ByVal Value As SqlString)
m_sDateiformat = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,490 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'FA_Dokumenttyp'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Montag, 4. April 2005, 23:36: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 'FA_Dokumenttyp'.
' /// </summary>
Public Class clsFA_Dokumenttyp
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iAktiv, m_iMutierer, m_iApplNr, m_iEintragnr, m_iEDOKA_Dokumenttyp As SqlInt32
Private m_sFA_Dokumenttyp 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>iApplNr. May be SqlInt32.Null</LI>
' /// <LI>sFA_Dokumenttyp. May be SqlString.Null</LI>
' /// <LI>iEDOKA_Dokumenttyp. May be SqlInt32.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>iAktiv. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iEintragnr</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_edokaimport_FA_Dokumenttyp_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iApplNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iApplNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sFA_Dokumenttyp", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFA_Dokumenttyp))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iEDOKA_Dokumenttyp", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iEDOKA_Dokumenttyp))
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("@iaktiv", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAktiv))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iEintragnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iEintragnr))
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_iEintragnr = scmCmdToExecute.Parameters.Item("@iEintragnr").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_edokaimport_FA_Dokumenttyp_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("clsFA_Dokumenttyp::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>iEintragnr</LI>
' /// <LI>iApplNr. May be SqlInt32.Null</LI>
' /// <LI>sFA_Dokumenttyp. May be SqlString.Null</LI>
' /// <LI>iEDOKA_Dokumenttyp. May be SqlInt32.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>iAktiv. 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_edokaimport_FA_Dokumenttyp_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iEintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iEintragnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iApplNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iApplNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sFA_Dokumenttyp", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFA_Dokumenttyp))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iEDOKA_Dokumenttyp", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iEDOKA_Dokumenttyp))
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("@iaktiv", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAktiv))
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_edokaimport_FA_Dokumenttyp_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("clsFA_Dokumenttyp::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>iEintragnr</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_edokaimport_FA_Dokumenttyp_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iEintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iEintragnr))
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_edokaimport_FA_Dokumenttyp_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("clsFA_Dokumenttyp::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>iEintragnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iEintragnr</LI>
' /// <LI>iApplNr</LI>
' /// <LI>sFA_Dokumenttyp</LI>
' /// <LI>iEDOKA_Dokumenttyp</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>iAktiv</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_edokaimport_FA_Dokumenttyp_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("FA_Dokumenttyp")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iEintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iEintragnr))
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_edokaimport_FA_Dokumenttyp_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iEintragnr = New SqlInt32(CType(dtToReturn.Rows(0)("Eintragnr"), Integer))
If dtToReturn.Rows(0)("ApplNr") Is System.DBNull.Value Then
m_iApplNr = SqlInt32.Null
Else
m_iApplNr = New SqlInt32(CType(dtToReturn.Rows(0)("ApplNr"), Integer))
End If
If dtToReturn.Rows(0)("FA_Dokumenttyp") Is System.DBNull.Value Then
m_sFA_Dokumenttyp = SqlString.Null
Else
m_sFA_Dokumenttyp = New SqlString(CType(dtToReturn.Rows(0)("FA_Dokumenttyp"), String))
End If
If dtToReturn.Rows(0)("EDOKA_Dokumenttyp") Is System.DBNull.Value Then
m_iEDOKA_Dokumenttyp = SqlInt32.Null
Else
m_iEDOKA_Dokumenttyp = New SqlInt32(CType(dtToReturn.Rows(0)("EDOKA_Dokumenttyp"), Integer))
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)("aktiv") Is System.DBNull.Value Then
m_iAktiv = SqlInt32.Null
Else
m_iAktiv = New SqlInt32(CType(dtToReturn.Rows(0)("aktiv"), 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("clsFA_Dokumenttyp::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_edokaimport_FA_Dokumenttyp_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("FA_Dokumenttyp")
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_edokaimport_FA_Dokumenttyp_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("clsFA_Dokumenttyp::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 [iEintragnr]() As SqlInt32
Get
Return m_iEintragnr
End Get
Set(ByVal Value As SqlInt32)
Dim iEintragnrTmp As SqlInt32 = Value
If iEintragnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iEintragnr", "iEintragnr can't be NULL")
End If
m_iEintragnr = Value
End Set
End Property
Public Property [iApplNr]() As SqlInt32
Get
Return m_iApplNr
End Get
Set(ByVal Value As SqlInt32)
m_iApplNr = Value
End Set
End Property
Public Property [sFA_Dokumenttyp]() As SqlString
Get
Return m_sFA_Dokumenttyp
End Get
Set(ByVal Value As SqlString)
m_sFA_Dokumenttyp = Value
End Set
End Property
Public Property [iEDOKA_Dokumenttyp]() As SqlInt32
Get
Return m_iEDOKA_Dokumenttyp
End Get
Set(ByVal Value As SqlInt32)
m_iEDOKA_Dokumenttyp = 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 [iAktiv]() As SqlInt32
Get
Return m_iAktiv
End Get
Set(ByVal Value As SqlInt32)
m_iAktiv = Value
End Set
End Property
#End Region
End Class
End Namespace

View 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

View 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

View File

@@ -0,0 +1,910 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'mitarbeiter'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 10. August 2003, 23:09:05
' // 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 'mitarbeiter'.
' /// </summary>
Public Class clsMitarbeiter
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bMailempfang, m_bEdokaMesasge, m_bShowtip, m_bAktiv, m_bMailDirektVersenden, m_bEdoka_mail, m_bJournalisierung, m_bMailDokumentrueckgang As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iPartnernr, m_iKlassifizierung, m_iMutierer, m_iMandantnr, m_iFunktionnr, m_iMitarbeiternr, m_iFuermandant, m_iSprache As SqlInt32
Private m_sRang, m_sAnrede, m_sKurzzeichen, m_sVorname, m_sName, m_sFax, m_sTelefon, m_sUnterschrift_text, m_sFunktion, m_sTgnummer, m_sEmail 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>iMitarbeiternr</LI>
' /// <LI>sVorname. May be SqlString.Null</LI>
' /// <LI>sName. May be SqlString.Null</LI>
' /// <LI>sKurzzeichen. May be SqlString.Null</LI>
' /// <LI>sAnrede. May be SqlString.Null</LI>
' /// <LI>sTgnummer. May be SqlString.Null</LI>
' /// <LI>sEmail. May be SqlString.Null</LI>
' /// <LI>sFax. May be SqlString.Null</LI>
' /// <LI>sTelefon. May be SqlString.Null</LI>
' /// <LI>sUnterschrift_text. May be SqlString.Null</LI>
' /// <LI>iFunktionnr. May be SqlInt32.Null</LI>
' /// <LI>iSprache. May be SqlInt32.Null</LI>
' /// <LI>iFuermandant</LI>
' /// <LI>bShowtip</LI>
' /// <LI>iPartnernr</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>bMailempfang. May be SqlBoolean.Null</LI>
' /// <LI>bEdokaMesasge. May be SqlBoolean.Null</LI>
' /// <LI>sFunktion. May be SqlString.Null</LI>
' /// <LI>bMailDirektVersenden. May be SqlBoolean.Null</LI>
' /// <LI>sRang. May be SqlString.Null</LI>
' /// <LI>bMailDokumentrueckgang. May be SqlBoolean.Null</LI>
' /// <LI>iKlassifizierung. May be SqlInt32.Null</LI>
' /// <LI>bEdoka_mail. May be SqlBoolean.Null</LI>
' /// <LI>bJournalisierung. May be SqlBoolean.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_mitarbeiter_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@svorname", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVorname))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sname", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sName))
scmCmdToExecute.Parameters.Add(New SqlParameter("@skurzzeichen", SqlDbType.VarChar, 10, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sKurzzeichen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sanrede", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAnrede))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stgnummer", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTgnummer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@semail", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEmail))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfax", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFax))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stelefon", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTelefon))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sunterschrift_text", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sUnterschrift_text))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifuermandant", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFuermandant))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bshowtip", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bShowtip))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ipartnernr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPartnernr))
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("@bMailempfang", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailempfang))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bEdokaMesasge", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bEdokaMesasge))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfunktion", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFunktion))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailDirektVersenden", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailDirektVersenden))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sRang", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRang))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailDokumentrueckgang", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailDokumentrueckgang))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iklassifizierung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iKlassifizierung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bedoka_mail", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bEdoka_mail))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bjournalisierung", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bJournalisierung))
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_mitarbeiter_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("clsMitarbeiter::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>iMitarbeiternr</LI>
' /// <LI>sVorname. May be SqlString.Null</LI>
' /// <LI>sName. May be SqlString.Null</LI>
' /// <LI>sKurzzeichen. May be SqlString.Null</LI>
' /// <LI>sAnrede. May be SqlString.Null</LI>
' /// <LI>sTgnummer. May be SqlString.Null</LI>
' /// <LI>sEmail. May be SqlString.Null</LI>
' /// <LI>sFax. May be SqlString.Null</LI>
' /// <LI>sTelefon. May be SqlString.Null</LI>
' /// <LI>sUnterschrift_text. May be SqlString.Null</LI>
' /// <LI>iFunktionnr. May be SqlInt32.Null</LI>
' /// <LI>iSprache. May be SqlInt32.Null</LI>
' /// <LI>iFuermandant</LI>
' /// <LI>bShowtip</LI>
' /// <LI>iPartnernr</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>bMailempfang. May be SqlBoolean.Null</LI>
' /// <LI>bEdokaMesasge. May be SqlBoolean.Null</LI>
' /// <LI>sFunktion. May be SqlString.Null</LI>
' /// <LI>bMailDirektVersenden. May be SqlBoolean.Null</LI>
' /// <LI>sRang. May be SqlString.Null</LI>
' /// <LI>bMailDokumentrueckgang. May be SqlBoolean.Null</LI>
' /// <LI>iKlassifizierung. May be SqlInt32.Null</LI>
' /// <LI>bEdoka_mail. May be SqlBoolean.Null</LI>
' /// <LI>bJournalisierung. May be SqlBoolean.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_mitarbeiter_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@svorname", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVorname))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sname", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sName))
scmCmdToExecute.Parameters.Add(New SqlParameter("@skurzzeichen", SqlDbType.VarChar, 10, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sKurzzeichen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sanrede", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAnrede))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stgnummer", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTgnummer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@semail", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEmail))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfax", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFax))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stelefon", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTelefon))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sunterschrift_text", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sUnterschrift_text))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifuermandant", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFuermandant))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bshowtip", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bShowtip))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ipartnernr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPartnernr))
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("@bMailempfang", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailempfang))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bEdokaMesasge", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bEdokaMesasge))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfunktion", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFunktion))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailDirektVersenden", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailDirektVersenden))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sRang", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRang))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailDokumentrueckgang", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailDokumentrueckgang))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iklassifizierung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iKlassifizierung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bedoka_mail", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bEdoka_mail))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bjournalisierung", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bJournalisierung))
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_mitarbeiter_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("clsMitarbeiter::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>iMitarbeiternr</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_mitarbeiter_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
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_mitarbeiter_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("clsMitarbeiter::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>iMitarbeiternr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iMitarbeiternr</LI>
' /// <LI>sVorname</LI>
' /// <LI>sName</LI>
' /// <LI>sKurzzeichen</LI>
' /// <LI>sAnrede</LI>
' /// <LI>sTgnummer</LI>
' /// <LI>sEmail</LI>
' /// <LI>sFax</LI>
' /// <LI>sTelefon</LI>
' /// <LI>sUnterschrift_text</LI>
' /// <LI>iFunktionnr</LI>
' /// <LI>iSprache</LI>
' /// <LI>iFuermandant</LI>
' /// <LI>bShowtip</LI>
' /// <LI>iPartnernr</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>bMailempfang</LI>
' /// <LI>bEdokaMesasge</LI>
' /// <LI>sFunktion</LI>
' /// <LI>bMailDirektVersenden</LI>
' /// <LI>sRang</LI>
' /// <LI>bMailDokumentrueckgang</LI>
' /// <LI>iKlassifizierung</LI>
' /// <LI>bEdoka_mail</LI>
' /// <LI>bJournalisierung</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_mitarbeiter_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("mitarbeiter")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
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_mitarbeiter_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iMitarbeiternr = New SqlInt32(CType(dtToReturn.Rows(0)("mitarbeiternr"), Integer))
If dtToReturn.Rows(0)("vorname") Is System.DBNull.Value Then
m_sVorname = SqlString.Null
Else
m_sVorname = New SqlString(CType(dtToReturn.Rows(0)("vorname"), String))
End If
If dtToReturn.Rows(0)("name") Is System.DBNull.Value Then
m_sName = SqlString.Null
Else
m_sName = New SqlString(CType(dtToReturn.Rows(0)("name"), String))
End If
If dtToReturn.Rows(0)("kurzzeichen") Is System.DBNull.Value Then
m_sKurzzeichen = SqlString.Null
Else
m_sKurzzeichen = New SqlString(CType(dtToReturn.Rows(0)("kurzzeichen"), String))
End If
If dtToReturn.Rows(0)("anrede") Is System.DBNull.Value Then
m_sAnrede = SqlString.Null
Else
m_sAnrede = New SqlString(CType(dtToReturn.Rows(0)("anrede"), String))
End If
If dtToReturn.Rows(0)("tgnummer") Is System.DBNull.Value Then
m_sTgnummer = SqlString.Null
Else
m_sTgnummer = New SqlString(CType(dtToReturn.Rows(0)("tgnummer"), String))
End If
If dtToReturn.Rows(0)("email") Is System.DBNull.Value Then
m_sEmail = SqlString.Null
Else
m_sEmail = New SqlString(CType(dtToReturn.Rows(0)("email"), String))
End If
If dtToReturn.Rows(0)("fax") Is System.DBNull.Value Then
m_sFax = SqlString.Null
Else
m_sFax = New SqlString(CType(dtToReturn.Rows(0)("fax"), String))
End If
If dtToReturn.Rows(0)("telefon") Is System.DBNull.Value Then
m_sTelefon = SqlString.Null
Else
m_sTelefon = New SqlString(CType(dtToReturn.Rows(0)("telefon"), String))
End If
If dtToReturn.Rows(0)("unterschrift_text") Is System.DBNull.Value Then
m_sUnterschrift_text = SqlString.Null
Else
m_sUnterschrift_text = New SqlString(CType(dtToReturn.Rows(0)("unterschrift_text"), String))
End If
If dtToReturn.Rows(0)("funktionnr") Is System.DBNull.Value Then
m_iFunktionnr = SqlInt32.Null
Else
m_iFunktionnr = New SqlInt32(CType(dtToReturn.Rows(0)("funktionnr"), Integer))
End If
If dtToReturn.Rows(0)("sprache") Is System.DBNull.Value Then
m_iSprache = SqlInt32.Null
Else
m_iSprache = New SqlInt32(CType(dtToReturn.Rows(0)("sprache"), Integer))
End If
m_iFuermandant = New SqlInt32(CType(dtToReturn.Rows(0)("fuermandant"), Integer))
m_bShowtip = New SqlBoolean(CType(dtToReturn.Rows(0)("showtip"), Boolean))
m_iPartnernr = New SqlInt32(CType(dtToReturn.Rows(0)("partnernr"), 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)("Mailempfang") Is System.DBNull.Value Then
m_bMailempfang = SqlBoolean.Null
Else
m_bMailempfang = New SqlBoolean(CType(dtToReturn.Rows(0)("Mailempfang"), Boolean))
End If
If dtToReturn.Rows(0)("EdokaMesasge") Is System.DBNull.Value Then
m_bEdokaMesasge = SqlBoolean.Null
Else
m_bEdokaMesasge = New SqlBoolean(CType(dtToReturn.Rows(0)("EdokaMesasge"), Boolean))
End If
If dtToReturn.Rows(0)("funktion") Is System.DBNull.Value Then
m_sFunktion = SqlString.Null
Else
m_sFunktion = New SqlString(CType(dtToReturn.Rows(0)("funktion"), String))
End If
If dtToReturn.Rows(0)("MailDirektVersenden") Is System.DBNull.Value Then
m_bMailDirektVersenden = SqlBoolean.Null
Else
m_bMailDirektVersenden = New SqlBoolean(CType(dtToReturn.Rows(0)("MailDirektVersenden"), Boolean))
End If
If dtToReturn.Rows(0)("Rang") Is System.DBNull.Value Then
m_sRang = SqlString.Null
Else
m_sRang = New SqlString(CType(dtToReturn.Rows(0)("Rang"), String))
End If
If dtToReturn.Rows(0)("MailDokumentrueckgang") Is System.DBNull.Value Then
m_bMailDokumentrueckgang = SqlBoolean.Null
Else
m_bMailDokumentrueckgang = New SqlBoolean(CType(dtToReturn.Rows(0)("MailDokumentrueckgang"), Boolean))
End If
If dtToReturn.Rows(0)("klassifizierung") Is System.DBNull.Value Then
m_iKlassifizierung = SqlInt32.Null
Else
m_iKlassifizierung = New SqlInt32(CType(dtToReturn.Rows(0)("klassifizierung"), Integer))
End If
If dtToReturn.Rows(0)("edoka_mail") Is System.DBNull.Value Then
m_bEdoka_mail = SqlBoolean.Null
Else
m_bEdoka_mail = New SqlBoolean(CType(dtToReturn.Rows(0)("edoka_mail"), Boolean))
End If
If dtToReturn.Rows(0)("journalisierung") Is System.DBNull.Value Then
m_bJournalisierung = SqlBoolean.Null
Else
m_bJournalisierung = New SqlBoolean(CType(dtToReturn.Rows(0)("journalisierung"), Boolean))
End If
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsMitarbeiter::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_mitarbeiter_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("mitarbeiter")
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_mitarbeiter_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("clsMitarbeiter::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 [iMitarbeiternr]() As SqlInt32
Get
Return m_iMitarbeiternr
End Get
Set(ByVal Value As SqlInt32)
Dim iMitarbeiternrTmp As SqlInt32 = Value
If iMitarbeiternrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iMitarbeiternr", "iMitarbeiternr can't be NULL")
End If
m_iMitarbeiternr = Value
End Set
End Property
Public Property [sVorname]() As SqlString
Get
Return m_sVorname
End Get
Set(ByVal Value As SqlString)
m_sVorname = Value
End Set
End Property
Public Property [sName]() As SqlString
Get
Return m_sName
End Get
Set(ByVal Value As SqlString)
m_sName = Value
End Set
End Property
Public Property [sKurzzeichen]() As SqlString
Get
Return m_sKurzzeichen
End Get
Set(ByVal Value As SqlString)
m_sKurzzeichen = Value
End Set
End Property
Public Property [sAnrede]() As SqlString
Get
Return m_sAnrede
End Get
Set(ByVal Value As SqlString)
m_sAnrede = Value
End Set
End Property
Public Property [sTgnummer]() As SqlString
Get
Return m_sTgnummer
End Get
Set(ByVal Value As SqlString)
m_sTgnummer = Value
End Set
End Property
Public Property [sEmail]() As SqlString
Get
Return m_sEmail
End Get
Set(ByVal Value As SqlString)
m_sEmail = Value
End Set
End Property
Public Property [sFax]() As SqlString
Get
Return m_sFax
End Get
Set(ByVal Value As SqlString)
m_sFax = Value
End Set
End Property
Public Property [sTelefon]() As SqlString
Get
Return m_sTelefon
End Get
Set(ByVal Value As SqlString)
m_sTelefon = Value
End Set
End Property
Public Property [sUnterschrift_text]() As SqlString
Get
Return m_sUnterschrift_text
End Get
Set(ByVal Value As SqlString)
m_sUnterschrift_text = Value
End Set
End Property
Public Property [iFunktionnr]() As SqlInt32
Get
Return m_iFunktionnr
End Get
Set(ByVal Value As SqlInt32)
m_iFunktionnr = Value
End Set
End Property
Public Property [iSprache]() As SqlInt32
Get
Return m_iSprache
End Get
Set(ByVal Value As SqlInt32)
m_iSprache = Value
End Set
End Property
Public Property [iFuermandant]() As SqlInt32
Get
Return m_iFuermandant
End Get
Set(ByVal Value As SqlInt32)
Dim iFuermandantTmp As SqlInt32 = Value
If iFuermandantTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iFuermandant", "iFuermandant can't be NULL")
End If
m_iFuermandant = Value
End Set
End Property
Public Property [bShowtip]() As SqlBoolean
Get
Return m_bShowtip
End Get
Set(ByVal Value As SqlBoolean)
Dim bShowtipTmp As SqlBoolean = Value
If bShowtipTmp.IsNull Then
Throw New ArgumentOutOfRangeException("bShowtip", "bShowtip can't be NULL")
End If
m_bShowtip = Value
End Set
End Property
Public Property [iPartnernr]() As SqlInt32
Get
Return m_iPartnernr
End Get
Set(ByVal Value As SqlInt32)
Dim iPartnernrTmp As SqlInt32 = Value
If iPartnernrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iPartnernr", "iPartnernr can't be NULL")
End If
m_iPartnernr = 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 [bMailempfang]() As SqlBoolean
Get
Return m_bMailempfang
End Get
Set(ByVal Value As SqlBoolean)
m_bMailempfang = Value
End Set
End Property
Public Property [bEdokaMesasge]() As SqlBoolean
Get
Return m_bEdokaMesasge
End Get
Set(ByVal Value As SqlBoolean)
m_bEdokaMesasge = Value
End Set
End Property
Public Property [sFunktion]() As SqlString
Get
Return m_sFunktion
End Get
Set(ByVal Value As SqlString)
m_sFunktion = Value
End Set
End Property
Public Property [bMailDirektVersenden]() As SqlBoolean
Get
Return m_bMailDirektVersenden
End Get
Set(ByVal Value As SqlBoolean)
m_bMailDirektVersenden = Value
End Set
End Property
Public Property [sRang]() As SqlString
Get
Return m_sRang
End Get
Set(ByVal Value As SqlString)
m_sRang = Value
End Set
End Property
Public Property [bMailDokumentrueckgang]() As SqlBoolean
Get
Return m_bMailDokumentrueckgang
End Get
Set(ByVal Value As SqlBoolean)
m_bMailDokumentrueckgang = Value
End Set
End Property
Public Property [iKlassifizierung]() As SqlInt32
Get
Return m_iKlassifizierung
End Get
Set(ByVal Value As SqlInt32)
m_iKlassifizierung = Value
End Set
End Property
Public Property [bEdoka_mail]() As SqlBoolean
Get
Return m_bEdoka_mail
End Get
Set(ByVal Value As SqlBoolean)
m_bEdoka_mail = Value
End Set
End Property
Public Property [bJournalisierung]() As SqlBoolean
Get
Return m_bJournalisierung
End Get
Set(ByVal Value As SqlBoolean)
m_bJournalisierung = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,61 @@
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
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

View File

@@ -0,0 +1,73 @@
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Imports System.Security.Principal
Namespace edokadb
Public Class clsMyMitarbeiter
Inherits edokaDB.clsMitarbeiter
#Region "Deklarationen"
Private m_xtgnummer As String
Property xtgnummer() As String
Get
Return m_xtgnummer
End Get
Set(ByVal Value As String)
m_xtgnummer = Value
End Set
End Property
#End Region
Public Function SelectWithTGNummer() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[sp_mitarbeiter_SelectWithTGNummer]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("mitarbeiter")
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@stgnummer", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_xtgnummer))
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_mitarbeiter_SelectAllWithTGNummer' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return dtToReturn
Catch ex As Exception
MsgBox(ex.Message)
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsMitarbeiter::SelectWithTGNummer::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
End Class
End Namespace

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View 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

528
edkb08/Datenbank/clsVv.vb Normal file
View File

@@ -0,0 +1,528 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'VV'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 17. September 2003, 00:12:40
' // 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 'VV'.
' /// </summary>
Public Class clsVV
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_iNRPRD00, m_iNRVBS00, m_iNRSPR00, m_iNRVVG00, m_iNRPAR00 As SqlInt32
Private m_sNAVVG00, m_sSAREC00, m_sBEPRDLG, m_sTXRBK00, m_sNEVVG00 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>iNRVVG00</LI>
' /// <LI>iNRPAR00. May be SqlInt32.Null</LI>
' /// <LI>iNRSPR00. May be SqlInt32.Null</LI>
' /// <LI>sBEPRDLG. May be SqlString.Null</LI>
' /// <LI>iNRPRD00. May be SqlInt32.Null</LI>
' /// <LI>sTXRBK00. May be SqlString.Null</LI>
' /// <LI>sNEVVG00. May be SqlString.Null</LI>
' /// <LI>sNAVVG00. May be SqlString.Null</LI>
' /// <LI>iNRVBS00. May be SqlInt32.Null</LI>
' /// <LI>sSAREC00. 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_VV_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRVVG00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRVVG00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPAR00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRPAR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRSPR00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRSPR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEPRDLG", SqlDbType.NVarChar, 35, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEPRDLG))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPRD00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRPRD00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sTXRBK00", SqlDbType.VarChar, 35, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTXRBK00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNEVVG00", SqlDbType.VarChar, 16, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNEVVG00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNAVVG00", SqlDbType.VarChar, 16, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNAVVG00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRVBS00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRVBS00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAREC00", SqlDbType.VarChar, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSAREC00))
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_VV_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("clsVV::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>iNRVVG00</LI>
' /// <LI>iNRPAR00. May be SqlInt32.Null</LI>
' /// <LI>iNRSPR00. May be SqlInt32.Null</LI>
' /// <LI>sBEPRDLG. May be SqlString.Null</LI>
' /// <LI>iNRPRD00. May be SqlInt32.Null</LI>
' /// <LI>sTXRBK00. May be SqlString.Null</LI>
' /// <LI>sNEVVG00. May be SqlString.Null</LI>
' /// <LI>sNAVVG00. May be SqlString.Null</LI>
' /// <LI>iNRVBS00. May be SqlInt32.Null</LI>
' /// <LI>sSAREC00. 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_VV_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRVVG00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRVVG00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPAR00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRPAR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRSPR00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRSPR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEPRDLG", SqlDbType.NVarChar, 35, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEPRDLG))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPRD00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRPRD00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sTXRBK00", SqlDbType.VarChar, 35, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTXRBK00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNEVVG00", SqlDbType.VarChar, 16, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNEVVG00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNAVVG00", SqlDbType.VarChar, 16, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNAVVG00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRVBS00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRVBS00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAREC00", SqlDbType.VarChar, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSAREC00))
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_VV_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("clsVV::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>iNRVVG00</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_VV_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRVVG00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRVVG00))
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_VV_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("clsVV::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>iNRVVG00</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iNRVVG00</LI>
' /// <LI>iNRPAR00</LI>
' /// <LI>iNRSPR00</LI>
' /// <LI>sBEPRDLG</LI>
' /// <LI>iNRPRD00</LI>
' /// <LI>sTXRBK00</LI>
' /// <LI>sNEVVG00</LI>
' /// <LI>sNAVVG00</LI>
' /// <LI>iNRVBS00</LI>
' /// <LI>sSAREC00</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_VV_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("VV")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iNRVVG00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRVVG00))
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_VV_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iNRVVG00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRVVG00"), Integer))
If dtToReturn.Rows(0)("NRPAR00") Is System.DBNull.Value Then
m_iNRPAR00 = SqlInt32.Null
Else
m_iNRPAR00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRPAR00"), Integer))
End If
If dtToReturn.Rows(0)("NRSPR00") Is System.DBNull.Value Then
m_iNRSPR00 = SqlInt32.Null
Else
m_iNRSPR00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRSPR00"), Integer))
End If
If dtToReturn.Rows(0)("BEPRDLG") Is System.DBNull.Value Then
m_sBEPRDLG = SqlString.Null
Else
m_sBEPRDLG = New SqlString(CType(dtToReturn.Rows(0)("BEPRDLG"), String))
End If
If dtToReturn.Rows(0)("NRPRD00") Is System.DBNull.Value Then
m_iNRPRD00 = SqlInt32.Null
Else
m_iNRPRD00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRPRD00"), Integer))
End If
If dtToReturn.Rows(0)("TXRBK00") Is System.DBNull.Value Then
m_sTXRBK00 = SqlString.Null
Else
m_sTXRBK00 = New SqlString(CType(dtToReturn.Rows(0)("TXRBK00"), String))
End If
If dtToReturn.Rows(0)("NEVVG00") Is System.DBNull.Value Then
m_sNEVVG00 = SqlString.Null
Else
m_sNEVVG00 = New SqlString(CType(dtToReturn.Rows(0)("NEVVG00"), String))
End If
If dtToReturn.Rows(0)("NAVVG00") Is System.DBNull.Value Then
m_sNAVVG00 = SqlString.Null
Else
m_sNAVVG00 = New SqlString(CType(dtToReturn.Rows(0)("NAVVG00"), String))
End If
If dtToReturn.Rows(0)("NRVBS00") Is System.DBNull.Value Then
m_iNRVBS00 = SqlInt32.Null
Else
m_iNRVBS00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRVBS00"), Integer))
End If
If dtToReturn.Rows(0)("SAREC00") Is System.DBNull.Value Then
m_sSAREC00 = SqlString.Null
Else
m_sSAREC00 = New SqlString(CType(dtToReturn.Rows(0)("SAREC00"), 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("clsVV::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_VV_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("VV")
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_VV_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("clsVV::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 [iNRVVG00]() As SqlInt32
Get
Return m_iNRVVG00
End Get
Set(ByVal Value As SqlInt32)
Dim iNRVVG00Tmp As SqlInt32 = Value
If iNRVVG00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("iNRVVG00", "iNRVVG00 can't be NULL")
End If
m_iNRVVG00 = Value
End Set
End Property
Public Property [iNRPAR00]() As SqlInt32
Get
Return m_iNRPAR00
End Get
Set(ByVal Value As SqlInt32)
m_iNRPAR00 = Value
End Set
End Property
Public Property [iNRSPR00]() As SqlInt32
Get
Return m_iNRSPR00
End Get
Set(ByVal Value As SqlInt32)
m_iNRSPR00 = Value
End Set
End Property
Public Property [sBEPRDLG]() As SqlString
Get
Return m_sBEPRDLG
End Get
Set(ByVal Value As SqlString)
m_sBEPRDLG = Value
End Set
End Property
Public Property [iNRPRD00]() As SqlInt32
Get
Return m_iNRPRD00
End Get
Set(ByVal Value As SqlInt32)
m_iNRPRD00 = Value
End Set
End Property
Public Property [sTXRBK00]() As SqlString
Get
Return m_sTXRBK00
End Get
Set(ByVal Value As SqlString)
m_sTXRBK00 = Value
End Set
End Property
Public Property [sNEVVG00]() As SqlString
Get
Return m_sNEVVG00
End Get
Set(ByVal Value As SqlString)
m_sNEVVG00 = Value
End Set
End Property
Public Property [sNAVVG00]() As SqlString
Get
Return m_sNAVVG00
End Get
Set(ByVal Value As SqlString)
m_sNAVVG00 = Value
End Set
End Property
Public Property [iNRVBS00]() As SqlInt32
Get
Return m_iNRVBS00
End Get
Set(ByVal Value As SqlInt32)
m_iNRVBS00 = Value
End Set
End Property
Public Property [sSAREC00]() As SqlString
Get
Return m_sSAREC00
End Get
Set(ByVal Value As SqlString)
m_sSAREC00 = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,43 @@
Imports System.ComponentModel
Imports Microsoft.VisualBasic
Namespace edokadb
Public Class DB_Connection
Shared Sub New()
'Edoka
oread = System.IO.File.OpenText(DivFnkt.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 = System.IO.File.OpenText(DivFnkt.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()
'Journale für Mailversand
oread = System.IO.File.OpenText(DivFnkt.ApplicationPath + "journaleconn_Mail.cfg")
sConnectionString_journale_mail = oread.ReadLine
'sConnectionString_journale = Crypto.DecryptText(sConnectionString, "HutterundMueller")
'sConnectionString_journale = Left(sConnectionString, Len(sConnectionString) - 1)
Globals.sConnectionString_journale_mail = sConnectionString_journale_Mail
oread.Close()
Globals.conn_edoka.sConnectionString = sConnectionString_edoka
Globals.conn_journale.sConnectionString = sConnectionString_journale
Globals.conn_journale_Mail.sConnectionString = sConnectionString_journale_Mail
End Sub
End Class
End Namespace

BIN
edkb08/Datenbank/vssver.scc Normal file

Binary file not shown.