591 lines
24 KiB
VB.net
591 lines
24 KiB
VB.net
' ///////////////////////////////////////////////////////////////////////////
|
|
' // Description: Data Access class for the table 'Import_Eintrag'
|
|
' // Generated by LLBLGen v1.2.1045.38210 Final on: Donnerstag, 14. April 2005, 21:41:01
|
|
' // Because the Base Class already implements IDispose, this class doesn't.
|
|
' ///////////////////////////////////////////////////////////////////////////
|
|
Imports System
|
|
Imports System.Data
|
|
Imports System.Data.SqlTypes
|
|
Imports System.Data.SqlClient
|
|
|
|
Namespace edokadb
|
|
' /// <summary>
|
|
' /// Purpose: Data Access class for the table 'Import_Eintrag'.
|
|
' /// </summary>
|
|
Public Class clsImport_Eintrag
|
|
Inherits clsDBInteractionBase
|
|
|
|
#Region " Class Member Declarations "
|
|
|
|
Private m_daTS As SqlDateTime
|
|
Private m_iImport_Eintragnr, m_iImport_JobNr As SqlInt32
|
|
Private m_sEDOKA_Dokumentid, m_sStatustext, m_sEDOKA_Dokumenttyp, m_sIndexdaten, m_sApplikationsnr, m_sPartnernr, m_sRecordNo, m_sDateityp, m_sStatus, m_sDateiname As SqlString
|
|
|
|
#End Region
|
|
|
|
|
|
' /// <summary>
|
|
' /// Purpose: Class constructor.
|
|
' /// </summary>
|
|
Public Sub New()
|
|
' // Nothing for now.
|
|
End Sub
|
|
|
|
|
|
' /// <summary>
|
|
' /// Purpose: Insert method. This method will insert one new row into the database.
|
|
' /// </summary>
|
|
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
|
' /// <remarks>
|
|
' /// Properties needed for this method:
|
|
' /// <UL>
|
|
' /// <LI>iImport_JobNr. May be SqlInt32.Null</LI>
|
|
' /// <LI>daTS. May be SqlDateTime.Null</LI>
|
|
' /// <LI>sRecordNo. May be SqlString.Null</LI>
|
|
' /// <LI>sPartnernr. May be SqlString.Null</LI>
|
|
' /// <LI>sDateityp. May be SqlString.Null</LI>
|
|
' /// <LI>sDateiname. May be SqlString.Null</LI>
|
|
' /// <LI>sStatus. May be SqlString.Null</LI>
|
|
' /// <LI>sStatustext. May be SqlString.Null</LI>
|
|
' /// <LI>sEDOKA_Dokumentid. May be SqlString.Null</LI>
|
|
' /// <LI>sEDOKA_Dokumenttyp. May be SqlString.Null</LI>
|
|
' /// <LI>sApplikationsnr. May be SqlString.Null</LI>
|
|
' /// <LI>sIndexdaten. May be SqlString.Null</LI>
|
|
' /// </UL>
|
|
' /// Properties set after a succesful call of this method:
|
|
' /// <UL>
|
|
' /// <LI>iImport_Eintragnr</LI>
|
|
' /// <LI>iErrorCode</LI>
|
|
' /// </UL>
|
|
' /// </remarks>
|
|
Overrides Public Function Insert() As Boolean
|
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
|
scmCmdToExecute.CommandText = "dbo.[pr_inport_Import_Eintrag_Insert]"
|
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
|
|
|
' // Use base class' connection object
|
|
scmCmdToExecute.Connection = m_scoMainConnection
|
|
|
|
Try
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_JobNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImport_JobNr))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daTS", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daTS))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sRecordNo", SqlDbType.VarChar, 4, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRecordNo))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sPartnernr", SqlDbType.VarChar, 9, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDateityp", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateityp))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDateiname", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateiname))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sStatus", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStatus))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sStatustext", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStatustext))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sEDOKA_Dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEDOKA_Dokumentid))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sEDOKA_Dokumenttyp", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEDOKA_Dokumenttyp))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sApplikationsnr", SqlDbType.VarChar, 4, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sApplikationsnr))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sIndexdaten", SqlDbType.VarChar, 4096, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sIndexdaten))
|
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iImport_Eintragnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iImport_Eintragnr))
|
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
|
|
|
If m_bMainConnectionIsCreatedLocal Then
|
|
' // Open connection.
|
|
m_scoMainConnection.Open()
|
|
Else
|
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
|
End If
|
|
End If
|
|
|
|
' // Execute query.
|
|
scmCmdToExecute.ExecuteNonQuery()
|
|
m_iImport_Eintragnr = scmCmdToExecute.Parameters.Item("@iImport_Eintragnr").Value
|
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
|
|
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
|
' // Throw error.
|
|
Throw New Exception("Stored Procedure 'pr_inport_Import_Eintrag_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
|
End If
|
|
|
|
Return True
|
|
Catch ex As Exception
|
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
|
Throw New Exception("clsImport_Eintrag::Insert::Error occured.", ex)
|
|
Finally
|
|
If m_bMainConnectionIsCreatedLocal Then
|
|
' // Close connection.
|
|
m_scoMainConnection.Close()
|
|
End If
|
|
scmCmdToExecute.Dispose()
|
|
End Try
|
|
End Function
|
|
|
|
|
|
' /// <summary>
|
|
' /// Purpose: Update method. This method will Update one existing row in the database.
|
|
' /// </summary>
|
|
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
|
' /// <remarks>
|
|
' /// Properties needed for this method:
|
|
' /// <UL>
|
|
' /// <LI>iImport_Eintragnr</LI>
|
|
' /// <LI>iImport_JobNr. May be SqlInt32.Null</LI>
|
|
' /// <LI>daTS. May be SqlDateTime.Null</LI>
|
|
' /// <LI>sRecordNo. May be SqlString.Null</LI>
|
|
' /// <LI>sPartnernr. May be SqlString.Null</LI>
|
|
' /// <LI>sDateityp. May be SqlString.Null</LI>
|
|
' /// <LI>sDateiname. May be SqlString.Null</LI>
|
|
' /// <LI>sStatus. May be SqlString.Null</LI>
|
|
' /// <LI>sStatustext. May be SqlString.Null</LI>
|
|
' /// <LI>sEDOKA_Dokumentid. May be SqlString.Null</LI>
|
|
' /// <LI>sEDOKA_Dokumenttyp. May be SqlString.Null</LI>
|
|
' /// <LI>sApplikationsnr. May be SqlString.Null</LI>
|
|
' /// <LI>sIndexdaten. May be SqlString.Null</LI>
|
|
' /// </UL>
|
|
' /// Properties set after a succesful call of this method:
|
|
' /// <UL>
|
|
' /// <LI>iErrorCode</LI>
|
|
' /// </UL>
|
|
' /// </remarks>
|
|
Overrides Public Function Update() As Boolean
|
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
|
scmCmdToExecute.CommandText = "dbo.[pr_inport_Import_Eintrag_Update]"
|
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
|
|
|
' // Use base class' connection object
|
|
scmCmdToExecute.Connection = m_scoMainConnection
|
|
|
|
Try
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_Eintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_Eintragnr))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_JobNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImport_JobNr))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daTS", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daTS))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sRecordNo", SqlDbType.VarChar, 4, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRecordNo))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sPartnernr", SqlDbType.VarChar, 9, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDateityp", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateityp))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDateiname", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateiname))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sStatus", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStatus))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sStatustext", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStatustext))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sEDOKA_Dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEDOKA_Dokumentid))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sEDOKA_Dokumenttyp", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEDOKA_Dokumenttyp))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sApplikationsnr", SqlDbType.VarChar, 4, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sApplikationsnr))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sIndexdaten", SqlDbType.VarChar, 4096, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sIndexdaten))
|
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
|
|
|
If m_bMainConnectionIsCreatedLocal Then
|
|
' // Open connection.
|
|
m_scoMainConnection.Open()
|
|
Else
|
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
|
End If
|
|
End If
|
|
|
|
' // Execute query.
|
|
scmCmdToExecute.ExecuteNonQuery()
|
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
|
|
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
|
' // Throw error.
|
|
Throw New Exception("Stored Procedure 'pr_inport_Import_Eintrag_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
|
|
End If
|
|
|
|
Return True
|
|
Catch ex As Exception
|
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
|
Throw New Exception("clsImport_Eintrag::Update::Error occured.", ex)
|
|
Finally
|
|
If m_bMainConnectionIsCreatedLocal Then
|
|
' // Close connection.
|
|
m_scoMainConnection.Close()
|
|
End If
|
|
scmCmdToExecute.Dispose()
|
|
End Try
|
|
End Function
|
|
|
|
|
|
' /// <summary>
|
|
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
|
|
' /// </summary>
|
|
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
|
' /// <remarks>
|
|
' /// Properties needed for this method:
|
|
' /// <UL>
|
|
' /// <LI>iImport_Eintragnr</LI>
|
|
' /// </UL>
|
|
' /// Properties set after a succesful call of this method:
|
|
' /// <UL>
|
|
' /// <LI>iErrorCode</LI>
|
|
' /// </UL>
|
|
' /// </remarks>
|
|
Overrides Public Function Delete() As Boolean
|
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
|
scmCmdToExecute.CommandText = "dbo.[pr_inport_Import_Eintrag_Delete]"
|
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
|
|
|
' // Use base class' connection object
|
|
scmCmdToExecute.Connection = m_scoMainConnection
|
|
|
|
Try
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_Eintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_Eintragnr))
|
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
|
|
|
If m_bMainConnectionIsCreatedLocal Then
|
|
' // Open connection.
|
|
m_scoMainConnection.Open()
|
|
Else
|
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
|
End If
|
|
End If
|
|
|
|
' // Execute query.
|
|
scmCmdToExecute.ExecuteNonQuery()
|
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
|
|
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
|
' // Throw error.
|
|
Throw New Exception("Stored Procedure 'pr_inport_Import_Eintrag_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
|
|
End If
|
|
|
|
Return True
|
|
Catch ex As Exception
|
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
|
Throw New Exception("clsImport_Eintrag::Delete::Error occured.", ex)
|
|
Finally
|
|
If m_bMainConnectionIsCreatedLocal Then
|
|
' // Close connection.
|
|
m_scoMainConnection.Close()
|
|
End If
|
|
scmCmdToExecute.Dispose()
|
|
End Try
|
|
End Function
|
|
|
|
|
|
' /// <summary>
|
|
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
|
|
' /// </summary>
|
|
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
|
' /// <remarks>
|
|
' /// Properties needed for this method:
|
|
' /// <UL>
|
|
' /// <LI>iImport_Eintragnr</LI>
|
|
' /// </UL>
|
|
' /// Properties set after a succesful call of this method:
|
|
' /// <UL>
|
|
' /// <LI>iErrorCode</LI>
|
|
' /// <LI>iImport_Eintragnr</LI>
|
|
' /// <LI>iImport_JobNr</LI>
|
|
' /// <LI>daTS</LI>
|
|
' /// <LI>sRecordNo</LI>
|
|
' /// <LI>sPartnernr</LI>
|
|
' /// <LI>sDateityp</LI>
|
|
' /// <LI>sDateiname</LI>
|
|
' /// <LI>sStatus</LI>
|
|
' /// <LI>sStatustext</LI>
|
|
' /// <LI>sEDOKA_Dokumentid</LI>
|
|
' /// <LI>sEDOKA_Dokumenttyp</LI>
|
|
' /// <LI>sApplikationsnr</LI>
|
|
' /// <LI>sIndexdaten</LI>
|
|
' /// </UL>
|
|
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
|
|
' /// </remarks>
|
|
Overrides Public Function SelectOne() As DataTable
|
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
|
scmCmdToExecute.CommandText = "dbo.[pr_inport_Import_Eintrag_SelectOne]"
|
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
|
Dim dtToReturn As DataTable = new DataTable("Import_Eintrag")
|
|
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
|
|
|
' // Use base class' connection object
|
|
scmCmdToExecute.Connection = m_scoMainConnection
|
|
|
|
Try
|
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iImport_Eintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_Eintragnr))
|
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
|
|
|
If m_bMainConnectionIsCreatedLocal Then
|
|
' // Open connection.
|
|
m_scoMainConnection.Open()
|
|
Else
|
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
|
End If
|
|
End If
|
|
|
|
' // Execute query.
|
|
sdaAdapter.Fill(dtToReturn)
|
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
|
|
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
|
' // Throw error.
|
|
Throw New Exception("Stored Procedure 'pr_inport_Import_Eintrag_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
|
End If
|
|
|
|
If dtToReturn.Rows.Count > 0 Then
|
|
m_iImport_Eintragnr = New SqlInt32(CType(dtToReturn.Rows(0)("Import_Eintragnr"), Integer))
|
|
If dtToReturn.Rows(0)("Import_JobNr") Is System.DBNull.Value Then
|
|
m_iImport_JobNr = SqlInt32.Null
|
|
Else
|
|
m_iImport_JobNr = New SqlInt32(CType(dtToReturn.Rows(0)("Import_JobNr"), Integer))
|
|
End If
|
|
If dtToReturn.Rows(0)("TS") Is System.DBNull.Value Then
|
|
m_daTS = SqlDateTime.Null
|
|
Else
|
|
m_daTS = New SqlDateTime(CType(dtToReturn.Rows(0)("TS"), Date))
|
|
End If
|
|
If dtToReturn.Rows(0)("RecordNo") Is System.DBNull.Value Then
|
|
m_sRecordNo = SqlString.Null
|
|
Else
|
|
m_sRecordNo = New SqlString(CType(dtToReturn.Rows(0)("RecordNo"), String))
|
|
End If
|
|
If dtToReturn.Rows(0)("Partnernr") Is System.DBNull.Value Then
|
|
m_sPartnernr = SqlString.Null
|
|
Else
|
|
m_sPartnernr = New SqlString(CType(dtToReturn.Rows(0)("Partnernr"), String))
|
|
End If
|
|
If dtToReturn.Rows(0)("Dateityp") Is System.DBNull.Value Then
|
|
m_sDateityp = SqlString.Null
|
|
Else
|
|
m_sDateityp = New SqlString(CType(dtToReturn.Rows(0)("Dateityp"), String))
|
|
End If
|
|
If dtToReturn.Rows(0)("Dateiname") Is System.DBNull.Value Then
|
|
m_sDateiname = SqlString.Null
|
|
Else
|
|
m_sDateiname = New SqlString(CType(dtToReturn.Rows(0)("Dateiname"), String))
|
|
End If
|
|
If dtToReturn.Rows(0)("Status") Is System.DBNull.Value Then
|
|
m_sStatus = SqlString.Null
|
|
Else
|
|
m_sStatus = New SqlString(CType(dtToReturn.Rows(0)("Status"), String))
|
|
End If
|
|
If dtToReturn.Rows(0)("Statustext") Is System.DBNull.Value Then
|
|
m_sStatustext = SqlString.Null
|
|
Else
|
|
m_sStatustext = New SqlString(CType(dtToReturn.Rows(0)("Statustext"), String))
|
|
End If
|
|
If dtToReturn.Rows(0)("EDOKA_Dokumentid") Is System.DBNull.Value Then
|
|
m_sEDOKA_Dokumentid = SqlString.Null
|
|
Else
|
|
m_sEDOKA_Dokumentid = New SqlString(CType(dtToReturn.Rows(0)("EDOKA_Dokumentid"), String))
|
|
End If
|
|
If dtToReturn.Rows(0)("EDOKA_Dokumenttyp") Is System.DBNull.Value Then
|
|
m_sEDOKA_Dokumenttyp = SqlString.Null
|
|
Else
|
|
m_sEDOKA_Dokumenttyp = New SqlString(CType(dtToReturn.Rows(0)("EDOKA_Dokumenttyp"), String))
|
|
End If
|
|
If dtToReturn.Rows(0)("Applikationsnr") Is System.DBNull.Value Then
|
|
m_sApplikationsnr = SqlString.Null
|
|
Else
|
|
m_sApplikationsnr = New SqlString(CType(dtToReturn.Rows(0)("Applikationsnr"), String))
|
|
End If
|
|
If dtToReturn.Rows(0)("Indexdaten") Is System.DBNull.Value Then
|
|
m_sIndexdaten = SqlString.Null
|
|
Else
|
|
m_sIndexdaten = New SqlString(CType(dtToReturn.Rows(0)("Indexdaten"), String))
|
|
End If
|
|
End If
|
|
Return dtToReturn
|
|
Catch ex As Exception
|
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
|
Throw New Exception("clsImport_Eintrag::SelectOne::Error occured.", ex)
|
|
Finally
|
|
If m_bMainConnectionIsCreatedLocal Then
|
|
' // Close connection.
|
|
m_scoMainConnection.Close()
|
|
End If
|
|
scmCmdToExecute.Dispose()
|
|
sdaAdapter.Dispose()
|
|
End Try
|
|
End Function
|
|
|
|
|
|
' /// <summary>
|
|
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
|
' /// </summary>
|
|
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
|
' /// <remarks>
|
|
' /// Properties set after a succesful call of this method:
|
|
' /// <UL>
|
|
' /// <LI>iErrorCode</LI>
|
|
' /// </UL>
|
|
' /// </remarks>
|
|
Overrides Public Function SelectAll() As DataTable
|
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
|
scmCmdToExecute.CommandText = "dbo.[pr_inport_Import_Eintrag_SelectAll]"
|
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
|
Dim dtToReturn As DataTable = new DataTable("Import_Eintrag")
|
|
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
|
|
|
' // Use base class' connection object
|
|
scmCmdToExecute.Connection = m_scoMainConnection
|
|
|
|
Try
|
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
|
|
|
If m_bMainConnectionIsCreatedLocal Then
|
|
' // Open connection.
|
|
m_scoMainConnection.Open()
|
|
Else
|
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
|
End If
|
|
End If
|
|
|
|
' // Execute query.
|
|
sdaAdapter.Fill(dtToReturn)
|
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
|
|
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
|
' // Throw error.
|
|
Throw New Exception("Stored Procedure 'pr_inport_Import_Eintrag_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
|
|
End If
|
|
|
|
Return dtToReturn
|
|
Catch ex As Exception
|
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
|
Throw New Exception("clsImport_Eintrag::SelectAll::Error occured.", ex)
|
|
Finally
|
|
If m_bMainConnectionIsCreatedLocal Then
|
|
' // Close connection.
|
|
m_scoMainConnection.Close()
|
|
End If
|
|
scmCmdToExecute.Dispose()
|
|
sdaAdapter.Dispose()
|
|
End Try
|
|
End Function
|
|
|
|
|
|
#Region " Class Property Declarations "
|
|
|
|
Public Property [iImport_Eintragnr]() As SqlInt32
|
|
Get
|
|
Return m_iImport_Eintragnr
|
|
End Get
|
|
Set(ByVal Value As SqlInt32)
|
|
Dim iImport_EintragnrTmp As SqlInt32 = Value
|
|
If iImport_EintragnrTmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("iImport_Eintragnr", "iImport_Eintragnr can't be NULL")
|
|
End If
|
|
m_iImport_Eintragnr = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [iImport_JobNr]() As SqlInt32
|
|
Get
|
|
Return m_iImport_JobNr
|
|
End Get
|
|
Set(ByVal Value As SqlInt32)
|
|
m_iImport_JobNr = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [daTS]() As SqlDateTime
|
|
Get
|
|
Return m_daTS
|
|
End Get
|
|
Set(ByVal Value As SqlDateTime)
|
|
m_daTS = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [sRecordNo]() As SqlString
|
|
Get
|
|
Return m_sRecordNo
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
m_sRecordNo = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [sPartnernr]() As SqlString
|
|
Get
|
|
Return m_sPartnernr
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
m_sPartnernr = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [sDateityp]() As SqlString
|
|
Get
|
|
Return m_sDateityp
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
m_sDateityp = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [sDateiname]() As SqlString
|
|
Get
|
|
Return m_sDateiname
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
m_sDateiname = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [sStatus]() As SqlString
|
|
Get
|
|
Return m_sStatus
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
m_sStatus = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [sStatustext]() As SqlString
|
|
Get
|
|
Return m_sStatustext
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
m_sStatustext = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [sEDOKA_Dokumentid]() As SqlString
|
|
Get
|
|
Return m_sEDOKA_Dokumentid
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
m_sEDOKA_Dokumentid = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [sEDOKA_Dokumenttyp]() As SqlString
|
|
Get
|
|
Return m_sEDOKA_Dokumenttyp
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
m_sEDOKA_Dokumenttyp = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [sApplikationsnr]() As SqlString
|
|
Get
|
|
Return m_sApplikationsnr
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
m_sApplikationsnr = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [sIndexdaten]() As SqlString
|
|
Get
|
|
Return m_sIndexdaten
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
m_sIndexdaten = Value
|
|
End Set
|
|
End Property
|
|
|
|
#End Region
|
|
|
|
End Class
|
|
End Namespace
|