You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
262 lines
8.7 KiB
262 lines
8.7 KiB
' ///////////////////////////////////////////////////////////////////////////
|
|
' // Description: Data Access class for the table 'mehrfachscann'
|
|
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 19. Juli 2006, 15:16:33
|
|
' // 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 'mehrfachscann'.
|
|
' /// </summary>
|
|
Public Class clsMehrfachscann
|
|
Inherits clsDBInteractionBase
|
|
|
|
#Region " Class Member Declarations "
|
|
|
|
Private m_bAktiv As SqlBoolean
|
|
Private m_daStatusdatum, m_daMutiert_am, m_daErstellt_am, m_daMutationsdatum As SqlDateTime
|
|
Private m_iMutierer, m_iNreintrag, m_iStatus, m_iMandantnr As SqlInt32
|
|
Private m_sDokumentid, m_sStapelnr, m_sColddokumentid 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>iNreintrag</LI>
|
|
' /// <LI>daMutationsdatum</LI>
|
|
' /// <LI>sColddokumentid. May be SqlString.Null</LI>
|
|
' /// <LI>sStapelnr</LI>
|
|
' /// <LI>iStatus</LI>
|
|
' /// <LI>daStatusdatum</LI>
|
|
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
|
' /// <LI>bAktiv. May be SqlBoolean.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>sDokumentid. 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.[pv_mehrfachscann_Insert]"
|
|
scmCmdToExecute.CommandText = "dbo.[pv_mehrfachscann_Insert_EDKB02]"
|
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
|
|
|
' // Use base class' connection object
|
|
scmCmdToExecute.Connection = m_scoMainConnection
|
|
|
|
Try
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutationsdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daMutationsdatum))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@scolddokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sColddokumentid))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sstapelnr", SqlDbType.VarChar, 20, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sStapelnr))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@dastatusdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daStatusdatum))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
|
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("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 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 'pv_mehrfachscann_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("clsMehrfachscann::Insert::Error occured.", ex)
|
|
Finally
|
|
If m_bMainConnectionIsCreatedLocal Then
|
|
' // Close connection.
|
|
m_scoMainConnection.Close()
|
|
End If
|
|
scmCmdToExecute.Dispose()
|
|
End Try
|
|
End Function
|
|
|
|
|
|
#Region " Class Property Declarations "
|
|
|
|
Public Property [iNreintrag]() As SqlInt32
|
|
Get
|
|
Return m_iNreintrag
|
|
End Get
|
|
Set(ByVal Value As SqlInt32)
|
|
Dim iNreintragTmp As SqlInt32 = Value
|
|
If iNreintragTmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("iNreintrag", "iNreintrag can't be NULL")
|
|
End If
|
|
m_iNreintrag = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [daMutationsdatum]() As SqlDateTime
|
|
Get
|
|
Return m_daMutationsdatum
|
|
End Get
|
|
Set(ByVal Value As SqlDateTime)
|
|
Dim daMutationsdatumTmp As SqlDateTime = Value
|
|
If daMutationsdatumTmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("daMutationsdatum", "daMutationsdatum can't be NULL")
|
|
End If
|
|
m_daMutationsdatum = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [sColddokumentid]() As SqlString
|
|
Get
|
|
Return m_sColddokumentid
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
m_sColddokumentid = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [sStapelnr]() As SqlString
|
|
Get
|
|
Return m_sStapelnr
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
Dim sStapelnrTmp As SqlString = Value
|
|
If sStapelnrTmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("sStapelnr", "sStapelnr can't be NULL")
|
|
End If
|
|
m_sStapelnr = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [iStatus]() As SqlInt32
|
|
Get
|
|
Return m_iStatus
|
|
End Get
|
|
Set(ByVal Value As SqlInt32)
|
|
Dim iStatusTmp As SqlInt32 = Value
|
|
If iStatusTmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("iStatus", "iStatus can't be NULL")
|
|
End If
|
|
m_iStatus = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [daStatusdatum]() As SqlDateTime
|
|
Get
|
|
Return m_daStatusdatum
|
|
End Get
|
|
Set(ByVal Value As SqlDateTime)
|
|
Dim daStatusdatumTmp As SqlDateTime = Value
|
|
If daStatusdatumTmp.IsNull Then
|
|
Throw New ArgumentOutOfRangeException("daStatusdatum", "daStatusdatum can't be NULL")
|
|
End If
|
|
m_daStatusdatum = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [iMandantnr]() As SqlInt32
|
|
Get
|
|
Return m_iMandantnr
|
|
End Get
|
|
Set(ByVal Value As SqlInt32)
|
|
m_iMandantnr = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [bAktiv]() As SqlBoolean
|
|
Get
|
|
Return m_bAktiv
|
|
End Get
|
|
Set(ByVal Value As SqlBoolean)
|
|
m_bAktiv = 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 [sDokumentid]() As SqlString
|
|
Get
|
|
Return m_sDokumentid
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
m_sDokumentid = Value
|
|
End Set
|
|
End Property
|
|
|
|
#End Region
|
|
|
|
End Class
|
|
End Namespace
|