You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

564 lines
21 KiB

' ///////////////////////////////////////////////////////////////////////////
' // 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