' /////////////////////////////////////////////////////////////////////////// ' // Description: Data Access class for the table 'edoka_etpar0' ' // Generated by LLBLGen v1.21.2003.712 Final on: Mittwoch, 27. Oktober 2010, 14:07: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 ''' ''' Purpose: Data Access class for the table 'edoka_etpar0'. ''' Public Class clsEdoka_etpar0 Inherits clsDBInteractionBase #Region " Class Member Declarations " Private m_sCDDOMKT, m_sSAREC00, m_sCDMUTER, m_sSAINT00, m_sSAKTRNA, m_sSAWBG00, m_sCDKTRNA, m_sCDPAW00 As SqlString Private m_daTSMUT00, m_daValidto, m_daDMERF00, m_daDMPAREO, m_daDMPARVN, m_daDMKTRNA, m_daDMPARBI, m_daDMPARZZ As SqlDateTime Private m_iNRBEU01, m_iNRBEE00, m_iNRBEU02, m_iNRPAR00 As SqlInt32 Private m_siNRSPA00, m_siNRGSR00, m_siNRDOM00, m_siNRRST00, m_siNRERF00, m_siNRAFG00, m_siNRVRN00, m_siNRDOMGE, m_siNRNAT02, m_siNRNAT01, m_siNRBON00, m_siNRDOMRI, m_siNRBBG00 As SqlInt16 Private m_sCDPARSQ, m_sBKPARSQ, m_sBKPAR00 As SqlString #End Region ''' ''' Purpose: Class constructor. ''' Public Sub New() ' // Nothing for now. End Sub ''' ''' Purpose: Insert method. This method will insert one new row into the database. ''' ''' True if succeeded, otherwise an Exception is thrown. ''' ''' Properties needed for this method: ''' ''' Properties set after a succesful call of this method: ''' ''' Overrides Public Function Insert() As Boolean Dim scmCmdToExecute As SqlCommand = New SqlCommand() scmCmdToExecute.CommandText = "dbo.[pr_edoka_etpar0_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("@sCDPAW00", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDPAW00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@sBKPAR00", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBKPAR00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMPAREO", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_daDMPAREO)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRERF00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRERF00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMPARVN", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daDMPARVN)) scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMPARBI", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daDMPARBI)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRAFG00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRAFG00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMPARZZ", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daDMPARZZ)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRRST00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRRST00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRSPA00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRSPA00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRGSR00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRGSR00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRBON00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRBON00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRBBG00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRBBG00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRDOMGE", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRDOMGE)) scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDDOMKT", SqlDbType.Char, 2, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDDOMKT)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRDOM00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRDOM00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRDOMRI", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRDOMRI)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRNAT01", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRNAT01)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRNAT02", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRNAT02)) scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAWBG00", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sSAWBG00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRBEE00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRBEE00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAINT00", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sSAINT00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRBEU01", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRBEU01)) scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRBEU02", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRBEU02)) scmCmdToExecute.Parameters.Add(New SqlParameter("@sBKPARSQ", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBKPARSQ)) scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDPARSQ", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDPARSQ)) 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, 0, 0, "", DataRowVersion.Proposed, m_daTSMUT00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMERF00", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 0, 0, "", 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("@daDMKTRNA", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daDMKTRNA)) scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDKTRNA", SqlDbType.Char, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDKTRNA)) scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAKTRNA", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sSAKTRNA)) scmCmdToExecute.Parameters.Add(New SqlParameter("@davalidto", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daValidto)) 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. m_iRowsAffected = 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_edoka_etpar0_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("clsEdoka_etpar0::Insert::Error occured.", ex) Finally If m_bMainConnectionIsCreatedLocal Then ' // Close connection. m_scoMainConnection.Close() End If scmCmdToExecute.Dispose() End Try End Function ''' ''' Purpose: Update method. This method will Update one existing row in the database. ''' ''' True if succeeded, otherwise an Exception is thrown. ''' ''' Properties needed for this method: ''' ''' Properties set after a succesful call of this method: ''' ''' Overrides Public Function Update() As Boolean Dim scmCmdToExecute As SqlCommand = New SqlCommand() scmCmdToExecute.CommandText = "dbo.[pr_edoka_etpar0_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("@sCDPAW00", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDPAW00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@sBKPAR00", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBKPAR00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMPAREO", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_daDMPAREO)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRERF00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRERF00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMPARVN", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daDMPARVN)) scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMPARBI", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daDMPARBI)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRAFG00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRAFG00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMPARZZ", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daDMPARZZ)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRRST00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRRST00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRSPA00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRSPA00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRGSR00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRGSR00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRBON00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRBON00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRBBG00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRBBG00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRDOMGE", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRDOMGE)) scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDDOMKT", SqlDbType.Char, 2, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDDOMKT)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRDOM00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRDOM00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRDOMRI", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRDOMRI)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRNAT01", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRNAT01)) scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRNAT02", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRNAT02)) scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAWBG00", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sSAWBG00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRBEE00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRBEE00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAINT00", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sSAINT00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRBEU01", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRBEU01)) scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRBEU02", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRBEU02)) scmCmdToExecute.Parameters.Add(New SqlParameter("@sBKPARSQ", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBKPARSQ)) scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDPARSQ", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDPARSQ)) 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, 0, 0, "", DataRowVersion.Proposed, m_daTSMUT00)) scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMERF00", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 0, 0, "", 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("@daDMKTRNA", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daDMKTRNA)) scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDKTRNA", SqlDbType.Char, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDKTRNA)) scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAKTRNA", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sSAKTRNA)) scmCmdToExecute.Parameters.Add(New SqlParameter("@davalidto", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daValidto)) 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. m_iRowsAffected = 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_edoka_etpar0_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("clsEdoka_etpar0::Update::Error occured.", ex) Finally If m_bMainConnectionIsCreatedLocal Then ' // Close connection. m_scoMainConnection.Close() End If scmCmdToExecute.Dispose() End Try End Function ''' ''' Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key. ''' ''' True if succeeded, otherwise an Exception is thrown. ''' ''' Properties needed for this method: ''' ''' Properties set after a succesful call of this method: ''' ''' Overrides Public Function Delete() As Boolean Dim scmCmdToExecute As SqlCommand = New SqlCommand() scmCmdToExecute.CommandText = "dbo.[pr_edoka_etpar0_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. m_iRowsAffected = 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_edoka_etpar0_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("clsEdoka_etpar0::Delete::Error occured.", ex) Finally If m_bMainConnectionIsCreatedLocal Then ' // Close connection. m_scoMainConnection.Close() End If scmCmdToExecute.Dispose() End Try End Function ''' ''' Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key. ''' ''' DataTable object if succeeded, otherwise an Exception is thrown. ''' ''' Properties needed for this method: ''' ''' Properties set after a succesful call of this method: ''' ''' Will fill all properties corresponding with a field in the table with the value of the row selected. ''' Overrides Public Function SelectOne() As DataTable Dim scmCmdToExecute As SqlCommand = New SqlCommand() scmCmdToExecute.CommandText = "dbo.[pr_edoka_etpar0_SelectOne]" scmCmdToExecute.CommandType = CommandType.StoredProcedure Dim dtToReturn As DataTable = new DataTable("edoka_etpar0") 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_edoka_etpar0_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)) m_sCDPAW00 = New SqlString(CType(dtToReturn.Rows(0)("CDPAW00"), String)) m_sBKPAR00 = New SqlString(CType(dtToReturn.Rows(0)("BKPAR00"), String)) m_daDMPAREO = New SqlDateTime(CType(dtToReturn.Rows(0)("DMPAREO"), Date)) m_siNRERF00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRERF00"), Short)) If dtToReturn.Rows(0)("DMPARVN") Is System.DBNull.Value Then m_daDMPARVN = SqlDateTime.Null Else m_daDMPARVN = New SqlDateTime(CType(dtToReturn.Rows(0)("DMPARVN"), Date)) End If If dtToReturn.Rows(0)("DMPARBI") Is System.DBNull.Value Then m_daDMPARBI = SqlDateTime.Null Else m_daDMPARBI = New SqlDateTime(CType(dtToReturn.Rows(0)("DMPARBI"), Date)) End If m_siNRAFG00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRAFG00"), Short)) If dtToReturn.Rows(0)("DMPARZZ") Is System.DBNull.Value Then m_daDMPARZZ = SqlDateTime.Null Else m_daDMPARZZ = New SqlDateTime(CType(dtToReturn.Rows(0)("DMPARZZ"), Date)) End If m_siNRRST00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRRST00"), Short)) m_siNRSPA00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRSPA00"), Short)) m_siNRGSR00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRGSR00"), Short)) m_siNRBON00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRBON00"), Short)) m_siNRBBG00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRBBG00"), Short)) m_siNRDOMGE = New SqlInt16(CType(dtToReturn.Rows(0)("NRDOMGE"), Short)) m_sCDDOMKT = New SqlString(CType(dtToReturn.Rows(0)("CDDOMKT"), String)) m_siNRDOM00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRDOM00"), Short)) m_siNRDOMRI = New SqlInt16(CType(dtToReturn.Rows(0)("NRDOMRI"), Short)) m_siNRNAT01 = New SqlInt16(CType(dtToReturn.Rows(0)("NRNAT01"), Short)) m_siNRNAT02 = New SqlInt16(CType(dtToReturn.Rows(0)("NRNAT02"), Short)) m_sSAWBG00 = New SqlString(CType(dtToReturn.Rows(0)("SAWBG00"), String)) m_iNRBEE00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRBEE00"), Integer)) m_sSAINT00 = New SqlString(CType(dtToReturn.Rows(0)("SAINT00"), String)) If dtToReturn.Rows(0)("NRBEU01") Is System.DBNull.Value Then m_iNRBEU01 = SqlInt32.Null Else m_iNRBEU01 = New SqlInt32(CType(dtToReturn.Rows(0)("NRBEU01"), Integer)) End If If dtToReturn.Rows(0)("NRBEU02") Is System.DBNull.Value Then m_iNRBEU02 = SqlInt32.Null Else m_iNRBEU02 = New SqlInt32(CType(dtToReturn.Rows(0)("NRBEU02"), Integer)) End If m_sBKPARSQ = New SqlString(CType(dtToReturn.Rows(0)("BKPARSQ"), String)) m_sCDPARSQ = New SqlString(CType(dtToReturn.Rows(0)("CDPARSQ"), 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)) If dtToReturn.Rows(0)("DMKTRNA") Is System.DBNull.Value Then m_daDMKTRNA = SqlDateTime.Null Else m_daDMKTRNA = New SqlDateTime(CType(dtToReturn.Rows(0)("DMKTRNA"), Date)) End If If dtToReturn.Rows(0)("CDKTRNA") Is System.DBNull.Value Then m_sCDKTRNA = SqlString.Null Else m_sCDKTRNA = New SqlString(CType(dtToReturn.Rows(0)("CDKTRNA"), String)) End If m_sSAKTRNA = New SqlString(CType(dtToReturn.Rows(0)("SAKTRNA"), String)) If dtToReturn.Rows(0)("validto") Is System.DBNull.Value Then m_daValidto = SqlDateTime.Null Else m_daValidto = New SqlDateTime(CType(dtToReturn.Rows(0)("validto"), 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("clsEdoka_etpar0::SelectOne::Error occured.", ex) Finally If m_bMainConnectionIsCreatedLocal Then ' // Close connection. m_scoMainConnection.Close() End If scmCmdToExecute.Dispose() sdaAdapter.Dispose() End Try End Function ''' ''' Purpose: SelectAll method. This method will Select all rows from the table. ''' ''' DataTable object if succeeded, otherwise an Exception is thrown. ''' ''' Properties set after a succesful call of this method: ''' ''' Overrides Public Function SelectAll() As DataTable Dim scmCmdToExecute As SqlCommand = New SqlCommand() scmCmdToExecute.CommandText = "dbo.[pr_edoka_etpar0_SelectAll]" scmCmdToExecute.CommandType = CommandType.StoredProcedure Dim dtToReturn As DataTable = new DataTable("edoka_etpar0") 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_edoka_etpar0_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("clsEdoka_etpar0::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 [sCDPAW00]() As SqlString Get Return m_sCDPAW00 End Get Set(ByVal Value As SqlString) Dim sCDPAW00Tmp As SqlString = Value If sCDPAW00Tmp.IsNull Then Throw New ArgumentOutOfRangeException("sCDPAW00", "sCDPAW00 can't be NULL") End If m_sCDPAW00 = Value End Set End Property Public Property [sBKPAR00]() As SqlString Get Return m_sBKPAR00 End Get Set(ByVal Value As SqlString) Dim sBKPAR00Tmp As SqlString = Value If sBKPAR00Tmp.IsNull Then Throw New ArgumentOutOfRangeException("sBKPAR00", "sBKPAR00 can't be NULL") End If m_sBKPAR00 = Value End Set End Property Public Property [daDMPAREO]() As SqlDateTime Get Return m_daDMPAREO End Get Set(ByVal Value As SqlDateTime) Dim daDMPAREOTmp As SqlDateTime = Value If daDMPAREOTmp.IsNull Then Throw New ArgumentOutOfRangeException("daDMPAREO", "daDMPAREO can't be NULL") End If m_daDMPAREO = Value End Set End Property Public Property [siNRERF00]() As SqlInt16 Get Return m_siNRERF00 End Get Set(ByVal Value As SqlInt16) Dim siNRERF00Tmp As SqlInt16 = Value If siNRERF00Tmp.IsNull Then Throw New ArgumentOutOfRangeException("siNRERF00", "siNRERF00 can't be NULL") End If m_siNRERF00 = Value End Set End Property Public Property [daDMPARVN]() As SqlDateTime Get Return m_daDMPARVN End Get Set(ByVal Value As SqlDateTime) m_daDMPARVN = Value End Set End Property Public Property [daDMPARBI]() As SqlDateTime Get Return m_daDMPARBI End Get Set(ByVal Value As SqlDateTime) m_daDMPARBI = Value End Set End Property Public Property [siNRAFG00]() As SqlInt16 Get Return m_siNRAFG00 End Get Set(ByVal Value As SqlInt16) Dim siNRAFG00Tmp As SqlInt16 = Value If siNRAFG00Tmp.IsNull Then Throw New ArgumentOutOfRangeException("siNRAFG00", "siNRAFG00 can't be NULL") End If m_siNRAFG00 = Value End Set End Property Public Property [daDMPARZZ]() As SqlDateTime Get Return m_daDMPARZZ End Get Set(ByVal Value As SqlDateTime) m_daDMPARZZ = Value End Set End Property Public Property [siNRRST00]() As SqlInt16 Get Return m_siNRRST00 End Get Set(ByVal Value As SqlInt16) Dim siNRRST00Tmp As SqlInt16 = Value If siNRRST00Tmp.IsNull Then Throw New ArgumentOutOfRangeException("siNRRST00", "siNRRST00 can't be NULL") End If m_siNRRST00 = Value End Set End Property Public Property [siNRSPA00]() As SqlInt16 Get Return m_siNRSPA00 End Get Set(ByVal Value As SqlInt16) Dim siNRSPA00Tmp As SqlInt16 = Value If siNRSPA00Tmp.IsNull Then Throw New ArgumentOutOfRangeException("siNRSPA00", "siNRSPA00 can't be NULL") End If m_siNRSPA00 = Value End Set End Property Public Property [siNRGSR00]() As SqlInt16 Get Return m_siNRGSR00 End Get Set(ByVal Value As SqlInt16) Dim siNRGSR00Tmp As SqlInt16 = Value If siNRGSR00Tmp.IsNull Then Throw New ArgumentOutOfRangeException("siNRGSR00", "siNRGSR00 can't be NULL") End If m_siNRGSR00 = Value End Set End Property Public Property [siNRBON00]() As SqlInt16 Get Return m_siNRBON00 End Get Set(ByVal Value As SqlInt16) Dim siNRBON00Tmp As SqlInt16 = Value If siNRBON00Tmp.IsNull Then Throw New ArgumentOutOfRangeException("siNRBON00", "siNRBON00 can't be NULL") End If m_siNRBON00 = Value End Set End Property Public Property [siNRBBG00]() As SqlInt16 Get Return m_siNRBBG00 End Get Set(ByVal Value As SqlInt16) Dim siNRBBG00Tmp As SqlInt16 = Value If siNRBBG00Tmp.IsNull Then Throw New ArgumentOutOfRangeException("siNRBBG00", "siNRBBG00 can't be NULL") End If m_siNRBBG00 = Value End Set End Property Public Property [siNRDOMGE]() As SqlInt16 Get Return m_siNRDOMGE End Get Set(ByVal Value As SqlInt16) Dim siNRDOMGETmp As SqlInt16 = Value If siNRDOMGETmp.IsNull Then Throw New ArgumentOutOfRangeException("siNRDOMGE", "siNRDOMGE can't be NULL") End If m_siNRDOMGE = Value End Set End Property Public Property [sCDDOMKT]() As SqlString Get Return m_sCDDOMKT End Get Set(ByVal Value As SqlString) Dim sCDDOMKTTmp As SqlString = Value If sCDDOMKTTmp.IsNull Then Throw New ArgumentOutOfRangeException("sCDDOMKT", "sCDDOMKT can't be NULL") End If m_sCDDOMKT = Value End Set End Property Public Property [siNRDOM00]() As SqlInt16 Get Return m_siNRDOM00 End Get Set(ByVal Value As SqlInt16) Dim siNRDOM00Tmp As SqlInt16 = Value If siNRDOM00Tmp.IsNull Then Throw New ArgumentOutOfRangeException("siNRDOM00", "siNRDOM00 can't be NULL") End If m_siNRDOM00 = Value End Set End Property Public Property [siNRDOMRI]() As SqlInt16 Get Return m_siNRDOMRI End Get Set(ByVal Value As SqlInt16) Dim siNRDOMRITmp As SqlInt16 = Value If siNRDOMRITmp.IsNull Then Throw New ArgumentOutOfRangeException("siNRDOMRI", "siNRDOMRI can't be NULL") End If m_siNRDOMRI = Value End Set End Property Public Property [siNRNAT01]() As SqlInt16 Get Return m_siNRNAT01 End Get Set(ByVal Value As SqlInt16) Dim siNRNAT01Tmp As SqlInt16 = Value If siNRNAT01Tmp.IsNull Then Throw New ArgumentOutOfRangeException("siNRNAT01", "siNRNAT01 can't be NULL") End If m_siNRNAT01 = Value End Set End Property Public Property [siNRNAT02]() As SqlInt16 Get Return m_siNRNAT02 End Get Set(ByVal Value As SqlInt16) Dim siNRNAT02Tmp As SqlInt16 = Value If siNRNAT02Tmp.IsNull Then Throw New ArgumentOutOfRangeException("siNRNAT02", "siNRNAT02 can't be NULL") End If m_siNRNAT02 = Value End Set End Property Public Property [sSAWBG00]() As SqlString Get Return m_sSAWBG00 End Get Set(ByVal Value As SqlString) Dim sSAWBG00Tmp As SqlString = Value If sSAWBG00Tmp.IsNull Then Throw New ArgumentOutOfRangeException("sSAWBG00", "sSAWBG00 can't be NULL") End If m_sSAWBG00 = Value End Set End Property Public Property [iNRBEE00]() As SqlInt32 Get Return m_iNRBEE00 End Get Set(ByVal Value As SqlInt32) Dim iNRBEE00Tmp As SqlInt32 = Value If iNRBEE00Tmp.IsNull Then Throw New ArgumentOutOfRangeException("iNRBEE00", "iNRBEE00 can't be NULL") End If m_iNRBEE00 = Value End Set End Property Public Property [sSAINT00]() As SqlString Get Return m_sSAINT00 End Get Set(ByVal Value As SqlString) Dim sSAINT00Tmp As SqlString = Value If sSAINT00Tmp.IsNull Then Throw New ArgumentOutOfRangeException("sSAINT00", "sSAINT00 can't be NULL") End If m_sSAINT00 = Value End Set End Property Public Property [iNRBEU01]() As SqlInt32 Get Return m_iNRBEU01 End Get Set(ByVal Value As SqlInt32) m_iNRBEU01 = Value End Set End Property Public Property [iNRBEU02]() As SqlInt32 Get Return m_iNRBEU02 End Get Set(ByVal Value As SqlInt32) m_iNRBEU02 = Value End Set End Property Public Property [sBKPARSQ]() As SqlString Get Return m_sBKPARSQ End Get Set(ByVal Value As SqlString) Dim sBKPARSQTmp As SqlString = Value If sBKPARSQTmp.IsNull Then Throw New ArgumentOutOfRangeException("sBKPARSQ", "sBKPARSQ can't be NULL") End If m_sBKPARSQ = Value End Set End Property Public Property [sCDPARSQ]() As SqlString Get Return m_sCDPARSQ End Get Set(ByVal Value As SqlString) Dim sCDPARSQTmp As SqlString = Value If sCDPARSQTmp.IsNull Then Throw New ArgumentOutOfRangeException("sCDPARSQ", "sCDPARSQ can't be NULL") End If m_sCDPARSQ = 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 Public Property [daDMKTRNA]() As SqlDateTime Get Return m_daDMKTRNA End Get Set(ByVal Value As SqlDateTime) m_daDMKTRNA = Value End Set End Property Public Property [sCDKTRNA]() As SqlString Get Return m_sCDKTRNA End Get Set(ByVal Value As SqlString) m_sCDKTRNA = Value End Set End Property Public Property [sSAKTRNA]() As SqlString Get Return m_sSAKTRNA End Get Set(ByVal Value As SqlString) Dim sSAKTRNATmp As SqlString = Value If sSAKTRNATmp.IsNull Then Throw New ArgumentOutOfRangeException("sSAKTRNA", "sSAKTRNA can't be NULL") End If m_sSAKTRNA = Value End Set End Property Public Property [daValidto]() As SqlDateTime Get Return m_daValidto End Get Set(ByVal Value As SqlDateTime) m_daValidto = Value End Set End Property #End Region End Class End Namespace