Initial commit
This commit is contained in:
449
Archiv/EDKB01/DB/clsApplikation.vb
Normal file
449
Archiv/EDKB01/DB/clsApplikation.vb
Normal file
@@ -0,0 +1,449 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'Applikation'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 15. Juni 2003, 07:59:59
|
||||
' // 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 'Applikation'.
|
||||
' /// </summary>
|
||||
Public Class clsApplikation
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_daMutiert_am, m_daLastrun, m_daErstellt_am As SqlDateTime
|
||||
Private m_iApplikationnr, m_iMutierer As SqlInt32
|
||||
Private m_sBezeichnung As SqlString
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iApplikationnr</LI>
|
||||
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// <LI>daLastrun. May be SqlDateTime.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Applikation_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iapplikationnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iApplikationnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dalastrun", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daLastrun))
|
||||
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_Applikation_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("clsApplikation::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>iApplikationnr</LI>
|
||||
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// <LI>daLastrun. May be SqlDateTime.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Update() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Applikation_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iapplikationnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iApplikationnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dalastrun", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daLastrun))
|
||||
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_Applikation_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("clsApplikation::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>iApplikationnr</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_Applikation_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iapplikationnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iApplikationnr))
|
||||
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_Applikation_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("clsApplikation::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>iApplikationnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iApplikationnr</LI>
|
||||
' /// <LI>sBezeichnung</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>iMutierer</LI>
|
||||
' /// <LI>daLastrun</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_Applikation_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("Applikation")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iapplikationnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iApplikationnr))
|
||||
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_Applikation_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iApplikationnr = New SqlInt32(CType(dtToReturn.Rows(0)("applikationnr"), Integer))
|
||||
If dtToReturn.Rows(0)("bezeichnung") Is System.DBNull.Value Then
|
||||
m_sBezeichnung = SqlString.Null
|
||||
Else
|
||||
m_sBezeichnung = New SqlString(CType(dtToReturn.Rows(0)("bezeichnung"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
|
||||
m_daErstellt_am = SqlDateTime.Null
|
||||
Else
|
||||
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
|
||||
m_daMutiert_am = SqlDateTime.Null
|
||||
Else
|
||||
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
|
||||
m_iMutierer = SqlInt32.Null
|
||||
Else
|
||||
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("lastrun") Is System.DBNull.Value Then
|
||||
m_daLastrun = SqlDateTime.Null
|
||||
Else
|
||||
m_daLastrun = New SqlDateTime(CType(dtToReturn.Rows(0)("lastrun"), 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("clsApplikation::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_Applikation_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("Applikation")
|
||||
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_Applikation_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("clsApplikation::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 [iApplikationnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iApplikationnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iApplikationnrTmp As SqlInt32 = Value
|
||||
If iApplikationnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iApplikationnr", "iApplikationnr can't be NULL")
|
||||
End If
|
||||
m_iApplikationnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBezeichnung]() As SqlString
|
||||
Get
|
||||
Return m_sBezeichnung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBezeichnung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daErstellt_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daErstellt_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daErstellt_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daMutiert_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daMutiert_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daMutiert_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iMutierer]() As SqlInt32
|
||||
Get
|
||||
Return m_iMutierer
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iMutierer = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daLastrun]() As SqlDateTime
|
||||
Get
|
||||
Return m_daLastrun
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daLastrun = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
289
Archiv/EDKB01/DB/clsConnectionProvider.vb
Normal file
289
Archiv/EDKB01/DB/clsConnectionProvider.vb
Normal file
@@ -0,0 +1,289 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Connection Provider class for Database connection sharing
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 7. Januar 2003, 13:03:43
|
||||
' // This class implements IDisposable.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Configuration
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Collections
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: provides a SqlConnection object which can be shared among data-access tier objects
|
||||
' /// to provide a way to do ADO.NET transaction coding without the hassling with SqlConnection objects
|
||||
' /// on a high level.
|
||||
' /// </summary>
|
||||
Public Class clsConnectionProvider
|
||||
Implements IDisposable
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_scoDBConnection As SqlConnection
|
||||
Private m_bIsTransactionPending, m_bIsDisposed As Boolean
|
||||
Private m_stCurrentTransaction As SqlTransaction
|
||||
Private m_alSavePoints As ArrayList
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Public Sub New()
|
||||
' // Init the class
|
||||
InitClass()
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the IDispose' method Dispose.
|
||||
' /// </summary>
|
||||
Public Overloads Sub Dispose() Implements IDisposable.Dispose
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the Dispose functionality.
|
||||
' /// </summary>
|
||||
Protected Overridable Overloads Sub Dispose(ByVal bIsDisposing As Boolean)
|
||||
' // Check to see if Dispose has already been called.
|
||||
If Not m_bIsDisposed Then
|
||||
If bIsDisposing Then
|
||||
' // Dispose managed resources.
|
||||
If Not (m_stCurrentTransaction Is Nothing) Then
|
||||
m_stCurrentTransaction.Dispose()
|
||||
m_stCurrentTransaction = Nothing
|
||||
End If
|
||||
If Not (m_scoDBConnection Is Nothing) Then
|
||||
' // closing the connection will abort (rollback) any pending transactions
|
||||
m_scoDBConnection.Close()
|
||||
m_scoDBConnection.Dispose()
|
||||
m_scoDBConnection = Nothing
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
m_bIsDisposed = True
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Initializes class members.
|
||||
' /// </summary>
|
||||
Private Sub InitClass()
|
||||
' // Create all the objects and initialize other members.
|
||||
m_scoDBConnection = New SqlConnection()
|
||||
m_bIsDisposed = False
|
||||
m_stCurrentTransaction = Nothing
|
||||
m_bIsTransactionPending = False
|
||||
m_alSavePoints = New ArrayList()
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Opens the connection object.
|
||||
' /// </summary>
|
||||
' /// <returns>True, if succeeded, otherwise an Exception exception is thrown.</returns>
|
||||
Public Function OpenConnection() As Boolean
|
||||
Try
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) > 0 Then
|
||||
' // It's already open.
|
||||
Throw New Exception("OpenConnection::Connection is already open.")
|
||||
End If
|
||||
m_scoDBConnection.Open()
|
||||
m_bIsTransactionPending = False
|
||||
m_alSavePoints.Clear()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Starts a new ADO.NET transaction using the open connection object of this class.
|
||||
' /// </summary>
|
||||
' /// <param name="sTransactionName">Name of the transaction to start</param>
|
||||
' /// <returns>True, if transaction is started correctly, otherwise an Exception exception is thrown</returns>
|
||||
Public Function BeginTransaction(ByVal sTransactionName As String) As Boolean
|
||||
Try
|
||||
If m_bIsTransactionPending Then
|
||||
' // no nested transactions allowed.
|
||||
Throw New Exception("BeginTransaction::Already transaction pending. Nesting not allowed")
|
||||
End If
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // no open connection
|
||||
Throw New Exception("BeginTransaction::Connection is not open.")
|
||||
End If
|
||||
' // begin the transaction and store the transaction object.
|
||||
m_stCurrentTransaction = m_scoDBConnection.BeginTransaction(IsolationLevel.ReadCommitted, sTransactionName)
|
||||
m_bIsTransactionPending = True
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Commits a pending transaction on the open connection object of this class.
|
||||
' /// </summary>
|
||||
' /// <returns>True, if commit was succesful, or an Exception exception is thrown</returns>
|
||||
Public Function CommitTransaction() As Boolean
|
||||
Try
|
||||
If Not m_bIsTransactionPending Then
|
||||
' // no transaction pending
|
||||
Throw New Exception("CommitTransaction::No transaction pending.")
|
||||
End If
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // no open connection
|
||||
Throw New Exception("CommitTransaction::Connection is not open.")
|
||||
End If
|
||||
' // commit the transaction
|
||||
m_stCurrentTransaction.Commit()
|
||||
m_bIsTransactionPending = False
|
||||
m_stCurrentTransaction.Dispose()
|
||||
m_stCurrentTransaction = Nothing
|
||||
m_alSavePoints.Clear()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Rolls back a pending transaction on the open connection object of this class,
|
||||
' /// or rolls back to the savepoint with the given name. Savepoints are created with SaveTransaction().
|
||||
' /// </summary>
|
||||
' /// <param name="sTransactionToRollback">Name of transaction to roll back. Can be name of savepoint</param>
|
||||
' /// <returns>True, if rollback was succesful, or an Exception exception is thrown</returns>
|
||||
Public Function RollbackTransaction(ByVal sTransactionToRollback As String) As Boolean
|
||||
Try
|
||||
If Not m_bIsTransactionPending Then
|
||||
' // no transaction pending
|
||||
Throw New Exception("RollbackTransaction::No transaction pending.")
|
||||
End If
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // no open connection
|
||||
Throw New Exception("RollbackTransaction::Connection is not open.")
|
||||
End If
|
||||
' // rollback the transaction
|
||||
m_stCurrentTransaction.Rollback(sTransactionToRollback)
|
||||
' // if this wasn't a savepoint, we've rolled back the complete transaction, so we
|
||||
' // can clean it up.
|
||||
If Not m_alSavePoints.Contains(sTransactionToRollback) Then
|
||||
' // it's not a savepoint
|
||||
m_bIsTransactionPending = False
|
||||
m_stCurrentTransaction.Dispose()
|
||||
m_stCurrentTransaction = Nothing
|
||||
m_alSavePoints.Clear()
|
||||
End If
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Saves a pending transaction on the open connection object of this class to a 'savepoint'
|
||||
' /// with the given name.
|
||||
' /// When a rollback is issued, the caller can rollback to this savepoint or roll back the complete transaction.
|
||||
' /// </summary>
|
||||
' /// <param name="sSavePointName">Name of the savepoint to store the current transaction under.</param>
|
||||
' /// <returns>True, if save was succesful, or an Exception exception is thrown</returns>
|
||||
Public Function SaveTransaction(ByVal sSavePointName As String) As Boolean
|
||||
Try
|
||||
If Not m_bIsTransactionPending Then
|
||||
' // no transaction pending
|
||||
Throw New Exception("SaveTransaction::No transaction pending.")
|
||||
End If
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // no open connection
|
||||
Throw New Exception("SaveTransaction::Connection is not open.")
|
||||
End If
|
||||
' // save the transaction
|
||||
m_stCurrentTransaction.Save(sSavePointName)
|
||||
' // Store the savepoint in the list.
|
||||
m_alSavePoints.Add(sSavePointName)
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Closes the open connection. Depending on bCommitPendingTransactions, a pending
|
||||
' /// transaction is commited, or aborted.
|
||||
' /// </summary>
|
||||
' /// <param name="bCommitPendingTransaction">Flag for what to do when a transaction is still pending. True
|
||||
' /// will commit the current transaction, False will abort (rollback) the complete current transaction.</param>
|
||||
' /// <returns>True, if close was succesful, False if connection was already closed, or an Exception exception is thrown when
|
||||
' /// an error occurs</returns>
|
||||
Public Function CloseConnection(ByVal bCommitPendingTransaction As Boolean) As Boolean
|
||||
Try
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // No open connection
|
||||
Return False
|
||||
End If
|
||||
If m_bIsTransactionPending Then
|
||||
If bCommitPendingTransaction Then
|
||||
' // Commit the pending transaction
|
||||
m_stCurrentTransaction.Commit()
|
||||
Else
|
||||
' // Rollback the pending transaction
|
||||
m_stCurrentTransaction.Rollback()
|
||||
End If
|
||||
m_bIsTransactionPending = False
|
||||
m_stCurrentTransaction.Dispose()
|
||||
m_stCurrentTransaction = Nothing
|
||||
m_alSavePoints.Clear()
|
||||
End If
|
||||
' // close the connection
|
||||
m_scoDBConnection.Close()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public ReadOnly Property stCurrentTransaction() As SqlTransaction
|
||||
Get
|
||||
Return m_stCurrentTransaction
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Public ReadOnly Property bIsTransactionPending() As Boolean
|
||||
Get
|
||||
Return m_bIsTransactionPending
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Public ReadOnly Property scoDBConnection() As SqlConnection
|
||||
Get
|
||||
Return m_scoDBConnection
|
||||
End Get
|
||||
End Property
|
||||
Public WriteOnly Property sConnectionString() As String
|
||||
Set(ByVal Value As String)
|
||||
m_scoDBConnection.ConnectionString = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
202
Archiv/EDKB01/DB/clsDBInteractionBase.vb
Normal file
202
Archiv/EDKB01/DB/clsDBInteractionBase.vb
Normal file
@@ -0,0 +1,202 @@
|
||||
' //////////////////////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Base class for Database Interaction.
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 7. Januar 2003, 13:03:43
|
||||
' // Because this class implements IDisposable, derived classes shouldn't do so.
|
||||
' //////////////////////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Configuration
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Data.SqlTypes
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Error Enums used by this LLBL library.
|
||||
' /// </summary>
|
||||
Public Enum LLBLError
|
||||
AllOk
|
||||
' // Add more here (check the comma's!)
|
||||
End Enum
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: General interface of the API generated. Contains only common methods of all classes.
|
||||
' /// </summary>
|
||||
Public Interface ICommonDBAccess
|
||||
Function Insert() As Boolean
|
||||
Function Update() As Boolean
|
||||
Function Delete() As Boolean
|
||||
Function SelectOne() As DataTable
|
||||
Function SelectAll() As DataTable
|
||||
End Interface
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Abstract base class for Database Interaction classes.
|
||||
' /// </summary>
|
||||
Public MustInherit Class clsDBInteractionBase
|
||||
Implements IDisposable
|
||||
Implements ICommonDBAccess
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Protected m_scoMainConnection As SqlConnection
|
||||
Protected m_iErrorCode As SqlInt32
|
||||
Protected m_bMainConnectionIsCreatedLocal As Boolean
|
||||
Protected m_cpMainConnectionProvider As clsConnectionProvider
|
||||
Private m_sConnectionString As String
|
||||
Private m_bIsDisposed As Boolean
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Initialize the class' members.
|
||||
InitClass()
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Initializes class members.
|
||||
' /// </summary>
|
||||
Private Sub InitClass()
|
||||
' // create all the objects and initialize other members.
|
||||
m_scoMainConnection = New SqlConnection()
|
||||
m_bMainConnectionIsCreatedLocal = True
|
||||
m_cpMainConnectionProvider = Nothing
|
||||
m_iErrorCode = New SqlInt32(LLBLError.AllOk)
|
||||
m_bIsDisposed = False
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the IDispose' method Dispose.
|
||||
' /// </summary>
|
||||
Public Overloads Sub Dispose() Implements IDisposable.Dispose
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the Dispose functionality.
|
||||
' /// </summary>
|
||||
Protected Overridable Overloads Sub Dispose(ByVal bIsDisposing As Boolean)
|
||||
' // Check to see if Dispose has already been called.
|
||||
If Not m_bIsDisposed Then
|
||||
If bIsDisposing Then
|
||||
' // Dispose managed resources.
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Object is created in this class, so destroy it here.
|
||||
m_scoMainConnection.Close()
|
||||
m_scoMainConnection.Dispose()
|
||||
m_bMainConnectionIsCreatedLocal = True
|
||||
End If
|
||||
m_cpMainConnectionProvider = Nothing
|
||||
m_scoMainConnection = Nothing
|
||||
End If
|
||||
End If
|
||||
m_bIsDisposed = True
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.Insert() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function Insert() As Boolean Implements ICommonDBAccess.Insert
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.Delete() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function Delete() As Boolean Implements ICommonDBAccess.Delete
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.Update() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function Update() As Boolean Implements ICommonDBAccess.Update
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.SelectOne() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function SelectOne() As DataTable Implements ICommonDBAccess.SelectOne
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.SelectAll() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function SelectAll() As DataTable Implements ICommonDBAccess.SelectAll
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public WriteOnly Property cpMainConnectionProvider() As clsConnectionProvider
|
||||
Set(ByVal Value As clsConnectionProvider)
|
||||
If Value Is Nothing Then
|
||||
' // Invalid value
|
||||
Throw New ArgumentNullException("cpMainConnectionProvider", "Nothing passed as value to this property which is not allowed.")
|
||||
End If
|
||||
|
||||
' // A connection provider object is passed to this class.
|
||||
' // Retrieve the SqlConnection object, if present and create a
|
||||
' // reference to it. If there is already a MainConnection object
|
||||
' // referenced by the membervar, destroy that one or simply
|
||||
' // remove the reference, based on the flag.
|
||||
If Not (m_scoMainConnection Is Nothing) Then
|
||||
' // First get rid of current connection object. Caller is responsible
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Is local created object, close it and dispose it.
|
||||
m_scoMainConnection.Close()
|
||||
m_scoMainConnection.Dispose()
|
||||
End If
|
||||
' // Remove reference.
|
||||
m_scoMainConnection = Nothing
|
||||
End If
|
||||
m_cpMainConnectionProvider = CType(Value, clsConnectionProvider)
|
||||
m_scoMainConnection = m_cpMainConnectionProvider.scoDBConnection
|
||||
m_bMainConnectionIsCreatedLocal = False
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public ReadOnly Property iErrorCode() As SqlInt32
|
||||
Get
|
||||
Return m_iErrorCode
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Public Property sConnectionString() As String
|
||||
Get
|
||||
Return m_sConnectionString
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_sConnectionString = Value
|
||||
m_scoMainConnection.ConnectionString = m_sConnectionString
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
520
Archiv/EDKB01/DB/clsEDEX_BL_Hostdokument.vb
Normal file
520
Archiv/EDKB01/DB/clsEDEX_BL_Hostdokument.vb
Normal file
@@ -0,0 +1,520 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'EDEX_BL_Hostdokument'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Freitag, 24. Juni 2005, 08:16:40
|
||||
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Data Access class for the table 'EDEX_BL_Hostdokument'.
|
||||
' /// </summary>
|
||||
Public Class clsEDEX_BL_Hostdokument
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_daInserttimestamp As SqlDateTime
|
||||
Private m_iBl_status, m_iAuslieferung_nr As SqlInt32
|
||||
Private m_sStandamdatum, m_sEx, m_sArchivdatum, m_sVvextern1, m_sVvextern2, m_sRes2, m_sRes3, m_sRes1, m_sDokumenttypnr, m_sLoadid, m_sPartnername_zusteller, m_sReferenzzeile1, m_sReferenzzeile2, m_sPartnernr_inhaber, m_sPartnernr_zusteller, m_sPartnername_inhaber, m_sValutadatum, m_sDokumentid, m_sAnzahlseiten, m_sNachvollziehbarkeit, m_sValutadatum1, m_sValorennr, m_sIsinnr As SqlString
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>sPartnernr_inhaber. May be SqlString.Null</LI>
|
||||
' /// <LI>sPartnernr_zusteller. May be SqlString.Null</LI>
|
||||
' /// <LI>sPartnername_inhaber. May be SqlString.Null</LI>
|
||||
' /// <LI>sPartnername_zusteller. May be SqlString.Null</LI>
|
||||
' /// <LI>sReferenzzeile1. May be SqlString.Null</LI>
|
||||
' /// <LI>sReferenzzeile2. May be SqlString.Null</LI>
|
||||
' /// <LI>sValutadatum. May be SqlString.Null</LI>
|
||||
' /// <LI>sValutadatum1. May be SqlString.Null</LI>
|
||||
' /// <LI>sValorennr. May be SqlString.Null</LI>
|
||||
' /// <LI>sIsinnr. May be SqlString.Null</LI>
|
||||
' /// <LI>sDokumentid. May be SqlString.Null</LI>
|
||||
' /// <LI>sAnzahlseiten. May be SqlString.Null</LI>
|
||||
' /// <LI>sNachvollziehbarkeit. May be SqlString.Null</LI>
|
||||
' /// <LI>sArchivdatum. May be SqlString.Null</LI>
|
||||
' /// <LI>sVvextern1. May be SqlString.Null</LI>
|
||||
' /// <LI>sVvextern2. May be SqlString.Null</LI>
|
||||
' /// <LI>sEx. May be SqlString.Null</LI>
|
||||
' /// <LI>sStandamdatum. May be SqlString.Null</LI>
|
||||
' /// <LI>sDokumenttypnr. May be SqlString.Null</LI>
|
||||
' /// <LI>sLoadid. May be SqlString.Null</LI>
|
||||
' /// <LI>daInserttimestamp. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iBl_status. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sRes1. May be SqlString.Null</LI>
|
||||
' /// <LI>sRes2. May be SqlString.Null</LI>
|
||||
' /// <LI>sRes3. May be SqlString.Null</LI>
|
||||
' /// <LI>iAuslieferung_nr. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
'scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_EDEX_BL_Hostdokument_Insert]"
|
||||
scmCmdToExecute.CommandText = "dbo.[sp_edex_bl_EDEX_BL_Hostdokument_Insert]" 'Num Konzept
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnernr_inhaber", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr_inhaber))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnernr_zusteller", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr_zusteller))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnername_inhaber", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sPartnername_inhaber))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnername_zusteller", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sPartnername_zusteller))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sreferenzzeile1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReferenzzeile1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sreferenzzeile2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReferenzzeile2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svalutadatum", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sValutadatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svalutadatum1", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sValutadatum1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svalorennr", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sValorennr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sisinnr", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sIsinnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sanzahlseiten", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAnzahlseiten))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@snachvollziehbarkeit", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNachvollziehbarkeit))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sarchivdatum", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sArchivdatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svvextern1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVvextern1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svvextern2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVvextern2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sex", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEx))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sstandamdatum", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStandamdatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumenttypnr", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumenttypnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sloadid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sLoadid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dainserttimestamp", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daInserttimestamp))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibl_status", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBl_status))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRes1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRes2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres3", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRes3))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iauslieferung_nr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAuslieferung_nr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sMailingProductID", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_sMailingProductID))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sMailingProductBezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_sMailingProductBezeichnung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sMetaType", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_sMetaType))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sOrderType", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_sOrderType))
|
||||
|
||||
|
||||
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_edex_bl_EDEX_BL_Hostdokument_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsEDEX_BL_Hostdokument::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_EDEX_BL_Hostdokument_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("EDEX_BL_Hostdokument")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_edex_bl_EDEX_BL_Hostdokument_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsEDEX_BL_Hostdokument::SelectAll::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public Property [sPartnernr_inhaber]() As SqlString
|
||||
Get
|
||||
Return m_sPartnernr_inhaber
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sPartnernr_inhaber = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sPartnernr_zusteller]() As SqlString
|
||||
Get
|
||||
Return m_sPartnernr_zusteller
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sPartnernr_zusteller = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sPartnername_inhaber]() As SqlString
|
||||
Get
|
||||
Return m_sPartnername_inhaber
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sPartnername_inhaber = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_sMailingProductID As String
|
||||
Public Property [sMailingProductID]() As SqlString
|
||||
Get
|
||||
Return m_sMailingProductID
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sMailingProductID = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_sMailingProductBezeichnung As String
|
||||
Public Property [sMailingProductBezeichnung]() As SqlString
|
||||
Get
|
||||
Return m_sMailingProductBezeichnung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sMailingProductBezeichnung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_sMetaType As String
|
||||
Public Property [sMetaType]() As SqlString
|
||||
Get
|
||||
Return m_sMetaType
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sMetaType = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_sOrderType As String
|
||||
Public Property [sOrderType]() As SqlString
|
||||
Get
|
||||
Return m_sOrderType
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sOrderType = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_sTransactnr As String
|
||||
Public Property [sTransactnr]() As SqlString
|
||||
Get
|
||||
Return m_sTransactnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sTransactnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sPartnername_zusteller]() As SqlString
|
||||
Get
|
||||
Return m_sPartnername_zusteller
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sPartnername_zusteller = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sReferenzzeile1]() As SqlString
|
||||
Get
|
||||
Return m_sReferenzzeile1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sReferenzzeile1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sReferenzzeile2]() As SqlString
|
||||
Get
|
||||
Return m_sReferenzzeile2
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sReferenzzeile2 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sValutadatum]() As SqlString
|
||||
Get
|
||||
Return m_sValutadatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sValutadatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sValutadatum1]() As SqlString
|
||||
Get
|
||||
Return m_sValutadatum1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sValutadatum1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sValorennr]() As SqlString
|
||||
Get
|
||||
Return m_sValorennr
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sValorennr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sIsinnr]() As SqlString
|
||||
Get
|
||||
Return m_sIsinnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sIsinnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDokumentid]() As SqlString
|
||||
Get
|
||||
Return m_sDokumentid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDokumentid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sAnzahlseiten]() As SqlString
|
||||
Get
|
||||
Return m_sAnzahlseiten
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sAnzahlseiten = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNachvollziehbarkeit]() As SqlString
|
||||
Get
|
||||
Return m_sNachvollziehbarkeit
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNachvollziehbarkeit = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sArchivdatum]() As SqlString
|
||||
Get
|
||||
Return m_sArchivdatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sArchivdatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sVvextern1]() As SqlString
|
||||
Get
|
||||
Return m_sVvextern1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sVvextern1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sVvextern2]() As SqlString
|
||||
Get
|
||||
Return m_sVvextern2
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sVvextern2 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sEx]() As SqlString
|
||||
Get
|
||||
Return m_sEx
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sEx = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sStandamdatum]() As SqlString
|
||||
Get
|
||||
Return m_sStandamdatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sStandamdatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDokumenttypnr]() As SqlString
|
||||
Get
|
||||
Return m_sDokumenttypnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDokumenttypnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sLoadid]() As SqlString
|
||||
Get
|
||||
Return m_sLoadid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sLoadid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daInserttimestamp]() As SqlDateTime
|
||||
Get
|
||||
Return m_daInserttimestamp
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daInserttimestamp = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iBl_status]() As SqlInt32
|
||||
Get
|
||||
Return m_iBl_status
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iBl_status = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sRes1]() As SqlString
|
||||
Get
|
||||
Return m_sRes1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sRes1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sRes2]() As SqlString
|
||||
Get
|
||||
Return m_sRes2
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sRes2 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sRes3]() As SqlString
|
||||
Get
|
||||
Return m_sRes3
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sRes3 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iAuslieferung_nr]() As SqlInt32
|
||||
Get
|
||||
Return m_iAuslieferung_nr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iAuslieferung_nr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
727
Archiv/EDKB01/DB/clsHost_dokument.vb
Normal file
727
Archiv/EDKB01/DB/clsHost_dokument.vb
Normal file
@@ -0,0 +1,727 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'host_dokument'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Montag, 30. Juni 2003, 10:32:51
|
||||
' // 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 'host_dokument'.
|
||||
' /// </summary>
|
||||
Public Class clsHost_dokument
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_sArchivdatum, m_sVvextern1, m_sNachvollziehbarkeit, m_sDokumentid, m_sAnzahlseiten, m_sDokumenttypnr, m_sLoadid, m_sStandamdatum, m_sVvextern2, m_sEx, m_sPartnername_zusteller, m_sReferenzzeile1, m_sPartnername_inhaber, m_sPartnernr_inhaber, m_sPartnernr_zusteller, m_sValorennr, m_sIsinnr, m_sValutadatum1, m_sReferenzzeile2, m_sValutadatum As SqlString
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>sPartnernr_inhaber</LI>
|
||||
' /// <LI>sPartnernr_zusteller. May be SqlString.Null</LI>
|
||||
' /// <LI>sPartnername_inhaber</LI>
|
||||
' /// <LI>sPartnername_zusteller. May be SqlString.Null</LI>
|
||||
' /// <LI>sReferenzzeile1. May be SqlString.Null</LI>
|
||||
' /// <LI>sReferenzzeile2. May be SqlString.Null</LI>
|
||||
' /// <LI>sValutadatum</LI>
|
||||
' /// <LI>sValutadatum1. May be SqlString.Null</LI>
|
||||
' /// <LI>sValorennr. May be SqlString.Null</LI>
|
||||
' /// <LI>sIsinnr. May be SqlString.Null</LI>
|
||||
' /// <LI>sDokumentid</LI>
|
||||
' /// <LI>sAnzahlseiten</LI>
|
||||
' /// <LI>sNachvollziehbarkeit</LI>
|
||||
' /// <LI>sArchivdatum</LI>
|
||||
' /// <LI>sVvextern1. May be SqlString.Null</LI>
|
||||
' /// <LI>sVvextern2. May be SqlString.Null</LI>
|
||||
' /// <LI>sEx. May be SqlString.Null</LI>
|
||||
' /// <LI>sStandamdatum. May be SqlString.Null</LI>
|
||||
' /// <LI>sDokumenttypnr. May be SqlString.Null</LI>
|
||||
' /// <LI>sLoadid. May be SqlString.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_host_dokument_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnernr_inhaber", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr_inhaber))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnernr_zusteller", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr_zusteller))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnername_inhaber", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPartnername_inhaber))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnername_zusteller", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sPartnername_zusteller))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sreferenzzeile1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReferenzzeile1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sreferenzzeile2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReferenzzeile2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svalutadatum", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sValutadatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svalutadatum1", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sValutadatum1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svalorennr", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sValorennr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sisinnr", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sIsinnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sanzahlseiten", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sAnzahlseiten))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@snachvollziehbarkeit", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sNachvollziehbarkeit))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sarchivdatum", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sArchivdatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svvextern1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVvextern1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svvextern2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVvextern2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sex", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEx))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sstandamdatum", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStandamdatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumenttypnr", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumenttypnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sloadid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sLoadid))
|
||||
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_host_dokument_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Console.WriteLine(m_sDokumentid.Value & " : " & ex.Message)
|
||||
Throw New Exception("clsHost_dokument::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>sPartnernr_inhaber</LI>
|
||||
' /// <LI>sPartnernr_zusteller. May be SqlString.Null</LI>
|
||||
' /// <LI>sPartnername_inhaber</LI>
|
||||
' /// <LI>sPartnername_zusteller. May be SqlString.Null</LI>
|
||||
' /// <LI>sReferenzzeile1. May be SqlString.Null</LI>
|
||||
' /// <LI>sReferenzzeile2. May be SqlString.Null</LI>
|
||||
' /// <LI>sValutadatum</LI>
|
||||
' /// <LI>sValutadatum1. May be SqlString.Null</LI>
|
||||
' /// <LI>sValorennr. May be SqlString.Null</LI>
|
||||
' /// <LI>sIsinnr. May be SqlString.Null</LI>
|
||||
' /// <LI>sDokumentid</LI>
|
||||
' /// <LI>sAnzahlseiten</LI>
|
||||
' /// <LI>sNachvollziehbarkeit</LI>
|
||||
' /// <LI>sArchivdatum</LI>
|
||||
' /// <LI>sVvextern1. May be SqlString.Null</LI>
|
||||
' /// <LI>sVvextern2. May be SqlString.Null</LI>
|
||||
' /// <LI>sEx. May be SqlString.Null</LI>
|
||||
' /// <LI>sStandamdatum. May be SqlString.Null</LI>
|
||||
' /// <LI>sDokumenttypnr. May be SqlString.Null</LI>
|
||||
' /// <LI>sLoadid. 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_host_dokument_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnernr_inhaber", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr_inhaber))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnernr_zusteller", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr_zusteller))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnername_inhaber", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPartnername_inhaber))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnername_zusteller", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sPartnername_zusteller))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sreferenzzeile1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReferenzzeile1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sreferenzzeile2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReferenzzeile2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svalutadatum", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sValutadatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svalutadatum1", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sValutadatum1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svalorennr", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sValorennr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sisinnr", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sIsinnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sanzahlseiten", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sAnzahlseiten))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@snachvollziehbarkeit", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sNachvollziehbarkeit))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sarchivdatum", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sArchivdatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svvextern1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVvextern1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svvextern2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVvextern2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sex", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEx))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sstandamdatum", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStandamdatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumenttypnr", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumenttypnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sloadid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sLoadid))
|
||||
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_host_dokument_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("clsHost_dokument::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>sDokumentid</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_host_dokument_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
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_host_dokument_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("clsHost_dokument::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>sDokumentid</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>sPartnernr_inhaber</LI>
|
||||
' /// <LI>sPartnernr_zusteller</LI>
|
||||
' /// <LI>sPartnername_inhaber</LI>
|
||||
' /// <LI>sPartnername_zusteller</LI>
|
||||
' /// <LI>sReferenzzeile1</LI>
|
||||
' /// <LI>sReferenzzeile2</LI>
|
||||
' /// <LI>sValutadatum</LI>
|
||||
' /// <LI>sValutadatum1</LI>
|
||||
' /// <LI>sValorennr</LI>
|
||||
' /// <LI>sIsinnr</LI>
|
||||
' /// <LI>sDokumentid</LI>
|
||||
' /// <LI>sAnzahlseiten</LI>
|
||||
' /// <LI>sNachvollziehbarkeit</LI>
|
||||
' /// <LI>sArchivdatum</LI>
|
||||
' /// <LI>sVvextern1</LI>
|
||||
' /// <LI>sVvextern2</LI>
|
||||
' /// <LI>sEx</LI>
|
||||
' /// <LI>sStandamdatum</LI>
|
||||
' /// <LI>sDokumenttypnr</LI>
|
||||
' /// <LI>sLoadid</LI>
|
||||
' /// </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_host_dokument_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("host_dokument")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@sdokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
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_host_dokument_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_sPartnernr_inhaber = New SqlString(CType(dtToReturn.Rows(0)("partnernr_inhaber"), String))
|
||||
If dtToReturn.Rows(0)("partnernr_zusteller") Is System.DBNull.Value Then
|
||||
m_sPartnernr_zusteller = SqlString.Null
|
||||
Else
|
||||
m_sPartnernr_zusteller = New SqlString(CType(dtToReturn.Rows(0)("partnernr_zusteller"), String))
|
||||
End If
|
||||
m_sPartnername_inhaber = New SqlString(CType(dtToReturn.Rows(0)("partnername_inhaber"), String))
|
||||
If dtToReturn.Rows(0)("partnername_zusteller") Is System.DBNull.Value Then
|
||||
m_sPartnername_zusteller = SqlString.Null
|
||||
Else
|
||||
m_sPartnername_zusteller = New SqlString(CType(dtToReturn.Rows(0)("partnername_zusteller"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("referenzzeile1") Is System.DBNull.Value Then
|
||||
m_sReferenzzeile1 = SqlString.Null
|
||||
Else
|
||||
m_sReferenzzeile1 = New SqlString(CType(dtToReturn.Rows(0)("referenzzeile1"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("referenzzeile2") Is System.DBNull.Value Then
|
||||
m_sReferenzzeile2 = SqlString.Null
|
||||
Else
|
||||
m_sReferenzzeile2 = New SqlString(CType(dtToReturn.Rows(0)("referenzzeile2"), String))
|
||||
End If
|
||||
m_sValutadatum = New SqlString(CType(dtToReturn.Rows(0)("valutadatum"), String))
|
||||
If dtToReturn.Rows(0)("valutadatum1") Is System.DBNull.Value Then
|
||||
m_sValutadatum1 = SqlString.Null
|
||||
Else
|
||||
m_sValutadatum1 = New SqlString(CType(dtToReturn.Rows(0)("valutadatum1"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("valorennr") Is System.DBNull.Value Then
|
||||
m_sValorennr = SqlString.Null
|
||||
Else
|
||||
m_sValorennr = New SqlString(CType(dtToReturn.Rows(0)("valorennr"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("isinnr") Is System.DBNull.Value Then
|
||||
m_sIsinnr = SqlString.Null
|
||||
Else
|
||||
m_sIsinnr = New SqlString(CType(dtToReturn.Rows(0)("isinnr"), String))
|
||||
End If
|
||||
m_sDokumentid = New SqlString(CType(dtToReturn.Rows(0)("dokumentid"), String))
|
||||
m_sAnzahlseiten = New SqlString(CType(dtToReturn.Rows(0)("anzahlseiten"), String))
|
||||
m_sNachvollziehbarkeit = New SqlString(CType(dtToReturn.Rows(0)("nachvollziehbarkeit"), String))
|
||||
m_sArchivdatum = New SqlString(CType(dtToReturn.Rows(0)("archivdatum"), String))
|
||||
If dtToReturn.Rows(0)("vvextern1") Is System.DBNull.Value Then
|
||||
m_sVvextern1 = SqlString.Null
|
||||
Else
|
||||
m_sVvextern1 = New SqlString(CType(dtToReturn.Rows(0)("vvextern1"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("vvextern2") Is System.DBNull.Value Then
|
||||
m_sVvextern2 = SqlString.Null
|
||||
Else
|
||||
m_sVvextern2 = New SqlString(CType(dtToReturn.Rows(0)("vvextern2"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("ex") Is System.DBNull.Value Then
|
||||
m_sEx = SqlString.Null
|
||||
Else
|
||||
m_sEx = New SqlString(CType(dtToReturn.Rows(0)("ex"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("standamdatum") Is System.DBNull.Value Then
|
||||
m_sStandamdatum = SqlString.Null
|
||||
Else
|
||||
m_sStandamdatum = New SqlString(CType(dtToReturn.Rows(0)("standamdatum"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("dokumenttypnr") Is System.DBNull.Value Then
|
||||
m_sDokumenttypnr = SqlString.Null
|
||||
Else
|
||||
m_sDokumenttypnr = New SqlString(CType(dtToReturn.Rows(0)("dokumenttypnr"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("loadid") Is System.DBNull.Value Then
|
||||
m_sLoadid = SqlString.Null
|
||||
Else
|
||||
m_sLoadid = New SqlString(CType(dtToReturn.Rows(0)("loadid"), 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("clsHost_dokument::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_host_dokument_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("host_dokument")
|
||||
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_host_dokument_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("clsHost_dokument::SelectAll::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public Property [sPartnernr_inhaber]() As SqlString
|
||||
Get
|
||||
Return m_sPartnernr_inhaber
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sPartnernr_inhaberTmp As SqlString = Value
|
||||
If sPartnernr_inhaberTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sPartnernr_inhaber", "sPartnernr_inhaber can't be NULL")
|
||||
End If
|
||||
m_sPartnernr_inhaber = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sPartnernr_zusteller]() As SqlString
|
||||
Get
|
||||
Return m_sPartnernr_zusteller
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sPartnernr_zusteller = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sPartnername_inhaber]() As SqlString
|
||||
Get
|
||||
Return m_sPartnername_inhaber
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sPartnername_inhaberTmp As SqlString = Value
|
||||
If sPartnername_inhaberTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sPartnername_inhaber", "sPartnername_inhaber can't be NULL")
|
||||
End If
|
||||
m_sPartnername_inhaber = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sPartnername_zusteller]() As SqlString
|
||||
Get
|
||||
Return m_sPartnername_zusteller
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sPartnername_zusteller = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sReferenzzeile1]() As SqlString
|
||||
Get
|
||||
Return m_sReferenzzeile1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sReferenzzeile1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sReferenzzeile2]() As SqlString
|
||||
Get
|
||||
Return m_sReferenzzeile2
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sReferenzzeile2 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sValutadatum]() As SqlString
|
||||
Get
|
||||
Return m_sValutadatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sValutadatumTmp As SqlString = Value
|
||||
If sValutadatumTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sValutadatum", "sValutadatum can't be NULL")
|
||||
End If
|
||||
m_sValutadatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sValutadatum1]() As SqlString
|
||||
Get
|
||||
Return m_sValutadatum1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sValutadatum1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sValorennr]() As SqlString
|
||||
Get
|
||||
Return m_sValorennr
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sValorennr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sIsinnr]() As SqlString
|
||||
Get
|
||||
Return m_sIsinnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sIsinnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDokumentid]() As SqlString
|
||||
Get
|
||||
Return m_sDokumentid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sDokumentidTmp As SqlString = Value
|
||||
If sDokumentidTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sDokumentid", "sDokumentid can't be NULL")
|
||||
End If
|
||||
m_sDokumentid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sAnzahlseiten]() As SqlString
|
||||
Get
|
||||
Return m_sAnzahlseiten
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sAnzahlseitenTmp As SqlString = Value
|
||||
If sAnzahlseitenTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sAnzahlseiten", "sAnzahlseiten can't be NULL")
|
||||
End If
|
||||
m_sAnzahlseiten = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNachvollziehbarkeit]() As SqlString
|
||||
Get
|
||||
Return m_sNachvollziehbarkeit
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sNachvollziehbarkeitTmp As SqlString = Value
|
||||
If sNachvollziehbarkeitTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sNachvollziehbarkeit", "sNachvollziehbarkeit can't be NULL")
|
||||
End If
|
||||
m_sNachvollziehbarkeit = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sArchivdatum]() As SqlString
|
||||
Get
|
||||
Return m_sArchivdatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sArchivdatumTmp As SqlString = Value
|
||||
If sArchivdatumTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sArchivdatum", "sArchivdatum can't be NULL")
|
||||
End If
|
||||
m_sArchivdatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sVvextern1]() As SqlString
|
||||
Get
|
||||
Return m_sVvextern1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sVvextern1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sVvextern2]() As SqlString
|
||||
Get
|
||||
Return m_sVvextern2
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sVvextern2 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sEx]() As SqlString
|
||||
Get
|
||||
Return m_sEx
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sEx = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sStandamdatum]() As SqlString
|
||||
Get
|
||||
Return m_sStandamdatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sStandamdatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDokumenttypnr]() As SqlString
|
||||
Get
|
||||
Return m_sDokumenttypnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDokumenttypnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sLoadid]() As SqlString
|
||||
Get
|
||||
Return m_sLoadid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sLoadid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
430
Archiv/EDKB01/DB/clsHost_dokument_data.vb
Normal file
430
Archiv/EDKB01/DB/clsHost_dokument_data.vb
Normal file
@@ -0,0 +1,430 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'host_dokument_data'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 13. Juli 2004, 00:23:21
|
||||
' // 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 'host_dokument_data'.
|
||||
' /// </summary>
|
||||
Public Class clsHost_dokument_data
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_daInserttimestamp As SqlDateTime
|
||||
Private m_sArchivdatum, m_sVvextern1, m_sAnzahlseiten, m_sNachvollziehbarkeit, m_sVvextern2, m_sDokumenttypnr, m_sLoadid, m_sEx, m_sStandamdatum, m_sDokumentid, m_sPartnername_zusteller, m_sReferenzzeile1, m_sPartnername_inhaber, m_sPartnernr_inhaber, m_sPartnernr_zusteller, m_sValorennr, m_sIsinnr, m_sValutadatum1, m_sReferenzzeile2, m_sValutadatum As SqlString
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>sPartnernr_inhaber</LI>
|
||||
' /// <LI>sPartnernr_zusteller. May be SqlString.Null</LI>
|
||||
' /// <LI>sPartnername_inhaber</LI>
|
||||
' /// <LI>sPartnername_zusteller. May be SqlString.Null</LI>
|
||||
' /// <LI>sReferenzzeile1. May be SqlString.Null</LI>
|
||||
' /// <LI>sReferenzzeile2. May be SqlString.Null</LI>
|
||||
' /// <LI>sValutadatum</LI>
|
||||
' /// <LI>sValutadatum1. May be SqlString.Null</LI>
|
||||
' /// <LI>sValorennr. May be SqlString.Null</LI>
|
||||
' /// <LI>sIsinnr. May be SqlString.Null</LI>
|
||||
' /// <LI>sDokumentid</LI>
|
||||
' /// <LI>sAnzahlseiten</LI>
|
||||
' /// <LI>sNachvollziehbarkeit</LI>
|
||||
' /// <LI>sArchivdatum</LI>
|
||||
' /// <LI>sVvextern1. May be SqlString.Null</LI>
|
||||
' /// <LI>sVvextern2. May be SqlString.Null</LI>
|
||||
' /// <LI>sEx. May be SqlString.Null</LI>
|
||||
' /// <LI>sStandamdatum. May be SqlString.Null</LI>
|
||||
' /// <LI>sDokumenttypnr. May be SqlString.Null</LI>
|
||||
' /// <LI>sLoadid. May be SqlString.Null</LI>
|
||||
' /// <LI>daInserttimestamp. May be SqlDateTime.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_host_dokument_data_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnernr_inhaber", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr_inhaber))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnernr_zusteller", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr_zusteller))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnername_inhaber", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPartnername_inhaber))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnername_zusteller", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sPartnername_zusteller))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sreferenzzeile1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReferenzzeile1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sreferenzzeile2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReferenzzeile2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svalutadatum", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sValutadatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svalutadatum1", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sValutadatum1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svalorennr", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sValorennr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sisinnr", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sIsinnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sanzahlseiten", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sAnzahlseiten))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@snachvollziehbarkeit", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sNachvollziehbarkeit))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sarchivdatum", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sArchivdatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svvextern1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVvextern1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svvextern2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVvextern2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sex", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEx))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sstandamdatum", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStandamdatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumenttypnr", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumenttypnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sloadid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sLoadid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dainserttimestamp", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daInserttimestamp))
|
||||
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_host_dokument_data_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("clsHost_dokument_data::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_host_dokument_data_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("host_dokument_data")
|
||||
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_host_dokument_data_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("clsHost_dokument_data::SelectAll::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public Property [sPartnernr_inhaber]() As SqlString
|
||||
Get
|
||||
Return m_sPartnernr_inhaber
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sPartnernr_inhaberTmp As SqlString = Value
|
||||
If sPartnernr_inhaberTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sPartnernr_inhaber", "sPartnernr_inhaber can't be NULL")
|
||||
End If
|
||||
m_sPartnernr_inhaber = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sPartnernr_zusteller]() As SqlString
|
||||
Get
|
||||
Return m_sPartnernr_zusteller
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sPartnernr_zusteller = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sPartnername_inhaber]() As SqlString
|
||||
Get
|
||||
Return m_sPartnername_inhaber
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sPartnername_inhaberTmp As SqlString = Value
|
||||
If sPartnername_inhaberTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sPartnername_inhaber", "sPartnername_inhaber can't be NULL")
|
||||
End If
|
||||
m_sPartnername_inhaber = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sPartnername_zusteller]() As SqlString
|
||||
Get
|
||||
Return m_sPartnername_zusteller
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sPartnername_zusteller = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sReferenzzeile1]() As SqlString
|
||||
Get
|
||||
Return m_sReferenzzeile1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sReferenzzeile1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sReferenzzeile2]() As SqlString
|
||||
Get
|
||||
Return m_sReferenzzeile2
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sReferenzzeile2 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sValutadatum]() As SqlString
|
||||
Get
|
||||
Return m_sValutadatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sValutadatumTmp As SqlString = Value
|
||||
If sValutadatumTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sValutadatum", "sValutadatum can't be NULL")
|
||||
End If
|
||||
m_sValutadatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sValutadatum1]() As SqlString
|
||||
Get
|
||||
Return m_sValutadatum1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sValutadatum1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sValorennr]() As SqlString
|
||||
Get
|
||||
Return m_sValorennr
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sValorennr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sIsinnr]() As SqlString
|
||||
Get
|
||||
Return m_sIsinnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sIsinnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDokumentid]() As SqlString
|
||||
Get
|
||||
Return m_sDokumentid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sDokumentidTmp As SqlString = Value
|
||||
If sDokumentidTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sDokumentid", "sDokumentid can't be NULL")
|
||||
End If
|
||||
m_sDokumentid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sAnzahlseiten]() As SqlString
|
||||
Get
|
||||
Return m_sAnzahlseiten
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sAnzahlseitenTmp As SqlString = Value
|
||||
If sAnzahlseitenTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sAnzahlseiten", "sAnzahlseiten can't be NULL")
|
||||
End If
|
||||
m_sAnzahlseiten = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNachvollziehbarkeit]() As SqlString
|
||||
Get
|
||||
Return m_sNachvollziehbarkeit
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sNachvollziehbarkeitTmp As SqlString = Value
|
||||
If sNachvollziehbarkeitTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sNachvollziehbarkeit", "sNachvollziehbarkeit can't be NULL")
|
||||
End If
|
||||
m_sNachvollziehbarkeit = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sArchivdatum]() As SqlString
|
||||
Get
|
||||
Return m_sArchivdatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sArchivdatumTmp As SqlString = Value
|
||||
If sArchivdatumTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sArchivdatum", "sArchivdatum can't be NULL")
|
||||
End If
|
||||
m_sArchivdatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sVvextern1]() As SqlString
|
||||
Get
|
||||
Return m_sVvextern1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sVvextern1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sVvextern2]() As SqlString
|
||||
Get
|
||||
Return m_sVvextern2
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sVvextern2 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sEx]() As SqlString
|
||||
Get
|
||||
Return m_sEx
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sEx = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sStandamdatum]() As SqlString
|
||||
Get
|
||||
Return m_sStandamdatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sStandamdatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDokumenttypnr]() As SqlString
|
||||
Get
|
||||
Return m_sDokumenttypnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDokumenttypnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sLoadid]() As SqlString
|
||||
Get
|
||||
Return m_sLoadid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sLoadid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daInserttimestamp]() As SqlDateTime
|
||||
Get
|
||||
Return m_daInserttimestamp
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daInserttimestamp = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
524
Archiv/EDKB01/DB/clsHost_dokument_import.vb
Normal file
524
Archiv/EDKB01/DB/clsHost_dokument_import.vb
Normal file
@@ -0,0 +1,524 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'host_dokument_import'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 13. Juli 2004, 00:23:21
|
||||
' // 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 'host_dokument_import'.
|
||||
' /// </summary>
|
||||
Public Class clsHost_dokument_import
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_daInserttimestamp As SqlDateTime
|
||||
Private m_sArchivdatum, m_sVvextern1, m_sAnzahlseiten, m_sNachvollziehbarkeit, m_sVvextern2, m_sDokumenttypnr, m_sLoadid, m_sEx, m_sStandamdatum, m_sDokumentid, m_sPartnername_zusteller, m_sReferenzzeile1, m_sPartnername_inhaber, m_sPartnernr_inhaber, m_sPartnernr_zusteller, m_sValorennr, m_sIsinnr, m_sValutadatum1, m_sReferenzzeile2, m_sValutadatum, m_sMetatype, m_sOrdertype1, m_sOrdertype2, m_sTransactnr, m_sManr, m_sMailingProduct, m_sMailingProductBezeichnung, m_sBetreffzeile, m_sXomaDocID As SqlString
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>sPartnernr_inhaber</LI>
|
||||
' /// <LI>sPartnernr_zusteller. May be SqlString.Null</LI>
|
||||
' /// <LI>sPartnername_inhaber</LI>
|
||||
' /// <LI>sPartnername_zusteller. May be SqlString.Null</LI>
|
||||
' /// <LI>sReferenzzeile1. May be SqlString.Null</LI>
|
||||
' /// <LI>sReferenzzeile2. May be SqlString.Null</LI>
|
||||
' /// <LI>sValutadatum</LI>
|
||||
' /// <LI>sValutadatum1. May be SqlString.Null</LI>
|
||||
' /// <LI>sValorennr. May be SqlString.Null</LI>
|
||||
' /// <LI>sIsinnr. May be SqlString.Null</LI>
|
||||
' /// <LI>sDokumentid</LI>
|
||||
' /// <LI>sAnzahlseiten</LI>
|
||||
' /// <LI>sNachvollziehbarkeit</LI>
|
||||
' /// <LI>sArchivdatum</LI>
|
||||
' /// <LI>sVvextern1. May be SqlString.Null</LI>
|
||||
' /// <LI>sVvextern2. May be SqlString.Null</LI>
|
||||
' /// <LI>sEx. May be SqlString.Null</LI>
|
||||
' /// <LI>sStandamdatum. May be SqlString.Null</LI>
|
||||
' /// <LI>sDokumenttypnr. May be SqlString.Null</LI>
|
||||
' /// <LI>sLoadid. May be SqlString.Null</LI>
|
||||
' /// <LI>daInserttimestamp. May be SqlDateTime.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
|
||||
'scmCmdToExecute.CommandText = "dbo.[pr_host_dokument_import_Insert]" 'früher
|
||||
scmCmdToExecute.CommandText = "dbo.[sp_host_dokument_import_Insert]" 'seit Nummerierungkonzept Teil 2
|
||||
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnernr_inhaber", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr_inhaber))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnernr_zusteller", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr_zusteller))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnername_inhaber", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPartnername_inhaber))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnername_zusteller", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sPartnername_zusteller))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sreferenzzeile1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReferenzzeile1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sreferenzzeile2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReferenzzeile2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svalutadatum", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sValutadatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svalutadatum1", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sValutadatum1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svalorennr", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sValorennr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sisinnr", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sIsinnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sanzahlseiten", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sAnzahlseiten))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@snachvollziehbarkeit", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sNachvollziehbarkeit))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sarchivdatum", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sArchivdatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svvextern1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVvextern1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svvextern2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVvextern2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sex", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEx))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sstandamdatum", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStandamdatum))
|
||||
' Neu auf Mailing-Product! (alt auf DokumentTypNr
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sMailingProduct", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sMailingProduct))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sloadid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sLoadid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumenttypnr", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, ""))
|
||||
'Neue Indexfelder
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sMailingProductBezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sMailingProductBezeichnung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBetreffzeile", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, sBetreffzeile))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sMetatype", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sMetatype))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sOrdertype", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sOrdertype1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sTransactnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTransactnr.ToSqlInt32))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sManr", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sManr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sXomaDocID", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sXomaDocID))
|
||||
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dainserttimestamp", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daInserttimestamp))
|
||||
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_host_dokument_import_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("clsHost_dokument_import::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_host_dokument_import_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("host_dokument_import")
|
||||
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_host_dokument_import_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("clsHost_dokument_import::SelectAll::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public Property [sPartnernr_inhaber]() As SqlString
|
||||
Get
|
||||
Return m_sPartnernr_inhaber
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sPartnernr_inhaberTmp As SqlString = Value
|
||||
If sPartnernr_inhaberTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sPartnernr_inhaber", "sPartnernr_inhaber can't be NULL")
|
||||
End If
|
||||
m_sPartnernr_inhaber = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sPartnernr_zusteller]() As SqlString
|
||||
Get
|
||||
Return m_sPartnernr_zusteller
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sPartnernr_zusteller = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sPartnername_inhaber]() As SqlString
|
||||
Get
|
||||
Return m_sPartnername_inhaber
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sPartnername_inhaberTmp As SqlString = Value
|
||||
If sPartnername_inhaberTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sPartnername_inhaber", "sPartnername_inhaber can't be NULL")
|
||||
End If
|
||||
m_sPartnername_inhaber = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sPartnername_zusteller]() As SqlString
|
||||
Get
|
||||
Return m_sPartnername_zusteller
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sPartnername_zusteller = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sReferenzzeile1]() As SqlString
|
||||
Get
|
||||
Return m_sReferenzzeile1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sReferenzzeile1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sReferenzzeile2]() As SqlString
|
||||
Get
|
||||
Return m_sReferenzzeile2
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sReferenzzeile2 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sValutadatum]() As SqlString
|
||||
Get
|
||||
Return m_sValutadatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sValutadatumTmp As SqlString = Value
|
||||
If sValutadatumTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sValutadatum", "sValutadatum can't be NULL")
|
||||
End If
|
||||
m_sValutadatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sValutadatum1]() As SqlString
|
||||
Get
|
||||
Return m_sValutadatum1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sValutadatum1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sValorennr]() As SqlString
|
||||
Get
|
||||
Return m_sValorennr
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sValorennr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sIsinnr]() As SqlString
|
||||
Get
|
||||
Return m_sIsinnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sIsinnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDokumentid]() As SqlString
|
||||
Get
|
||||
Return m_sDokumentid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sDokumentidTmp As SqlString = Value
|
||||
If sDokumentidTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sDokumentid", "sDokumentid can't be NULL")
|
||||
End If
|
||||
m_sDokumentid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sAnzahlseiten]() As SqlString
|
||||
Get
|
||||
Return m_sAnzahlseiten
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sAnzahlseitenTmp As SqlString = Value
|
||||
If sAnzahlseitenTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sAnzahlseiten", "sAnzahlseiten can't be NULL")
|
||||
End If
|
||||
m_sAnzahlseiten = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNachvollziehbarkeit]() As SqlString
|
||||
Get
|
||||
Return m_sNachvollziehbarkeit
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sNachvollziehbarkeitTmp As SqlString = Value
|
||||
If sNachvollziehbarkeitTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sNachvollziehbarkeit", "sNachvollziehbarkeit can't be NULL")
|
||||
End If
|
||||
m_sNachvollziehbarkeit = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sArchivdatum]() As SqlString
|
||||
Get
|
||||
Return m_sArchivdatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sArchivdatumTmp As SqlString = Value
|
||||
If sArchivdatumTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sArchivdatum", "sArchivdatum can't be NULL")
|
||||
End If
|
||||
m_sArchivdatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sVvextern1]() As SqlString
|
||||
Get
|
||||
Return m_sVvextern1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sVvextern1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sVvextern2]() As SqlString
|
||||
Get
|
||||
Return m_sVvextern2
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sVvextern2 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sEx]() As SqlString
|
||||
Get
|
||||
Return m_sEx
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sEx = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sStandamdatum]() As SqlString
|
||||
Get
|
||||
Return m_sStandamdatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sStandamdatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDokumenttypnr]() As SqlString
|
||||
Get
|
||||
Return m_sDokumenttypnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDokumenttypnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sLoadid]() As SqlString
|
||||
Get
|
||||
Return m_sLoadid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sLoadid = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property [sMetatype]() As SqlString
|
||||
Get
|
||||
Return m_sMetatype
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sMetatype = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property [sOrdertype1]() As SqlString
|
||||
Get
|
||||
Return m_sOrdertype1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sOrdertype1 = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property [sOrdertype2]() As SqlString
|
||||
Get
|
||||
Return m_sOrdertype2
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sOrdertype2 = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property [sTransactnr]() As SqlString
|
||||
Get
|
||||
Return m_sTransactnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sTransactnr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property [sManr]() As SqlString
|
||||
Get
|
||||
Return m_sManr
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sManr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property [daInserttimestamp]() As SqlDateTime
|
||||
Get
|
||||
Return m_daInserttimestamp
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daInserttimestamp = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property [sMailingProduct]() As SqlString
|
||||
Get
|
||||
Return m_sMailingProduct
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
|
||||
m_sMailingProduct = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property [sMailingProductBezeichnung]() As SqlString
|
||||
Get
|
||||
Return m_sMailingProductBezeichnung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
|
||||
m_sMailingProductBezeichnung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property [sBetreffzeile]() As SqlString
|
||||
Get
|
||||
Return m_sBetreffzeile
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
|
||||
m_sBetreffzeile = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property [sXomaDocID]() As SqlString
|
||||
Get
|
||||
Return m_sXomaDocID
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
|
||||
m_sXomaDocID = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
451
Archiv/EDKB01/DB/clsJournal.vb
Normal file
451
Archiv/EDKB01/DB/clsJournal.vb
Normal file
@@ -0,0 +1,451 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'Journal'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 18. Mai 2003, 00:06:24
|
||||
' // 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 'Journal'.
|
||||
' /// </summary>
|
||||
Public Class clsJournal
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bFehlerhaft As SqlBoolean
|
||||
Private m_daEnde, m_daStart As SqlDateTime
|
||||
Private m_iJournalnr, m_iApplikationnr As SqlInt32
|
||||
Private m_sFehlerbeschreibung 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>iApplikationnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>daStart. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daEnde. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>bFehlerhaft. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>sFehlerbeschreibung. May be SqlString.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iJournalnr</LI>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journal_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iapplikationnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iApplikationnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dastart", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daStart))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daende", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daEnde))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bfehlerhaft", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bFehlerhaft))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfehlerbeschreibung", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFehlerbeschreibung))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@ijournalnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iJournalnr))
|
||||
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_iJournalnr = scmCmdToExecute.Parameters.Item("@ijournalnr").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_Journal_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("clsJournal::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>iJournalnr</LI>
|
||||
' /// <LI>iApplikationnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>daStart. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daEnde. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>bFehlerhaft. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>sFehlerbeschreibung. 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_Journal_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournalnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournalnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iapplikationnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iApplikationnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dastart", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daStart))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daende", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daEnde))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bfehlerhaft", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bFehlerhaft))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfehlerbeschreibung", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFehlerbeschreibung))
|
||||
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_Journal_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("clsJournal::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>iJournalnr</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_Journal_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournalnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournalnr))
|
||||
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_Journal_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("clsJournal::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>iJournalnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iJournalnr</LI>
|
||||
' /// <LI>iApplikationnr</LI>
|
||||
' /// <LI>daStart</LI>
|
||||
' /// <LI>daEnde</LI>
|
||||
' /// <LI>bFehlerhaft</LI>
|
||||
' /// <LI>sFehlerbeschreibung</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_Journal_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("Journal")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@ijournalnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournalnr))
|
||||
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_Journal_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iJournalnr = New SqlInt32(CType(dtToReturn.Rows(0)("journalnr"), Integer))
|
||||
If dtToReturn.Rows(0)("applikationnr") Is System.DBNull.Value Then
|
||||
m_iApplikationnr = SqlInt32.Null
|
||||
Else
|
||||
m_iApplikationnr = New SqlInt32(CType(dtToReturn.Rows(0)("applikationnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("start") Is System.DBNull.Value Then
|
||||
m_daStart = SqlDateTime.Null
|
||||
Else
|
||||
m_daStart = New SqlDateTime(CType(dtToReturn.Rows(0)("start"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("ende") Is System.DBNull.Value Then
|
||||
m_daEnde = SqlDateTime.Null
|
||||
Else
|
||||
m_daEnde = New SqlDateTime(CType(dtToReturn.Rows(0)("ende"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("fehlerhaft") Is System.DBNull.Value Then
|
||||
m_bFehlerhaft = SqlBoolean.Null
|
||||
Else
|
||||
m_bFehlerhaft = New SqlBoolean(CType(dtToReturn.Rows(0)("fehlerhaft"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("fehlerbeschreibung") Is System.DBNull.Value Then
|
||||
m_sFehlerbeschreibung = SqlString.Null
|
||||
Else
|
||||
m_sFehlerbeschreibung = New SqlString(CType(dtToReturn.Rows(0)("fehlerbeschreibung"), 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("clsJournal::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_Journal_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("Journal")
|
||||
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_Journal_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("clsJournal::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 [iJournalnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iJournalnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iJournalnrTmp As SqlInt32 = Value
|
||||
If iJournalnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iJournalnr", "iJournalnr can't be NULL")
|
||||
End If
|
||||
m_iJournalnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iApplikationnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iApplikationnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iApplikationnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daStart]() As SqlDateTime
|
||||
Get
|
||||
Return m_daStart
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daStart = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daEnde]() As SqlDateTime
|
||||
Get
|
||||
Return m_daEnde
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daEnde = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bFehlerhaft]() As SqlBoolean
|
||||
Get
|
||||
Return m_bFehlerhaft
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bFehlerhaft = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sFehlerbeschreibung]() As SqlString
|
||||
Get
|
||||
Return m_sFehlerbeschreibung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sFehlerbeschreibung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
437
Archiv/EDKB01/DB/clsJournaldatei.vb
Normal file
437
Archiv/EDKB01/DB/clsJournaldatei.vb
Normal file
@@ -0,0 +1,437 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'Journaldatei'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 18. Mai 2003, 00:06:25
|
||||
' // 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 'Journaldatei'.
|
||||
' /// </summary>
|
||||
Public Class clsJournaldatei
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_blobDatei As SqlBinary
|
||||
Private m_iJournalnr, m_iJournaldateinr As SqlInt32
|
||||
Private m_sDateiname, m_sBezeichnung As SqlString
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iJournaldateinr</LI>
|
||||
' /// <LI>iJournalnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
|
||||
' /// <LI>blobDatei. May be SqlBinary.Null</LI>
|
||||
' /// <LI>sDateiname. May be SqlString.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journaldatei_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournaldateinr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournaldateinr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournalnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iJournalnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
Dim iLength As Integer = 0
|
||||
If Not m_blobDatei.IsNull Then
|
||||
iLength = m_blobDatei.Length
|
||||
End If
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobdatei", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobDatei))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdateiname", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateiname))
|
||||
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_Journaldatei_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("clsJournaldatei::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>iJournaldateinr</LI>
|
||||
' /// <LI>iJournalnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
|
||||
' /// <LI>blobDatei. May be SqlBinary.Null</LI>
|
||||
' /// <LI>sDateiname. 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_Journaldatei_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournaldateinr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournaldateinr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournalnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iJournalnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
Dim iLength As Integer = 0
|
||||
If Not m_blobDatei.IsNull Then
|
||||
iLength = m_blobDatei.Length
|
||||
End If
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobdatei", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobDatei))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdateiname", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateiname))
|
||||
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_Journaldatei_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("clsJournaldatei::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>iJournaldateinr</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_Journaldatei_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournaldateinr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournaldateinr))
|
||||
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_Journaldatei_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("clsJournaldatei::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>iJournaldateinr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iJournaldateinr</LI>
|
||||
' /// <LI>iJournalnr</LI>
|
||||
' /// <LI>sBezeichnung</LI>
|
||||
' /// <LI>blobDatei</LI>
|
||||
' /// <LI>sDateiname</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_Journaldatei_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("Journaldatei")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@ijournaldateinr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournaldateinr))
|
||||
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_Journaldatei_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iJournaldateinr = New SqlInt32(CType(dtToReturn.Rows(0)("journaldateinr"), Integer))
|
||||
If dtToReturn.Rows(0)("journalnr") Is System.DBNull.Value Then
|
||||
m_iJournalnr = SqlInt32.Null
|
||||
Else
|
||||
m_iJournalnr = New SqlInt32(CType(dtToReturn.Rows(0)("journalnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("bezeichnung") Is System.DBNull.Value Then
|
||||
m_sBezeichnung = SqlString.Null
|
||||
Else
|
||||
m_sBezeichnung = New SqlString(CType(dtToReturn.Rows(0)("bezeichnung"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("datei") Is System.DBNull.Value Then
|
||||
m_blobDatei = SqlBinary.Null
|
||||
Else
|
||||
m_blobDatei = New SqlBinary(CType(dtToReturn.Rows(0)("datei"), Byte()))
|
||||
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
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsJournaldatei::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_Journaldatei_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("Journaldatei")
|
||||
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_Journaldatei_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("clsJournaldatei::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 [iJournaldateinr]() As SqlInt32
|
||||
Get
|
||||
Return m_iJournaldateinr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iJournaldateinrTmp As SqlInt32 = Value
|
||||
If iJournaldateinrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iJournaldateinr", "iJournaldateinr can't be NULL")
|
||||
End If
|
||||
m_iJournaldateinr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iJournalnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iJournalnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iJournalnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBezeichnung]() As SqlString
|
||||
Get
|
||||
Return m_sBezeichnung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBezeichnung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [blobDatei]() As SqlBinary
|
||||
Get
|
||||
Return m_blobDatei
|
||||
End Get
|
||||
Set(ByVal Value As SqlBinary)
|
||||
m_blobDatei = 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
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
410
Archiv/EDKB01/DB/clsJournaleintrag.vb
Normal file
410
Archiv/EDKB01/DB/clsJournaleintrag.vb
Normal file
@@ -0,0 +1,410 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'Journaleintrag'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 18. Mai 2003, 09:14:59
|
||||
' // 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 'Journaleintrag'.
|
||||
' /// </summary>
|
||||
Public Class clsJournaleintrag
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_daDatumzeit As SqlDateTime
|
||||
Private m_iJournalnr, m_iJournaleintragnr As SqlInt32
|
||||
Private m_sEintrag 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>iJournalnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sEintrag. May be SqlString.Null</LI>
|
||||
' /// <LI>daDatumzeit. May be SqlDateTime.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iJournaleintragnr</LI>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journaleintrag_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournalnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iJournalnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@seintrag", SqlDbType.VarChar, 2048, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEintrag))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dadatumzeit", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDatumzeit))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@ijournaleintragnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iJournaleintragnr))
|
||||
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_iJournaleintragnr = scmCmdToExecute.Parameters.Item("@ijournaleintragnr").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_Journaleintrag_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("clsJournaleintrag::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>iJournaleintragnr</LI>
|
||||
' /// <LI>iJournalnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sEintrag. May be SqlString.Null</LI>
|
||||
' /// <LI>daDatumzeit. May be SqlDateTime.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Update() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journaleintrag_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournaleintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournaleintragnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournalnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iJournalnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@seintrag", SqlDbType.VarChar, 2048, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEintrag))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dadatumzeit", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDatumzeit))
|
||||
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_Journaleintrag_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("clsJournaleintrag::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>iJournaleintragnr</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_Journaleintrag_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournaleintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournaleintragnr))
|
||||
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_Journaleintrag_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("clsJournaleintrag::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>iJournaleintragnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iJournaleintragnr</LI>
|
||||
' /// <LI>iJournalnr</LI>
|
||||
' /// <LI>sEintrag</LI>
|
||||
' /// <LI>daDatumzeit</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_Journaleintrag_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("Journaleintrag")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@ijournaleintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournaleintragnr))
|
||||
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_Journaleintrag_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iJournaleintragnr = New SqlInt32(CType(dtToReturn.Rows(0)("journaleintragnr"), Integer))
|
||||
If dtToReturn.Rows(0)("journalnr") Is System.DBNull.Value Then
|
||||
m_iJournalnr = SqlInt32.Null
|
||||
Else
|
||||
m_iJournalnr = New SqlInt32(CType(dtToReturn.Rows(0)("journalnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("eintrag") Is System.DBNull.Value Then
|
||||
m_sEintrag = SqlString.Null
|
||||
Else
|
||||
m_sEintrag = New SqlString(CType(dtToReturn.Rows(0)("eintrag"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("datumzeit") Is System.DBNull.Value Then
|
||||
m_daDatumzeit = SqlDateTime.Null
|
||||
Else
|
||||
m_daDatumzeit = New SqlDateTime(CType(dtToReturn.Rows(0)("datumzeit"), 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("clsJournaleintrag::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_Journaleintrag_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("Journaleintrag")
|
||||
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_Journaleintrag_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("clsJournaleintrag::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 [iJournaleintragnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iJournaleintragnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iJournaleintragnrTmp As SqlInt32 = Value
|
||||
If iJournaleintragnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iJournaleintragnr", "iJournaleintragnr can't be NULL")
|
||||
End If
|
||||
m_iJournaleintragnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iJournalnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iJournalnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iJournalnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sEintrag]() As SqlString
|
||||
Get
|
||||
Return m_sEintrag
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sEintrag = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daDatumzeit]() As SqlDateTime
|
||||
Get
|
||||
Return m_daDatumzeit
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daDatumzeit = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
234
Archiv/EDKB01/DB/clsUvm_data.vb
Normal file
234
Archiv/EDKB01/DB/clsUvm_data.vb
Normal file
@@ -0,0 +1,234 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'uvm_data'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 27. Juli 2004, 20:30:12
|
||||
' // 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 'uvm_data'.
|
||||
' /// </summary>
|
||||
Public Class clsUvm_data
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_daInserttimestamp As SqlDateTime
|
||||
Private m_sDMERS00, m_sDMARC00, m_sNRAUF00, m_sNRDOT00, m_sNRDOC00, m_sNRPAR00 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>sNRDOT00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNRDOC00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNRPAR00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNRAUF00. May be SqlString.Null</LI>
|
||||
' /// <LI>sDMERS00. May be SqlString.Null</LI>
|
||||
' /// <LI>sDMARC00. May be SqlString.Null</LI>
|
||||
' /// <LI>daInserttimestamp. May be SqlDateTime.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_uvm_data_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRDOT00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRDOT00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRDOC00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRDOC00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRPAR00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRPAR00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRAUF00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRAUF00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDMERS00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDMERS00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDMARC00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDMARC00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dainserttimestamp", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daInserttimestamp))
|
||||
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_uvm_data_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("clsUvm_data::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_uvm_data_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("uvm_data")
|
||||
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_uvm_data_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("clsUvm_data::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 [sNRDOT00]() As SqlString
|
||||
Get
|
||||
Return m_sNRDOT00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNRDOT00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNRDOC00]() As SqlString
|
||||
Get
|
||||
Return m_sNRDOC00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNRDOC00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNRPAR00]() As SqlString
|
||||
Get
|
||||
Return m_sNRPAR00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNRPAR00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNRAUF00]() As SqlString
|
||||
Get
|
||||
Return m_sNRAUF00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNRAUF00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDMERS00]() As SqlString
|
||||
Get
|
||||
Return m_sDMERS00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDMERS00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDMARC00]() As SqlString
|
||||
Get
|
||||
Return m_sDMARC00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDMARC00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daInserttimestamp]() As SqlDateTime
|
||||
Get
|
||||
Return m_daInserttimestamp
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daInserttimestamp = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
234
Archiv/EDKB01/DB/clsUvm_import.vb
Normal file
234
Archiv/EDKB01/DB/clsUvm_import.vb
Normal file
@@ -0,0 +1,234 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'uvm_import'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 27. Juli 2004, 20:30:13
|
||||
' // 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 'uvm_import'.
|
||||
' /// </summary>
|
||||
Public Class clsUvm_import
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_daInserttimestamp As SqlDateTime
|
||||
Private m_sDMERS00, m_sDMARC00, m_sNRAUF00, m_sNRDOT00, m_sNRDOC00, m_sNRPAR00 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>sNRDOT00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNRDOC00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNRPAR00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNRAUF00. May be SqlString.Null</LI>
|
||||
' /// <LI>sDMERS00. May be SqlString.Null</LI>
|
||||
' /// <LI>sDMARC00. May be SqlString.Null</LI>
|
||||
' /// <LI>daInserttimestamp. May be SqlDateTime.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_uvm_import_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRDOT00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRDOT00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRDOC00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRDOC00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRPAR00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRPAR00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRAUF00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRAUF00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDMERS00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDMERS00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDMARC00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDMARC00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dainserttimestamp", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daInserttimestamp))
|
||||
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_uvm_import_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("clsUvm_import::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_uvm_import_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("uvm_import")
|
||||
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_uvm_import_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("clsUvm_import::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 [sNRDOT00]() As SqlString
|
||||
Get
|
||||
Return m_sNRDOT00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNRDOT00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNRDOC00]() As SqlString
|
||||
Get
|
||||
Return m_sNRDOC00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNRDOC00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNRPAR00]() As SqlString
|
||||
Get
|
||||
Return m_sNRPAR00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNRPAR00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNRAUF00]() As SqlString
|
||||
Get
|
||||
Return m_sNRAUF00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNRAUF00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDMERS00]() As SqlString
|
||||
Get
|
||||
Return m_sDMERS00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDMERS00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDMARC00]() As SqlString
|
||||
Get
|
||||
Return m_sDMARC00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDMARC00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daInserttimestamp]() As SqlDateTime
|
||||
Get
|
||||
Return m_daInserttimestamp
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daInserttimestamp = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
427
Archiv/EDKB01/DB/clsZVBelege_data.vb
Normal file
427
Archiv/EDKB01/DB/clsZVBelege_data.vb
Normal file
@@ -0,0 +1,427 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'ZVBelege_data'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Samstag, 28. August 2004, 09:27: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 'ZVBelege_data'.
|
||||
' /// </summary>
|
||||
Public Class clsZVBelege_data
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_daInsertTimestamp, m_daValdat As SqlDateTime
|
||||
Private m_fBetrag As SqlDouble
|
||||
Private m_sNRPAR00, m_sNEVVG02, m_sCDWAEAI, m_sBTBET00, m_sNRAUF00, m_sDMARC00, m_sNEVVG00, m_sNRPOS00, m_sNRREF00, m_sCDZAH00, m_sCDVARC00, m_sNRDOT00, m_sBEEAD00, m_sNRPCK00, m_sBESAD00, m_sDMVAL00, m_sNRDOC00, m_sNRBCL00, m_sNEVVG01 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>sNRDOT00</LI>
|
||||
' /// <LI>sBEEAD00. May be SqlString.Null</LI>
|
||||
' /// <LI>sCDVARC00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNRREF00. May be SqlString.Null</LI>
|
||||
' /// <LI>sCDZAH00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNRPCK00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNRBCL00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNEVVG01. May be SqlString.Null</LI>
|
||||
' /// <LI>sNRDOC00</LI>
|
||||
' /// <LI>sBESAD00. May be SqlString.Null</LI>
|
||||
' /// <LI>sDMVAL00. May be SqlString.Null</LI>
|
||||
' /// <LI>sCDWAEAI. May be SqlString.Null</LI>
|
||||
' /// <LI>sBTBET00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNRPAR00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNEVVG02. May be SqlString.Null</LI>
|
||||
' /// <LI>sNEVVG00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNRPOS00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNRAUF00</LI>
|
||||
' /// <LI>sDMARC00. May be SqlString.Null</LI>
|
||||
' /// <LI>daInsertTimestamp. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daValdat. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>fBetrag. May be SqlDouble.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_ZVBelege_data_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRDOT00", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sNRDOT00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEEAD00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEEAD00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDVARC00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDVARC00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRREF00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRREF00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDZAH00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDZAH00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRPCK00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRPCK00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRBCL00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRBCL00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNEVVG01", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNEVVG01))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRDOC00", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sNRDOC00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBESAD00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBESAD00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDMVAL00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDMVAL00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDWAEAI", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDWAEAI))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBTBET00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBTBET00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRPAR00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRPAR00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNEVVG02", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNEVVG02))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNEVVG00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNEVVG00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRPOS00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRPOS00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRAUF00", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sNRAUF00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDMARC00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDMARC00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daInsertTimestamp", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daInsertTimestamp))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@davaldat", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daValdat))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@fbetrag", SqlDbType.Float, 8, ParameterDirection.Input, True, 38, 0, "", DataRowVersion.Proposed, m_fBetrag))
|
||||
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_ZVBelege_data_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("clsZVBelege_data::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_ZVBelege_data_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("ZVBelege_data")
|
||||
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_ZVBelege_data_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("clsZVBelege_data::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 [sNRDOT00]() As SqlString
|
||||
Get
|
||||
Return m_sNRDOT00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sNRDOT00Tmp As SqlString = Value
|
||||
If sNRDOT00Tmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sNRDOT00", "sNRDOT00 can't be NULL")
|
||||
End If
|
||||
m_sNRDOT00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBEEAD00]() As SqlString
|
||||
Get
|
||||
Return m_sBEEAD00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBEEAD00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sCDVARC00]() As SqlString
|
||||
Get
|
||||
Return m_sCDVARC00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sCDVARC00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNRREF00]() As SqlString
|
||||
Get
|
||||
Return m_sNRREF00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNRREF00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sCDZAH00]() As SqlString
|
||||
Get
|
||||
Return m_sCDZAH00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sCDZAH00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNRPCK00]() As SqlString
|
||||
Get
|
||||
Return m_sNRPCK00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNRPCK00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNRBCL00]() As SqlString
|
||||
Get
|
||||
Return m_sNRBCL00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNRBCL00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNEVVG01]() As SqlString
|
||||
Get
|
||||
Return m_sNEVVG01
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNEVVG01 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNRDOC00]() As SqlString
|
||||
Get
|
||||
Return m_sNRDOC00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sNRDOC00Tmp As SqlString = Value
|
||||
If sNRDOC00Tmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sNRDOC00", "sNRDOC00 can't be NULL")
|
||||
End If
|
||||
m_sNRDOC00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBESAD00]() As SqlString
|
||||
Get
|
||||
Return m_sBESAD00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBESAD00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDMVAL00]() As SqlString
|
||||
Get
|
||||
Return m_sDMVAL00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDMVAL00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sCDWAEAI]() As SqlString
|
||||
Get
|
||||
Return m_sCDWAEAI
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sCDWAEAI = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBTBET00]() As SqlString
|
||||
Get
|
||||
Return m_sBTBET00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBTBET00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNRPAR00]() As SqlString
|
||||
Get
|
||||
Return m_sNRPAR00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNRPAR00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNEVVG02]() As SqlString
|
||||
Get
|
||||
Return m_sNEVVG02
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNEVVG02 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNEVVG00]() As SqlString
|
||||
Get
|
||||
Return m_sNEVVG00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNEVVG00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNRPOS00]() As SqlString
|
||||
Get
|
||||
Return m_sNRPOS00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNRPOS00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNRAUF00]() As SqlString
|
||||
Get
|
||||
Return m_sNRAUF00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sNRAUF00Tmp As SqlString = Value
|
||||
If sNRAUF00Tmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sNRAUF00", "sNRAUF00 can't be NULL")
|
||||
End If
|
||||
m_sNRAUF00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDMARC00]() As SqlString
|
||||
Get
|
||||
Return m_sDMARC00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDMARC00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daInsertTimestamp]() As SqlDateTime
|
||||
Get
|
||||
Return m_daInsertTimestamp
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daInsertTimestamp = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daValdat]() As SqlDateTime
|
||||
Get
|
||||
Return m_daValdat
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daValdat = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [fBetrag]() As SqlDouble
|
||||
Get
|
||||
Return m_fBetrag
|
||||
End Get
|
||||
Set(ByVal Value As SqlDouble)
|
||||
m_fBetrag = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
415
Archiv/EDKB01/DB/clsZvbelege_import.vb
Normal file
415
Archiv/EDKB01/DB/clsZvbelege_import.vb
Normal file
@@ -0,0 +1,415 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'ZVBelege_import'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Samstag, 28. August 2004, 09:27: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 'ZVBelege_import'.
|
||||
' /// </summary>
|
||||
Public Class clsZVBelege_import
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_daInsertTimestamp, m_daValdat As SqlDateTime
|
||||
Private m_fBetrag As SqlDouble
|
||||
Private m_sNRPAR00, m_sNEVVG02, m_sCDWAEAI, m_sBTBET00, m_sNRAUF00, m_sDMARC00, m_sNEVVG00, m_sNRPOS00, m_sNRREF00, m_sCDZAH00, m_sCDVARC00, m_sNRDOT00, m_sBEEAD00, m_sNRPCK00, m_sBESAD00, m_sDMVAL00, m_sNRDOC00, m_sNRBCL00, m_sNEVVG01 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>sNRDOT00. May be SqlString.Null</LI>
|
||||
' /// <LI>sBEEAD00. May be SqlString.Null</LI>
|
||||
' /// <LI>sCDVARC00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNRREF00. May be SqlString.Null</LI>
|
||||
' /// <LI>sCDZAH00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNRPCK00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNRBCL00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNEVVG01. May be SqlString.Null</LI>
|
||||
' /// <LI>sNRDOC00. May be SqlString.Null</LI>
|
||||
' /// <LI>sBESAD00. May be SqlString.Null</LI>
|
||||
' /// <LI>sDMVAL00. May be SqlString.Null</LI>
|
||||
' /// <LI>sCDWAEAI. May be SqlString.Null</LI>
|
||||
' /// <LI>sBTBET00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNRPAR00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNEVVG02. May be SqlString.Null</LI>
|
||||
' /// <LI>sNEVVG00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNRPOS00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNRAUF00. May be SqlString.Null</LI>
|
||||
' /// <LI>sDMARC00. May be SqlString.Null</LI>
|
||||
' /// <LI>daInsertTimestamp. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daValdat. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>fBetrag. May be SqlDouble.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_ZVBelege_import_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRDOT00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRDOT00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEEAD00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEEAD00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDVARC00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDVARC00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRREF00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRREF00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDZAH00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDZAH00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRPCK00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRPCK00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRBCL00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRBCL00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNEVVG01", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNEVVG01))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRDOC00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRDOC00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBESAD00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBESAD00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDMVAL00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDMVAL00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDWAEAI", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDWAEAI))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBTBET00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBTBET00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRPAR00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRPAR00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNEVVG02", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNEVVG02))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNEVVG00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNEVVG00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRPOS00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRPOS00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRAUF00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRAUF00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDMARC00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDMARC00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daInsertTimestamp", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daInsertTimestamp))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@davaldat", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daValdat))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@fbetrag", SqlDbType.Float, 8, ParameterDirection.Input, True, 38, 0, "", DataRowVersion.Proposed, m_fBetrag))
|
||||
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_ZVBelege_import_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("clsZVBelege_import::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_ZVBelege_import_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("ZVBelege_import")
|
||||
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_ZVBelege_import_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("clsZVBelege_import::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 [sNRDOT00]() As SqlString
|
||||
Get
|
||||
Return m_sNRDOT00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNRDOT00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBEEAD00]() As SqlString
|
||||
Get
|
||||
Return m_sBEEAD00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBEEAD00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sCDVARC00]() As SqlString
|
||||
Get
|
||||
Return m_sCDVARC00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sCDVARC00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNRREF00]() As SqlString
|
||||
Get
|
||||
Return m_sNRREF00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNRREF00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sCDZAH00]() As SqlString
|
||||
Get
|
||||
Return m_sCDZAH00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sCDZAH00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNRPCK00]() As SqlString
|
||||
Get
|
||||
Return m_sNRPCK00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNRPCK00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNRBCL00]() As SqlString
|
||||
Get
|
||||
Return m_sNRBCL00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNRBCL00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNEVVG01]() As SqlString
|
||||
Get
|
||||
Return m_sNEVVG01
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNEVVG01 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNRDOC00]() As SqlString
|
||||
Get
|
||||
Return m_sNRDOC00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNRDOC00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBESAD00]() As SqlString
|
||||
Get
|
||||
Return m_sBESAD00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBESAD00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDMVAL00]() As SqlString
|
||||
Get
|
||||
Return m_sDMVAL00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDMVAL00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sCDWAEAI]() As SqlString
|
||||
Get
|
||||
Return m_sCDWAEAI
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sCDWAEAI = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBTBET00]() As SqlString
|
||||
Get
|
||||
Return m_sBTBET00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBTBET00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNRPAR00]() As SqlString
|
||||
Get
|
||||
Return m_sNRPAR00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNRPAR00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNEVVG02]() As SqlString
|
||||
Get
|
||||
Return m_sNEVVG02
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNEVVG02 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNEVVG00]() As SqlString
|
||||
Get
|
||||
Return m_sNEVVG00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNEVVG00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNRPOS00]() As SqlString
|
||||
Get
|
||||
Return m_sNRPOS00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNRPOS00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNRAUF00]() As SqlString
|
||||
Get
|
||||
Return m_sNRAUF00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNRAUF00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDMARC00]() As SqlString
|
||||
Get
|
||||
Return m_sDMARC00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDMARC00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daInsertTimestamp]() As SqlDateTime
|
||||
Get
|
||||
Return m_daInsertTimestamp
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daInsertTimestamp = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daValdat]() As SqlDateTime
|
||||
Get
|
||||
Return m_daValdat
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daValdat = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [fBetrag]() As SqlDouble
|
||||
Get
|
||||
Return m_fBetrag
|
||||
End Get
|
||||
Set(ByVal Value As SqlDouble)
|
||||
m_fBetrag = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
569
Archiv/EDKB01/DB/cls_host_dokument.vb
Normal file
569
Archiv/EDKB01/DB/cls_host_dokument.vb
Normal file
@@ -0,0 +1,569 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table '_host_dokument'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Montag, 2. Februar 2004, 00:58:05
|
||||
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Data Access class for the table '_host_dokument'.
|
||||
' /// </summary>
|
||||
Public Class cls_host_dokument
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_sDatumbis, m_sDatumvon1, m_sDatumbis1, m_sPartnernr_inhaber, m_sDokumenttypnr, m_sDatumvon As SqlString
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>sPartnernr_inhaber</LI>
|
||||
' /// <LI>sDokumenttypnr</LI>
|
||||
' /// <LI>sDatumvon. May be SqlString.Null</LI>
|
||||
' /// <LI>sDatumbis. May be SqlString.Null</LI>
|
||||
' /// <LI>sDatumvon1. May be SqlString.Null</LI>
|
||||
' /// <LI>sDatumbis1. May be SqlString.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr__host_dokument_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnernr_inhaber", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr_inhaber))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumenttypnr", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumenttypnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdatumvon", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDatumvon))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdatumbis", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDatumbis))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdatumvon1", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDatumvon1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdatumbis1", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDatumbis1))
|
||||
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__host_dokument_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("cls_host_dokument::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>sPartnernr_inhaber</LI>
|
||||
' /// <LI>sDokumenttypnr</LI>
|
||||
' /// <LI>sDatumvon. May be SqlString.Null</LI>
|
||||
' /// <LI>sDatumbis. May be SqlString.Null</LI>
|
||||
' /// <LI>sDatumvon1. May be SqlString.Null</LI>
|
||||
' /// <LI>sDatumbis1. 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__host_dokument_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnernr_inhaber", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr_inhaber))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumenttypnr", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumenttypnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdatumvon", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDatumvon))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdatumbis", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDatumbis))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdatumvon1", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDatumvon1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdatumbis1", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDatumbis1))
|
||||
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__host_dokument_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("cls_host_dokument::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>sPartnernr_inhaber</LI>
|
||||
' /// <LI>sDokumenttypnr</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__host_dokument_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnernr_inhaber", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr_inhaber))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumenttypnr", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumenttypnr))
|
||||
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__host_dokument_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("cls_host_dokument::Delete::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 using PK field 'partnernr_inhaber'. This method will
|
||||
' /// delete one or more rows from the database, based on the Primary Key field 'partnernr_inhaber'.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>sPartnernr_inhaber</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Public Function DeleteWpartnernr_inhaberLogic() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr__host_dokument_DeleteWpartnernr_inhaberLogic]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@spartnernr_inhaber", SqlDbType.VarChar, 255, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr_inhaber))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 255, ParameterDirection.Output, True, 0, 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, Integer))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr__host_dokument_DeleteWpartnernr_inhaberLogic' 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("cls_host_dokument::DeleteWpartnernr_inhaberLogic::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 using PK field 'dokumenttypnr'. This method will
|
||||
' /// delete one or more rows from the database, based on the Primary Key field 'dokumenttypnr'.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>sDokumenttypnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Public Function DeleteWdokumenttypnrLogic() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr__host_dokument_DeleteWdokumenttypnrLogic]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@sdokumenttypnr", SqlDbType.VarChar, 255, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, m_sDokumenttypnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 255, ParameterDirection.Output, True, 0, 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, Integer))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr__host_dokument_DeleteWdokumenttypnrLogic' 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("cls_host_dokument::DeleteWdokumenttypnrLogic::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>sPartnernr_inhaber</LI>
|
||||
' /// <LI>sDokumenttypnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>sPartnernr_inhaber</LI>
|
||||
' /// <LI>sDokumenttypnr</LI>
|
||||
' /// <LI>sDatumvon</LI>
|
||||
' /// <LI>sDatumbis</LI>
|
||||
' /// <LI>sDatumvon1</LI>
|
||||
' /// <LI>sDatumbis1</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__host_dokument_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("_host_dokument")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@spartnernr_inhaber", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr_inhaber))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@sdokumenttypnr", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumenttypnr))
|
||||
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__host_dokument_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_sPartnernr_inhaber = New SqlString(CType(dtToReturn.Rows(0)("partnernr_inhaber"), String))
|
||||
m_sDokumenttypnr = New SqlString(CType(dtToReturn.Rows(0)("dokumenttypnr"), String))
|
||||
If dtToReturn.Rows(0)("datumvon") Is System.DBNull.Value Then
|
||||
m_sDatumvon = SqlString.Null
|
||||
Else
|
||||
m_sDatumvon = New SqlString(CType(dtToReturn.Rows(0)("datumvon"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("datumbis") Is System.DBNull.Value Then
|
||||
m_sDatumbis = SqlString.Null
|
||||
Else
|
||||
m_sDatumbis = New SqlString(CType(dtToReturn.Rows(0)("datumbis"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("datumvon1") Is System.DBNull.Value Then
|
||||
m_sDatumvon1 = SqlString.Null
|
||||
Else
|
||||
m_sDatumvon1 = New SqlString(CType(dtToReturn.Rows(0)("datumvon1"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("datumbis1") Is System.DBNull.Value Then
|
||||
m_sDatumbis1 = SqlString.Null
|
||||
Else
|
||||
m_sDatumbis1 = New SqlString(CType(dtToReturn.Rows(0)("datumbis1"), 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("cls_host_dokument::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__host_dokument_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("_host_dokument")
|
||||
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__host_dokument_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("cls_host_dokument::SelectAll::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public Property [sPartnernr_inhaber]() As SqlString
|
||||
Get
|
||||
Return m_sPartnernr_inhaber
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sPartnernr_inhaberTmp As SqlString = Value
|
||||
If sPartnernr_inhaberTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sPartnernr_inhaber", "sPartnernr_inhaber can't be NULL")
|
||||
End If
|
||||
m_sPartnernr_inhaber = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDokumenttypnr]() As SqlString
|
||||
Get
|
||||
Return m_sDokumenttypnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sDokumenttypnrTmp As SqlString = Value
|
||||
If sDokumenttypnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sDokumenttypnr", "sDokumenttypnr can't be NULL")
|
||||
End If
|
||||
m_sDokumenttypnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDatumvon]() As SqlString
|
||||
Get
|
||||
Return m_sDatumvon
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDatumvon = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDatumbis]() As SqlString
|
||||
Get
|
||||
Return m_sDatumbis
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDatumbis = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDatumvon1]() As SqlString
|
||||
Get
|
||||
Return m_sDatumvon1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDatumvon1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDatumbis1]() As SqlString
|
||||
Get
|
||||
Return m_sDatumbis1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDatumbis1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
54
Archiv/EDKB01/DB/db_connection.vb
Normal file
54
Archiv/EDKB01/DB/db_connection.vb
Normal file
@@ -0,0 +1,54 @@
|
||||
Namespace EDOKA
|
||||
Public Class DB_Connection
|
||||
Shared Sub New()
|
||||
Try
|
||||
'Edoka
|
||||
oread = IO.File.OpenText(args(1) + "edokaconn.cfg")
|
||||
sConnectionString_edoka = oread.ReadLine
|
||||
Globals.sConnectionString_edoka = sConnectionString_edoka
|
||||
Console.WriteLine("EDOKA_HOST Connected")
|
||||
oread.Close()
|
||||
|
||||
'ZV
|
||||
oread = IO.File.OpenText(args(1) + "edokazvconn.cfg")
|
||||
sConnectionString_ZV = oread.ReadLine
|
||||
Globals.sConnectionString_ZV = sConnectionString_ZV
|
||||
Console.WriteLine("EDOKA_ZV Connected")
|
||||
oread.Close()
|
||||
|
||||
'UVM
|
||||
oread = IO.File.OpenText(args(1) + "edokauvmconn.cfg")
|
||||
sConnectionstring_UVM = oread.ReadLine
|
||||
Globals.sConnectionstring_UVM = sConnectionstring_UVM
|
||||
Console.WriteLine("EDOKA_UVM Connected")
|
||||
oread.Close()
|
||||
|
||||
'Banklagernd
|
||||
oread = IO.File.OpenText(args(1) + "edokablconn.cfg")
|
||||
sConnectionstring_BL = oread.ReadLine
|
||||
Globals.sConnectionstring_BL = sConnectionstring_BL
|
||||
Console.WriteLine("EDOKA-Banklagernd Connected")
|
||||
oread.Close()
|
||||
|
||||
|
||||
'Journale
|
||||
oread = IO.File.OpenText(args(1) + "journaleconn.cfg")
|
||||
sConnectionString_journale = oread.ReadLine
|
||||
'sConnectionString_journale = Crypto.DecryptText(sConnectionString, "HutterundMueller")
|
||||
'sConnectionString_journale = Left(sConnectionString, Len(sConnectionString) - 1)
|
||||
Globals.sConnectionString_journale = sConnectionString_journale
|
||||
Console.WriteLine("EDOKA_Journale Connected")
|
||||
oread.Close()
|
||||
|
||||
Globals.conn_edoka.sConnectionString = sConnectionString_edoka
|
||||
Globals.conn_journale.sConnectionString = sConnectionString_journale
|
||||
Globals.conn_ams.sConnectionString = sConnectionString_ams
|
||||
Globals.conn_zv.sConnectionString = sConnectionString_ZV
|
||||
Globals.conn_uvm.sConnectionString = sConnectionstring_UVM
|
||||
Globals.conn_bl.sConnectionString = sConnectionstring_BL
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
BIN
Archiv/EDKB01/DB/vssver.scc
Normal file
BIN
Archiv/EDKB01/DB/vssver.scc
Normal file
Binary file not shown.
Reference in New Issue
Block a user