Initial commit

This commit is contained in:
2022-10-03 16:21:20 +02:00
commit aeddcb75ec
3897 changed files with 2127526 additions and 0 deletions

View File

@@ -0,0 +1,991 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'EDEX_BL_Auslieferung'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 15. Mai 2005, 16:57:27
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokadb
' /// <summary>
' /// Purpose: Data Access class for the table 'EDEX_BL_Auslieferung'.
' /// </summary>
Public Class clsEDEX_BL_Auslieferung
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAushaendigung_blv, m_bAushaendigung_kube, m_bAushaendigungsart_persoenlich, m_bGrundlage2, m_bGrundlage3, m_bGrundlage4, m_bBeilage_zur_Quittung1, m_bBeilage_zur_Quittung2, m_bBeilage_zur_Quittung3, m_bAushaendigungsart_post, m_bAushaendigung_verschlossen, m_bAushaendigung_nicht_verschlossen, m_bGrundlage1, m_bAktiv As SqlBoolean
Private m_daDokumentebis, m_daMutiert_am, m_daDokumenteab, m_daErstellt_am, m_daGrundlage1_Datum, m_daGrundlage3_Datum, m_daGrundlage4_Datum, m_daGrundlage2_Datum As SqlDateTime
Private m_iNrpar00, m_iAuslieferungnr, m_iBlv, m_iMutierer, m_iStatus, m_iKube As SqlInt32
Private m_sBemerkung, m_sBeilage_zur_Quittung_text, m_sQuittungsflag, m_sDokumentid_quittung, m_sBezeichnung As SqlString
#End Region
' /// <summary>
' /// Purpose: Class constructor.
' /// </summary>
Public Sub New()
' // Nothing for now.
End Sub
' /// <summary>
' /// Purpose: Insert method. This method will insert one new row into the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sDokumentid_quittung. May be SqlString.Null</LI>
' /// <LI>sQuittungsflag. May be SqlString.Null</LI>
' /// <LI>iNrpar00. May be SqlInt32.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>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>bGrundlage1. May be SqlBoolean.Null</LI>
' /// <LI>daGrundlage1_Datum. May be SqlDateTime.Null</LI>
' /// <LI>bGrundlage2. May be SqlBoolean.Null</LI>
' /// <LI>daGrundlage2_Datum. May be SqlDateTime.Null</LI>
' /// <LI>bGrundlage3. May be SqlBoolean.Null</LI>
' /// <LI>daGrundlage3_Datum. May be SqlDateTime.Null</LI>
' /// <LI>bGrundlage4. May be SqlBoolean.Null</LI>
' /// <LI>daGrundlage4_Datum. May be SqlDateTime.Null</LI>
' /// <LI>bAushaendigung_blv. May be SqlBoolean.Null</LI>
' /// <LI>iBlv. May be SqlInt32.Null</LI>
' /// <LI>bAushaendigung_kube. May be SqlBoolean.Null</LI>
' /// <LI>iKube. May be SqlInt32.Null</LI>
' /// <LI>bAushaendigungsart_persoenlich. May be SqlBoolean.Null</LI>
' /// <LI>bAushaendigungsart_post. May be SqlBoolean.Null</LI>
' /// <LI>bAushaendigung_verschlossen. May be SqlBoolean.Null</LI>
' /// <LI>bAushaendigung_nicht_verschlossen. May be SqlBoolean.Null</LI>
' /// <LI>bBeilage_zur_Quittung1. May be SqlBoolean.Null</LI>
' /// <LI>bBeilage_zur_Quittung2. May be SqlBoolean.Null</LI>
' /// <LI>bBeilage_zur_Quittung3. May be SqlBoolean.Null</LI>
' /// <LI>sBeilage_zur_Quittung_text. May be SqlString.Null</LI>
' /// <LI>sBemerkung. May be SqlString.Null</LI>
' /// <LI>daDokumenteab. May be SqlDateTime.Null</LI>
' /// <LI>daDokumentebis. May be SqlDateTime.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iAuslieferungnr</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_EDEX_BL_Auslieferung_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("@sdokumentid_quittung", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid_quittung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@squittungsflag", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sQuittungsflag))
scmCmdToExecute.Parameters.Add(New SqlParameter("@inrpar00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNrpar00))
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("@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("@bGrundlage1", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bGrundlage1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daGrundlage1_Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daGrundlage1_Datum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bGrundlage2", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bGrundlage2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daGrundlage2_Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daGrundlage2_Datum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bGrundlage3", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bGrundlage3))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daGrundlage3_Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daGrundlage3_Datum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bGrundlage4", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bGrundlage4))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daGrundlage4_Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daGrundlage4_Datum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAushaendigung_blv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigung_blv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iblv", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBlv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAushaendigung_kube", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigung_kube))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikube", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iKube))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAushaendigungsart_persoenlich", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigungsart_persoenlich))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baushaendigungsart_post", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigungsart_post))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAushaendigung_verschlossen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigung_verschlossen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAushaendigung_nicht_verschlossen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigung_nicht_verschlossen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bBeilage_zur_Quittung1", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bBeilage_zur_Quittung1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bBeilage_zur_Quittung2", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bBeilage_zur_Quittung2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bBeilage_zur_Quittung3", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bBeilage_zur_Quittung3))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBeilage_zur_Quittung_text", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeilage_zur_Quittung_text))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBemerkung", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBemerkung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dadokumenteab", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDokumenteab))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dadokumentebis", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDokumentebis))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iauslieferungnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iAuslieferungnr))
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_iAuslieferungnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iauslieferungnr").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_bl_EDEX_BL_Auslieferung_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEDEX_BL_Auslieferung::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>iAuslieferungnr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sDokumentid_quittung. May be SqlString.Null</LI>
' /// <LI>sQuittungsflag. May be SqlString.Null</LI>
' /// <LI>iNrpar00. May be SqlInt32.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>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>bGrundlage1. May be SqlBoolean.Null</LI>
' /// <LI>daGrundlage1_Datum. May be SqlDateTime.Null</LI>
' /// <LI>bGrundlage2. May be SqlBoolean.Null</LI>
' /// <LI>daGrundlage2_Datum. May be SqlDateTime.Null</LI>
' /// <LI>bGrundlage3. May be SqlBoolean.Null</LI>
' /// <LI>daGrundlage3_Datum. May be SqlDateTime.Null</LI>
' /// <LI>bGrundlage4. May be SqlBoolean.Null</LI>
' /// <LI>daGrundlage4_Datum. May be SqlDateTime.Null</LI>
' /// <LI>bAushaendigung_blv. May be SqlBoolean.Null</LI>
' /// <LI>iBlv. May be SqlInt32.Null</LI>
' /// <LI>bAushaendigung_kube. May be SqlBoolean.Null</LI>
' /// <LI>iKube. May be SqlInt32.Null</LI>
' /// <LI>bAushaendigungsart_persoenlich. May be SqlBoolean.Null</LI>
' /// <LI>bAushaendigungsart_post. May be SqlBoolean.Null</LI>
' /// <LI>bAushaendigung_verschlossen. May be SqlBoolean.Null</LI>
' /// <LI>bAushaendigung_nicht_verschlossen. May be SqlBoolean.Null</LI>
' /// <LI>bBeilage_zur_Quittung1. May be SqlBoolean.Null</LI>
' /// <LI>bBeilage_zur_Quittung2. May be SqlBoolean.Null</LI>
' /// <LI>bBeilage_zur_Quittung3. May be SqlBoolean.Null</LI>
' /// <LI>sBeilage_zur_Quittung_text. May be SqlString.Null</LI>
' /// <LI>sBemerkung. May be SqlString.Null</LI>
' /// <LI>daDokumenteab. May be SqlDateTime.Null</LI>
' /// <LI>daDokumentebis. 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_edex_bl_EDEX_BL_Auslieferung_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iauslieferungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iAuslieferungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid_quittung", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid_quittung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@squittungsflag", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sQuittungsflag))
scmCmdToExecute.Parameters.Add(New SqlParameter("@inrpar00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNrpar00))
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("@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("@bGrundlage1", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bGrundlage1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daGrundlage1_Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daGrundlage1_Datum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bGrundlage2", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bGrundlage2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daGrundlage2_Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daGrundlage2_Datum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bGrundlage3", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bGrundlage3))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daGrundlage3_Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daGrundlage3_Datum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bGrundlage4", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bGrundlage4))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daGrundlage4_Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daGrundlage4_Datum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAushaendigung_blv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigung_blv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iblv", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBlv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAushaendigung_kube", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigung_kube))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikube", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iKube))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAushaendigungsart_persoenlich", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigungsart_persoenlich))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baushaendigungsart_post", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigungsart_post))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAushaendigung_verschlossen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigung_verschlossen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAushaendigung_nicht_verschlossen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigung_nicht_verschlossen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bBeilage_zur_Quittung1", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bBeilage_zur_Quittung1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bBeilage_zur_Quittung2", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bBeilage_zur_Quittung2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bBeilage_zur_Quittung3", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bBeilage_zur_Quittung3))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBeilage_zur_Quittung_text", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeilage_zur_Quittung_text))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBemerkung", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBemerkung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dadokumenteab", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDokumenteab))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dadokumentebis", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDokumentebis))
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_bl_EDEX_BL_Auslieferung_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEDEX_BL_Auslieferung::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>iAuslieferungnr</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_edex_bl_EDEX_BL_Auslieferung_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iauslieferungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iAuslieferungnr))
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_bl_EDEX_BL_Auslieferung_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEDEX_BL_Auslieferung::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>iAuslieferungnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iAuslieferungnr</LI>
' /// <LI>sBezeichnung</LI>
' /// <LI>sDokumentid_quittung</LI>
' /// <LI>sQuittungsflag</LI>
' /// <LI>iNrpar00</LI>
' /// <LI>iStatus</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>bAktiv</LI>
' /// <LI>bGrundlage1</LI>
' /// <LI>daGrundlage1_Datum</LI>
' /// <LI>bGrundlage2</LI>
' /// <LI>daGrundlage2_Datum</LI>
' /// <LI>bGrundlage3</LI>
' /// <LI>daGrundlage3_Datum</LI>
' /// <LI>bGrundlage4</LI>
' /// <LI>daGrundlage4_Datum</LI>
' /// <LI>bAushaendigung_blv</LI>
' /// <LI>iBlv</LI>
' /// <LI>bAushaendigung_kube</LI>
' /// <LI>iKube</LI>
' /// <LI>bAushaendigungsart_persoenlich</LI>
' /// <LI>bAushaendigungsart_post</LI>
' /// <LI>bAushaendigung_verschlossen</LI>
' /// <LI>bAushaendigung_nicht_verschlossen</LI>
' /// <LI>bBeilage_zur_Quittung1</LI>
' /// <LI>bBeilage_zur_Quittung2</LI>
' /// <LI>bBeilage_zur_Quittung3</LI>
' /// <LI>sBeilage_zur_Quittung_text</LI>
' /// <LI>sBemerkung</LI>
' /// <LI>daDokumenteab</LI>
' /// <LI>daDokumentebis</LI>
' /// </UL>
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
' /// </remarks>
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_EDEX_BL_Auslieferung_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("EDEX_BL_Auslieferung")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iauslieferungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iAuslieferungnr))
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_bl_EDEX_BL_Auslieferung_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iAuslieferungnr = New SqlInt32(CType(dtToReturn.Rows(0)("auslieferungnr"), 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)("dokumentid_quittung") Is System.DBNull.Value Then
m_sDokumentid_quittung = SqlString.Null
Else
m_sDokumentid_quittung = New SqlString(CType(dtToReturn.Rows(0)("dokumentid_quittung"), String))
End If
If dtToReturn.Rows(0)("quittungsflag") Is System.DBNull.Value Then
m_sQuittungsflag = SqlString.Null
Else
m_sQuittungsflag = New SqlString(CType(dtToReturn.Rows(0)("quittungsflag"), String))
End If
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)("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)("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)("Grundlage1") Is System.DBNull.Value Then
m_bGrundlage1 = SqlBoolean.Null
Else
m_bGrundlage1 = New SqlBoolean(CType(dtToReturn.Rows(0)("Grundlage1"), Boolean))
End If
If dtToReturn.Rows(0)("Grundlage1_Datum") Is System.DBNull.Value Then
m_daGrundlage1_Datum = SqlDateTime.Null
Else
m_daGrundlage1_Datum = New SqlDateTime(CType(dtToReturn.Rows(0)("Grundlage1_Datum"), Date))
End If
If dtToReturn.Rows(0)("Grundlage2") Is System.DBNull.Value Then
m_bGrundlage2 = SqlBoolean.Null
Else
m_bGrundlage2 = New SqlBoolean(CType(dtToReturn.Rows(0)("Grundlage2"), Boolean))
End If
If dtToReturn.Rows(0)("Grundlage2_Datum") Is System.DBNull.Value Then
m_daGrundlage2_Datum = SqlDateTime.Null
Else
m_daGrundlage2_Datum = New SqlDateTime(CType(dtToReturn.Rows(0)("Grundlage2_Datum"), Date))
End If
If dtToReturn.Rows(0)("Grundlage3") Is System.DBNull.Value Then
m_bGrundlage3 = SqlBoolean.Null
Else
m_bGrundlage3 = New SqlBoolean(CType(dtToReturn.Rows(0)("Grundlage3"), Boolean))
End If
If dtToReturn.Rows(0)("Grundlage3_Datum") Is System.DBNull.Value Then
m_daGrundlage3_Datum = SqlDateTime.Null
Else
m_daGrundlage3_Datum = New SqlDateTime(CType(dtToReturn.Rows(0)("Grundlage3_Datum"), Date))
End If
If dtToReturn.Rows(0)("Grundlage4") Is System.DBNull.Value Then
m_bGrundlage4 = SqlBoolean.Null
Else
m_bGrundlage4 = New SqlBoolean(CType(dtToReturn.Rows(0)("Grundlage4"), Boolean))
End If
If dtToReturn.Rows(0)("Grundlage4_Datum") Is System.DBNull.Value Then
m_daGrundlage4_Datum = SqlDateTime.Null
Else
m_daGrundlage4_Datum = New SqlDateTime(CType(dtToReturn.Rows(0)("Grundlage4_Datum"), Date))
End If
If dtToReturn.Rows(0)("Aushaendigung_blv") Is System.DBNull.Value Then
m_bAushaendigung_blv = SqlBoolean.Null
Else
m_bAushaendigung_blv = New SqlBoolean(CType(dtToReturn.Rows(0)("Aushaendigung_blv"), Boolean))
End If
If dtToReturn.Rows(0)("blv") Is System.DBNull.Value Then
m_iBlv = SqlInt32.Null
Else
m_iBlv = New SqlInt32(CType(dtToReturn.Rows(0)("blv"), Integer))
End If
If dtToReturn.Rows(0)("Aushaendigung_kube") Is System.DBNull.Value Then
m_bAushaendigung_kube = SqlBoolean.Null
Else
m_bAushaendigung_kube = New SqlBoolean(CType(dtToReturn.Rows(0)("Aushaendigung_kube"), Boolean))
End If
If dtToReturn.Rows(0)("kube") Is System.DBNull.Value Then
m_iKube = SqlInt32.Null
Else
m_iKube = New SqlInt32(CType(dtToReturn.Rows(0)("kube"), Integer))
End If
If dtToReturn.Rows(0)("Aushaendigungsart_persoenlich") Is System.DBNull.Value Then
m_bAushaendigungsart_persoenlich = SqlBoolean.Null
Else
m_bAushaendigungsart_persoenlich = New SqlBoolean(CType(dtToReturn.Rows(0)("Aushaendigungsart_persoenlich"), Boolean))
End If
If dtToReturn.Rows(0)("aushaendigungsart_post") Is System.DBNull.Value Then
m_bAushaendigungsart_post = SqlBoolean.Null
Else
m_bAushaendigungsart_post = New SqlBoolean(CType(dtToReturn.Rows(0)("aushaendigungsart_post"), Boolean))
End If
If dtToReturn.Rows(0)("Aushaendigung_verschlossen") Is System.DBNull.Value Then
m_bAushaendigung_verschlossen = SqlBoolean.Null
Else
m_bAushaendigung_verschlossen = New SqlBoolean(CType(dtToReturn.Rows(0)("Aushaendigung_verschlossen"), Boolean))
End If
If dtToReturn.Rows(0)("Aushaendigung_nicht_verschlossen") Is System.DBNull.Value Then
m_bAushaendigung_nicht_verschlossen = SqlBoolean.Null
Else
m_bAushaendigung_nicht_verschlossen = New SqlBoolean(CType(dtToReturn.Rows(0)("Aushaendigung_nicht_verschlossen"), Boolean))
End If
If dtToReturn.Rows(0)("Beilage_zur_Quittung1") Is System.DBNull.Value Then
m_bBeilage_zur_Quittung1 = SqlBoolean.Null
Else
m_bBeilage_zur_Quittung1 = New SqlBoolean(CType(dtToReturn.Rows(0)("Beilage_zur_Quittung1"), Boolean))
End If
If dtToReturn.Rows(0)("Beilage_zur_Quittung2") Is System.DBNull.Value Then
m_bBeilage_zur_Quittung2 = SqlBoolean.Null
Else
m_bBeilage_zur_Quittung2 = New SqlBoolean(CType(dtToReturn.Rows(0)("Beilage_zur_Quittung2"), Boolean))
End If
If dtToReturn.Rows(0)("Beilage_zur_Quittung3") Is System.DBNull.Value Then
m_bBeilage_zur_Quittung3 = SqlBoolean.Null
Else
m_bBeilage_zur_Quittung3 = New SqlBoolean(CType(dtToReturn.Rows(0)("Beilage_zur_Quittung3"), Boolean))
End If
If dtToReturn.Rows(0)("Beilage_zur_Quittung_text") Is System.DBNull.Value Then
m_sBeilage_zur_Quittung_text = SqlString.Null
Else
m_sBeilage_zur_Quittung_text = New SqlString(CType(dtToReturn.Rows(0)("Beilage_zur_Quittung_text"), String))
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)("dokumenteab") Is System.DBNull.Value Then
m_daDokumenteab = SqlDateTime.Null
Else
m_daDokumenteab = New SqlDateTime(CType(dtToReturn.Rows(0)("dokumenteab"), Date))
End If
If dtToReturn.Rows(0)("dokumentebis") Is System.DBNull.Value Then
m_daDokumentebis = SqlDateTime.Null
Else
m_daDokumentebis = New SqlDateTime(CType(dtToReturn.Rows(0)("dokumentebis"), 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("clsEDEX_BL_Auslieferung::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_edex_bl_EDEX_BL_Auslieferung_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("EDEX_BL_Auslieferung")
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_bl_EDEX_BL_Auslieferung_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEDEX_BL_Auslieferung::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 [iAuslieferungnr]() As SqlInt32
Get
Return m_iAuslieferungnr
End Get
Set(ByVal Value As SqlInt32)
Dim iAuslieferungnrTmp As SqlInt32 = Value
If iAuslieferungnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iAuslieferungnr", "iAuslieferungnr can't be NULL")
End If
m_iAuslieferungnr = 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 [sDokumentid_quittung]() As SqlString
Get
Return m_sDokumentid_quittung
End Get
Set(ByVal Value As SqlString)
m_sDokumentid_quittung = Value
End Set
End Property
Public Property [sQuittungsflag]() As SqlString
Get
Return m_sQuittungsflag
End Get
Set(ByVal Value As SqlString)
m_sQuittungsflag = 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 [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 [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 [bGrundlage1]() As SqlBoolean
Get
Return m_bGrundlage1
End Get
Set(ByVal Value As SqlBoolean)
m_bGrundlage1 = Value
End Set
End Property
Public Property [daGrundlage1_Datum]() As SqlDateTime
Get
Return m_daGrundlage1_Datum
End Get
Set(ByVal Value As SqlDateTime)
m_daGrundlage1_Datum = Value
End Set
End Property
Public Property [bGrundlage2]() As SqlBoolean
Get
Return m_bGrundlage2
End Get
Set(ByVal Value As SqlBoolean)
m_bGrundlage2 = Value
End Set
End Property
Public Property [daGrundlage2_Datum]() As SqlDateTime
Get
Return m_daGrundlage2_Datum
End Get
Set(ByVal Value As SqlDateTime)
m_daGrundlage2_Datum = Value
End Set
End Property
Public Property [bGrundlage3]() As SqlBoolean
Get
Return m_bGrundlage3
End Get
Set(ByVal Value As SqlBoolean)
m_bGrundlage3 = Value
End Set
End Property
Public Property [daGrundlage3_Datum]() As SqlDateTime
Get
Return m_daGrundlage3_Datum
End Get
Set(ByVal Value As SqlDateTime)
m_daGrundlage3_Datum = Value
End Set
End Property
Public Property [bGrundlage4]() As SqlBoolean
Get
Return m_bGrundlage4
End Get
Set(ByVal Value As SqlBoolean)
m_bGrundlage4 = Value
End Set
End Property
Public Property [daGrundlage4_Datum]() As SqlDateTime
Get
Return m_daGrundlage4_Datum
End Get
Set(ByVal Value As SqlDateTime)
m_daGrundlage4_Datum = Value
End Set
End Property
Public Property [bAushaendigung_blv]() As SqlBoolean
Get
Return m_bAushaendigung_blv
End Get
Set(ByVal Value As SqlBoolean)
m_bAushaendigung_blv = Value
End Set
End Property
Public Property [iBlv]() As SqlInt32
Get
Return m_iBlv
End Get
Set(ByVal Value As SqlInt32)
m_iBlv = Value
End Set
End Property
Public Property [bAushaendigung_kube]() As SqlBoolean
Get
Return m_bAushaendigung_kube
End Get
Set(ByVal Value As SqlBoolean)
m_bAushaendigung_kube = Value
End Set
End Property
Public Property [iKube]() As SqlInt32
Get
Return m_iKube
End Get
Set(ByVal Value As SqlInt32)
m_iKube = Value
End Set
End Property
Public Property [bAushaendigungsart_persoenlich]() As SqlBoolean
Get
Return m_bAushaendigungsart_persoenlich
End Get
Set(ByVal Value As SqlBoolean)
m_bAushaendigungsart_persoenlich = Value
End Set
End Property
Public Property [bAushaendigungsart_post]() As SqlBoolean
Get
Return m_bAushaendigungsart_post
End Get
Set(ByVal Value As SqlBoolean)
m_bAushaendigungsart_post = Value
End Set
End Property
Public Property [bAushaendigung_verschlossen]() As SqlBoolean
Get
Return m_bAushaendigung_verschlossen
End Get
Set(ByVal Value As SqlBoolean)
m_bAushaendigung_verschlossen = Value
End Set
End Property
Public Property [bAushaendigung_nicht_verschlossen]() As SqlBoolean
Get
Return m_bAushaendigung_nicht_verschlossen
End Get
Set(ByVal Value As SqlBoolean)
m_bAushaendigung_nicht_verschlossen = Value
End Set
End Property
Public Property [bBeilage_zur_Quittung1]() As SqlBoolean
Get
Return m_bBeilage_zur_Quittung1
End Get
Set(ByVal Value As SqlBoolean)
m_bBeilage_zur_Quittung1 = Value
End Set
End Property
Public Property [bBeilage_zur_Quittung2]() As SqlBoolean
Get
Return m_bBeilage_zur_Quittung2
End Get
Set(ByVal Value As SqlBoolean)
m_bBeilage_zur_Quittung2 = Value
End Set
End Property
Public Property [bBeilage_zur_Quittung3]() As SqlBoolean
Get
Return m_bBeilage_zur_Quittung3
End Get
Set(ByVal Value As SqlBoolean)
m_bBeilage_zur_Quittung3 = Value
End Set
End Property
Public Property [sBeilage_zur_Quittung_text]() As SqlString
Get
Return m_sBeilage_zur_Quittung_text
End Get
Set(ByVal Value As SqlString)
m_sBeilage_zur_Quittung_text = 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 [daDokumenteab]() As SqlDateTime
Get
Return m_daDokumenteab
End Get
Set(ByVal Value As SqlDateTime)
m_daDokumenteab = Value
End Set
End Property
Public Property [daDokumentebis]() As SqlDateTime
Get
Return m_daDokumentebis
End Get
Set(ByVal Value As SqlDateTime)
m_daDokumentebis = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,611 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'EDEX_BL_BLIndex'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 4. Mai 2005, 19:42:17
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokadb
' /// <summary>
' /// Purpose: Data Access class for the table 'EDEX_BL_BLIndex'.
' /// </summary>
Public Class clsEDEX_BL_BLIndex
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daScandatum, m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iBLIndexnr, m_iAuslieferungnr, m_iBl_status, m_iMutierer As SqlInt32
Private m_sRes3, m_sStapelnr, m_sUser_id, m_sDokumentid, m_sRes2, m_sRes1, m_sCold_dokumentid As SqlString
#End Region
' /// <summary>
' /// Purpose: Class constructor.
' /// </summary>
Public Sub New()
' // Nothing for now.
End Sub
' /// <summary>
' /// Purpose: Insert method. This method will insert one new row into the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>sDokumentid</LI>
' /// <LI>iBl_status</LI>
' /// <LI>sUser_id. May be SqlString.Null</LI>
' /// <LI>sStapelnr. May be SqlString.Null</LI>
' /// <LI>daScandatum. May be SqlDateTime.Null</LI>
' /// <LI>sCold_dokumentid. May be SqlString.Null</LI>
' /// <LI>sRes1. May be SqlString.Null</LI>
' /// <LI>sRes2. May be SqlString.Null</LI>
' /// <LI>sRes3. May be SqlString.Null</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>bAktiv</LI>
' /// <LI>iMutierer</LI>
' /// <LI>iAuslieferungnr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iBLIndexnr</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_EDEX_BL_BLIndex_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibl_status", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBl_status))
scmCmdToExecute.Parameters.Add(New SqlParameter("@suser_id", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sUser_id))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sstapelnr", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStapelnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dascandatum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daScandatum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@scold_dokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCold_dokumentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRes1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRes2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres3", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRes3))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iauslieferungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAuslieferungnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iBLIndexnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iBLIndexnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iBLIndexnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iBLIndexnr").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_bl_EDEX_BL_BLIndex_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEDEX_BL_BLIndex::Insert::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: Update method. This method will Update one existing row in the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iBLIndexnr</LI>
' /// <LI>sDokumentid</LI>
' /// <LI>iBl_status</LI>
' /// <LI>sUser_id. May be SqlString.Null</LI>
' /// <LI>sStapelnr. May be SqlString.Null</LI>
' /// <LI>daScandatum. May be SqlDateTime.Null</LI>
' /// <LI>sCold_dokumentid. May be SqlString.Null</LI>
' /// <LI>sRes1. May be SqlString.Null</LI>
' /// <LI>sRes2. May be SqlString.Null</LI>
' /// <LI>sRes3. May be SqlString.Null</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>bAktiv</LI>
' /// <LI>iMutierer</LI>
' /// <LI>iAuslieferungnr. 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_bl_EDEX_BL_BLIndex_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iBLIndexnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBLIndexnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibl_status", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBl_status))
scmCmdToExecute.Parameters.Add(New SqlParameter("@suser_id", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sUser_id))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sstapelnr", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStapelnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dascandatum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daScandatum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@scold_dokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCold_dokumentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRes1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRes2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres3", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRes3))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iauslieferungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAuslieferungnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@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_bl_EDEX_BL_BLIndex_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEDEX_BL_BLIndex::Update::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iBLIndexnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Overrides Function Delete() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_EDEX_BL_BLIndex_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iBLIndexnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBLIndexnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = 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_bl_EDEX_BL_BLIndex_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEDEX_BL_BLIndex::Delete::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iBLIndexnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iBLIndexnr</LI>
' /// <LI>sDokumentid</LI>
' /// <LI>iBl_status</LI>
' /// <LI>sUser_id</LI>
' /// <LI>sStapelnr</LI>
' /// <LI>daScandatum</LI>
' /// <LI>sCold_dokumentid</LI>
' /// <LI>sRes1</LI>
' /// <LI>sRes2</LI>
' /// <LI>sRes3</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>bAktiv</LI>
' /// <LI>iMutierer</LI>
' /// <LI>iAuslieferungnr</LI>
' /// </UL>
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
' /// </remarks>
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_EDEX_BL_BLIndex_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("EDEX_BL_BLIndex")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iBLIndexnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBLIndexnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
sdaAdapter.Fill(dtToReturn)
m_iErrorCode = 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_bl_EDEX_BL_BLIndex_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iBLIndexnr = New SqlInt32(CType(dtToReturn.Rows(0)("BLIndexnr"), Integer))
m_sDokumentid = New SqlString(CType(dtToReturn.Rows(0)("Dokumentid"), String))
m_iBl_status = New SqlInt32(CType(dtToReturn.Rows(0)("bl_status"), Integer))
If dtToReturn.Rows(0)("user_id") Is System.DBNull.Value Then
m_sUser_id = SqlString.Null
Else
m_sUser_id = New SqlString(CType(dtToReturn.Rows(0)("user_id"), String))
End If
If dtToReturn.Rows(0)("stapelnr") Is System.DBNull.Value Then
m_sStapelnr = SqlString.Null
Else
m_sStapelnr = New SqlString(CType(dtToReturn.Rows(0)("stapelnr"), String))
End If
If dtToReturn.Rows(0)("scandatum") Is System.DBNull.Value Then
m_daScandatum = SqlDateTime.Null
Else
m_daScandatum = New SqlDateTime(CType(dtToReturn.Rows(0)("scandatum"), Date))
End If
If dtToReturn.Rows(0)("cold_dokumentid") Is System.DBNull.Value Then
m_sCold_dokumentid = SqlString.Null
Else
m_sCold_dokumentid = New SqlString(CType(dtToReturn.Rows(0)("cold_dokumentid"), String))
End If
If dtToReturn.Rows(0)("res1") Is System.DBNull.Value Then
m_sRes1 = SqlString.Null
Else
m_sRes1 = New SqlString(CType(dtToReturn.Rows(0)("res1"), String))
End If
If dtToReturn.Rows(0)("res2") Is System.DBNull.Value Then
m_sRes2 = SqlString.Null
Else
m_sRes2 = New SqlString(CType(dtToReturn.Rows(0)("res2"), String))
End If
If dtToReturn.Rows(0)("res3") Is System.DBNull.Value Then
m_sRes3 = SqlString.Null
Else
m_sRes3 = New SqlString(CType(dtToReturn.Rows(0)("res3"), String))
End If
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
If dtToReturn.Rows(0)("auslieferungnr") Is System.DBNull.Value Then
m_iAuslieferungnr = SqlInt32.Null
Else
m_iAuslieferungnr = New SqlInt32(CType(dtToReturn.Rows(0)("auslieferungnr"), Integer))
End If
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEDEX_BL_BLIndex::SelectOne::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: SelectAll method. This method will Select all rows from the table.
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Overrides Function SelectAll() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_EDEX_BL_BLIndex_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("EDEX_BL_BLIndex")
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
sdaAdapter.Fill(dtToReturn)
m_iErrorCode = 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_bl_EDEX_BL_BLIndex_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEDEX_BL_BLIndex::SelectAll::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
#Region " Class Property Declarations "
Public Property [iBLIndexnr]() As SqlInt32
Get
Return m_iBLIndexnr
End Get
Set(ByVal Value As SqlInt32)
Dim iBLIndexnrTmp As SqlInt32 = Value
If iBLIndexnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iBLIndexnr", "iBLIndexnr can't be NULL")
End If
m_iBLIndexnr = Value
End Set
End Property
Public Property [sDokumentid]() As SqlString
Get
Return m_sDokumentid
End Get
Set(ByVal Value As SqlString)
Dim sDokumentidTmp As SqlString = Value
If sDokumentidTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sDokumentid", "sDokumentid can't be NULL")
End If
m_sDokumentid = Value
End Set
End Property
Public Property [iBl_status]() As SqlInt32
Get
Return m_iBl_status
End Get
Set(ByVal Value As SqlInt32)
m_iBl_status = Value
End Set
End Property
Public Property [sUser_id]() As SqlString
Get
Return m_sUser_id
End Get
Set(ByVal Value As SqlString)
m_sUser_id = Value
End Set
End Property
Public Property [sStapelnr]() As SqlString
Get
Return m_sStapelnr
End Get
Set(ByVal Value As SqlString)
m_sStapelnr = Value
End Set
End Property
Public Property [daScandatum]() As SqlDateTime
Get
Return m_daScandatum
End Get
Set(ByVal Value As SqlDateTime)
m_daScandatum = Value
End Set
End Property
Public Property [sCold_dokumentid]() As SqlString
Get
Return m_sCold_dokumentid
End Get
Set(ByVal Value As SqlString)
m_sCold_dokumentid = Value
End Set
End Property
Public Property [sRes1]() As SqlString
Get
Return m_sRes1
End Get
Set(ByVal Value As SqlString)
m_sRes1 = Value
End Set
End Property
Public Property [sRes2]() As SqlString
Get
Return m_sRes2
End Get
Set(ByVal Value As SqlString)
m_sRes2 = Value
End Set
End Property
Public Property [sRes3]() As SqlString
Get
Return m_sRes3
End Get
Set(ByVal Value As SqlString)
m_sRes3 = Value
End Set
End Property
Public Property [daErstellt_am]() As SqlDateTime
Get
Return m_daErstellt_am
End Get
Set(ByVal Value As SqlDateTime)
m_daErstellt_am = Value
End Set
End Property
Public Property [daMutiert_am]() As SqlDateTime
Get
Return m_daMutiert_am
End Get
Set(ByVal Value As SqlDateTime)
m_daMutiert_am = Value
End Set
End Property
Public Property [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
m_bAktiv = Value
End Set
End Property
Public Property [iMutierer]() As SqlInt32
Get
Return m_iMutierer
End Get
Set(ByVal Value As SqlInt32)
m_iMutierer = Value
End Set
End Property
Public Property [iAuslieferungnr]() As SqlInt32
Get
Return m_iAuslieferungnr
End Get
Set(ByVal Value As SqlInt32)
m_iAuslieferungnr = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,505 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'EDEX_BL_BLKunde'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 4. Mai 2005, 19:42:17
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokadb
' /// <summary>
' /// Purpose: Data Access class for the table 'EDEX_BL_BLKunde'.
' /// </summary>
Public Class clsEDEX_BL_BLKunde
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_sAktiv, m_sPeriodische_auslieferung As SqlString
Private m_daBlerklaerung_vom, m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iPeriodizitaet, m_iBlkundenr, m_iNRAR00, m_iMandantnr, m_iMutierer 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>iBlkundenr</LI>
' /// <LI>iNRAR00</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>sAktiv</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>sPeriodische_auslieferung</LI>
' /// <LI>iPeriodizitaet</LI>
' /// <LI>daBlerklaerung_vom. May be SqlDateTime.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_edex_bl_EDEX_BL_BLKunde_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iblkundenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBlkundenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRAR00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRAR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@saktiv", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@speriodische_auslieferung", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPeriodische_auslieferung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iperiodizitaet", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPeriodizitaet))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dablerklaerung_vom", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daBlerklaerung_vom))
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_bl_EDEX_BL_BLKunde_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEDEX_BL_BLKunde::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>iBlkundenr</LI>
' /// <LI>iNRAR00</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>sAktiv</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>sPeriodische_auslieferung</LI>
' /// <LI>iPeriodizitaet</LI>
' /// <LI>daBlerklaerung_vom. 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_edex_bl_EDEX_BL_BLKunde_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iblkundenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBlkundenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRAR00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRAR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@saktiv", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@speriodische_auslieferung", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPeriodische_auslieferung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iperiodizitaet", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPeriodizitaet))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dablerklaerung_vom", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daBlerklaerung_vom))
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_bl_EDEX_BL_BLKunde_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEDEX_BL_BLKunde::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>iBlkundenr</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_edex_bl_EDEX_BL_BLKunde_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iblkundenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBlkundenr))
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_bl_EDEX_BL_BLKunde_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEDEX_BL_BLKunde::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>iBlkundenr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iBlkundenr</LI>
' /// <LI>iNRAR00</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>sAktiv</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>sPeriodische_auslieferung</LI>
' /// <LI>iPeriodizitaet</LI>
' /// <LI>daBlerklaerung_vom</LI>
' /// </UL>
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
' /// </remarks>
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_EDEX_BL_BLKunde_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("EDEX_BL_BLKunde")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iblkundenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBlkundenr))
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_bl_EDEX_BL_BLKunde_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iBlkundenr = New SqlInt32(CType(dtToReturn.Rows(0)("blkundenr"), Integer))
m_iNRAR00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRAR00"), Integer))
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
m_sAktiv = New SqlString(CType(dtToReturn.Rows(0)("aktiv"), String))
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
m_sPeriodische_auslieferung = New SqlString(CType(dtToReturn.Rows(0)("periodische_auslieferung"), String))
m_iPeriodizitaet = New SqlInt32(CType(dtToReturn.Rows(0)("periodizitaet"), Integer))
If dtToReturn.Rows(0)("blerklaerung_vom") Is System.DBNull.Value Then
m_daBlerklaerung_vom = SqlDateTime.Null
Else
m_daBlerklaerung_vom = New SqlDateTime(CType(dtToReturn.Rows(0)("blerklaerung_vom"), 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("clsEDEX_BL_BLKunde::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_edex_bl_EDEX_BL_BLKunde_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("EDEX_BL_BLKunde")
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_bl_EDEX_BL_BLKunde_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEDEX_BL_BLKunde::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 [iBlkundenr]() As SqlInt32
Get
Return m_iBlkundenr
End Get
Set(ByVal Value As SqlInt32)
Dim iBlkundenrTmp As SqlInt32 = Value
If iBlkundenrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iBlkundenr", "iBlkundenr can't be NULL")
End If
m_iBlkundenr = Value
End Set
End Property
Public Property [iNRAR00]() As SqlInt32
Get
Return m_iNRAR00
End Get
Set(ByVal Value As SqlInt32)
Dim iNRAR00Tmp As SqlInt32 = Value
If iNRAR00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("iNRAR00", "iNRAR00 can't be NULL")
End If
m_iNRAR00 = 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 [sAktiv]() As SqlString
Get
Return m_sAktiv
End Get
Set(ByVal Value As SqlString)
m_sAktiv = 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)
Dim iMutiererTmp As SqlInt32 = Value
If iMutiererTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iMutierer", "iMutierer can't be NULL")
End If
m_iMutierer = Value
End Set
End Property
Public Property [sPeriodische_auslieferung]() As SqlString
Get
Return m_sPeriodische_auslieferung
End Get
Set(ByVal Value As SqlString)
m_sPeriodische_auslieferung = Value
End Set
End Property
Public Property [iPeriodizitaet]() As SqlInt32
Get
Return m_iPeriodizitaet
End Get
Set(ByVal Value As SqlInt32)
m_iPeriodizitaet = Value
End Set
End Property
Public Property [daBlerklaerung_vom]() As SqlDateTime
Get
Return m_daBlerklaerung_vom
End Get
Set(ByVal Value As SqlDateTime)
m_daBlerklaerung_vom = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,619 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'EDEX_BL_Druckjob'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Montag, 16. Mai 2005, 23:08:04
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokadb
' /// <summary>
' /// Purpose: Data Access class for the table 'EDEX_BL_Druckjob'.
' /// </summary>
Public Class clsEDEX_BL_Druckjob
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daAufbereitet_am, m_daGedruckt_am, m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_blobPdfdokument As SqlBinary
Private m_iMandantnr, m_iMutierer, m_iAuslieferungnr, m_iDruckjobnr, m_iAnzahl_dokument, m_iStatus As SqlInt32
Private m_sBemerkung, m_sTgnummer 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>iDruckjobnr</LI>
' /// <LI>iAuslieferungnr. May be SqlInt32.Null</LI>
' /// <LI>sTgnummer. May be SqlString.Null</LI>
' /// <LI>iAnzahl_dokument. May be SqlInt32.Null</LI>
' /// <LI>daAufbereitet_am. May be SqlDateTime.Null</LI>
' /// <LI>daGedruckt_am. May be SqlDateTime.Null</LI>
' /// <LI>iStatus. May be SqlInt32.Null</LI>
' /// <LI>sBemerkung. May be SqlString.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>blobPdfdokument. May be SqlBinary.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>iMandantnr. 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_edex_bl_EDEX_BL_Druckjob_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idruckjobnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDruckjobnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iauslieferungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAuslieferungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stgnummer", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTgnummer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ianzahl_dokument", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAnzahl_dokument))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daaufbereitet_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daAufbereitet_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dagedruckt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daGedruckt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbemerkung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBemerkung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
Dim iLength As Integer = 0
If Not m_blobPdfdokument.IsNull Then
iLength = m_blobPdfdokument.Length
End If
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobpdfdokument", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobPdfdokument))
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("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
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_bl_EDEX_BL_Druckjob_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEDEX_BL_Druckjob::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>iDruckjobnr</LI>
' /// <LI>iAuslieferungnr. May be SqlInt32.Null</LI>
' /// <LI>sTgnummer. May be SqlString.Null</LI>
' /// <LI>iAnzahl_dokument. May be SqlInt32.Null</LI>
' /// <LI>daAufbereitet_am. May be SqlDateTime.Null</LI>
' /// <LI>daGedruckt_am. May be SqlDateTime.Null</LI>
' /// <LI>iStatus. May be SqlInt32.Null</LI>
' /// <LI>sBemerkung. May be SqlString.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>blobPdfdokument. May be SqlBinary.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>iMandantnr. 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_bl_EDEX_BL_Druckjob_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idruckjobnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDruckjobnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iauslieferungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAuslieferungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stgnummer", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTgnummer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ianzahl_dokument", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAnzahl_dokument))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daaufbereitet_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daAufbereitet_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dagedruckt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daGedruckt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbemerkung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBemerkung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
Dim iLength As Integer = 0
If Not m_blobPdfdokument.IsNull Then
iLength = m_blobPdfdokument.Length
End If
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobpdfdokument", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobPdfdokument))
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("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
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_bl_EDEX_BL_Druckjob_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEDEX_BL_Druckjob::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>iDruckjobnr</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_edex_bl_EDEX_BL_Druckjob_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idruckjobnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDruckjobnr))
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_bl_EDEX_BL_Druckjob_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEDEX_BL_Druckjob::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>iDruckjobnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iDruckjobnr</LI>
' /// <LI>iAuslieferungnr</LI>
' /// <LI>sTgnummer</LI>
' /// <LI>iAnzahl_dokument</LI>
' /// <LI>daAufbereitet_am</LI>
' /// <LI>daGedruckt_am</LI>
' /// <LI>iStatus</LI>
' /// <LI>sBemerkung</LI>
' /// <LI>bAktiv</LI>
' /// <LI>blobPdfdokument</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>iMandantnr</LI>
' /// </UL>
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
' /// </remarks>
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_EDEX_BL_Druckjob_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("EDEX_BL_Druckjob")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@idruckjobnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDruckjobnr))
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_bl_EDEX_BL_Druckjob_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iDruckjobnr = New SqlInt32(CType(dtToReturn.Rows(0)("druckjobnr"), Integer))
If dtToReturn.Rows(0)("auslieferungnr") Is System.DBNull.Value Then
m_iAuslieferungnr = SqlInt32.Null
Else
m_iAuslieferungnr = New SqlInt32(CType(dtToReturn.Rows(0)("auslieferungnr"), Integer))
End If
If dtToReturn.Rows(0)("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)("anzahl_dokument") Is System.DBNull.Value Then
m_iAnzahl_dokument = SqlInt32.Null
Else
m_iAnzahl_dokument = New SqlInt32(CType(dtToReturn.Rows(0)("anzahl_dokument"), Integer))
End If
If dtToReturn.Rows(0)("aufbereitet_am") Is System.DBNull.Value Then
m_daAufbereitet_am = SqlDateTime.Null
Else
m_daAufbereitet_am = New SqlDateTime(CType(dtToReturn.Rows(0)("aufbereitet_am"), Date))
End If
If dtToReturn.Rows(0)("gedruckt_am") Is System.DBNull.Value Then
m_daGedruckt_am = SqlDateTime.Null
Else
m_daGedruckt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("gedruckt_am"), Date))
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)("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)("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)("pdfdokument") Is System.DBNull.Value Then
m_blobPdfdokument = SqlBinary.Null
Else
m_blobPdfdokument = New SqlBinary(CType(dtToReturn.Rows(0)("pdfdokument"), Byte()))
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)("mandantnr") Is System.DBNull.Value Then
m_iMandantnr = SqlInt32.Null
Else
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), 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_BL_Druckjob::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_edex_bl_EDEX_BL_Druckjob_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("EDEX_BL_Druckjob")
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_bl_EDEX_BL_Druckjob_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEDEX_BL_Druckjob::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 [iDruckjobnr]() As SqlInt32
Get
Return m_iDruckjobnr
End Get
Set(ByVal Value As SqlInt32)
Dim iDruckjobnrTmp As SqlInt32 = Value
If iDruckjobnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iDruckjobnr", "iDruckjobnr can't be NULL")
End If
m_iDruckjobnr = Value
End Set
End Property
Public Property [iAuslieferungnr]() As SqlInt32
Get
Return m_iAuslieferungnr
End Get
Set(ByVal Value As SqlInt32)
m_iAuslieferungnr = Value
End Set
End Property
Public Property [sTgnummer]() As SqlString
Get
Return m_sTgnummer
End Get
Set(ByVal Value As SqlString)
m_sTgnummer = Value
End Set
End Property
Public Property [iAnzahl_dokument]() As SqlInt32
Get
Return m_iAnzahl_dokument
End Get
Set(ByVal Value As SqlInt32)
m_iAnzahl_dokument = Value
End Set
End Property
Public Property [daAufbereitet_am]() As SqlDateTime
Get
Return m_daAufbereitet_am
End Get
Set(ByVal Value As SqlDateTime)
m_daAufbereitet_am = Value
End Set
End Property
Public Property [daGedruckt_am]() As SqlDateTime
Get
Return m_daGedruckt_am
End Get
Set(ByVal Value As SqlDateTime)
m_daGedruckt_am = 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 [sBemerkung]() As SqlString
Get
Return m_sBemerkung
End Get
Set(ByVal Value As SqlString)
m_sBemerkung = 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 [blobPdfdokument]() As SqlBinary
Get
Return m_blobPdfdokument
End Get
Set(ByVal Value As SqlBinary)
m_blobPdfdokument = 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 [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,563 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'EDEX_BL_Hostdokument'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 4. Mai 2005, 19:42: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 'EDEX_BL_Hostdokument'.
' /// </summary>
Public Class clsEDEX_BL_Hostdokument
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_daInserttimestamp As SqlDateTime
Private m_iBl_status, m_iAuslieferungnr As SqlInt32
Private m_sStandamdatum, m_sEx, m_sArchivdatum, m_sVvextern1, m_sVvextern2, m_sRes2, m_sRes3, m_sRes1, m_sDokumenttypnr, m_sLoadid, m_sPartnername_zusteller, m_sReferenzzeile1, m_sReferenzzeile2, m_sPartnernr_inhaber, m_sPartnernr_zusteller, m_sPartnername_inhaber, m_sValutadatum, m_sDokumentid, m_sAnzahlseiten, m_sNachvollziehbarkeit, m_sValutadatum1, m_sValorennr, m_sIsinnr 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>sPartnernr_inhaber</LI>
' /// <LI>sPartnernr_zusteller</LI>
' /// <LI>sPartnername_inhaber</LI>
' /// <LI>sPartnername_zusteller</LI>
' /// <LI>sReferenzzeile1</LI>
' /// <LI>sReferenzzeile2</LI>
' /// <LI>sValutadatum</LI>
' /// <LI>sValutadatum1</LI>
' /// <LI>sValorennr</LI>
' /// <LI>sIsinnr</LI>
' /// <LI>sDokumentid</LI>
' /// <LI>sAnzahlseiten</LI>
' /// <LI>sNachvollziehbarkeit</LI>
' /// <LI>sArchivdatum</LI>
' /// <LI>sVvextern1</LI>
' /// <LI>sVvextern2</LI>
' /// <LI>sEx</LI>
' /// <LI>sStandamdatum</LI>
' /// <LI>sDokumenttypnr</LI>
' /// <LI>sLoadid</LI>
' /// <LI>daInserttimestamp</LI>
' /// <LI>iBl_status</LI>
' /// <LI>sRes1</LI>
' /// <LI>sRes2</LI>
' /// <LI>sRes3</LI>
' /// <LI>iAuslieferungnr. 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_edex_bl_EDEX_BL_Hostdokument_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnernr_inhaber", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr_inhaber))
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnernr_zusteller", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr_zusteller))
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnername_inhaber", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPartnername_inhaber))
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnername_zusteller", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPartnername_zusteller))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sreferenzzeile1", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sReferenzzeile1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sreferenzzeile2", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sReferenzzeile2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@svalutadatum", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sValutadatum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@svalutadatum1", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sValutadatum1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@svalorennr", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sValorennr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sisinnr", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sIsinnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sanzahlseiten", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sAnzahlseiten))
scmCmdToExecute.Parameters.Add(New SqlParameter("@snachvollziehbarkeit", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sNachvollziehbarkeit))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sarchivdatum", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sArchivdatum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@svvextern1", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sVvextern1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@svvextern2", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sVvextern2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sex", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sEx))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sstandamdatum", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sStandamdatum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumenttypnr", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumenttypnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sloadid", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sLoadid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dainserttimestamp", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daInserttimestamp))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibl_status", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBl_status))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres1", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sRes1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres2", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sRes2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres3", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sRes3))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iauslieferungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAuslieferungnr))
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_bl_EDEX_BL_Hostdokument_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEDEX_BL_Hostdokument::Insert::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.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_edex_bl_EDEX_BL_Hostdokument_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("EDEX_BL_Hostdokument")
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_bl_EDEX_BL_Hostdokument_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEDEX_BL_Hostdokument::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 [sPartnernr_inhaber]() As SqlString
Get
Return m_sPartnernr_inhaber
End Get
Set(ByVal Value As SqlString)
Dim sPartnernr_inhaberTmp As SqlString = Value
If sPartnernr_inhaberTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sPartnernr_inhaber", "sPartnernr_inhaber can't be NULL")
End If
m_sPartnernr_inhaber = Value
End Set
End Property
Public Property [sPartnernr_zusteller]() As SqlString
Get
Return m_sPartnernr_zusteller
End Get
Set(ByVal Value As SqlString)
Dim sPartnernr_zustellerTmp As SqlString = Value
If sPartnernr_zustellerTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sPartnernr_zusteller", "sPartnernr_zusteller can't be NULL")
End If
m_sPartnernr_zusteller = Value
End Set
End Property
Public Property [sPartnername_inhaber]() As SqlString
Get
Return m_sPartnername_inhaber
End Get
Set(ByVal Value As SqlString)
Dim sPartnername_inhaberTmp As SqlString = Value
If sPartnername_inhaberTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sPartnername_inhaber", "sPartnername_inhaber can't be NULL")
End If
m_sPartnername_inhaber = Value
End Set
End Property
Public Property [sPartnername_zusteller]() As SqlString
Get
Return m_sPartnername_zusteller
End Get
Set(ByVal Value As SqlString)
Dim sPartnername_zustellerTmp As SqlString = Value
If sPartnername_zustellerTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sPartnername_zusteller", "sPartnername_zusteller can't be NULL")
End If
m_sPartnername_zusteller = Value
End Set
End Property
Public Property [sReferenzzeile1]() As SqlString
Get
Return m_sReferenzzeile1
End Get
Set(ByVal Value As SqlString)
Dim sReferenzzeile1Tmp As SqlString = Value
If sReferenzzeile1Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("sReferenzzeile1", "sReferenzzeile1 can't be NULL")
End If
m_sReferenzzeile1 = Value
End Set
End Property
Public Property [sReferenzzeile2]() As SqlString
Get
Return m_sReferenzzeile2
End Get
Set(ByVal Value As SqlString)
Dim sReferenzzeile2Tmp As SqlString = Value
If sReferenzzeile2Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("sReferenzzeile2", "sReferenzzeile2 can't be NULL")
End If
m_sReferenzzeile2 = Value
End Set
End Property
Public Property [sValutadatum]() As SqlString
Get
Return m_sValutadatum
End Get
Set(ByVal Value As SqlString)
Dim sValutadatumTmp As SqlString = Value
If sValutadatumTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sValutadatum", "sValutadatum can't be NULL")
End If
m_sValutadatum = Value
End Set
End Property
Public Property [sValutadatum1]() As SqlString
Get
Return m_sValutadatum1
End Get
Set(ByVal Value As SqlString)
Dim sValutadatum1Tmp As SqlString = Value
If sValutadatum1Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("sValutadatum1", "sValutadatum1 can't be NULL")
End If
m_sValutadatum1 = Value
End Set
End Property
Public Property [sValorennr]() As SqlString
Get
Return m_sValorennr
End Get
Set(ByVal Value As SqlString)
Dim sValorennrTmp As SqlString = Value
If sValorennrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sValorennr", "sValorennr can't be NULL")
End If
m_sValorennr = Value
End Set
End Property
Public Property [sIsinnr]() As SqlString
Get
Return m_sIsinnr
End Get
Set(ByVal Value As SqlString)
Dim sIsinnrTmp As SqlString = Value
If sIsinnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sIsinnr", "sIsinnr can't be NULL")
End If
m_sIsinnr = Value
End Set
End Property
Public Property [sDokumentid]() As SqlString
Get
Return m_sDokumentid
End Get
Set(ByVal Value As SqlString)
Dim sDokumentidTmp As SqlString = Value
If sDokumentidTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sDokumentid", "sDokumentid can't be NULL")
End If
m_sDokumentid = Value
End Set
End Property
Public Property [sAnzahlseiten]() As SqlString
Get
Return m_sAnzahlseiten
End Get
Set(ByVal Value As SqlString)
Dim sAnzahlseitenTmp As SqlString = Value
If sAnzahlseitenTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sAnzahlseiten", "sAnzahlseiten can't be NULL")
End If
m_sAnzahlseiten = Value
End Set
End Property
Public Property [sNachvollziehbarkeit]() As SqlString
Get
Return m_sNachvollziehbarkeit
End Get
Set(ByVal Value As SqlString)
Dim sNachvollziehbarkeitTmp As SqlString = Value
If sNachvollziehbarkeitTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sNachvollziehbarkeit", "sNachvollziehbarkeit can't be NULL")
End If
m_sNachvollziehbarkeit = Value
End Set
End Property
Public Property [sArchivdatum]() As SqlString
Get
Return m_sArchivdatum
End Get
Set(ByVal Value As SqlString)
Dim sArchivdatumTmp As SqlString = Value
If sArchivdatumTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sArchivdatum", "sArchivdatum can't be NULL")
End If
m_sArchivdatum = Value
End Set
End Property
Public Property [sVvextern1]() As SqlString
Get
Return m_sVvextern1
End Get
Set(ByVal Value As SqlString)
Dim sVvextern1Tmp As SqlString = Value
If sVvextern1Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("sVvextern1", "sVvextern1 can't be NULL")
End If
m_sVvextern1 = Value
End Set
End Property
Public Property [sVvextern2]() As SqlString
Get
Return m_sVvextern2
End Get
Set(ByVal Value As SqlString)
Dim sVvextern2Tmp As SqlString = Value
If sVvextern2Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("sVvextern2", "sVvextern2 can't be NULL")
End If
m_sVvextern2 = Value
End Set
End Property
Public Property [sEx]() As SqlString
Get
Return m_sEx
End Get
Set(ByVal Value As SqlString)
Dim sExTmp As SqlString = Value
If sExTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sEx", "sEx can't be NULL")
End If
m_sEx = Value
End Set
End Property
Public Property [sStandamdatum]() As SqlString
Get
Return m_sStandamdatum
End Get
Set(ByVal Value As SqlString)
Dim sStandamdatumTmp As SqlString = Value
If sStandamdatumTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sStandamdatum", "sStandamdatum can't be NULL")
End If
m_sStandamdatum = Value
End Set
End Property
Public Property [sDokumenttypnr]() As SqlString
Get
Return m_sDokumenttypnr
End Get
Set(ByVal Value As SqlString)
Dim sDokumenttypnrTmp As SqlString = Value
If sDokumenttypnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sDokumenttypnr", "sDokumenttypnr can't be NULL")
End If
m_sDokumenttypnr = Value
End Set
End Property
Public Property [sLoadid]() As SqlString
Get
Return m_sLoadid
End Get
Set(ByVal Value As SqlString)
Dim sLoadidTmp As SqlString = Value
If sLoadidTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sLoadid", "sLoadid can't be NULL")
End If
m_sLoadid = Value
End Set
End Property
Public Property [daInserttimestamp]() As SqlDateTime
Get
Return m_daInserttimestamp
End Get
Set(ByVal Value As SqlDateTime)
Dim daInserttimestampTmp As SqlDateTime = Value
If daInserttimestampTmp.IsNull Then
Throw New ArgumentOutOfRangeException("daInserttimestamp", "daInserttimestamp can't be NULL")
End If
m_daInserttimestamp = Value
End Set
End Property
Public Property [iBl_status]() As SqlInt32
Get
Return m_iBl_status
End Get
Set(ByVal Value As SqlInt32)
Dim iBl_statusTmp As SqlInt32 = Value
If iBl_statusTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iBl_status", "iBl_status can't be NULL")
End If
m_iBl_status = Value
End Set
End Property
Public Property [sRes1]() As SqlString
Get
Return m_sRes1
End Get
Set(ByVal Value As SqlString)
Dim sRes1Tmp As SqlString = Value
If sRes1Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("sRes1", "sRes1 can't be NULL")
End If
m_sRes1 = Value
End Set
End Property
Public Property [sRes2]() As SqlString
Get
Return m_sRes2
End Get
Set(ByVal Value As SqlString)
Dim sRes2Tmp As SqlString = Value
If sRes2Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("sRes2", "sRes2 can't be NULL")
End If
m_sRes2 = Value
End Set
End Property
Public Property [sRes3]() As SqlString
Get
Return m_sRes3
End Get
Set(ByVal Value As SqlString)
Dim sRes3Tmp As SqlString = Value
If sRes3Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("sRes3", "sRes3 can't be NULL")
End If
m_sRes3 = Value
End Set
End Property
Public Property [iAuslieferungnr]() As SqlInt32
Get
Return m_iAuslieferungnr
End Get
Set(ByVal Value As SqlInt32)
m_iAuslieferungnr = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,470 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'EDEX_BL_Status'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 4. Mai 2005, 19:42: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 'EDEX_BL_Status'.
' /// </summary>
Public Class clsEDEX_BL_Status
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_ma As SqlDateTime
Private m_iMutierer, m_iMandantnr, m_iBLStatusnr As SqlInt32
Private m_sBezeichnung As SqlString
#End Region
' /// <summary>
' /// Purpose: Class constructor.
' /// </summary>
Public Sub New()
' // Nothing for now.
End Sub
' /// <summary>
' /// Purpose: Insert method. This method will insert one new row into the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iBLStatusnr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_ma. 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_edex_bl_EDEX_BL_Status_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iBLStatusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBLStatusnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
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_ma", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_ma))
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 = 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_bl_EDEX_BL_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("clsEDEX_BL_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>iBLStatusnr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_ma. 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_edex_bl_EDEX_BL_Status_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iBLStatusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBLStatusnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
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_ma", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_ma))
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 = 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_bl_EDEX_BL_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("clsEDEX_BL_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>iBLStatusnr</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_edex_bl_EDEX_BL_Status_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iBLStatusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBLStatusnr))
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_bl_EDEX_BL_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("clsEDEX_BL_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>iBLStatusnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iBLStatusnr</LI>
' /// <LI>sBezeichnung</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_ma</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_edex_bl_EDEX_BL_Status_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("EDEX_BL_Status")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iBLStatusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBLStatusnr))
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_bl_EDEX_BL_Status_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iBLStatusnr = New SqlInt32(CType(dtToReturn.Rows(0)("BLStatusnr"), 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)("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_ma") Is System.DBNull.Value Then
m_daMutiert_ma = SqlDateTime.Null
Else
m_daMutiert_ma = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_ma"), 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("clsEDEX_BL_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>
Public Overrides Function SelectAll() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_EDEX_BL_Status_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("EDEX_BL_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 = 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_bl_EDEX_BL_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("clsEDEX_BL_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 [iBLStatusnr]() As SqlInt32
Get
Return m_iBLStatusnr
End Get
Set(ByVal Value As SqlInt32)
Dim iBLStatusnrTmp As SqlInt32 = Value
If iBLStatusnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iBLStatusnr", "iBLStatusnr can't be NULL")
End If
m_iBLStatusnr = 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 [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_ma]() As SqlDateTime
Get
Return m_daMutiert_ma
End Get
Set(ByVal Value As SqlDateTime)
m_daMutiert_ma = 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,671 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'EDEX_Favoriten'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 16. Januar 2005, 18:42:16
' // 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_Favoriten'.
' /// </summary>
Public Class clsEDEX_Favoriten
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bStddp, m_bDp, m_bStrukturelement, m_bAktiv As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iNreintrag, m_iMandantnr, m_iSprache, m_iMutierer, m_iDtnr_dpnr, m_iImageindexopen, m_iImageindex, m_iMitarbeiternr, m_iParentid, m_iSort As SqlInt32
Private m_sBezeichnung As SqlString
#End Region
' /// <summary>
' /// Purpose: Class constructor.
' /// </summary>
Public Sub New()
' // Nothing for now.
End Sub
' /// <summary>
' /// Purpose: Insert method. This method will insert one new row into the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>iParentid. May be SqlInt32.Null</LI>
' /// <LI>iSort. May be SqlInt32.Null</LI>
' /// <LI>iImageindex. May be SqlInt32.Null</LI>
' /// <LI>iImageindexopen. May be SqlInt32.Null</LI>
' /// <LI>iDtnr_dpnr. May be SqlInt32.Null</LI>
' /// <LI>bDp. May be SqlBoolean.Null</LI>
' /// <LI>bStddp. May be SqlBoolean.Null</LI>
' /// <LI>iMitarbeiternr. 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>iSprache. May be SqlInt32.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>bStrukturelement. May be SqlBoolean.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iNreintrag</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[edex_pr_EDEX_Favoriten_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("@iparentid", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isort", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSort))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iimageindex", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageindex))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iimageindexopen", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageindexopen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idtnr_dpnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDtnr_dpnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdp", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDp))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bstddp", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bStddp))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
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("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bstrukturelement", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bStrukturelement))
scmCmdToExecute.Parameters.Add(new SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iNreintrag = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@inreintrag").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 'edex_pr_EDEX_Favoriten_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_Favoriten::Insert::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: Update method. This method will Update one existing row in the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iNreintrag</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>iParentid. May be SqlInt32.Null</LI>
' /// <LI>iSort. May be SqlInt32.Null</LI>
' /// <LI>iImageindex. May be SqlInt32.Null</LI>
' /// <LI>iImageindexopen. May be SqlInt32.Null</LI>
' /// <LI>iDtnr_dpnr. May be SqlInt32.Null</LI>
' /// <LI>bDp. May be SqlBoolean.Null</LI>
' /// <LI>bStddp. May be SqlBoolean.Null</LI>
' /// <LI>iMitarbeiternr. 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>iSprache. May be SqlInt32.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>bStrukturelement. 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.[edex_pr_EDEX_Favoriten_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iparentid", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isort", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSort))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iimageindex", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageindex))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iimageindexopen", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageindexopen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idtnr_dpnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDtnr_dpnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdp", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDp))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bstddp", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bStddp))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
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("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bstrukturelement", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bStrukturelement))
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 'edex_pr_EDEX_Favoriten_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_Favoriten::Update::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iNreintrag</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Overrides Function Delete() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[edex_pr_EDEX_Favoriten_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = 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 'edex_pr_EDEX_Favoriten_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_Favoriten::Delete::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iNreintrag</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iNreintrag</LI>
' /// <LI>sBezeichnung</LI>
' /// <LI>iParentid</LI>
' /// <LI>iSort</LI>
' /// <LI>iImageindex</LI>
' /// <LI>iImageindexopen</LI>
' /// <LI>iDtnr_dpnr</LI>
' /// <LI>bDp</LI>
' /// <LI>bStddp</LI>
' /// <LI>iMitarbeiternr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>iSprache</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>bStrukturelement</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.[edex_pr_EDEX_Favoriten_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("EDEX_Favoriten")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
sdaAdapter.Fill(dtToReturn)
m_iErrorCode = 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 'edex_pr_EDEX_Favoriten_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iNreintrag = New SqlInt32(CType(dtToReturn.Rows(0)("nreintrag"), Integer))
If dtToReturn.Rows(0)("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)("parentid") Is System.DBNull.Value Then
m_iParentid = SqlInt32.Null
Else
m_iParentid = New SqlInt32(CType(dtToReturn.Rows(0)("parentid"), Integer))
End If
If dtToReturn.Rows(0)("sort") Is System.DBNull.Value Then
m_iSort = SqlInt32.Null
Else
m_iSort = New SqlInt32(CType(dtToReturn.Rows(0)("sort"), Integer))
End If
If dtToReturn.Rows(0)("imageindex") Is System.DBNull.Value Then
m_iImageindex = SqlInt32.Null
Else
m_iImageindex = New SqlInt32(CType(dtToReturn.Rows(0)("imageindex"), Integer))
End If
If dtToReturn.Rows(0)("imageindexopen") Is System.DBNull.Value Then
m_iImageindexopen = SqlInt32.Null
Else
m_iImageindexopen = New SqlInt32(CType(dtToReturn.Rows(0)("imageindexopen"), Integer))
End If
If dtToReturn.Rows(0)("dtnr_dpnr") Is System.DBNull.Value Then
m_iDtnr_dpnr = SqlInt32.Null
Else
m_iDtnr_dpnr = New SqlInt32(CType(dtToReturn.Rows(0)("dtnr_dpnr"), Integer))
End If
If dtToReturn.Rows(0)("dp") Is System.DBNull.Value Then
m_bDp = SqlBoolean.Null
Else
m_bDp = New SqlBoolean(CType(dtToReturn.Rows(0)("dp"), Boolean))
End If
If dtToReturn.Rows(0)("stddp") Is System.DBNull.Value Then
m_bStddp = SqlBoolean.Null
Else
m_bStddp = New SqlBoolean(CType(dtToReturn.Rows(0)("stddp"), Boolean))
End If
If dtToReturn.Rows(0)("mitarbeiternr") Is System.DBNull.Value Then
m_iMitarbeiternr = SqlInt32.Null
Else
m_iMitarbeiternr = New SqlInt32(CType(dtToReturn.Rows(0)("mitarbeiternr"), 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)("sprache") Is System.DBNull.Value Then
m_iSprache = SqlInt32.Null
Else
m_iSprache = New SqlInt32(CType(dtToReturn.Rows(0)("sprache"), 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)("strukturelement") Is System.DBNull.Value Then
m_bStrukturelement = SqlBoolean.Null
Else
m_bStrukturelement = New SqlBoolean(CType(dtToReturn.Rows(0)("strukturelement"), 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("clsEDEX_Favoriten::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.[edex_pr_EDEX_Favoriten_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("EDEX_Favoriten")
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 'edex_pr_EDEX_Favoriten_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_Favoriten::SelectAll::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
#Region " Class Property Declarations "
Public Property [iNreintrag]() As SqlInt32
Get
Return m_iNreintrag
End Get
Set(ByVal Value As SqlInt32)
Dim iNreintragTmp As SqlInt32 = Value
If iNreintragTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iNreintrag", "iNreintrag can't be NULL")
End If
m_iNreintrag = Value
End Set
End Property
Public Property [sBezeichnung]() As SqlString
Get
Return m_sBezeichnung
End Get
Set(ByVal Value As SqlString)
m_sBezeichnung = Value
End Set
End Property
Public Property [iParentid]() As SqlInt32
Get
Return m_iParentid
End Get
Set(ByVal Value As SqlInt32)
m_iParentid = Value
End Set
End Property
Public Property [iSort]() As SqlInt32
Get
Return m_iSort
End Get
Set(ByVal Value As SqlInt32)
m_iSort = Value
End Set
End Property
Public Property [iImageindex]() As SqlInt32
Get
Return m_iImageindex
End Get
Set(ByVal Value As SqlInt32)
m_iImageindex = Value
End Set
End Property
Public Property [iImageindexopen]() As SqlInt32
Get
Return m_iImageindexopen
End Get
Set(ByVal Value As SqlInt32)
m_iImageindexopen = Value
End Set
End Property
Public Property [iDtnr_dpnr]() As SqlInt32
Get
Return m_iDtnr_dpnr
End Get
Set(ByVal Value As SqlInt32)
m_iDtnr_dpnr = Value
End Set
End Property
Public Property [bDp]() As SqlBoolean
Get
Return m_bDp
End Get
Set(ByVal Value As SqlBoolean)
m_bDp = Value
End Set
End Property
Public Property [bStddp]() As SqlBoolean
Get
Return m_bStddp
End Get
Set(ByVal Value As SqlBoolean)
m_bStddp = Value
End Set
End Property
Public Property [iMitarbeiternr]() As SqlInt32
Get
Return m_iMitarbeiternr
End Get
Set(ByVal Value As SqlInt32)
m_iMitarbeiternr = 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 [iSprache]() As SqlInt32
Get
Return m_iSprache
End Get
Set(ByVal Value As SqlInt32)
m_iSprache = 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 [bStrukturelement]() As SqlBoolean
Get
Return m_bStrukturelement
End Get
Set(ByVal Value As SqlBoolean)
m_bStrukturelement = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,731 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'edex_bl_parameter'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Freitag, 13. Mai 2005, 11:41:17
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokadb
' /// <summary>
' /// Purpose: Data Access class for the table 'edex_bl_parameter'.
' /// </summary>
Public Class clsEdex_bl_parameter
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMandantnr, m_iMutierer, m_iBlvparamnr, m_iBlvfunktion, m_iBlvdokumenttypnr As SqlInt32
Private m_sTxtbeilage1, m_sTxtForm2, m_sTxtForm1, m_sTxtQuittung2, m_sTxtQuittung1, m_sTxtbeilage2, m_sTxtGrundlage3, m_sTxtGrundlage2, m_sTxtGrundlage1, m_sTxtArt2, m_sTxtArt1, m_sTxtGrundlage4 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>iBlvfunktion. May be SqlInt32.Null</LI>
' /// <LI>iBlvdokumenttypnr. 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>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>sTxtGrundlage1. May be SqlString.Null</LI>
' /// <LI>sTxtGrundlage2. May be SqlString.Null</LI>
' /// <LI>sTxtGrundlage3. May be SqlString.Null</LI>
' /// <LI>sTxtGrundlage4. May be SqlString.Null</LI>
' /// <LI>sTxtArt1. May be SqlString.Null</LI>
' /// <LI>sTxtArt2. May be SqlString.Null</LI>
' /// <LI>sTxtForm1. May be SqlString.Null</LI>
' /// <LI>sTxtForm2. May be SqlString.Null</LI>
' /// <LI>sTxtbeilage1. May be SqlString.Null</LI>
' /// <LI>sTxtbeilage2. May be SqlString.Null</LI>
' /// <LI>sTxtQuittung1. May be SqlString.Null</LI>
' /// <LI>sTxtQuittung2. May be SqlString.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iBlvparamnr</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_edex_bl_parameter_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iblvfunktion", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBlvfunktion))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iblvdokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBlvdokumenttypnr))
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("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtGrundlage1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtGrundlage1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtGrundlage2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtGrundlage2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtGrundlage3", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtGrundlage3))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtGrundlage4", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtGrundlage4))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtArt1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtArt1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtArt2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtArt2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtForm1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtForm1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtForm2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtForm2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtbeilage1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtbeilage1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtbeilage2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtbeilage2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtQuittung1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtQuittung1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtQuittung2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtQuittung2))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iblvparamnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iBlvparamnr))
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_iBlvparamnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iblvparamnr").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_bl_edex_bl_parameter_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEdex_bl_parameter::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>iBlvparamnr</LI>
' /// <LI>iBlvfunktion. May be SqlInt32.Null</LI>
' /// <LI>iBlvdokumenttypnr. 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>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>sTxtGrundlage1. May be SqlString.Null</LI>
' /// <LI>sTxtGrundlage2. May be SqlString.Null</LI>
' /// <LI>sTxtGrundlage3. May be SqlString.Null</LI>
' /// <LI>sTxtGrundlage4. May be SqlString.Null</LI>
' /// <LI>sTxtArt1. May be SqlString.Null</LI>
' /// <LI>sTxtArt2. May be SqlString.Null</LI>
' /// <LI>sTxtForm1. May be SqlString.Null</LI>
' /// <LI>sTxtForm2. May be SqlString.Null</LI>
' /// <LI>sTxtbeilage1. May be SqlString.Null</LI>
' /// <LI>sTxtbeilage2. May be SqlString.Null</LI>
' /// <LI>sTxtQuittung1. May be SqlString.Null</LI>
' /// <LI>sTxtQuittung2. May be SqlString.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_edex_bl_parameter_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iblvparamnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBlvparamnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iblvfunktion", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBlvfunktion))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iblvdokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBlvdokumenttypnr))
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("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtGrundlage1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtGrundlage1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtGrundlage2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtGrundlage2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtGrundlage3", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtGrundlage3))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtGrundlage4", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtGrundlage4))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtArt1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtArt1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtArt2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtArt2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtForm1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtForm1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtForm2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtForm2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtbeilage1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtbeilage1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtbeilage2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtbeilage2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtQuittung1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtQuittung1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtQuittung2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtQuittung2))
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_bl_edex_bl_parameter_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEdex_bl_parameter::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>iBlvparamnr</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_edex_bl_edex_bl_parameter_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iblvparamnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBlvparamnr))
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_bl_edex_bl_parameter_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEdex_bl_parameter::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>iBlvparamnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iBlvparamnr</LI>
' /// <LI>iBlvfunktion</LI>
' /// <LI>iBlvdokumenttypnr</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>bAktiv</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>iMutierer</LI>
' /// <LI>sTxtGrundlage1</LI>
' /// <LI>sTxtGrundlage2</LI>
' /// <LI>sTxtGrundlage3</LI>
' /// <LI>sTxtGrundlage4</LI>
' /// <LI>sTxtArt1</LI>
' /// <LI>sTxtArt2</LI>
' /// <LI>sTxtForm1</LI>
' /// <LI>sTxtForm2</LI>
' /// <LI>sTxtbeilage1</LI>
' /// <LI>sTxtbeilage2</LI>
' /// <LI>sTxtQuittung1</LI>
' /// <LI>sTxtQuittung2</LI>
' /// </UL>
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
' /// </remarks>
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_edex_bl_parameter_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("edex_bl_parameter")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iblvparamnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBlvparamnr))
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_bl_edex_bl_parameter_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iBlvparamnr = New SqlInt32(CType(dtToReturn.Rows(0)("blvparamnr"), Integer))
If dtToReturn.Rows(0)("blvfunktion") Is System.DBNull.Value Then
m_iBlvfunktion = SqlInt32.Null
Else
m_iBlvfunktion = New SqlInt32(CType(dtToReturn.Rows(0)("blvfunktion"), Integer))
End If
If dtToReturn.Rows(0)("blvdokumenttypnr") Is System.DBNull.Value Then
m_iBlvdokumenttypnr = SqlInt32.Null
Else
m_iBlvdokumenttypnr = New SqlInt32(CType(dtToReturn.Rows(0)("blvdokumenttypnr"), 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)("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)("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)("txtGrundlage1") Is System.DBNull.Value Then
m_sTxtGrundlage1 = SqlString.Null
Else
m_sTxtGrundlage1 = New SqlString(CType(dtToReturn.Rows(0)("txtGrundlage1"), String))
End If
If dtToReturn.Rows(0)("txtGrundlage2") Is System.DBNull.Value Then
m_sTxtGrundlage2 = SqlString.Null
Else
m_sTxtGrundlage2 = New SqlString(CType(dtToReturn.Rows(0)("txtGrundlage2"), String))
End If
If dtToReturn.Rows(0)("txtGrundlage3") Is System.DBNull.Value Then
m_sTxtGrundlage3 = SqlString.Null
Else
m_sTxtGrundlage3 = New SqlString(CType(dtToReturn.Rows(0)("txtGrundlage3"), String))
End If
If dtToReturn.Rows(0)("txtGrundlage4") Is System.DBNull.Value Then
m_sTxtGrundlage4 = SqlString.Null
Else
m_sTxtGrundlage4 = New SqlString(CType(dtToReturn.Rows(0)("txtGrundlage4"), String))
End If
If dtToReturn.Rows(0)("txtArt1") Is System.DBNull.Value Then
m_sTxtArt1 = SqlString.Null
Else
m_sTxtArt1 = New SqlString(CType(dtToReturn.Rows(0)("txtArt1"), String))
End If
If dtToReturn.Rows(0)("txtArt2") Is System.DBNull.Value Then
m_sTxtArt2 = SqlString.Null
Else
m_sTxtArt2 = New SqlString(CType(dtToReturn.Rows(0)("txtArt2"), String))
End If
If dtToReturn.Rows(0)("txtForm1") Is System.DBNull.Value Then
m_sTxtForm1 = SqlString.Null
Else
m_sTxtForm1 = New SqlString(CType(dtToReturn.Rows(0)("txtForm1"), String))
End If
If dtToReturn.Rows(0)("txtForm2") Is System.DBNull.Value Then
m_sTxtForm2 = SqlString.Null
Else
m_sTxtForm2 = New SqlString(CType(dtToReturn.Rows(0)("txtForm2"), String))
End If
If dtToReturn.Rows(0)("txtbeilage1") Is System.DBNull.Value Then
m_sTxtbeilage1 = SqlString.Null
Else
m_sTxtbeilage1 = New SqlString(CType(dtToReturn.Rows(0)("txtbeilage1"), String))
End If
If dtToReturn.Rows(0)("txtbeilage2") Is System.DBNull.Value Then
m_sTxtbeilage2 = SqlString.Null
Else
m_sTxtbeilage2 = New SqlString(CType(dtToReturn.Rows(0)("txtbeilage2"), String))
End If
If dtToReturn.Rows(0)("txtQuittung1") Is System.DBNull.Value Then
m_sTxtQuittung1 = SqlString.Null
Else
m_sTxtQuittung1 = New SqlString(CType(dtToReturn.Rows(0)("txtQuittung1"), String))
End If
If dtToReturn.Rows(0)("txtQuittung2") Is System.DBNull.Value Then
m_sTxtQuittung2 = SqlString.Null
Else
m_sTxtQuittung2 = New SqlString(CType(dtToReturn.Rows(0)("txtQuittung2"), String))
End If
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEdex_bl_parameter::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_edex_bl_edex_bl_parameter_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("edex_bl_parameter")
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_bl_edex_bl_parameter_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEdex_bl_parameter::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 [iBlvparamnr]() As SqlInt32
Get
Return m_iBlvparamnr
End Get
Set(ByVal Value As SqlInt32)
Dim iBlvparamnrTmp As SqlInt32 = Value
If iBlvparamnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iBlvparamnr", "iBlvparamnr can't be NULL")
End If
m_iBlvparamnr = Value
End Set
End Property
Public Property [iBlvfunktion]() As SqlInt32
Get
Return m_iBlvfunktion
End Get
Set(ByVal Value As SqlInt32)
m_iBlvfunktion = Value
End Set
End Property
Public Property [iBlvdokumenttypnr]() As SqlInt32
Get
Return m_iBlvdokumenttypnr
End Get
Set(ByVal Value As SqlInt32)
m_iBlvdokumenttypnr = 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 [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr = 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 [sTxtGrundlage1]() As SqlString
Get
Return m_sTxtGrundlage1
End Get
Set(ByVal Value As SqlString)
m_sTxtGrundlage1 = Value
End Set
End Property
Public Property [sTxtGrundlage2]() As SqlString
Get
Return m_sTxtGrundlage2
End Get
Set(ByVal Value As SqlString)
m_sTxtGrundlage2 = Value
End Set
End Property
Public Property [sTxtGrundlage3]() As SqlString
Get
Return m_sTxtGrundlage3
End Get
Set(ByVal Value As SqlString)
m_sTxtGrundlage3 = Value
End Set
End Property
Public Property [sTxtGrundlage4]() As SqlString
Get
Return m_sTxtGrundlage4
End Get
Set(ByVal Value As SqlString)
m_sTxtGrundlage4 = Value
End Set
End Property
Public Property [sTxtArt1]() As SqlString
Get
Return m_sTxtArt1
End Get
Set(ByVal Value As SqlString)
m_sTxtArt1 = Value
End Set
End Property
Public Property [sTxtArt2]() As SqlString
Get
Return m_sTxtArt2
End Get
Set(ByVal Value As SqlString)
m_sTxtArt2 = Value
End Set
End Property
Public Property [sTxtForm1]() As SqlString
Get
Return m_sTxtForm1
End Get
Set(ByVal Value As SqlString)
m_sTxtForm1 = Value
End Set
End Property
Public Property [sTxtForm2]() As SqlString
Get
Return m_sTxtForm2
End Get
Set(ByVal Value As SqlString)
m_sTxtForm2 = Value
End Set
End Property
Public Property [sTxtbeilage1]() As SqlString
Get
Return m_sTxtbeilage1
End Get
Set(ByVal Value As SqlString)
m_sTxtbeilage1 = Value
End Set
End Property
Public Property [sTxtbeilage2]() As SqlString
Get
Return m_sTxtbeilage2
End Get
Set(ByVal Value As SqlString)
m_sTxtbeilage2 = Value
End Set
End Property
Public Property [sTxtQuittung1]() As SqlString
Get
Return m_sTxtQuittung1
End Get
Set(ByVal Value As SqlString)
m_sTxtQuittung1 = Value
End Set
End Property
Public Property [sTxtQuittung2]() As SqlString
Get
Return m_sTxtQuittung2
End Get
Set(ByVal Value As SqlString)
m_sTxtQuittung2 = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,619 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'edex_dokumentpaket'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 16. Januar 2005, 23:00:08
' // 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_dokumentpaket'.
' /// </summary>
Public Class clsEdex_dokumentpaket
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv, m_bIndividuelles_dp As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_blobDpbeschreibung As SqlBinary
Private m_iSort, m_iMutierer, m_iMandantnr, m_iDokumentpaketnr, m_iOwner, m_iDokumentartnr As SqlInt32
Private m_sWichtigehinweise, m_sBeschreibung, m_sBezeichnung As SqlString
#End Region
' /// <summary>
' /// Purpose: Class constructor.
' /// </summary>
Public Sub New()
' // Nothing for now.
End Sub
' /// <summary>
' /// Purpose: Insert method. This method will insert one new row into the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iDokumentpaketnr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
' /// <LI>iOwner. May be SqlInt32.Null</LI>
' /// <LI>bIndividuelles_dp. May be SqlBoolean.Null</LI>
' /// <LI>blobDpbeschreibung. May be SqlBinary.Null</LI>
' /// <LI>iDokumentartnr. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>sWichtigehinweise. May be SqlString.Null</LI>
' /// <LI>iSort. 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.[edex_pr_edex_dokumentpaket_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentpaketnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iowner", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iOwner))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bindividuelles_dp", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bIndividuelles_dp))
Dim iLength As Integer = 0
If Not m_blobDpbeschreibung.IsNull Then
iLength = m_blobDpbeschreibung.Length
End If
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobdpbeschreibung", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobDpbeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentartnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentartnr))
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("@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("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@swichtigehinweise", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sWichtigehinweise))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isort", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSort))
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 'edex_pr_edex_dokumentpaket_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_dokumentpaket::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>iDokumentpaketnr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
' /// <LI>iOwner. May be SqlInt32.Null</LI>
' /// <LI>bIndividuelles_dp. May be SqlBoolean.Null</LI>
' /// <LI>blobDpbeschreibung. May be SqlBinary.Null</LI>
' /// <LI>iDokumentartnr. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>sWichtigehinweise. May be SqlString.Null</LI>
' /// <LI>iSort. 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.[edex_pr_edex_dokumentpaket_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentpaketnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iowner", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iOwner))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bindividuelles_dp", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bIndividuelles_dp))
Dim iLength As Integer = 0
If Not m_blobDpbeschreibung.IsNull Then
iLength = m_blobDpbeschreibung.Length
End If
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobdpbeschreibung", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobDpbeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentartnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentartnr))
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("@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("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@swichtigehinweise", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sWichtigehinweise))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isort", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSort))
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 'edex_pr_edex_dokumentpaket_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_dokumentpaket::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>iDokumentpaketnr</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.[edex_pr_edex_dokumentpaket_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentpaketnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketnr))
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 'edex_pr_edex_dokumentpaket_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_dokumentpaket::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>iDokumentpaketnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iDokumentpaketnr</LI>
' /// <LI>sBezeichnung</LI>
' /// <LI>sBeschreibung</LI>
' /// <LI>iOwner</LI>
' /// <LI>bIndividuelles_dp</LI>
' /// <LI>blobDpbeschreibung</LI>
' /// <LI>iDokumentartnr</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>iMutierer</LI>
' /// <LI>sWichtigehinweise</LI>
' /// <LI>iSort</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.[edex_pr_edex_dokumentpaket_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("edex_dokumentpaket")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@idokumentpaketnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketnr))
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 'edex_pr_edex_dokumentpaket_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iDokumentpaketnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumentpaketnr"), 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)("beschreibung") Is System.DBNull.Value Then
m_sBeschreibung = SqlString.Null
Else
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("beschreibung"), String))
End If
If dtToReturn.Rows(0)("owner") Is System.DBNull.Value Then
m_iOwner = SqlInt32.Null
Else
m_iOwner = New SqlInt32(CType(dtToReturn.Rows(0)("owner"), Integer))
End If
If dtToReturn.Rows(0)("individuelles_dp") Is System.DBNull.Value Then
m_bIndividuelles_dp = SqlBoolean.Null
Else
m_bIndividuelles_dp = New SqlBoolean(CType(dtToReturn.Rows(0)("individuelles_dp"), Boolean))
End If
If dtToReturn.Rows(0)("dpbeschreibung") Is System.DBNull.Value Then
m_blobDpbeschreibung = SqlBinary.Null
Else
m_blobDpbeschreibung = New SqlBinary(CType(dtToReturn.Rows(0)("dpbeschreibung"), Byte()))
End If
If dtToReturn.Rows(0)("dokumentartnr") Is System.DBNull.Value Then
m_iDokumentartnr = SqlInt32.Null
Else
m_iDokumentartnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumentartnr"), 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)("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)("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)("wichtigehinweise") Is System.DBNull.Value Then
m_sWichtigehinweise = SqlString.Null
Else
m_sWichtigehinweise = New SqlString(CType(dtToReturn.Rows(0)("wichtigehinweise"), String))
End If
If dtToReturn.Rows(0)("sort") Is System.DBNull.Value Then
m_iSort = SqlInt32.Null
Else
m_iSort = New SqlInt32(CType(dtToReturn.Rows(0)("sort"), 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_dokumentpaket::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.[edex_pr_edex_dokumentpaket_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("edex_dokumentpaket")
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 'edex_pr_edex_dokumentpaket_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_dokumentpaket::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 [iDokumentpaketnr]() As SqlInt32
Get
Return m_iDokumentpaketnr
End Get
Set(ByVal Value As SqlInt32)
Dim iDokumentpaketnrTmp As SqlInt32 = Value
If iDokumentpaketnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iDokumentpaketnr", "iDokumentpaketnr can't be NULL")
End If
m_iDokumentpaketnr = 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 [sBeschreibung]() As SqlString
Get
Return m_sBeschreibung
End Get
Set(ByVal Value As SqlString)
m_sBeschreibung = Value
End Set
End Property
Public Property [iOwner]() As SqlInt32
Get
Return m_iOwner
End Get
Set(ByVal Value As SqlInt32)
m_iOwner = Value
End Set
End Property
Public Property [bIndividuelles_dp]() As SqlBoolean
Get
Return m_bIndividuelles_dp
End Get
Set(ByVal Value As SqlBoolean)
m_bIndividuelles_dp = Value
End Set
End Property
Public Property [blobDpbeschreibung]() As SqlBinary
Get
Return m_blobDpbeschreibung
End Get
Set(ByVal Value As SqlBinary)
m_blobDpbeschreibung = Value
End Set
End Property
Public Property [iDokumentartnr]() As SqlInt32
Get
Return m_iDokumentartnr
End Get
Set(ByVal Value As SqlInt32)
m_iDokumentartnr = 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 [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 [iMutierer]() As SqlInt32
Get
Return m_iMutierer
End Get
Set(ByVal Value As SqlInt32)
m_iMutierer = Value
End Set
End Property
Public Property [sWichtigehinweise]() As SqlString
Get
Return m_sWichtigehinweise
End Get
Set(ByVal Value As SqlString)
m_sWichtigehinweise = Value
End Set
End Property
Public Property [iSort]() As SqlInt32
Get
Return m_iSort
End Get
Set(ByVal Value As SqlInt32)
m_iSort = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,530 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'edex_dokumentpaketvorlage'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Donnerstag, 6. Januar 2005, 23:03: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 'edex_dokumentpaketvorlage'.
' /// </summary>
Public Class clsEdex_dokumentpaketvorlage
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iDokumentpaketvorlagenr, m_iSort, m_iImageindex, m_iMandantnr, m_iZwingend, m_iDokumenttypnr, m_iDokumentpaketnr 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>iDokumentpaketnr. May be SqlInt32.Null</LI>
' /// <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
' /// <LI>iZwingend. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>iSort. May be SqlInt32.Null</LI>
' /// <LI>iImageindex. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iDokumentpaketvorlagenr</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[edex_pr_edex_dokumentpaketvorlage_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentpaketnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@izwingend", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iZwingend))
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("@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("@isort", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSort))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iimageindex", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageindex))
scmCmdToExecute.Parameters.Add(new SqlParameter("@idokumentpaketvorlagenr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketvorlagenr))
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_iDokumentpaketvorlagenr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@idokumentpaketvorlagenr").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 'edex_pr_edex_dokumentpaketvorlage_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_dokumentpaketvorlage::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>iDokumentpaketvorlagenr</LI>
' /// <LI>iDokumentpaketnr. May be SqlInt32.Null</LI>
' /// <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
' /// <LI>iZwingend. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>iSort. May be SqlInt32.Null</LI>
' /// <LI>iImageindex. 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.[edex_pr_edex_dokumentpaketvorlage_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentpaketvorlagenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketvorlagenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentpaketnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@izwingend", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iZwingend))
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("@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("@isort", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSort))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iimageindex", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageindex))
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 'edex_pr_edex_dokumentpaketvorlage_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_dokumentpaketvorlage::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>iDokumentpaketvorlagenr</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.[edex_pr_edex_dokumentpaketvorlage_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentpaketvorlagenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketvorlagenr))
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 'edex_pr_edex_dokumentpaketvorlage_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_dokumentpaketvorlage::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>iDokumentpaketvorlagenr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iDokumentpaketvorlagenr</LI>
' /// <LI>iDokumentpaketnr</LI>
' /// <LI>iDokumenttypnr</LI>
' /// <LI>iZwingend</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>iSort</LI>
' /// <LI>iImageindex</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.[edex_pr_edex_dokumentpaketvorlage_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("edex_dokumentpaketvorlage")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@idokumentpaketvorlagenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketvorlagenr))
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 'edex_pr_edex_dokumentpaketvorlage_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iDokumentpaketvorlagenr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumentpaketvorlagenr"), Integer))
If dtToReturn.Rows(0)("dokumentpaketnr") Is System.DBNull.Value Then
m_iDokumentpaketnr = SqlInt32.Null
Else
m_iDokumentpaketnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumentpaketnr"), 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)("zwingend") Is System.DBNull.Value Then
m_iZwingend = SqlInt32.Null
Else
m_iZwingend = New SqlInt32(CType(dtToReturn.Rows(0)("zwingend"), 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)("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)("sort") Is System.DBNull.Value Then
m_iSort = SqlInt32.Null
Else
m_iSort = New SqlInt32(CType(dtToReturn.Rows(0)("sort"), Integer))
End If
If dtToReturn.Rows(0)("imageindex") Is System.DBNull.Value Then
m_iImageindex = SqlInt32.Null
Else
m_iImageindex = New SqlInt32(CType(dtToReturn.Rows(0)("imageindex"), 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_dokumentpaketvorlage::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.[edex_pr_edex_dokumentpaketvorlage_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("edex_dokumentpaketvorlage")
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 'edex_pr_edex_dokumentpaketvorlage_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_dokumentpaketvorlage::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 [iDokumentpaketvorlagenr]() As SqlInt32
Get
Return m_iDokumentpaketvorlagenr
End Get
Set(ByVal Value As SqlInt32)
Dim iDokumentpaketvorlagenrTmp As SqlInt32 = Value
If iDokumentpaketvorlagenrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iDokumentpaketvorlagenr", "iDokumentpaketvorlagenr can't be NULL")
End If
m_iDokumentpaketvorlagenr = Value
End Set
End Property
Public Property [iDokumentpaketnr]() As SqlInt32
Get
Return m_iDokumentpaketnr
End Get
Set(ByVal Value As SqlInt32)
m_iDokumentpaketnr = 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 [iZwingend]() As SqlInt32
Get
Return m_iZwingend
End Get
Set(ByVal Value As SqlInt32)
m_iZwingend = 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 [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 [iSort]() As SqlInt32
Get
Return m_iSort
End Get
Set(ByVal Value As SqlInt32)
m_iSort = Value
End Set
End Property
Public Property [iImageindex]() As SqlInt32
Get
Return m_iImageindex
End Get
Set(ByVal Value As SqlInt32)
m_iImageindex = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,600 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'edex_dpinstanz'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 8. Februar 2005, 10:41:34
' // 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_dpinstanz'.
' /// </summary>
Public Class clsEdex_dpinstanz
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bIndividuellesDP As SqlBoolean
Private m_daErstellt_am As SqlDateTime
Private m_iDokumentpaketnr, m_iProfilnr, m_iNrpar00, m_iMitarbeiternr, m_iNreintrag As SqlInt32
Private m_sHacken, m_sDokumentpaketnummern 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. May be SqlInt32.Null</LI>
' /// <LI>sDokumentpaketnummern. May be SqlString.Null</LI>
' /// <LI>sHacken. May be SqlString.Null</LI>
' /// <LI>iNrpar00. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>iDokumentpaketnr. May be SqlInt32.Null</LI>
' /// <LI>bIndividuellesDP. May be SqlBoolean.Null</LI>
' /// <LI>iProfilnr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iNreintrag</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[edex_pr_edex_dpinstanz_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, True, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentpaketnummern", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentpaketnummern))
scmCmdToExecute.Parameters.Add(New SqlParameter("@shacken", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sHacken))
scmCmdToExecute.Parameters.Add(New SqlParameter("@inrpar00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNrpar00))
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("@iDokumentpaketnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bIndividuellesDP", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bIndividuellesDP))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iProfilnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iProfilnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iNreintrag = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@inreintrag").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 'edex_pr_edex_dpinstanz_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_dpinstanz::Insert::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: Update method. This method will Update one existing row in the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iNreintrag</LI>
' /// <LI>iMitarbeiternr. May be SqlInt32.Null</LI>
' /// <LI>sDokumentpaketnummern. May be SqlString.Null</LI>
' /// <LI>sHacken. May be SqlString.Null</LI>
' /// <LI>iNrpar00. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>iDokumentpaketnr. May be SqlInt32.Null</LI>
' /// <LI>bIndividuellesDP. May be SqlBoolean.Null</LI>
' /// <LI>iProfilnr. 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.[edex_pr_edex_dpinstanz_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentpaketnummern", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentpaketnummern))
scmCmdToExecute.Parameters.Add(New SqlParameter("@shacken", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sHacken))
scmCmdToExecute.Parameters.Add(New SqlParameter("@inrpar00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNrpar00))
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("@iDokumentpaketnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bIndividuellesDP", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bIndividuellesDP))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iProfilnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iProfilnr))
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 'edex_pr_edex_dpinstanz_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_dpinstanz::Update::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iNreintrag</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Overrides Function Delete() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[edex_pr_edex_dpinstanz_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = 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 'edex_pr_edex_dpinstanz_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_dpinstanz::Delete::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Public Function SelectByDPNr(ByVal DPNr As Integer) As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[edex_pr_edex_dpinstanz_SelectByDPNr]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("edex_dpinstanz")
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@DPNR", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, DPNr))
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 'edex_pr_edex_dpinstanz_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iNreintrag = New SqlInt32(CType(dtToReturn.Rows(0)("nreintrag"), Integer))
If dtToReturn.Rows(0)("mitarbeiternr") Is System.DBNull.Value Then
m_iMitarbeiternr = SqlInt32.Null
Else
m_iMitarbeiternr = New SqlInt32(CType(dtToReturn.Rows(0)("mitarbeiternr"), Integer))
End If
If dtToReturn.Rows(0)("dokumentpaketnummern") Is System.DBNull.Value Then
m_sDokumentpaketnummern = SqlString.Null
Else
m_sDokumentpaketnummern = New SqlString(CType(dtToReturn.Rows(0)("dokumentpaketnummern"), String))
End If
If dtToReturn.Rows(0)("hacken") Is System.DBNull.Value Then
m_sHacken = SqlString.Null
Else
m_sHacken = New SqlString(CType(dtToReturn.Rows(0)("hacken"), String))
End If
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)("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)("Dokumentpaketnr") Is System.DBNull.Value Then
m_iDokumentpaketnr = SqlInt32.Null
Else
m_iDokumentpaketnr = New SqlInt32(CType(dtToReturn.Rows(0)("Dokumentpaketnr"), Integer))
End If
If dtToReturn.Rows(0)("IndividuellesDP") Is System.DBNull.Value Then
m_bIndividuellesDP = SqlBoolean.Null
Else
m_bIndividuellesDP = New SqlBoolean(CType(dtToReturn.Rows(0)("IndividuellesDP"), Boolean))
End If
If dtToReturn.Rows(0)("Profilnr") Is System.DBNull.Value Then
m_iProfilnr = SqlInt32.Null
Else
m_iProfilnr = New SqlInt32(CType(dtToReturn.Rows(0)("Profilnr"), 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_dpinstanz::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: Select method. This method will Select one existing row from the database, based on the Primary Key.
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iNreintrag</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iNreintrag</LI>
' /// <LI>iMitarbeiternr</LI>
' /// <LI>sDokumentpaketnummern</LI>
' /// <LI>sHacken</LI>
' /// <LI>iNrpar00</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>iDokumentpaketnr</LI>
' /// <LI>bIndividuellesDP</LI>
' /// <LI>iProfilnr</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.[edex_pr_edex_dpinstanz_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("edex_dpinstanz")
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
sdaAdapter.Fill(dtToReturn)
m_iErrorCode = 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 'edex_pr_edex_dpinstanz_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iNreintrag = New SqlInt32(CType(dtToReturn.Rows(0)("nreintrag"), Integer))
If dtToReturn.Rows(0)("mitarbeiternr") Is System.DBNull.Value Then
m_iMitarbeiternr = SqlInt32.Null
Else
m_iMitarbeiternr = New SqlInt32(CType(dtToReturn.Rows(0)("mitarbeiternr"), Integer))
End If
If dtToReturn.Rows(0)("dokumentpaketnummern") Is System.DBNull.Value Then
m_sDokumentpaketnummern = SqlString.Null
Else
m_sDokumentpaketnummern = New SqlString(CType(dtToReturn.Rows(0)("dokumentpaketnummern"), String))
End If
If dtToReturn.Rows(0)("hacken") Is System.DBNull.Value Then
m_sHacken = SqlString.Null
Else
m_sHacken = New SqlString(CType(dtToReturn.Rows(0)("hacken"), String))
End If
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)("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)("Dokumentpaketnr") Is System.DBNull.Value Then
m_iDokumentpaketnr = SqlInt32.Null
Else
m_iDokumentpaketnr = New SqlInt32(CType(dtToReturn.Rows(0)("Dokumentpaketnr"), Integer))
End If
If dtToReturn.Rows(0)("IndividuellesDP") Is System.DBNull.Value Then
m_bIndividuellesDP = SqlBoolean.Null
Else
m_bIndividuellesDP = New SqlBoolean(CType(dtToReturn.Rows(0)("IndividuellesDP"), Boolean))
End If
If dtToReturn.Rows(0)("Profilnr") Is System.DBNull.Value Then
m_iProfilnr = SqlInt32.Null
Else
m_iProfilnr = New SqlInt32(CType(dtToReturn.Rows(0)("Profilnr"), 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_dpinstanz::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.[edex_pr_edex_dpinstanz_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("edex_dpinstanz")
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 'edex_pr_edex_dpinstanz_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_dpinstanz::SelectAll::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
#Region " Class Property Declarations "
Public Property [iNreintrag]() As SqlInt32
Get
Return m_iNreintrag
End Get
Set(ByVal Value As SqlInt32)
Dim iNreintragTmp As SqlInt32 = Value
If iNreintragTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iNreintrag", "iNreintrag can't be NULL")
End If
m_iNreintrag = Value
End Set
End Property
Public Property [iMitarbeiternr]() As SqlInt32
Get
Return m_iMitarbeiternr
End Get
Set(ByVal Value As SqlInt32)
m_iMitarbeiternr = Value
End Set
End Property
Public Property [sDokumentpaketnummern]() As SqlString
Get
Return m_sDokumentpaketnummern
End Get
Set(ByVal Value As SqlString)
m_sDokumentpaketnummern = Value
End Set
End Property
Public Property [sHacken]() As SqlString
Get
Return m_sHacken
End Get
Set(ByVal Value As SqlString)
m_sHacken = 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 [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 [iDokumentpaketnr]() As SqlInt32
Get
Return m_iDokumentpaketnr
End Get
Set(ByVal Value As SqlInt32)
m_iDokumentpaketnr = Value
End Set
End Property
Public Property [bIndividuellesDP]() As SqlBoolean
Get
Return m_bIndividuellesDP
End Get
Set(ByVal Value As SqlBoolean)
m_bIndividuellesDP = Value
End Set
End Property
Public Property [iProfilnr]() As SqlInt32
Get
Return m_iProfilnr
End Get
Set(ByVal Value As SqlInt32)
m_iProfilnr = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,511 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'edex_sb_notizen'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Montag, 31. Oktober 2005, 13:44: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 'edex_sb_notizen'.
' /// </summary>
Public Class clsEdex_sb_notizen
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iMandantnr, m_iSerienbriefnr, m_iNotiznr As SqlInt32
Private m_sNotiz, m_sBetreff 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>iSerienbriefnr. May be SqlInt32.Null</LI>
' /// <LI>sBetreff. May be SqlString.Null</LI>
' /// <LI>sNotiz. May be SqlString.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iNotiznr</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_edex_sb_notizen_Insert]"
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, True, 10, 0, "", DataRowVersion.Proposed, m_iSerienbriefnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbetreff", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBetreff))
scmCmdToExecute.Parameters.Add(New SqlParameter("@snotiz", SqlDbType.VarChar, 2048, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNotiz))
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("@inotiznr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iNotiznr))
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_iNotiznr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@inotiznr").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_notizen_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_notizen::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>iNotiznr</LI>
' /// <LI>iSerienbriefnr. May be SqlInt32.Null</LI>
' /// <LI>sBetreff. May be SqlString.Null</LI>
' /// <LI>sNotiz. May be SqlString.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// </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_notizen_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inotiznr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNotiznr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iserienbriefnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSerienbriefnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbetreff", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBetreff))
scmCmdToExecute.Parameters.Add(New SqlParameter("@snotiz", SqlDbType.VarChar, 2048, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNotiz))
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 = 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_notizen_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_notizen::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>iNotiznr</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_edex_sb_notizen_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inotiznr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNotiznr))
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_notizen_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_notizen::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>iNotiznr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iNotiznr</LI>
' /// <LI>iSerienbriefnr</LI>
' /// <LI>sBetreff</LI>
' /// <LI>sNotiz</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_edex_sb_notizen_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("edex_sb_notizen")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@inotiznr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNotiznr))
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_notizen_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iNotiznr = New SqlInt32(CType(dtToReturn.Rows(0)("notiznr"), Integer))
If dtToReturn.Rows(0)("serienbriefnr") Is System.DBNull.Value Then
m_iSerienbriefnr = SqlInt32.Null
Else
m_iSerienbriefnr = New SqlInt32(CType(dtToReturn.Rows(0)("serienbriefnr"), Integer))
End If
If dtToReturn.Rows(0)("betreff") Is System.DBNull.Value Then
m_sBetreff = SqlString.Null
Else
m_sBetreff = New SqlString(CType(dtToReturn.Rows(0)("betreff"), String))
End If
If dtToReturn.Rows(0)("notiz") Is System.DBNull.Value Then
m_sNotiz = SqlString.Null
Else
m_sNotiz = New SqlString(CType(dtToReturn.Rows(0)("notiz"), String))
End If
If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then
m_iMandantnr = SqlInt32.Null
Else
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
End If
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
m_bAktiv = SqlBoolean.Null
Else
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
End If
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
m_daErstellt_am = SqlDateTime.Null
Else
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
End If
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
m_daMutiert_am = SqlDateTime.Null
Else
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
End If
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
m_iMutierer = SqlInt32.Null
Else
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
End If
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEdex_sb_notizen::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_edex_sb_notizen_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("edex_sb_notizen")
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_notizen_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_notizen::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 [iNotiznr]() As SqlInt32
Get
Return m_iNotiznr
End Get
Set(ByVal Value As SqlInt32)
Dim iNotiznrTmp As SqlInt32 = Value
If iNotiznrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iNotiznr", "iNotiznr can't be NULL")
End If
m_iNotiznr = Value
End Set
End Property
Public Property [iSerienbriefnr]() As SqlInt32
Get
Return m_iSerienbriefnr
End Get
Set(ByVal Value As SqlInt32)
m_iSerienbriefnr = Value
End Set
End Property
Public Property [sBetreff]() As SqlString
Get
Return m_sBetreff
End Get
Set(ByVal Value As SqlString)
m_sBetreff = Value
End Set
End Property
Public Property [sNotiz]() As SqlString
Get
Return m_sNotiz
End Get
Set(ByVal Value As SqlString)
m_sNotiz = 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,540 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'edex_sb_partnerliste'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 7. September 2005, 08:30:57
' // 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_partnerliste'.
' /// </summary>
Public Class clsEdex_sb_partnerliste
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_blobEmpfaenger As SqlBinary
Private m_iVerwendung, m_iVerwendungcd, m_iPartnerlistenr, m_iMutierer As SqlInt32
Private m_sBeschreibung, m_sBezeichnung As SqlString
#End Region
' /// <summary>
' /// Purpose: Class constructor.
' /// </summary>
Public Sub New()
' // Nothing for now.
End Sub
' /// <summary>
' /// Purpose: Insert method. This method will insert one new row into the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. 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>iVerwendung. May be SqlInt32.Null</LI>
' /// <LI>iVerwendungcd. May be SqlInt32.Null</LI>
' /// <LI>blobEmpfaenger. May be SqlBinary.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iPartnerlistenr</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_edex_sb_partnerliste_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("@sbeschreibung", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
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("@iverwendung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerwendung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iverwendungcd", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerwendungcd))
Dim iLength As Integer = 0
If Not m_blobEmpfaenger.IsNull Then
iLength = m_blobEmpfaenger.Length
End If
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobempfaenger", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobEmpfaenger))
scmCmdToExecute.Parameters.Add(new SqlParameter("@ipartnerlistenr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iPartnerlistenr))
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_iPartnerlistenr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@ipartnerlistenr").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_partnerliste_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_partnerliste::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>iPartnerlistenr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. 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>iVerwendung. May be SqlInt32.Null</LI>
' /// <LI>iVerwendungcd. May be SqlInt32.Null</LI>
' /// <LI>blobEmpfaenger. 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_edex_sb_partnerliste_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ipartnerlistenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPartnerlistenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
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("@iverwendung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerwendung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iverwendungcd", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerwendungcd))
Dim iLength As Integer = 0
If Not m_blobEmpfaenger.IsNull Then
iLength = m_blobEmpfaenger.Length
End If
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobempfaenger", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobEmpfaenger))
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_partnerliste_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_partnerliste::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>iPartnerlistenr</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_edex_sb_partnerliste_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ipartnerlistenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPartnerlistenr))
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_partnerliste_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_partnerliste::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>iPartnerlistenr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iPartnerlistenr</LI>
' /// <LI>sBezeichnung</LI>
' /// <LI>sBeschreibung</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>bAktiv</LI>
' /// <LI>iVerwendung</LI>
' /// <LI>iVerwendungcd</LI>
' /// <LI>blobEmpfaenger</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_partnerliste_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("edex_sb_partnerliste")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@ipartnerlistenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPartnerlistenr))
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_partnerliste_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iPartnerlistenr = New SqlInt32(CType(dtToReturn.Rows(0)("partnerlistenr"), 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)("beschreibung") Is System.DBNull.Value Then
m_sBeschreibung = SqlString.Null
Else
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("beschreibung"), 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)("verwendung") Is System.DBNull.Value Then
m_iVerwendung = SqlInt32.Null
Else
m_iVerwendung = New SqlInt32(CType(dtToReturn.Rows(0)("verwendung"), Integer))
End If
If dtToReturn.Rows(0)("verwendungcd") Is System.DBNull.Value Then
m_iVerwendungcd = SqlInt32.Null
Else
m_iVerwendungcd = New SqlInt32(CType(dtToReturn.Rows(0)("verwendungcd"), Integer))
End If
If dtToReturn.Rows(0)("empfaenger") Is System.DBNull.Value Then
m_blobEmpfaenger = SqlBinary.Null
Else
m_blobEmpfaenger = New SqlBinary(CType(dtToReturn.Rows(0)("empfaenger"), 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("clsEdex_sb_partnerliste::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_edex_sb_partnerliste_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("edex_sb_partnerliste")
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_partnerliste_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_partnerliste::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 [iPartnerlistenr]() As SqlInt32
Get
Return m_iPartnerlistenr
End Get
Set(ByVal Value As SqlInt32)
Dim iPartnerlistenrTmp As SqlInt32 = Value
If iPartnerlistenrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iPartnerlistenr", "iPartnerlistenr can't be NULL")
End If
m_iPartnerlistenr = 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 [sBeschreibung]() As SqlString
Get
Return m_sBeschreibung
End Get
Set(ByVal Value As SqlString)
m_sBeschreibung = 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 [iVerwendung]() As SqlInt32
Get
Return m_iVerwendung
End Get
Set(ByVal Value As SqlInt32)
m_iVerwendung = Value
End Set
End Property
Public Property [iVerwendungcd]() As SqlInt32
Get
Return m_iVerwendungcd
End Get
Set(ByVal Value As SqlInt32)
m_iVerwendungcd = Value
End Set
End Property
Public Property [blobEmpfaenger]() As SqlBinary
Get
Return m_blobEmpfaenger
End Get
Set(ByVal Value As SqlBinary)
m_blobEmpfaenger = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,871 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'edex_sb_serienbrief'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 18. Oktober 2005, 23:08:22
' // 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_daTermin, m_daArchivdatum, m_daMutiert_am, m_daErstellt_am, m_daDokumentdatum As SqlDateTime
Private m_iTreewidth, m_iFehlerhaft, m_iDokumenttypnr, m_iWindowwidth, m_iWindowheight, m_iBestaetigt, m_iAusgeloest, m_iGedruckt, m_iInBearbeitung, m_iErstellt, m_iStatus, m_iPostzustellung, m_iUnterschriftlinks, m_iUnterschriftrechts, m_iTeam, m_iMutierer, m_iSerienbriefnr, m_iVerantwortlich, m_iZustaendig 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>
' /// </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, 23, 3, "", 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, 23, 3, "", DataRowVersion.Proposed, m_daArchivdatum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@datermin", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", 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, 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("@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("@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>
' /// </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, 23, 3, "", 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, 23, 3, "", DataRowVersion.Proposed, m_daArchivdatum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@datermin", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", 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, 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("@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("@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>
Public Overrides 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>
' /// </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
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>
Public Overrides 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
#End Region
End Class
End Namespace