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.
811 lines
34 KiB
811 lines
34 KiB
' ///////////////////////////////////////////////////////////////////////////
|
|
' // Description: Data Access class for the table 'etparn'
|
|
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 26. April 2005, 15:11:43
|
|
' // Because the Base Class already implements IDispose, this class doesn't.
|
|
' ///////////////////////////////////////////////////////////////////////////
|
|
Imports System
|
|
Imports System.Data
|
|
Imports System.Data.SqlTypes
|
|
Imports System.Data.SqlClient
|
|
|
|
Namespace edokadb
|
|
' /// <summary>
|
|
' /// Purpose: Data Access class for the table 'etparn'.
|
|
' /// </summary>
|
|
Public Class clsEtparn
|
|
Inherits clsDBInteractionBase
|
|
|
|
#Region " Class Member Declarations "
|
|
|
|
Private m_sBEGEB00, m_sBEBGO00, m_sCDMUTER, m_sCDIPA00, m_sCDAHV00, m_sSAREC00, m_sBEBERAL As SqlString
|
|
Private m_daTSMUT00, m_daDMGEB00, m_daDMERF00, m_daDMTOD00 As SqlDateTime
|
|
Private m_iNRBER01, m_iNRPAR00, m_iNRBER02 As SqlInt32
|
|
Private m_siNRABE00, m_siNRBVG00, m_siDMTODJJ, m_siNRSEX00, m_siNRVRN00, m_siDMGEBJJ, m_siNRABD00, m_siNRERW00, m_siNRZVS00, m_siNRGST00 As SqlInt16
|
|
|
|
#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>iNRPAR00</LI>
|
|
' /// <LI>siNRVRN00</LI>
|
|
' /// <LI>daDMGEB00. May be SqlDateTime.Null</LI>
|
|
' /// <LI>siDMGEBJJ</LI>
|
|
' /// <LI>sBEGEB00</LI>
|
|
' /// <LI>sBEBGO00</LI>
|
|
' /// <LI>daDMTOD00. May be SqlDateTime.Null</LI>
|
|
' /// <LI>siDMTODJJ</LI>
|
|
' /// <LI>siNRSEX00</LI>
|
|
' /// <LI>siNRZVS00</LI>
|
|
' /// <LI>siNRGST00</LI>
|
|
' /// <LI>siNRABD00</LI>
|
|
' /// <LI>sBEBERAL</LI>
|
|
' /// <LI>iNRBER01</LI>
|
|
' /// <LI>iNRBER02</LI>
|
|
' /// <LI>siNRERW00</LI>
|
|
' /// <LI>sCDAHV00</LI>
|
|
' /// <LI>siNRBVG00</LI>
|
|
' /// <LI>siNRABE00</LI>
|
|
' /// <LI>sCDIPA00</LI>
|
|
' /// <LI>sCDMUTER</LI>
|
|
' /// <LI>daTSMUT00</LI>
|
|
' /// <LI>daDMERF00</LI>
|
|
' /// <LI>sSAREC00</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_etparn_Insert]"
|
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
|
|
|
' // Use base class' connection object
|
|
scmCmdToExecute.Connection = m_scoMainConnection
|
|
|
|
Try
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPAR00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRPAR00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRVRN00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRVRN00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMGEB00", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDMGEB00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@siDMGEBJJ", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siDMGEBJJ))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEGEB00", SqlDbType.Char, 35, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBEGEB00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEBGO00", SqlDbType.Char, 35, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBEBGO00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMTOD00", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDMTOD00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@siDMTODJJ", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siDMTODJJ))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRSEX00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRSEX00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRZVS00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRZVS00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRGST00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRGST00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRABD00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRABD00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEBERAL", SqlDbType.Char, 35, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBEBERAL))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRBER01", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRBER01))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRBER02", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRBER02))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRERW00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRERW00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDAHV00", SqlDbType.Char, 11, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDAHV00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRBVG00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRBVG00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRABE00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRABE00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDIPA00", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDIPA00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDMUTER", SqlDbType.Char, 8, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDMUTER))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daTSMUT00", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daTSMUT00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMERF00", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daDMERF00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAREC00", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sSAREC00))
|
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
|
|
|
If m_bMainConnectionIsCreatedLocal Then
|
|
' // Open connection.
|
|
m_scoMainConnection.Open()
|
|
Else
|
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
|
End If
|
|
End If
|
|
|
|
' // Execute query.
|
|
scmCmdToExecute.ExecuteNonQuery()
|
|
m_iErrorCode = 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_etparn_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("clsEtparn::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>iNRPAR00</LI>
|
|
' /// <LI>siNRVRN00</LI>
|
|
' /// <LI>daDMGEB00. May be SqlDateTime.Null</LI>
|
|
' /// <LI>siDMGEBJJ</LI>
|
|
' /// <LI>sBEGEB00</LI>
|
|
' /// <LI>sBEBGO00</LI>
|
|
' /// <LI>daDMTOD00. May be SqlDateTime.Null</LI>
|
|
' /// <LI>siDMTODJJ</LI>
|
|
' /// <LI>siNRSEX00</LI>
|
|
' /// <LI>siNRZVS00</LI>
|
|
' /// <LI>siNRGST00</LI>
|
|
' /// <LI>siNRABD00</LI>
|
|
' /// <LI>sBEBERAL</LI>
|
|
' /// <LI>iNRBER01</LI>
|
|
' /// <LI>iNRBER02</LI>
|
|
' /// <LI>siNRERW00</LI>
|
|
' /// <LI>sCDAHV00</LI>
|
|
' /// <LI>siNRBVG00</LI>
|
|
' /// <LI>siNRABE00</LI>
|
|
' /// <LI>sCDIPA00</LI>
|
|
' /// <LI>sCDMUTER</LI>
|
|
' /// <LI>daTSMUT00</LI>
|
|
' /// <LI>daDMERF00</LI>
|
|
' /// <LI>sSAREC00</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_etparn_Update]"
|
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
|
|
|
' // Use base class' connection object
|
|
scmCmdToExecute.Connection = m_scoMainConnection
|
|
|
|
Try
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPAR00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRPAR00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRVRN00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRVRN00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMGEB00", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDMGEB00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@siDMGEBJJ", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siDMGEBJJ))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEGEB00", SqlDbType.Char, 35, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBEGEB00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEBGO00", SqlDbType.Char, 35, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBEBGO00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMTOD00", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDMTOD00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@siDMTODJJ", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siDMTODJJ))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRSEX00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRSEX00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRZVS00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRZVS00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRGST00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRGST00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRABD00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRABD00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEBERAL", SqlDbType.Char, 35, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBEBERAL))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRBER01", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRBER01))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRBER02", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRBER02))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRERW00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRERW00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDAHV00", SqlDbType.Char, 11, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDAHV00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRBVG00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRBVG00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRABE00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRABE00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDIPA00", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDIPA00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDMUTER", SqlDbType.Char, 8, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDMUTER))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daTSMUT00", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daTSMUT00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMERF00", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daDMERF00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAREC00", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sSAREC00))
|
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
|
|
|
If m_bMainConnectionIsCreatedLocal Then
|
|
' // Open connection.
|
|
m_scoMainConnection.Open()
|
|
Else
|
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
|
End If
|
|
End If
|
|
|
|
' // Execute query.
|
|
scmCmdToExecute.ExecuteNonQuery()
|
|
m_iErrorCode = 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_etparn_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("clsEtparn::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>iNRPAR00</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_etparn_Delete]"
|
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
|
|
|
' // Use base class' connection object
|
|
scmCmdToExecute.Connection = m_scoMainConnection
|
|
|
|
Try
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPAR00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRPAR00))
|
|
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_etparn_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("clsEtparn::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>iNRPAR00</LI>
|
|
' /// </UL>
|
|
' /// Properties set after a succesful call of this method:
|
|
' /// <UL>
|
|
' /// <LI>iErrorCode</LI>
|
|
' /// <LI>iNRPAR00</LI>
|
|
' /// <LI>siNRVRN00</LI>
|
|
' /// <LI>daDMGEB00</LI>
|
|
' /// <LI>siDMGEBJJ</LI>
|
|
' /// <LI>sBEGEB00</LI>
|
|
' /// <LI>sBEBGO00</LI>
|
|
' /// <LI>daDMTOD00</LI>
|
|
' /// <LI>siDMTODJJ</LI>
|
|
' /// <LI>siNRSEX00</LI>
|
|
' /// <LI>siNRZVS00</LI>
|
|
' /// <LI>siNRGST00</LI>
|
|
' /// <LI>siNRABD00</LI>
|
|
' /// <LI>sBEBERAL</LI>
|
|
' /// <LI>iNRBER01</LI>
|
|
' /// <LI>iNRBER02</LI>
|
|
' /// <LI>siNRERW00</LI>
|
|
' /// <LI>sCDAHV00</LI>
|
|
' /// <LI>siNRBVG00</LI>
|
|
' /// <LI>siNRABE00</LI>
|
|
' /// <LI>sCDIPA00</LI>
|
|
' /// <LI>sCDMUTER</LI>
|
|
' /// <LI>daTSMUT00</LI>
|
|
' /// <LI>daDMERF00</LI>
|
|
' /// <LI>sSAREC00</LI>
|
|
' /// </UL>
|
|
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
|
|
' /// </remarks>
|
|
Overrides Public Function SelectOne() As DataTable
|
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
|
scmCmdToExecute.CommandText = "dbo.[pr_etparn_SelectOne]"
|
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
|
Dim dtToReturn As DataTable = new DataTable("etparn")
|
|
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
|
|
|
' // Use base class' connection object
|
|
scmCmdToExecute.Connection = m_scoMainConnection
|
|
|
|
Try
|
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iNRPAR00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRPAR00))
|
|
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_etparn_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
|
End If
|
|
|
|
If dtToReturn.Rows.Count > 0 Then
|
|
m_iNRPAR00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRPAR00"), Integer))
|
|
m_siNRVRN00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRVRN00"), Short))
|
|
If dtToReturn.Rows(0)("DMGEB00") Is System.DBNull.Value Then
|
|
m_daDMGEB00 = SqlDateTime.Null
|
|
Else
|
|
m_daDMGEB00 = New SqlDateTime(CType(dtToReturn.Rows(0)("DMGEB00"), Date))
|
|
End If
|
|
m_siDMGEBJJ = New SqlInt16(CType(dtToReturn.Rows(0)("DMGEBJJ"), Short))
|
|
m_sBEGEB00 = New SqlString(CType(dtToReturn.Rows(0)("BEGEB00"), String))
|
|
m_sBEBGO00 = New SqlString(CType(dtToReturn.Rows(0)("BEBGO00"), String))
|
|
If dtToReturn.Rows(0)("DMTOD00") Is System.DBNull.Value Then
|
|
m_daDMTOD00 = SqlDateTime.Null
|
|
Else
|
|
m_daDMTOD00 = New SqlDateTime(CType(dtToReturn.Rows(0)("DMTOD00"), Date))
|
|
End If
|
|
m_siDMTODJJ = New SqlInt16(CType(dtToReturn.Rows(0)("DMTODJJ"), Short))
|
|
m_siNRSEX00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRSEX00"), Short))
|
|
m_siNRZVS00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRZVS00"), Short))
|
|
m_siNRGST00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRGST00"), Short))
|
|
m_siNRABD00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRABD00"), Short))
|
|
m_sBEBERAL = New SqlString(CType(dtToReturn.Rows(0)("BEBERAL"), String))
|
|
m_iNRBER01 = New SqlInt32(CType(dtToReturn.Rows(0)("NRBER01"), Integer))
|
|
m_iNRBER02 = New SqlInt32(CType(dtToReturn.Rows(0)("NRBER02"), Integer))
|
|
m_siNRERW00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRERW00"), Short))
|
|
m_sCDAHV00 = New SqlString(CType(dtToReturn.Rows(0)("CDAHV00"), String))
|
|
m_siNRBVG00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRBVG00"), Short))
|
|
m_siNRABE00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRABE00"), Short))
|
|
m_sCDIPA00 = New SqlString(CType(dtToReturn.Rows(0)("CDIPA00"), String))
|
|
m_sCDMUTER = New SqlString(CType(dtToReturn.Rows(0)("CDMUTER"), String))
|
|
m_daTSMUT00 = New SqlDateTime(CType(dtToReturn.Rows(0)("TSMUT00"), Date))
|
|
m_daDMERF00 = New SqlDateTime(CType(dtToReturn.Rows(0)("DMERF00"), Date))
|
|
m_sSAREC00 = New SqlString(CType(dtToReturn.Rows(0)("SAREC00"), String))
|
|
End If
|
|
Return dtToReturn
|
|
Catch ex As Exception
|
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
|
Throw New Exception("clsEtparn::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_etparn_SelectAll]"
|
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
|
Dim dtToReturn As DataTable = New DataTable("etparn")
|
|
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_etparn_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("clsEtparn::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 [iNRPAR00]() As SqlInt32
|
|
Get
|
|
Return m_iNRPAR00
|
|
End Get
|
|
Set(ByVal Value As SqlInt32)
|
|
Dim iNRPAR00Tmp As SqlInt32 = Value
|
|
If iNRPAR00Tmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("iNRPAR00", "iNRPAR00 can't be NULL")
|
|
End If
|
|
m_iNRPAR00 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [siNRVRN00]() As SqlInt16
|
|
Get
|
|
Return m_siNRVRN00
|
|
End Get
|
|
Set(ByVal Value As SqlInt16)
|
|
Dim siNRVRN00Tmp As SqlInt16 = Value
|
|
If siNRVRN00Tmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("siNRVRN00", "siNRVRN00 can't be NULL")
|
|
End If
|
|
m_siNRVRN00 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [daDMGEB00]() As SqlDateTime
|
|
Get
|
|
Return m_daDMGEB00
|
|
End Get
|
|
Set(ByVal Value As SqlDateTime)
|
|
m_daDMGEB00 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [siDMGEBJJ]() As SqlInt16
|
|
Get
|
|
Return m_siDMGEBJJ
|
|
End Get
|
|
Set(ByVal Value As SqlInt16)
|
|
Dim siDMGEBJJTmp As SqlInt16 = Value
|
|
If siDMGEBJJTmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("siDMGEBJJ", "siDMGEBJJ can't be NULL")
|
|
End If
|
|
m_siDMGEBJJ = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [sBEGEB00]() As SqlString
|
|
Get
|
|
Return m_sBEGEB00
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
Dim sBEGEB00Tmp As SqlString = Value
|
|
If sBEGEB00Tmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("sBEGEB00", "sBEGEB00 can't be NULL")
|
|
End If
|
|
m_sBEGEB00 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [sBEBGO00]() As SqlString
|
|
Get
|
|
Return m_sBEBGO00
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
Dim sBEBGO00Tmp As SqlString = Value
|
|
If sBEBGO00Tmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("sBEBGO00", "sBEBGO00 can't be NULL")
|
|
End If
|
|
m_sBEBGO00 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [daDMTOD00]() As SqlDateTime
|
|
Get
|
|
Return m_daDMTOD00
|
|
End Get
|
|
Set(ByVal Value As SqlDateTime)
|
|
m_daDMTOD00 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [siDMTODJJ]() As SqlInt16
|
|
Get
|
|
Return m_siDMTODJJ
|
|
End Get
|
|
Set(ByVal Value As SqlInt16)
|
|
Dim siDMTODJJTmp As SqlInt16 = Value
|
|
If siDMTODJJTmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("siDMTODJJ", "siDMTODJJ can't be NULL")
|
|
End If
|
|
m_siDMTODJJ = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [siNRSEX00]() As SqlInt16
|
|
Get
|
|
Return m_siNRSEX00
|
|
End Get
|
|
Set(ByVal Value As SqlInt16)
|
|
Dim siNRSEX00Tmp As SqlInt16 = Value
|
|
If siNRSEX00Tmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("siNRSEX00", "siNRSEX00 can't be NULL")
|
|
End If
|
|
m_siNRSEX00 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [siNRZVS00]() As SqlInt16
|
|
Get
|
|
Return m_siNRZVS00
|
|
End Get
|
|
Set(ByVal Value As SqlInt16)
|
|
Dim siNRZVS00Tmp As SqlInt16 = Value
|
|
If siNRZVS00Tmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("siNRZVS00", "siNRZVS00 can't be NULL")
|
|
End If
|
|
m_siNRZVS00 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [siNRGST00]() As SqlInt16
|
|
Get
|
|
Return m_siNRGST00
|
|
End Get
|
|
Set(ByVal Value As SqlInt16)
|
|
Dim siNRGST00Tmp As SqlInt16 = Value
|
|
If siNRGST00Tmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("siNRGST00", "siNRGST00 can't be NULL")
|
|
End If
|
|
m_siNRGST00 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [siNRABD00]() As SqlInt16
|
|
Get
|
|
Return m_siNRABD00
|
|
End Get
|
|
Set(ByVal Value As SqlInt16)
|
|
Dim siNRABD00Tmp As SqlInt16 = Value
|
|
If siNRABD00Tmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("siNRABD00", "siNRABD00 can't be NULL")
|
|
End If
|
|
m_siNRABD00 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [sBEBERAL]() As SqlString
|
|
Get
|
|
Return m_sBEBERAL
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
Dim sBEBERALTmp As SqlString = Value
|
|
If sBEBERALTmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("sBEBERAL", "sBEBERAL can't be NULL")
|
|
End If
|
|
m_sBEBERAL = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [iNRBER01]() As SqlInt32
|
|
Get
|
|
Return m_iNRBER01
|
|
End Get
|
|
Set(ByVal Value As SqlInt32)
|
|
Dim iNRBER01Tmp As SqlInt32 = Value
|
|
If iNRBER01Tmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("iNRBER01", "iNRBER01 can't be NULL")
|
|
End If
|
|
m_iNRBER01 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [iNRBER02]() As SqlInt32
|
|
Get
|
|
Return m_iNRBER02
|
|
End Get
|
|
Set(ByVal Value As SqlInt32)
|
|
Dim iNRBER02Tmp As SqlInt32 = Value
|
|
If iNRBER02Tmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("iNRBER02", "iNRBER02 can't be NULL")
|
|
End If
|
|
m_iNRBER02 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [siNRERW00]() As SqlInt16
|
|
Get
|
|
Return m_siNRERW00
|
|
End Get
|
|
Set(ByVal Value As SqlInt16)
|
|
Dim siNRERW00Tmp As SqlInt16 = Value
|
|
If siNRERW00Tmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("siNRERW00", "siNRERW00 can't be NULL")
|
|
End If
|
|
m_siNRERW00 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [sCDAHV00]() As SqlString
|
|
Get
|
|
Return m_sCDAHV00
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
Dim sCDAHV00Tmp As SqlString = Value
|
|
If sCDAHV00Tmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("sCDAHV00", "sCDAHV00 can't be NULL")
|
|
End If
|
|
m_sCDAHV00 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [siNRBVG00]() As SqlInt16
|
|
Get
|
|
Return m_siNRBVG00
|
|
End Get
|
|
Set(ByVal Value As SqlInt16)
|
|
Dim siNRBVG00Tmp As SqlInt16 = Value
|
|
If siNRBVG00Tmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("siNRBVG00", "siNRBVG00 can't be NULL")
|
|
End If
|
|
m_siNRBVG00 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [siNRABE00]() As SqlInt16
|
|
Get
|
|
Return m_siNRABE00
|
|
End Get
|
|
Set(ByVal Value As SqlInt16)
|
|
Dim siNRABE00Tmp As SqlInt16 = Value
|
|
If siNRABE00Tmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("siNRABE00", "siNRABE00 can't be NULL")
|
|
End If
|
|
m_siNRABE00 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [sCDIPA00]() As SqlString
|
|
Get
|
|
Return m_sCDIPA00
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
Dim sCDIPA00Tmp As SqlString = Value
|
|
If sCDIPA00Tmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("sCDIPA00", "sCDIPA00 can't be NULL")
|
|
End If
|
|
m_sCDIPA00 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [sCDMUTER]() As SqlString
|
|
Get
|
|
Return m_sCDMUTER
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
Dim sCDMUTERTmp As SqlString = Value
|
|
If sCDMUTERTmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("sCDMUTER", "sCDMUTER can't be NULL")
|
|
End If
|
|
m_sCDMUTER = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [daTSMUT00]() As SqlDateTime
|
|
Get
|
|
Return m_daTSMUT00
|
|
End Get
|
|
Set(ByVal Value As SqlDateTime)
|
|
Dim daTSMUT00Tmp As SqlDateTime = Value
|
|
If daTSMUT00Tmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("daTSMUT00", "daTSMUT00 can't be NULL")
|
|
End If
|
|
m_daTSMUT00 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [daDMERF00]() As SqlDateTime
|
|
Get
|
|
Return m_daDMERF00
|
|
End Get
|
|
Set(ByVal Value As SqlDateTime)
|
|
Dim daDMERF00Tmp As SqlDateTime = Value
|
|
If daDMERF00Tmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("daDMERF00", "daDMERF00 can't be NULL")
|
|
End If
|
|
m_daDMERF00 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [sSAREC00]() As SqlString
|
|
Get
|
|
Return m_sSAREC00
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
Dim sSAREC00Tmp As SqlString = Value
|
|
If sSAREC00Tmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("sSAREC00", "sSAREC00 can't be NULL")
|
|
End If
|
|
m_sSAREC00 = Value
|
|
End Set
|
|
End Property
|
|
|
|
#End Region
|
|
|
|
End Class
|
|
End Namespace
|