Initial commit
This commit is contained in:
BIN
LBLLGEN/Verknüpfung mit LLBLGen.exe.lnk
Normal file
BIN
LBLLGEN/Verknüpfung mit LLBLGen.exe.lnk
Normal file
Binary file not shown.
289
LBLLGEN/clsConnectionProvider.vb
Normal file
289
LBLLGEN/clsConnectionProvider.vb
Normal file
@@ -0,0 +1,289 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Connection Provider class for Database connection sharing
|
||||
' // Generated by LLBLGen v1.21.2003.712 Final on: Freitag, 11. Mai 2012, 11:49:45
|
||||
' // 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>
|
||||
Overloads Public Sub Dispose() Implements IDisposable.Dispose
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the Dispose functionality.
|
||||
' /// </summary>
|
||||
Overridable Overloads Protected 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(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(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(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(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
|
||||
208
LBLLGEN/clsDBInteractionBase.vb
Normal file
208
LBLLGEN/clsDBInteractionBase.vb
Normal file
@@ -0,0 +1,208 @@
|
||||
' //////////////////////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Base class for Database Interaction.
|
||||
' // Generated by LLBLGen v1.21.2003.712 Final on: Freitag, 11. Mai 2012, 11:49:45
|
||||
' // 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_iRowsAffected As Integer
|
||||
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>
|
||||
Overloads Public Sub Dispose() Implements IDisposable.Dispose
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the Dispose functionality.
|
||||
' /// </summary>
|
||||
Overridable Overloads Protected 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
|
||||
Public Readonly Property iRowsAffected() As Integer
|
||||
Get
|
||||
Return m_iRowsAffected
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
490
LBLLGEN/clsDokEditMail.vb
Normal file
490
LBLLGEN/clsDokEditMail.vb
Normal file
@@ -0,0 +1,490 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'DokEditMail'
|
||||
' // Generated by LLBLGen v1.21.2003.712 Final on: Sonntag, 15. August 2010, 19:48:32
|
||||
' // 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 'DokEditMail'.
|
||||
''' </summary>
|
||||
Public Class clsDokEditMail
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bAktiv As SqlBoolean
|
||||
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
|
||||
Private m_iMutierer, m_iDokEditMailNr, m_iDokumenttypnr, m_iStatus As SqlInt32
|
||||
Private m_sEMail 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>iDokEditMailNr</LI>
|
||||
''' <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
|
||||
''' <LI>sEMail. May be SqlString.Null</LI>
|
||||
''' <LI>iStatus. May be SqlInt32.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>bAktiv. May be SqlBoolean.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_DokEditMail_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iDokEditMailNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokEditMailNr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iDokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sEMail", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEMail))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iStatus", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daErstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daMutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", 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("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_DokEditMail_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("clsDokEditMail::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>iDokEditMailNr</LI>
|
||||
''' <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
|
||||
''' <LI>sEMail. May be SqlString.Null</LI>
|
||||
''' <LI>iStatus. May be SqlInt32.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>bAktiv. May be SqlBoolean.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_DokEditMail_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iDokEditMailNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokEditMailNr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iDokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sEMail", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEMail))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iStatus", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daErstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daMutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", 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("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_DokEditMail_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("clsDokEditMail::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>iDokEditMailNr</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_DokEditMail_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iDokEditMailNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokEditMailNr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_DokEditMail_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("clsDokEditMail::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>iDokEditMailNr</LI>
|
||||
''' </UL>
|
||||
''' Properties set after a succesful call of this method:
|
||||
''' <UL>
|
||||
''' <LI>iErrorCode</LI>
|
||||
''' <LI>iDokEditMailNr</LI>
|
||||
''' <LI>iDokumenttypnr</LI>
|
||||
''' <LI>sEMail</LI>
|
||||
''' <LI>iStatus</LI>
|
||||
''' <LI>daErstellt_am</LI>
|
||||
''' <LI>daMutiert_am</LI>
|
||||
''' <LI>iMutierer</LI>
|
||||
''' <LI>bAktiv</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_DokEditMail_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("DokEditMail")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iDokEditMailNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokEditMailNr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_DokEditMail_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iDokEditMailNr = New SqlInt32(CType(dtToReturn.Rows(0)("DokEditMailNr"), Integer))
|
||||
If dtToReturn.Rows(0)("Dokumenttypnr") Is System.DBNull.Value Then
|
||||
m_iDokumenttypnr = SqlInt32.Null
|
||||
Else
|
||||
m_iDokumenttypnr = New SqlInt32(CType(dtToReturn.Rows(0)("Dokumenttypnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("EMail") Is System.DBNull.Value Then
|
||||
m_sEMail = SqlString.Null
|
||||
Else
|
||||
m_sEMail = New SqlString(CType(dtToReturn.Rows(0)("EMail"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Status") Is System.DBNull.Value Then
|
||||
m_iStatus = SqlInt32.Null
|
||||
Else
|
||||
m_iStatus = New SqlInt32(CType(dtToReturn.Rows(0)("Status"), Integer))
|
||||
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)("Aktiv") Is System.DBNull.Value Then
|
||||
m_bAktiv = SqlBoolean.Null
|
||||
Else
|
||||
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("Aktiv"), Boolean))
|
||||
End If
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsDokEditMail::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_DokEditMail_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("DokEditMail")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_DokEditMail_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("clsDokEditMail::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 [iDokEditMailNr]() As SqlInt32
|
||||
Get
|
||||
Return m_iDokEditMailNr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iDokEditMailNrTmp As SqlInt32 = Value
|
||||
If iDokEditMailNrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iDokEditMailNr", "iDokEditMailNr can't be NULL")
|
||||
End If
|
||||
m_iDokEditMailNr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iDokumenttypnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iDokumenttypnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iDokumenttypnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sEMail]() As SqlString
|
||||
Get
|
||||
Return m_sEMail
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sEMail = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iStatus]() As SqlInt32
|
||||
Get
|
||||
Return m_iStatus
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iStatus = 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 [bAktiv]() As SqlBoolean
|
||||
Get
|
||||
Return m_bAktiv
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
1606
LBLLGEN/clsDokumenttyp.vb
Normal file
1606
LBLLGEN/clsDokumenttyp.vb
Normal file
File diff suppressed because it is too large
Load Diff
891
LBLLGEN/clsEdex_sb_serienbrief.vb
Normal file
891
LBLLGEN/clsEdex_sb_serienbrief.vb
Normal file
@@ -0,0 +1,891 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'edex_sb_serienbrief'
|
||||
' // Generated by LLBLGen v1.21.2003.712 Final on: Montag, 13. September 2010, 16:18:43
|
||||
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
''' <summary>
|
||||
''' Purpose: Data Access class for the table 'edex_sb_serienbrief'.
|
||||
''' </summary>
|
||||
Public Class clsEdex_sb_serienbrief
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bAktiv As SqlBoolean
|
||||
Private m_daErstellt_am, m_daArchivdatum, m_daTermin, m_daDokumentdatum, m_daMutiert_am As SqlDateTime
|
||||
Private m_iDokumenttypnr, m_iWindowheight, m_iWindowwidth, m_iTreewidth, m_iBestaetigt, m_iAusgeloest, m_iBldossier, m_iGedruckt, m_iFehlerhaft, m_iInBearbeitung, m_iErstellt, m_iUnterschriftlinks, m_iUnterschriftrechts, m_iZustaendig, m_iVerantwortlich, m_iPostzustellung, m_iMutierer, m_iStatus, m_iSerienbriefnr, m_iTeam As SqlInt32
|
||||
Private m_sBezeichnung, m_sBemerkung 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>sBezeichnung. May be SqlString.Null</LI>
|
||||
''' <LI>iVerantwortlich. May be SqlInt32.Null</LI>
|
||||
''' <LI>iPostzustellung. May be SqlInt32.Null</LI>
|
||||
''' <LI>daDokumentdatum. May be SqlDateTime.Null</LI>
|
||||
''' <LI>iZustaendig. May be SqlInt32.Null</LI>
|
||||
''' <LI>iUnterschriftlinks. May be SqlInt32.Null</LI>
|
||||
''' <LI>iUnterschriftrechts. May be SqlInt32.Null</LI>
|
||||
''' <LI>iTeam. May be SqlInt32.Null</LI>
|
||||
''' <LI>daArchivdatum. May be SqlDateTime.Null</LI>
|
||||
''' <LI>daTermin. May be SqlDateTime.Null</LI>
|
||||
''' <LI>sBemerkung. 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>bAktiv. May be SqlBoolean.Null</LI>
|
||||
''' <LI>iStatus. May be SqlInt32.Null</LI>
|
||||
''' <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
|
||||
''' <LI>iWindowwidth. May be SqlInt32.Null</LI>
|
||||
''' <LI>iWindowheight. May be SqlInt32.Null</LI>
|
||||
''' <LI>iTreewidth. May be SqlInt32.Null</LI>
|
||||
''' <LI>iFehlerhaft. May be SqlInt32.Null</LI>
|
||||
''' <LI>iInBearbeitung. May be SqlInt32.Null</LI>
|
||||
''' <LI>iErstellt. May be SqlInt32.Null</LI>
|
||||
''' <LI>iGedruckt. May be SqlInt32.Null</LI>
|
||||
''' <LI>iBestaetigt. May be SqlInt32.Null</LI>
|
||||
''' <LI>iAusgeloest. May be SqlInt32.Null</LI>
|
||||
''' <LI>iBldossier. May be SqlInt32.Null</LI>
|
||||
''' </UL>
|
||||
''' Properties set after a succesful call of this method:
|
||||
''' <UL>
|
||||
''' <LI>iSerienbriefnr</LI>
|
||||
''' <LI>iErrorCode</LI>
|
||||
'''</UL>
|
||||
''' </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_edex_sb_serienbrief_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iverantwortlich", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerantwortlich))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ipostzustellung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iPostzustellung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dadokumentdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daDokumentdatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@izustaendig", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iZustaendig))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iunterschriftlinks", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iUnterschriftlinks))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iunterschriftrechts", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iUnterschriftrechts))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iteam", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iTeam))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daarchivdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daArchivdatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@datermin", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daTermin))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbemerkung", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBemerkung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", 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("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iwindowwidth", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iWindowwidth))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iwindowheight", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iWindowheight))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@itreewidth", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iTreewidth))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifehlerhaft", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFehlerhaft))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iinBearbeitung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iInBearbeitung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ierstellt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iErstellt))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@igedruckt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iGedruckt))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibestaetigt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBestaetigt))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iausgeloest", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAusgeloest))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibldossier", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBldossier))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iserienbriefnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iSerienbriefnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iSerienbriefnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iserienbriefnr").Value, Integer))
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_edex_sb_serienbrief_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_sb_serienbrief::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>iSerienbriefnr</LI>
|
||||
''' <LI>sBezeichnung. May be SqlString.Null</LI>
|
||||
''' <LI>iVerantwortlich. May be SqlInt32.Null</LI>
|
||||
''' <LI>iPostzustellung. May be SqlInt32.Null</LI>
|
||||
''' <LI>daDokumentdatum. May be SqlDateTime.Null</LI>
|
||||
''' <LI>iZustaendig. May be SqlInt32.Null</LI>
|
||||
''' <LI>iUnterschriftlinks. May be SqlInt32.Null</LI>
|
||||
''' <LI>iUnterschriftrechts. May be SqlInt32.Null</LI>
|
||||
''' <LI>iTeam. May be SqlInt32.Null</LI>
|
||||
''' <LI>daArchivdatum. May be SqlDateTime.Null</LI>
|
||||
''' <LI>daTermin. May be SqlDateTime.Null</LI>
|
||||
''' <LI>sBemerkung. 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>bAktiv. May be SqlBoolean.Null</LI>
|
||||
''' <LI>iStatus. May be SqlInt32.Null</LI>
|
||||
''' <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
|
||||
''' <LI>iWindowwidth. May be SqlInt32.Null</LI>
|
||||
''' <LI>iWindowheight. May be SqlInt32.Null</LI>
|
||||
''' <LI>iTreewidth. May be SqlInt32.Null</LI>
|
||||
''' <LI>iFehlerhaft. May be SqlInt32.Null</LI>
|
||||
''' <LI>iInBearbeitung. May be SqlInt32.Null</LI>
|
||||
''' <LI>iErstellt. May be SqlInt32.Null</LI>
|
||||
''' <LI>iGedruckt. May be SqlInt32.Null</LI>
|
||||
''' <LI>iBestaetigt. May be SqlInt32.Null</LI>
|
||||
''' <LI>iAusgeloest. May be SqlInt32.Null</LI>
|
||||
''' <LI>iBldossier. May be SqlInt32.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_edex_sb_serienbrief_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iserienbriefnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSerienbriefnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iverantwortlich", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerantwortlich))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ipostzustellung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iPostzustellung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dadokumentdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daDokumentdatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@izustaendig", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iZustaendig))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iunterschriftlinks", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iUnterschriftlinks))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iunterschriftrechts", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iUnterschriftrechts))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iteam", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iTeam))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daarchivdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daArchivdatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@datermin", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daTermin))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbemerkung", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBemerkung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", 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("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iwindowwidth", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iWindowwidth))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iwindowheight", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iWindowheight))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@itreewidth", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iTreewidth))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifehlerhaft", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFehlerhaft))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iinBearbeitung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iInBearbeitung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ierstellt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iErstellt))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@igedruckt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iGedruckt))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibestaetigt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBestaetigt))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iausgeloest", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAusgeloest))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibldossier", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBldossier))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_edex_sb_serienbrief_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("clsEdex_sb_serienbrief::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>iSerienbriefnr</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_edex_sb_serienbrief_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iserienbriefnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSerienbriefnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_edex_sb_serienbrief_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("clsEdex_sb_serienbrief::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>iSerienbriefnr</LI>
|
||||
''' </UL>
|
||||
''' Properties set after a succesful call of this method:
|
||||
''' <UL>
|
||||
''' <LI>iErrorCode</LI>
|
||||
''' <LI>iSerienbriefnr</LI>
|
||||
''' <LI>sBezeichnung</LI>
|
||||
''' <LI>iVerantwortlich</LI>
|
||||
''' <LI>iPostzustellung</LI>
|
||||
''' <LI>daDokumentdatum</LI>
|
||||
''' <LI>iZustaendig</LI>
|
||||
''' <LI>iUnterschriftlinks</LI>
|
||||
''' <LI>iUnterschriftrechts</LI>
|
||||
''' <LI>iTeam</LI>
|
||||
''' <LI>daArchivdatum</LI>
|
||||
''' <LI>daTermin</LI>
|
||||
''' <LI>sBemerkung</LI>
|
||||
''' <LI>daErstellt_am</LI>
|
||||
''' <LI>daMutiert_am</LI>
|
||||
''' <LI>iMutierer</LI>
|
||||
''' <LI>bAktiv</LI>
|
||||
''' <LI>iStatus</LI>
|
||||
''' <LI>iDokumenttypnr</LI>
|
||||
''' <LI>iWindowwidth</LI>
|
||||
''' <LI>iWindowheight</LI>
|
||||
''' <LI>iTreewidth</LI>
|
||||
''' <LI>iFehlerhaft</LI>
|
||||
''' <LI>iInBearbeitung</LI>
|
||||
''' <LI>iErstellt</LI>
|
||||
''' <LI>iGedruckt</LI>
|
||||
''' <LI>iBestaetigt</LI>
|
||||
''' <LI>iAusgeloest</LI>
|
||||
''' <LI>iBldossier</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_edex_sb_serienbrief_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("edex_sb_serienbrief")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iserienbriefnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSerienbriefnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_edex_sb_serienbrief_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iSerienbriefnr = New SqlInt32(CType(dtToReturn.Rows(0)("serienbriefnr"), 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)("verantwortlich") Is System.DBNull.Value Then
|
||||
m_iVerantwortlich = SqlInt32.Null
|
||||
Else
|
||||
m_iVerantwortlich = New SqlInt32(CType(dtToReturn.Rows(0)("verantwortlich"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("postzustellung") Is System.DBNull.Value Then
|
||||
m_iPostzustellung = SqlInt32.Null
|
||||
Else
|
||||
m_iPostzustellung = New SqlInt32(CType(dtToReturn.Rows(0)("postzustellung"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("dokumentdatum") Is System.DBNull.Value Then
|
||||
m_daDokumentdatum = SqlDateTime.Null
|
||||
Else
|
||||
m_daDokumentdatum = New SqlDateTime(CType(dtToReturn.Rows(0)("dokumentdatum"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("zustaendig") Is System.DBNull.Value Then
|
||||
m_iZustaendig = SqlInt32.Null
|
||||
Else
|
||||
m_iZustaendig = New SqlInt32(CType(dtToReturn.Rows(0)("zustaendig"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("unterschriftlinks") Is System.DBNull.Value Then
|
||||
m_iUnterschriftlinks = SqlInt32.Null
|
||||
Else
|
||||
m_iUnterschriftlinks = New SqlInt32(CType(dtToReturn.Rows(0)("unterschriftlinks"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("unterschriftrechts") Is System.DBNull.Value Then
|
||||
m_iUnterschriftrechts = SqlInt32.Null
|
||||
Else
|
||||
m_iUnterschriftrechts = New SqlInt32(CType(dtToReturn.Rows(0)("unterschriftrechts"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("team") Is System.DBNull.Value Then
|
||||
m_iTeam = SqlInt32.Null
|
||||
Else
|
||||
m_iTeam = New SqlInt32(CType(dtToReturn.Rows(0)("team"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("archivdatum") Is System.DBNull.Value Then
|
||||
m_daArchivdatum = SqlDateTime.Null
|
||||
Else
|
||||
m_daArchivdatum = New SqlDateTime(CType(dtToReturn.Rows(0)("archivdatum"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("termin") Is System.DBNull.Value Then
|
||||
m_daTermin = SqlDateTime.Null
|
||||
Else
|
||||
m_daTermin = New SqlDateTime(CType(dtToReturn.Rows(0)("termin"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("bemerkung") Is System.DBNull.Value Then
|
||||
m_sBemerkung = SqlString.Null
|
||||
Else
|
||||
m_sBemerkung = New SqlString(CType(dtToReturn.Rows(0)("bemerkung"), 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)("aktiv") Is System.DBNull.Value Then
|
||||
m_bAktiv = SqlBoolean.Null
|
||||
Else
|
||||
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("status") Is System.DBNull.Value Then
|
||||
m_iStatus = SqlInt32.Null
|
||||
Else
|
||||
m_iStatus = New SqlInt32(CType(dtToReturn.Rows(0)("status"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("dokumenttypnr") Is System.DBNull.Value Then
|
||||
m_iDokumenttypnr = SqlInt32.Null
|
||||
Else
|
||||
m_iDokumenttypnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumenttypnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("windowwidth") Is System.DBNull.Value Then
|
||||
m_iWindowwidth = SqlInt32.Null
|
||||
Else
|
||||
m_iWindowwidth = New SqlInt32(CType(dtToReturn.Rows(0)("windowwidth"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("windowheight") Is System.DBNull.Value Then
|
||||
m_iWindowheight = SqlInt32.Null
|
||||
Else
|
||||
m_iWindowheight = New SqlInt32(CType(dtToReturn.Rows(0)("windowheight"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("treewidth") Is System.DBNull.Value Then
|
||||
m_iTreewidth = SqlInt32.Null
|
||||
Else
|
||||
m_iTreewidth = New SqlInt32(CType(dtToReturn.Rows(0)("treewidth"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("fehlerhaft") Is System.DBNull.Value Then
|
||||
m_iFehlerhaft = SqlInt32.Null
|
||||
Else
|
||||
m_iFehlerhaft = New SqlInt32(CType(dtToReturn.Rows(0)("fehlerhaft"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("inBearbeitung") Is System.DBNull.Value Then
|
||||
m_iInBearbeitung = SqlInt32.Null
|
||||
Else
|
||||
m_iInBearbeitung = New SqlInt32(CType(dtToReturn.Rows(0)("inBearbeitung"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("erstellt") Is System.DBNull.Value Then
|
||||
m_iErstellt = SqlInt32.Null
|
||||
Else
|
||||
m_iErstellt = New SqlInt32(CType(dtToReturn.Rows(0)("erstellt"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("gedruckt") Is System.DBNull.Value Then
|
||||
m_iGedruckt = SqlInt32.Null
|
||||
Else
|
||||
m_iGedruckt = New SqlInt32(CType(dtToReturn.Rows(0)("gedruckt"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("bestaetigt") Is System.DBNull.Value Then
|
||||
m_iBestaetigt = SqlInt32.Null
|
||||
Else
|
||||
m_iBestaetigt = New SqlInt32(CType(dtToReturn.Rows(0)("bestaetigt"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("ausgeloest") Is System.DBNull.Value Then
|
||||
m_iAusgeloest = SqlInt32.Null
|
||||
Else
|
||||
m_iAusgeloest = New SqlInt32(CType(dtToReturn.Rows(0)("ausgeloest"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("bldossier") Is System.DBNull.Value Then
|
||||
m_iBldossier = SqlInt32.Null
|
||||
Else
|
||||
m_iBldossier = New SqlInt32(CType(dtToReturn.Rows(0)("bldossier"), Integer))
|
||||
End If
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsEdex_sb_serienbrief::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_edex_sb_serienbrief_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("edex_sb_serienbrief")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_edex_sb_serienbrief_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_sb_serienbrief::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 [iSerienbriefnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iSerienbriefnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iSerienbriefnrTmp As SqlInt32 = Value
|
||||
If iSerienbriefnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iSerienbriefnr", "iSerienbriefnr can't be NULL")
|
||||
End If
|
||||
m_iSerienbriefnr = 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 [iVerantwortlich]() As SqlInt32
|
||||
Get
|
||||
Return m_iVerantwortlich
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iVerantwortlich = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iPostzustellung]() As SqlInt32
|
||||
Get
|
||||
Return m_iPostzustellung
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iPostzustellung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daDokumentdatum]() As SqlDateTime
|
||||
Get
|
||||
Return m_daDokumentdatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daDokumentdatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iZustaendig]() As SqlInt32
|
||||
Get
|
||||
Return m_iZustaendig
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iZustaendig = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iUnterschriftlinks]() As SqlInt32
|
||||
Get
|
||||
Return m_iUnterschriftlinks
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iUnterschriftlinks = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iUnterschriftrechts]() As SqlInt32
|
||||
Get
|
||||
Return m_iUnterschriftrechts
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iUnterschriftrechts = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iTeam]() As SqlInt32
|
||||
Get
|
||||
Return m_iTeam
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iTeam = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daArchivdatum]() As SqlDateTime
|
||||
Get
|
||||
Return m_daArchivdatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daArchivdatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daTermin]() As SqlDateTime
|
||||
Get
|
||||
Return m_daTermin
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daTermin = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBemerkung]() As SqlString
|
||||
Get
|
||||
Return m_sBemerkung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBemerkung = 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 [bAktiv]() As SqlBoolean
|
||||
Get
|
||||
Return m_bAktiv
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iStatus]() As SqlInt32
|
||||
Get
|
||||
Return m_iStatus
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iStatus = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iDokumenttypnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iDokumenttypnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iDokumenttypnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iWindowwidth]() As SqlInt32
|
||||
Get
|
||||
Return m_iWindowwidth
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iWindowwidth = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iWindowheight]() As SqlInt32
|
||||
Get
|
||||
Return m_iWindowheight
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iWindowheight = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iTreewidth]() As SqlInt32
|
||||
Get
|
||||
Return m_iTreewidth
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iTreewidth = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iFehlerhaft]() As SqlInt32
|
||||
Get
|
||||
Return m_iFehlerhaft
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iFehlerhaft = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iInBearbeitung]() As SqlInt32
|
||||
Get
|
||||
Return m_iInBearbeitung
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iInBearbeitung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iErstellt]() As SqlInt32
|
||||
Get
|
||||
Return m_iErstellt
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iErstellt = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iGedruckt]() As SqlInt32
|
||||
Get
|
||||
Return m_iGedruckt
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iGedruckt = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iBestaetigt]() As SqlInt32
|
||||
Get
|
||||
Return m_iBestaetigt
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iBestaetigt = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iAusgeloest]() As SqlInt32
|
||||
Get
|
||||
Return m_iAusgeloest
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iAusgeloest = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iBldossier]() As SqlInt32
|
||||
Get
|
||||
Return m_iBldossier
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iBldossier = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
1051
LBLLGEN/clsEdoka_etpar0.vb
Normal file
1051
LBLLGEN/clsEdoka_etpar0.vb
Normal file
File diff suppressed because it is too large
Load Diff
553
LBLLGEN/clsOffice_vorlage.vb
Normal file
553
LBLLGEN/clsOffice_vorlage.vb
Normal file
@@ -0,0 +1,553 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'office_vorlage'
|
||||
' // Generated by LLBLGen v1.21.2003.712 Final on: Donnerstag, 10. Mai 2012, 08:41:43
|
||||
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
''' <summary>
|
||||
''' Purpose: Data Access class for the table 'office_vorlage'.
|
||||
''' </summary>
|
||||
Public Class clsOffice_vorlage
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bDokument_geschuetzt, m_bIdv_nativ, m_bAbsender_ersteller, m_bBchorizontal, m_bAktiv, m_bKopfzeile_generieren, m_bIdv_vorlage, m_bVorlage_neu As SqlBoolean
|
||||
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
|
||||
Private m_fRegionentextfeld_h, m_fRegionentextfeld_w, m_fRegionentextfeld_t, m_fRegionentextfeld_l As SqlDouble
|
||||
Private m_iMandantnr, m_iOWNER, m_iOffice_vorlagenr, m_iMutierer, m_iAnwendungnr, m_iBcpt, m_iKlassifizierung, m_iVorlageid, m_iBch, m_iBcw, m_iBcpl As SqlInt32
|
||||
Private m_sBezeichnung, m_sBeschreibung, m_sVorlagename, m_sOffice_vorlage, m_sIdv_id, m_sPrefix_dokumentname 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>iOffice_vorlagenr</LI>
|
||||
''' <LI>sBezeichnung. May be SqlString.Null</LI>
|
||||
''' <LI>sBeschreibung. May be SqlString.Null</LI>
|
||||
''' <LI>iVorlageid. May be SqlInt32.Null</LI>
|
||||
''' <LI>sVorlagename. May be SqlString.Null</LI>
|
||||
''' <LI>sPrefix_dokumentname. May be SqlString.Null</LI>
|
||||
''' <LI>bIdv_vorlage</LI>
|
||||
''' <LI>sIdv_id. May be SqlString.Null</LI>
|
||||
''' <LI>sOffice_vorlage. May be SqlString.Null</LI>
|
||||
''' <LI>bAbsender_ersteller. May be SqlBoolean.Null</LI>
|
||||
''' <LI>bIdv_nativ</LI>
|
||||
''' <LI>bDokument_geschuetzt. May be SqlBoolean.Null</LI>
|
||||
''' <LI>bKopfzeile_generieren</LI>
|
||||
''' <LI>iKlassifizierung. May be SqlInt32.Null</LI>
|
||||
''' <LI>iBcpt</LI>
|
||||
''' <LI>iBcpl. May be SqlInt32.Null</LI>
|
||||
''' <LI>iBcw</LI>
|
||||
''' <LI>iBch</LI>
|
||||
''' <LI>bBchorizontal. May be SqlBoolean.Null</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>iAnwendungnr. May be SqlInt32.Null</LI>
|
||||
''' <LI>iOWNER. May be SqlInt32.Null</LI>
|
||||
''' <LI>fRegionentextfeld_t. May be SqlDouble.Null</LI>
|
||||
''' <LI>fRegionentextfeld_l. May be SqlDouble.Null</LI>
|
||||
''' <LI>fRegionentextfeld_w. May be SqlDouble.Null</LI>
|
||||
''' <LI>fRegionentextfeld_h. May be SqlDouble.Null</LI>
|
||||
''' <LI>bVorlage_neu. May be SqlBoolean.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_office_vorlage_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ioffice_vorlagenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iOffice_vorlagenr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ivorlageid", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVorlageid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svorlagename", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVorlagename))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sprefix_dokumentname", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sPrefix_dokumentname))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bidv_vorlage", SqlDbType.Bit, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_bIdv_vorlage))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sidv_id", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sIdv_id))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@soffice_vorlage", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sOffice_vorlage))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@babsender_ersteller", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAbsender_ersteller))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bidv_nativ", SqlDbType.Bit, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_bIdv_nativ))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_geschuetzt", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bDokument_geschuetzt))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bkopfzeile_generieren", SqlDbType.Bit, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_bKopfzeile_generieren))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iklassifizierung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iKlassifizierung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibcpt", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBcpt))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibcpl", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBcpl))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibcw", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBcw))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibch", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBch))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bbchorizontal", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bBchorizontal))
|
||||
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, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", 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("@ianwendungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAnwendungnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iOWNER", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iOWNER))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@fRegionentextfeld_t", SqlDbType.Float, 8, ParameterDirection.Input, True, 38, 0, "", DataRowVersion.Proposed, m_fRegionentextfeld_t))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@fRegionentextfeld_l", SqlDbType.Float, 8, ParameterDirection.Input, True, 38, 0, "", DataRowVersion.Proposed, m_fRegionentextfeld_l))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@fRegionentextfeld_w", SqlDbType.Float, 8, ParameterDirection.Input, True, 38, 0, "", DataRowVersion.Proposed, m_fRegionentextfeld_w))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@fRegionentextfeld_h", SqlDbType.Float, 8, ParameterDirection.Input, True, 38, 0, "", DataRowVersion.Proposed, m_fRegionentextfeld_h))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bVorlage_neu", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bVorlage_neu))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_office_vorlage_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("clsOffice_vorlage::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_office_vorlage_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("office_vorlage")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_office_vorlage_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("clsOffice_vorlage::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 [iOffice_vorlagenr]() As SqlInt32
|
||||
Get
|
||||
Return m_iOffice_vorlagenr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iOffice_vorlagenrTmp As SqlInt32 = Value
|
||||
If iOffice_vorlagenrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iOffice_vorlagenr", "iOffice_vorlagenr can't be NULL")
|
||||
End If
|
||||
m_iOffice_vorlagenr = 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 [sBeschreibung]() As SqlString
|
||||
Get
|
||||
Return m_sBeschreibung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBeschreibung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iVorlageid]() As SqlInt32
|
||||
Get
|
||||
Return m_iVorlageid
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iVorlageid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sVorlagename]() As SqlString
|
||||
Get
|
||||
Return m_sVorlagename
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sVorlagename = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sPrefix_dokumentname]() As SqlString
|
||||
Get
|
||||
Return m_sPrefix_dokumentname
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sPrefix_dokumentname = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bIdv_vorlage]() As SqlBoolean
|
||||
Get
|
||||
Return m_bIdv_vorlage
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
Dim bIdv_vorlageTmp As SqlBoolean = Value
|
||||
If bIdv_vorlageTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("bIdv_vorlage", "bIdv_vorlage can't be NULL")
|
||||
End If
|
||||
m_bIdv_vorlage = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sIdv_id]() As SqlString
|
||||
Get
|
||||
Return m_sIdv_id
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sIdv_id = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sOffice_vorlage]() As SqlString
|
||||
Get
|
||||
Return m_sOffice_vorlage
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sOffice_vorlage = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bAbsender_ersteller]() As SqlBoolean
|
||||
Get
|
||||
Return m_bAbsender_ersteller
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bAbsender_ersteller = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bIdv_nativ]() As SqlBoolean
|
||||
Get
|
||||
Return m_bIdv_nativ
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
Dim bIdv_nativTmp As SqlBoolean = Value
|
||||
If bIdv_nativTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("bIdv_nativ", "bIdv_nativ can't be NULL")
|
||||
End If
|
||||
m_bIdv_nativ = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bDokument_geschuetzt]() As SqlBoolean
|
||||
Get
|
||||
Return m_bDokument_geschuetzt
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bDokument_geschuetzt = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bKopfzeile_generieren]() As SqlBoolean
|
||||
Get
|
||||
Return m_bKopfzeile_generieren
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
Dim bKopfzeile_generierenTmp As SqlBoolean = Value
|
||||
If bKopfzeile_generierenTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("bKopfzeile_generieren", "bKopfzeile_generieren can't be NULL")
|
||||
End If
|
||||
m_bKopfzeile_generieren = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iKlassifizierung]() As SqlInt32
|
||||
Get
|
||||
Return m_iKlassifizierung
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iKlassifizierung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iBcpt]() As SqlInt32
|
||||
Get
|
||||
Return m_iBcpt
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iBcptTmp As SqlInt32 = Value
|
||||
If iBcptTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iBcpt", "iBcpt can't be NULL")
|
||||
End If
|
||||
m_iBcpt = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iBcpl]() As SqlInt32
|
||||
Get
|
||||
Return m_iBcpl
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iBcpl = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iBcw]() As SqlInt32
|
||||
Get
|
||||
Return m_iBcw
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iBcwTmp As SqlInt32 = Value
|
||||
If iBcwTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iBcw", "iBcw can't be NULL")
|
||||
End If
|
||||
m_iBcw = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iBch]() As SqlInt32
|
||||
Get
|
||||
Return m_iBch
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iBchTmp As SqlInt32 = Value
|
||||
If iBchTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iBch", "iBch can't be NULL")
|
||||
End If
|
||||
m_iBch = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bBchorizontal]() As SqlBoolean
|
||||
Get
|
||||
Return m_bBchorizontal
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bBchorizontal = 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 [iAnwendungnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iAnwendungnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iAnwendungnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iOWNER]() As SqlInt32
|
||||
Get
|
||||
Return m_iOWNER
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iOWNER = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [fRegionentextfeld_t]() As SqlDouble
|
||||
Get
|
||||
Return m_fRegionentextfeld_t
|
||||
End Get
|
||||
Set(ByVal Value As SqlDouble)
|
||||
m_fRegionentextfeld_t = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [fRegionentextfeld_l]() As SqlDouble
|
||||
Get
|
||||
Return m_fRegionentextfeld_l
|
||||
End Get
|
||||
Set(ByVal Value As SqlDouble)
|
||||
m_fRegionentextfeld_l = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [fRegionentextfeld_w]() As SqlDouble
|
||||
Get
|
||||
Return m_fRegionentextfeld_w
|
||||
End Get
|
||||
Set(ByVal Value As SqlDouble)
|
||||
m_fRegionentextfeld_w = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [fRegionentextfeld_h]() As SqlDouble
|
||||
Get
|
||||
Return m_fRegionentextfeld_h
|
||||
End Get
|
||||
Set(ByVal Value As SqlDouble)
|
||||
m_fRegionentextfeld_h = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bVorlage_neu]() As SqlBoolean
|
||||
Get
|
||||
Return m_bVorlage_neu
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bVorlage_neu = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
1150
LBLLGEN/clsPartner.vb
Normal file
1150
LBLLGEN/clsPartner.vb
Normal file
File diff suppressed because it is too large
Load Diff
1612
LBLLGEN/clsPartner_Hauptadresse.vb
Normal file
1612
LBLLGEN/clsPartner_Hauptadresse.vb
Normal file
File diff suppressed because it is too large
Load Diff
470
LBLLGEN/clsSerienbrief_BL_Physiche_Ablage.vb
Normal file
470
LBLLGEN/clsSerienbrief_BL_Physiche_Ablage.vb
Normal file
@@ -0,0 +1,470 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'Serienbrief_BL_Physiche_Ablage'
|
||||
' // Generated by LLBLGen v1.21.2003.712 Final on: Sonntag, 19. September 2010, 09:41:03
|
||||
' // 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 'Serienbrief_BL_Physiche_Ablage'.
|
||||
''' </summary>
|
||||
Public Class clsSerienbrief_BL_Physiche_Ablage
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_daTimestampe As SqlDateTime
|
||||
Private m_iEintragnr, m_iPartnernr, m_iSerienbriefnr As SqlInt32
|
||||
Private m_sTGNumer_Ersteller, m_sDokumentid, 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>iSerienbriefnr. May be SqlInt32.Null</LI>
|
||||
''' <LI>sBezeichnung. May be SqlString.Null</LI>
|
||||
''' <LI>sTGNumer_Ersteller. May be SqlString.Null</LI>
|
||||
''' <LI>iPartnernr. May be SqlInt32.Null</LI>
|
||||
''' <LI>sDokumentid. May be SqlString.Null</LI>
|
||||
''' <LI>daTimestampe. May be SqlDateTime.Null</LI>
|
||||
''' </UL>
|
||||
''' Properties set after a succesful call of this method:
|
||||
''' <UL>
|
||||
''' <LI>iEintragnr</LI>
|
||||
''' <LI>iErrorCode</LI>
|
||||
'''</UL>
|
||||
''' </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Serienbrief_BL_Physiche_Ablage_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSerienbriefnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSerienbriefnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sTGNumer_Ersteller", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTGNumer_Ersteller))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iPartnernr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iPartnernr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daTimestampe", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daTimestampe))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iEintragnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iEintragnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iEintragnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iEintragnr").Value, Integer))
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Serienbrief_BL_Physiche_Ablage_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("clsSerienbrief_BL_Physiche_Ablage::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>iEintragnr</LI>
|
||||
''' <LI>iSerienbriefnr. May be SqlInt32.Null</LI>
|
||||
''' <LI>sBezeichnung. May be SqlString.Null</LI>
|
||||
''' <LI>sTGNumer_Ersteller. May be SqlString.Null</LI>
|
||||
''' <LI>iPartnernr. May be SqlInt32.Null</LI>
|
||||
''' <LI>sDokumentid. May be SqlString.Null</LI>
|
||||
''' <LI>daTimestampe. 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_Serienbrief_BL_Physiche_Ablage_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iEintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iEintragnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSerienbriefnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSerienbriefnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sTGNumer_Ersteller", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTGNumer_Ersteller))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iPartnernr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iPartnernr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daTimestampe", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daTimestampe))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Serienbrief_BL_Physiche_Ablage_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("clsSerienbrief_BL_Physiche_Ablage::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>iEintragnr</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_Serienbrief_BL_Physiche_Ablage_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iEintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iEintragnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Serienbrief_BL_Physiche_Ablage_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("clsSerienbrief_BL_Physiche_Ablage::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>iEintragnr</LI>
|
||||
''' </UL>
|
||||
''' Properties set after a succesful call of this method:
|
||||
''' <UL>
|
||||
''' <LI>iErrorCode</LI>
|
||||
''' <LI>iEintragnr</LI>
|
||||
''' <LI>iSerienbriefnr</LI>
|
||||
''' <LI>sBezeichnung</LI>
|
||||
''' <LI>sTGNumer_Ersteller</LI>
|
||||
''' <LI>iPartnernr</LI>
|
||||
''' <LI>sDokumentid</LI>
|
||||
''' <LI>daTimestampe</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_Serienbrief_BL_Physiche_Ablage_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("Serienbrief_BL_Physiche_Ablage")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iEintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iEintragnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Serienbrief_BL_Physiche_Ablage_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iEintragnr = New SqlInt32(CType(dtToReturn.Rows(0)("Eintragnr"), Integer))
|
||||
If dtToReturn.Rows(0)("Serienbriefnr") Is System.DBNull.Value Then
|
||||
m_iSerienbriefnr = SqlInt32.Null
|
||||
Else
|
||||
m_iSerienbriefnr = New SqlInt32(CType(dtToReturn.Rows(0)("Serienbriefnr"), 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)("TGNumer_Ersteller") Is System.DBNull.Value Then
|
||||
m_sTGNumer_Ersteller = SqlString.Null
|
||||
Else
|
||||
m_sTGNumer_Ersteller = New SqlString(CType(dtToReturn.Rows(0)("TGNumer_Ersteller"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Partnernr") Is System.DBNull.Value Then
|
||||
m_iPartnernr = SqlInt32.Null
|
||||
Else
|
||||
m_iPartnernr = New SqlInt32(CType(dtToReturn.Rows(0)("Partnernr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Dokumentid") Is System.DBNull.Value Then
|
||||
m_sDokumentid = SqlString.Null
|
||||
Else
|
||||
m_sDokumentid = New SqlString(CType(dtToReturn.Rows(0)("Dokumentid"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Timestampe") Is System.DBNull.Value Then
|
||||
m_daTimestampe = SqlDateTime.Null
|
||||
Else
|
||||
m_daTimestampe = New SqlDateTime(CType(dtToReturn.Rows(0)("Timestampe"), 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("clsSerienbrief_BL_Physiche_Ablage::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_Serienbrief_BL_Physiche_Ablage_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("Serienbrief_BL_Physiche_Ablage")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Serienbrief_BL_Physiche_Ablage_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("clsSerienbrief_BL_Physiche_Ablage::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 [iEintragnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iEintragnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iEintragnrTmp As SqlInt32 = Value
|
||||
If iEintragnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iEintragnr", "iEintragnr can't be NULL")
|
||||
End If
|
||||
m_iEintragnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iSerienbriefnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iSerienbriefnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iSerienbriefnr = 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 [sTGNumer_Ersteller]() As SqlString
|
||||
Get
|
||||
Return m_sTGNumer_Ersteller
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sTGNumer_Ersteller = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iPartnernr]() As SqlInt32
|
||||
Get
|
||||
Return m_iPartnernr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iPartnernr = 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 [daTimestampe]() As SqlDateTime
|
||||
Get
|
||||
Return m_daTimestampe
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daTimestampe = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
895
LBLLGEN/clsSysadminfunktion.vb
Normal file
895
LBLLGEN/clsSysadminfunktion.vb
Normal file
@@ -0,0 +1,895 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'sysadminfunktion'
|
||||
' // Generated by LLBLGen v1.21.2003.712 Final on: Donnerstag, 14. Oktober 2010, 22:33:31
|
||||
' // 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 'sysadminfunktion'.
|
||||
''' </summary>
|
||||
Public Class clsSysadminfunktion
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bAktiv As SqlBoolean
|
||||
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
|
||||
Private m_iFheight, m_iFwidth, m_iMandantnr, m_iMutierer, m_iSprache, m_iSort, m_iImageIndex, m_iSysadminfnktnr, m_iParentID, m_iFtop, m_iFleft, m_iImageIndexOpen As SqlInt32
|
||||
Private m_sKeyFields, m_sDomaintable, m_sBeschreibung, 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>iSysadminfnktnr</LI>
|
||||
''' <LI>sBezeichnung. May be SqlString.Null</LI>
|
||||
''' <LI>iParentID. May be SqlInt32.Null</LI>
|
||||
''' <LI>iSort. May be SqlInt32.Null</LI>
|
||||
''' <LI>iImageIndex. May be SqlInt32.Null</LI>
|
||||
''' <LI>iImageIndexOpen. May be SqlInt32.Null</LI>
|
||||
''' <LI>iFtop. May be SqlInt32.Null</LI>
|
||||
''' <LI>iFleft. May be SqlInt32.Null</LI>
|
||||
''' <LI>iFwidth. May be SqlInt32.Null</LI>
|
||||
''' <LI>iFheight. May be SqlInt32.Null</LI>
|
||||
''' <LI>sBeschreibung. May be SqlString.Null</LI>
|
||||
''' <LI>iMandantnr</LI>
|
||||
''' <LI>iSprache</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>sDomaintable. May be SqlString.Null</LI>
|
||||
''' <LI>sKeyFields. 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_sysadminfunktion_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@isysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSysadminfnktnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParentID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentID))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSort", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSort))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImageIndex", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageIndex))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImageIndexOpen", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageIndexOpen))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iftop", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFtop))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifleft", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFleft))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifwidth", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFwidth))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifheight", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFheight))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", 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("@sDomaintable", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDomaintable))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sKeyFields", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sKeyFields))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_sysadminfunktion_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("clsSysadminfunktion::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>iSysadminfnktnr</LI>
|
||||
''' <LI>sBezeichnung. May be SqlString.Null</LI>
|
||||
''' <LI>iParentID. May be SqlInt32.Null</LI>
|
||||
''' <LI>iSort. May be SqlInt32.Null</LI>
|
||||
''' <LI>iImageIndex. May be SqlInt32.Null</LI>
|
||||
''' <LI>iImageIndexOpen. May be SqlInt32.Null</LI>
|
||||
''' <LI>iFtop. May be SqlInt32.Null</LI>
|
||||
''' <LI>iFleft. May be SqlInt32.Null</LI>
|
||||
''' <LI>iFwidth. May be SqlInt32.Null</LI>
|
||||
''' <LI>iFheight. May be SqlInt32.Null</LI>
|
||||
''' <LI>sBeschreibung. May be SqlString.Null</LI>
|
||||
''' <LI>iMandantnr</LI>
|
||||
''' <LI>iSprache</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>sDomaintable. May be SqlString.Null</LI>
|
||||
''' <LI>sKeyFields. 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_sysadminfunktion_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@isysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSysadminfnktnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParentID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentID))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSort", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSort))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImageIndex", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageIndex))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImageIndexOpen", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageIndexOpen))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iftop", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFtop))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifleft", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFleft))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifwidth", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFwidth))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifheight", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFheight))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", 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("@sDomaintable", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDomaintable))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sKeyFields", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sKeyFields))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_sysadminfunktion_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("clsSysadminfunktion::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>iSysadminfnktnr</LI>
|
||||
''' <LI>iMandantnr</LI>
|
||||
''' <LI>iSprache</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_sysadminfunktion_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@isysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSysadminfnktnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_sysadminfunktion_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("clsSysadminfunktion::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 'sysadminfnktnr'. This method will
|
||||
''' delete one or more rows from the database, based on the Primary Key field 'sysadminfnktnr'.
|
||||
''' </summary>
|
||||
''' <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
''' <remarks>
|
||||
''' Properties needed for this method:
|
||||
''' <UL>
|
||||
''' <LI>iSysadminfnktnr</LI>
|
||||
''' </UL>
|
||||
''' Properties set after a succesful call of this method:
|
||||
''' <UL>
|
||||
''' <LI>iErrorCode</LI>
|
||||
''' </UL>
|
||||
''' </remarks>
|
||||
Public Function DeleteAllWsysadminfnktnrLogic() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_sysadminfunktion_DeleteAllWsysadminfnktnrLogic]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@isysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, false, 10, 0, "", DataRowVersion.Proposed, m_iSysadminfnktnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iSysadminfnktnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@isysadminfnktnr").Value, Integer))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_sysadminfunktion_DeleteAllWsysadminfnktnrLogic' 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("clsSysadminfunktion::DeleteAllWsysadminfnktnrLogic::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 'mandantnr'. This method will
|
||||
''' delete one or more rows from the database, based on the Primary Key field 'mandantnr'.
|
||||
''' </summary>
|
||||
''' <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
''' <remarks>
|
||||
''' Properties needed for this method:
|
||||
''' <UL>
|
||||
''' <LI>iMandantnr</LI>
|
||||
''' </UL>
|
||||
''' Properties set after a succesful call of this method:
|
||||
''' <UL>
|
||||
''' <LI>iErrorCode</LI>
|
||||
''' </UL>
|
||||
''' </remarks>
|
||||
Public Function DeleteAllWmandantnrLogic() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_sysadminfunktion_DeleteAllWmandantnrLogic]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, false, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iMandantnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@imandantnr").Value, Integer))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_sysadminfunktion_DeleteAllWmandantnrLogic' 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("clsSysadminfunktion::DeleteAllWmandantnrLogic::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 'sprache'. This method will
|
||||
''' delete one or more rows from the database, based on the Primary Key field 'sprache'.
|
||||
''' </summary>
|
||||
''' <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
''' <remarks>
|
||||
''' Properties needed for this method:
|
||||
''' <UL>
|
||||
''' <LI>iSprache</LI>
|
||||
''' </UL>
|
||||
''' Properties set after a succesful call of this method:
|
||||
''' <UL>
|
||||
''' <LI>iErrorCode</LI>
|
||||
''' </UL>
|
||||
''' </remarks>
|
||||
Public Function DeleteAllWspracheLogic() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_sysadminfunktion_DeleteAllWspracheLogic]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, false, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iSprache = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@isprache").Value, Integer))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_sysadminfunktion_DeleteAllWspracheLogic' 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("clsSysadminfunktion::DeleteAllWspracheLogic::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>iSysadminfnktnr</LI>
|
||||
''' <LI>iMandantnr</LI>
|
||||
''' <LI>iSprache</LI>
|
||||
''' </UL>
|
||||
''' Properties set after a succesful call of this method:
|
||||
''' <UL>
|
||||
''' <LI>iErrorCode</LI>
|
||||
''' <LI>iSysadminfnktnr</LI>
|
||||
''' <LI>sBezeichnung</LI>
|
||||
''' <LI>iParentID</LI>
|
||||
''' <LI>iSort</LI>
|
||||
''' <LI>iImageIndex</LI>
|
||||
''' <LI>iImageIndexOpen</LI>
|
||||
''' <LI>iFtop</LI>
|
||||
''' <LI>iFleft</LI>
|
||||
''' <LI>iFwidth</LI>
|
||||
''' <LI>iFheight</LI>
|
||||
''' <LI>sBeschreibung</LI>
|
||||
''' <LI>iMandantnr</LI>
|
||||
''' <LI>iSprache</LI>
|
||||
''' <LI>bAktiv</LI>
|
||||
''' <LI>daErstellt_am</LI>
|
||||
''' <LI>daMutiert_am</LI>
|
||||
''' <LI>iMutierer</LI>
|
||||
''' <LI>sDomaintable</LI>
|
||||
''' <LI>sKeyFields</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_sysadminfunktion_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("sysadminfunktion")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@isysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSysadminfnktnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_sysadminfunktion_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iSysadminfnktnr = New SqlInt32(CType(dtToReturn.Rows(0)("sysadminfnktnr"), 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)("ParentID") Is System.DBNull.Value Then
|
||||
m_iParentID = SqlInt32.Null
|
||||
Else
|
||||
m_iParentID = New SqlInt32(CType(dtToReturn.Rows(0)("ParentID"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Sort") Is System.DBNull.Value Then
|
||||
m_iSort = SqlInt32.Null
|
||||
Else
|
||||
m_iSort = New SqlInt32(CType(dtToReturn.Rows(0)("Sort"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("ImageIndex") Is System.DBNull.Value Then
|
||||
m_iImageIndex = SqlInt32.Null
|
||||
Else
|
||||
m_iImageIndex = New SqlInt32(CType(dtToReturn.Rows(0)("ImageIndex"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("ImageIndexOpen") Is System.DBNull.Value Then
|
||||
m_iImageIndexOpen = SqlInt32.Null
|
||||
Else
|
||||
m_iImageIndexOpen = New SqlInt32(CType(dtToReturn.Rows(0)("ImageIndexOpen"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("ftop") Is System.DBNull.Value Then
|
||||
m_iFtop = SqlInt32.Null
|
||||
Else
|
||||
m_iFtop = New SqlInt32(CType(dtToReturn.Rows(0)("ftop"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("fleft") Is System.DBNull.Value Then
|
||||
m_iFleft = SqlInt32.Null
|
||||
Else
|
||||
m_iFleft = New SqlInt32(CType(dtToReturn.Rows(0)("fleft"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("fwidth") Is System.DBNull.Value Then
|
||||
m_iFwidth = SqlInt32.Null
|
||||
Else
|
||||
m_iFwidth = New SqlInt32(CType(dtToReturn.Rows(0)("fwidth"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("fheight") Is System.DBNull.Value Then
|
||||
m_iFheight = SqlInt32.Null
|
||||
Else
|
||||
m_iFheight = New SqlInt32(CType(dtToReturn.Rows(0)("fheight"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("beschreibung") Is System.DBNull.Value Then
|
||||
m_sBeschreibung = SqlString.Null
|
||||
Else
|
||||
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("beschreibung"), String))
|
||||
End If
|
||||
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
|
||||
m_iSprache = New SqlInt32(CType(dtToReturn.Rows(0)("sprache"), Integer))
|
||||
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
|
||||
m_bAktiv = SqlBoolean.Null
|
||||
Else
|
||||
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
|
||||
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)("Domaintable") Is System.DBNull.Value Then
|
||||
m_sDomaintable = SqlString.Null
|
||||
Else
|
||||
m_sDomaintable = New SqlString(CType(dtToReturn.Rows(0)("Domaintable"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("KeyFields") Is System.DBNull.Value Then
|
||||
m_sKeyFields = SqlString.Null
|
||||
Else
|
||||
m_sKeyFields = New SqlString(CType(dtToReturn.Rows(0)("KeyFields"), 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("clsSysadminfunktion::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_sysadminfunktion_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("sysadminfunktion")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_sysadminfunktion_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("clsSysadminfunktion::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 [iSysadminfnktnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iSysadminfnktnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iSysadminfnktnrTmp As SqlInt32 = Value
|
||||
If iSysadminfnktnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iSysadminfnktnr", "iSysadminfnktnr can't be NULL")
|
||||
End If
|
||||
m_iSysadminfnktnr = 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 [iParentID]() As SqlInt32
|
||||
Get
|
||||
Return m_iParentID
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iParentID = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iSort]() As SqlInt32
|
||||
Get
|
||||
Return m_iSort
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iSort = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iImageIndex]() As SqlInt32
|
||||
Get
|
||||
Return m_iImageIndex
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iImageIndex = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iImageIndexOpen]() As SqlInt32
|
||||
Get
|
||||
Return m_iImageIndexOpen
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iImageIndexOpen = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iFtop]() As SqlInt32
|
||||
Get
|
||||
Return m_iFtop
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iFtop = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iFleft]() As SqlInt32
|
||||
Get
|
||||
Return m_iFleft
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iFleft = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iFwidth]() As SqlInt32
|
||||
Get
|
||||
Return m_iFwidth
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iFwidth = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iFheight]() As SqlInt32
|
||||
Get
|
||||
Return m_iFheight
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iFheight = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBeschreibung]() As SqlString
|
||||
Get
|
||||
Return m_sBeschreibung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBeschreibung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iMandantnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iMandantnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iMandantnrTmp As SqlInt32 = Value
|
||||
If iMandantnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iMandantnr", "iMandantnr can't be NULL")
|
||||
End If
|
||||
m_iMandantnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iSprache]() As SqlInt32
|
||||
Get
|
||||
Return m_iSprache
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iSpracheTmp As SqlInt32 = Value
|
||||
If iSpracheTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iSprache", "iSprache can't be NULL")
|
||||
End If
|
||||
m_iSprache = 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 [sDomaintable]() As SqlString
|
||||
Get
|
||||
Return m_sDomaintable
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDomaintable = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sKeyFields]() As SqlString
|
||||
Get
|
||||
Return m_sKeyFields
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sKeyFields = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
708
LBLLGEN/edoka_LLBL_StoredProcedures.sql
Normal file
708
LBLLGEN/edoka_LLBL_StoredProcedures.sql
Normal file
@@ -0,0 +1,708 @@
|
||||
-- ================================================================================================================
|
||||
-- Stored Procedures generated by LLBLGen v1.21.2003.712 Final on Freitag, 11. Mai 2012, 11:49:44
|
||||
-- For the Low Level Business Logic Layer for the database 'edoka'
|
||||
-- ================================================================================================================
|
||||
SET NOCOUNT ON
|
||||
GO
|
||||
USE [edoka]
|
||||
GO
|
||||
|
||||
-- ========================================================================================================
|
||||
-- [Stored Procedures generated for table: dokumenttyp]
|
||||
GO
|
||||
|
||||
-- //// Insert Stored procedure.
|
||||
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_dokumenttyp_Insert]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_dokumenttyp_Insert]
|
||||
GO
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
-- Stored procedure that will insert 1 row in the table 'dokumenttyp'
|
||||
-- Gets: @idokumenttypnr int
|
||||
-- Gets: @sbezeichnung varchar(255)
|
||||
-- Gets: @sbeschreibung varchar(255)
|
||||
-- Gets: @bzu_vercolden bit
|
||||
-- Gets: @bzu_retournieren bit
|
||||
-- Gets: @beingang_ersetzt_ausgang bit
|
||||
-- Gets: @bwird_importiert bit
|
||||
-- Gets: @ianzahl_tage int
|
||||
-- Gets: @idbearbeitungszeit int
|
||||
-- Gets: @itage_mutation int
|
||||
-- Gets: @bpartnersaldierung_statusalt bit
|
||||
-- Gets: @bwird_nicht_geloescht bit
|
||||
-- Gets: @bvertrauliches_dokument bit
|
||||
-- Gets: @bunterschrift_links bit
|
||||
-- Gets: @bunterschrift_rechts bit
|
||||
-- Gets: @imonate_bis_zur_archivierung int
|
||||
-- Gets: @iaufbewahrungsfrist_elektronisch int
|
||||
-- Gets: @iaufbewahrungsfrist_physisch int
|
||||
-- Gets: @imandantnr int
|
||||
-- Gets: @baktiv bit
|
||||
-- Gets: @daerstellt_am datetime
|
||||
-- Gets: @damutiert_am datetime
|
||||
-- Gets: @imutierer int
|
||||
-- Gets: @ioffice_vorlagenr int
|
||||
-- Gets: @idokumentart_kundendossier int
|
||||
-- Gets: @idokumentart_neuerstellung int
|
||||
-- Gets: @idokumentart_retournierung int
|
||||
-- Gets: @idokumentart_coldausgang int
|
||||
-- Gets: @idokumentart_coldeingang int
|
||||
-- Gets: @idokumentart_host int
|
||||
-- Gets: @idokumentart_weitere int
|
||||
-- Gets: @idokumentart_nativ int
|
||||
-- Gets: @iprozessnr int
|
||||
-- Gets: @iprozessnr1 int
|
||||
-- Gets: @bamsdokument bit
|
||||
-- Gets: @bhostdokument bit
|
||||
-- Gets: @shostdokumenttyp varchar(50)
|
||||
-- Gets: @icold_folder int
|
||||
-- Gets: @iphysisches_archiv int
|
||||
-- Gets: @idokumentstatus int
|
||||
-- Gets: @bDokument_wird_erstellt bit
|
||||
-- Gets: @bDokument_wird_retourniert bit
|
||||
-- Gets: @bcold_ersetzen bit
|
||||
-- Gets: @bemail_versand bit
|
||||
-- Gets: @bfunktionen_zuweisen bit
|
||||
-- Gets: @idokumentstatus_barcode int
|
||||
-- Gets: @bnurnative bit
|
||||
-- Gets: @iOwner int
|
||||
-- Gets: @bvertrag bit
|
||||
-- Gets: @iobjektbezeichnungnr int
|
||||
-- Gets: @bbedingtretournierbar bit
|
||||
-- Gets: @idoktypbedingteretournierung int
|
||||
-- Gets: @itagebisvernichtungbedingteretournierung int
|
||||
-- Gets: @bAnzeigeZurDokumenterstellung bit
|
||||
-- Gets: @bKundenDokument bit
|
||||
-- Gets: @bsb bit
|
||||
-- Gets: @bsbimport bit
|
||||
-- Gets: @bsbedituser bit
|
||||
-- Gets: @bsbnur bit
|
||||
-- Gets: @bbezeichnungmut bit
|
||||
-- Gets: @bistFarbigArchiviert bit
|
||||
-- Gets: @bintern bit
|
||||
-- Gets: @belDokImport bit
|
||||
-- Gets: @sFachverantwortung varchar(255)
|
||||
-- Returns: @iErrorCode int
|
||||
---------------------------------------------------------------------------------
|
||||
CREATE PROCEDURE [dbo].[pr_dokumenttyp_Insert]
|
||||
@idokumenttypnr int,
|
||||
@sbezeichnung varchar(255),
|
||||
@sbeschreibung varchar(255),
|
||||
@bzu_vercolden bit,
|
||||
@bzu_retournieren bit,
|
||||
@beingang_ersetzt_ausgang bit,
|
||||
@bwird_importiert bit,
|
||||
@ianzahl_tage int,
|
||||
@idbearbeitungszeit int,
|
||||
@itage_mutation int,
|
||||
@bpartnersaldierung_statusalt bit,
|
||||
@bwird_nicht_geloescht bit,
|
||||
@bvertrauliches_dokument bit,
|
||||
@bunterschrift_links bit,
|
||||
@bunterschrift_rechts bit,
|
||||
@imonate_bis_zur_archivierung int,
|
||||
@iaufbewahrungsfrist_elektronisch int,
|
||||
@iaufbewahrungsfrist_physisch int,
|
||||
@imandantnr int,
|
||||
@baktiv bit,
|
||||
@daerstellt_am datetime,
|
||||
@damutiert_am datetime,
|
||||
@imutierer int,
|
||||
@ioffice_vorlagenr int,
|
||||
@idokumentart_kundendossier int,
|
||||
@idokumentart_neuerstellung int,
|
||||
@idokumentart_retournierung int,
|
||||
@idokumentart_coldausgang int,
|
||||
@idokumentart_coldeingang int,
|
||||
@idokumentart_host int,
|
||||
@idokumentart_weitere int,
|
||||
@idokumentart_nativ int,
|
||||
@iprozessnr int,
|
||||
@iprozessnr1 int,
|
||||
@bamsdokument bit,
|
||||
@bhostdokument bit,
|
||||
@shostdokumenttyp varchar(50),
|
||||
@icold_folder int,
|
||||
@iphysisches_archiv int,
|
||||
@idokumentstatus int,
|
||||
@bDokument_wird_erstellt bit,
|
||||
@bDokument_wird_retourniert bit,
|
||||
@bcold_ersetzen bit,
|
||||
@bemail_versand bit,
|
||||
@bfunktionen_zuweisen bit,
|
||||
@idokumentstatus_barcode int,
|
||||
@bnurnative bit,
|
||||
@iOwner int,
|
||||
@bvertrag bit,
|
||||
@iobjektbezeichnungnr int,
|
||||
@bbedingtretournierbar bit,
|
||||
@idoktypbedingteretournierung int,
|
||||
@itagebisvernichtungbedingteretournierung int,
|
||||
@bAnzeigeZurDokumenterstellung bit,
|
||||
@bKundenDokument bit,
|
||||
@bsb bit,
|
||||
@bsbimport bit,
|
||||
@bsbedituser bit,
|
||||
@bsbnur bit,
|
||||
@bbezeichnungmut bit,
|
||||
@bistFarbigArchiviert bit,
|
||||
@bintern bit,
|
||||
@belDokImport bit,
|
||||
@sFachverantwortung varchar(255),
|
||||
@iErrorCode int OUTPUT
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
-- INSERT a new row in the table.
|
||||
INSERT [dbo].[dokumenttyp]
|
||||
(
|
||||
[dokumenttypnr],
|
||||
[bezeichnung],
|
||||
[beschreibung],
|
||||
[zu_vercolden],
|
||||
[zu_retournieren],
|
||||
[eingang_ersetzt_ausgang],
|
||||
[wird_importiert],
|
||||
[anzahl_tage],
|
||||
[dbearbeitungszeit],
|
||||
[tage_mutation],
|
||||
[partnersaldierung_statusalt],
|
||||
[wird_nicht_geloescht],
|
||||
[vertrauliches_dokument],
|
||||
[unterschrift_links],
|
||||
[unterschrift_rechts],
|
||||
[monate_bis_zur_archivierung],
|
||||
[aufbewahrungsfrist_elektronisch],
|
||||
[aufbewahrungsfrist_physisch],
|
||||
[mandantnr],
|
||||
[aktiv],
|
||||
[erstellt_am],
|
||||
[mutiert_am],
|
||||
[mutierer],
|
||||
[office_vorlagenr],
|
||||
[dokumentart_kundendossier],
|
||||
[dokumentart_neuerstellung],
|
||||
[dokumentart_retournierung],
|
||||
[dokumentart_coldausgang],
|
||||
[dokumentart_coldeingang],
|
||||
[dokumentart_host],
|
||||
[dokumentart_weitere],
|
||||
[dokumentart_nativ],
|
||||
[prozessnr],
|
||||
[prozessnr1],
|
||||
[amsdokument],
|
||||
[hostdokument],
|
||||
[hostdokumenttyp],
|
||||
[cold_folder],
|
||||
[physisches_archiv],
|
||||
[dokumentstatus],
|
||||
[Dokument_wird_erstellt],
|
||||
[Dokument_wird_retourniert],
|
||||
[cold_ersetzen],
|
||||
[email_versand],
|
||||
[funktionen_zuweisen],
|
||||
[dokumentstatus_barcode],
|
||||
[nurnative],
|
||||
[Owner],
|
||||
[vertrag],
|
||||
[objektbezeichnungnr],
|
||||
[bedingtretournierbar],
|
||||
[doktypbedingteretournierung],
|
||||
[tagebisvernichtungbedingteretournierung],
|
||||
[AnzeigeZurDokumenterstellung],
|
||||
[KundenDokument],
|
||||
[sb],
|
||||
[sbimport],
|
||||
[sbedituser],
|
||||
[sbnur],
|
||||
[bezeichnungmut],
|
||||
[istFarbigArchiviert],
|
||||
[intern],
|
||||
[elDokImport],
|
||||
[Fachverantwortung]
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
@idokumenttypnr,
|
||||
@sbezeichnung,
|
||||
@sbeschreibung,
|
||||
@bzu_vercolden,
|
||||
@bzu_retournieren,
|
||||
@beingang_ersetzt_ausgang,
|
||||
@bwird_importiert,
|
||||
@ianzahl_tage,
|
||||
@idbearbeitungszeit,
|
||||
@itage_mutation,
|
||||
@bpartnersaldierung_statusalt,
|
||||
@bwird_nicht_geloescht,
|
||||
@bvertrauliches_dokument,
|
||||
@bunterschrift_links,
|
||||
@bunterschrift_rechts,
|
||||
@imonate_bis_zur_archivierung,
|
||||
@iaufbewahrungsfrist_elektronisch,
|
||||
@iaufbewahrungsfrist_physisch,
|
||||
@imandantnr,
|
||||
@baktiv,
|
||||
@daerstellt_am,
|
||||
@damutiert_am,
|
||||
@imutierer,
|
||||
@ioffice_vorlagenr,
|
||||
@idokumentart_kundendossier,
|
||||
@idokumentart_neuerstellung,
|
||||
@idokumentart_retournierung,
|
||||
@idokumentart_coldausgang,
|
||||
@idokumentart_coldeingang,
|
||||
@idokumentart_host,
|
||||
@idokumentart_weitere,
|
||||
@idokumentart_nativ,
|
||||
@iprozessnr,
|
||||
@iprozessnr1,
|
||||
@bamsdokument,
|
||||
@bhostdokument,
|
||||
@shostdokumenttyp,
|
||||
@icold_folder,
|
||||
@iphysisches_archiv,
|
||||
@idokumentstatus,
|
||||
@bDokument_wird_erstellt,
|
||||
@bDokument_wird_retourniert,
|
||||
@bcold_ersetzen,
|
||||
@bemail_versand,
|
||||
@bfunktionen_zuweisen,
|
||||
@idokumentstatus_barcode,
|
||||
@bnurnative,
|
||||
@iOwner,
|
||||
@bvertrag,
|
||||
@iobjektbezeichnungnr,
|
||||
@bbedingtretournierbar,
|
||||
@idoktypbedingteretournierung,
|
||||
@itagebisvernichtungbedingteretournierung,
|
||||
@bAnzeigeZurDokumenterstellung,
|
||||
@bKundenDokument,
|
||||
@bsb,
|
||||
@bsbimport,
|
||||
@bsbedituser,
|
||||
@bsbnur,
|
||||
@bbezeichnungmut,
|
||||
ISNULL(@bistFarbigArchiviert, (0)),
|
||||
@bintern,
|
||||
@belDokImport,
|
||||
@sFachverantwortung
|
||||
)
|
||||
-- Get the Error Code for the statement just executed.
|
||||
SELECT @iErrorCode=@@ERROR
|
||||
GO
|
||||
|
||||
|
||||
-- //// Update Stored procedure for updating one single row.
|
||||
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_dokumenttyp_Update]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_dokumenttyp_Update]
|
||||
GO
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
-- Stored procedure that will update an existing row in the table 'dokumenttyp'
|
||||
-- Gets: @idokumenttypnr int
|
||||
-- Gets: @sbezeichnung varchar(255)
|
||||
-- Gets: @sbeschreibung varchar(255)
|
||||
-- Gets: @bzu_vercolden bit
|
||||
-- Gets: @bzu_retournieren bit
|
||||
-- Gets: @beingang_ersetzt_ausgang bit
|
||||
-- Gets: @bwird_importiert bit
|
||||
-- Gets: @ianzahl_tage int
|
||||
-- Gets: @idbearbeitungszeit int
|
||||
-- Gets: @itage_mutation int
|
||||
-- Gets: @bpartnersaldierung_statusalt bit
|
||||
-- Gets: @bwird_nicht_geloescht bit
|
||||
-- Gets: @bvertrauliches_dokument bit
|
||||
-- Gets: @bunterschrift_links bit
|
||||
-- Gets: @bunterschrift_rechts bit
|
||||
-- Gets: @imonate_bis_zur_archivierung int
|
||||
-- Gets: @iaufbewahrungsfrist_elektronisch int
|
||||
-- Gets: @iaufbewahrungsfrist_physisch int
|
||||
-- Gets: @imandantnr int
|
||||
-- Gets: @baktiv bit
|
||||
-- Gets: @daerstellt_am datetime
|
||||
-- Gets: @damutiert_am datetime
|
||||
-- Gets: @imutierer int
|
||||
-- Gets: @ioffice_vorlagenr int
|
||||
-- Gets: @idokumentart_kundendossier int
|
||||
-- Gets: @idokumentart_neuerstellung int
|
||||
-- Gets: @idokumentart_retournierung int
|
||||
-- Gets: @idokumentart_coldausgang int
|
||||
-- Gets: @idokumentart_coldeingang int
|
||||
-- Gets: @idokumentart_host int
|
||||
-- Gets: @idokumentart_weitere int
|
||||
-- Gets: @idokumentart_nativ int
|
||||
-- Gets: @iprozessnr int
|
||||
-- Gets: @iprozessnr1 int
|
||||
-- Gets: @bamsdokument bit
|
||||
-- Gets: @bhostdokument bit
|
||||
-- Gets: @shostdokumenttyp varchar(50)
|
||||
-- Gets: @icold_folder int
|
||||
-- Gets: @iphysisches_archiv int
|
||||
-- Gets: @idokumentstatus int
|
||||
-- Gets: @bDokument_wird_erstellt bit
|
||||
-- Gets: @bDokument_wird_retourniert bit
|
||||
-- Gets: @bcold_ersetzen bit
|
||||
-- Gets: @bemail_versand bit
|
||||
-- Gets: @bfunktionen_zuweisen bit
|
||||
-- Gets: @idokumentstatus_barcode int
|
||||
-- Gets: @bnurnative bit
|
||||
-- Gets: @iOwner int
|
||||
-- Gets: @bvertrag bit
|
||||
-- Gets: @iobjektbezeichnungnr int
|
||||
-- Gets: @bbedingtretournierbar bit
|
||||
-- Gets: @idoktypbedingteretournierung int
|
||||
-- Gets: @itagebisvernichtungbedingteretournierung int
|
||||
-- Gets: @bAnzeigeZurDokumenterstellung bit
|
||||
-- Gets: @bKundenDokument bit
|
||||
-- Gets: @bsb bit
|
||||
-- Gets: @bsbimport bit
|
||||
-- Gets: @bsbedituser bit
|
||||
-- Gets: @bsbnur bit
|
||||
-- Gets: @bbezeichnungmut bit
|
||||
-- Gets: @bistFarbigArchiviert bit
|
||||
-- Gets: @bintern bit
|
||||
-- Gets: @belDokImport bit
|
||||
-- Gets: @sFachverantwortung varchar(255)
|
||||
-- Returns: @iErrorCode int
|
||||
---------------------------------------------------------------------------------
|
||||
CREATE PROCEDURE [dbo].[pr_dokumenttyp_Update]
|
||||
@idokumenttypnr int,
|
||||
@sbezeichnung varchar(255),
|
||||
@sbeschreibung varchar(255),
|
||||
@bzu_vercolden bit,
|
||||
@bzu_retournieren bit,
|
||||
@beingang_ersetzt_ausgang bit,
|
||||
@bwird_importiert bit,
|
||||
@ianzahl_tage int,
|
||||
@idbearbeitungszeit int,
|
||||
@itage_mutation int,
|
||||
@bpartnersaldierung_statusalt bit,
|
||||
@bwird_nicht_geloescht bit,
|
||||
@bvertrauliches_dokument bit,
|
||||
@bunterschrift_links bit,
|
||||
@bunterschrift_rechts bit,
|
||||
@imonate_bis_zur_archivierung int,
|
||||
@iaufbewahrungsfrist_elektronisch int,
|
||||
@iaufbewahrungsfrist_physisch int,
|
||||
@imandantnr int,
|
||||
@baktiv bit,
|
||||
@daerstellt_am datetime,
|
||||
@damutiert_am datetime,
|
||||
@imutierer int,
|
||||
@ioffice_vorlagenr int,
|
||||
@idokumentart_kundendossier int,
|
||||
@idokumentart_neuerstellung int,
|
||||
@idokumentart_retournierung int,
|
||||
@idokumentart_coldausgang int,
|
||||
@idokumentart_coldeingang int,
|
||||
@idokumentart_host int,
|
||||
@idokumentart_weitere int,
|
||||
@idokumentart_nativ int,
|
||||
@iprozessnr int,
|
||||
@iprozessnr1 int,
|
||||
@bamsdokument bit,
|
||||
@bhostdokument bit,
|
||||
@shostdokumenttyp varchar(50),
|
||||
@icold_folder int,
|
||||
@iphysisches_archiv int,
|
||||
@idokumentstatus int,
|
||||
@bDokument_wird_erstellt bit,
|
||||
@bDokument_wird_retourniert bit,
|
||||
@bcold_ersetzen bit,
|
||||
@bemail_versand bit,
|
||||
@bfunktionen_zuweisen bit,
|
||||
@idokumentstatus_barcode int,
|
||||
@bnurnative bit,
|
||||
@iOwner int,
|
||||
@bvertrag bit,
|
||||
@iobjektbezeichnungnr int,
|
||||
@bbedingtretournierbar bit,
|
||||
@idoktypbedingteretournierung int,
|
||||
@itagebisvernichtungbedingteretournierung int,
|
||||
@bAnzeigeZurDokumenterstellung bit,
|
||||
@bKundenDokument bit,
|
||||
@bsb bit,
|
||||
@bsbimport bit,
|
||||
@bsbedituser bit,
|
||||
@bsbnur bit,
|
||||
@bbezeichnungmut bit,
|
||||
@bistFarbigArchiviert bit,
|
||||
@bintern bit,
|
||||
@belDokImport bit,
|
||||
@sFachverantwortung varchar(255),
|
||||
@iErrorCode int OUTPUT
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
-- UPDATE an existing row in the table.
|
||||
UPDATE [dbo].[dokumenttyp]
|
||||
SET
|
||||
[bezeichnung] = @sbezeichnung,
|
||||
[beschreibung] = @sbeschreibung,
|
||||
[zu_vercolden] = @bzu_vercolden,
|
||||
[zu_retournieren] = @bzu_retournieren,
|
||||
[eingang_ersetzt_ausgang] = @beingang_ersetzt_ausgang,
|
||||
[wird_importiert] = @bwird_importiert,
|
||||
[anzahl_tage] = @ianzahl_tage,
|
||||
[dbearbeitungszeit] = @idbearbeitungszeit,
|
||||
[tage_mutation] = @itage_mutation,
|
||||
[partnersaldierung_statusalt] = @bpartnersaldierung_statusalt,
|
||||
[wird_nicht_geloescht] = @bwird_nicht_geloescht,
|
||||
[vertrauliches_dokument] = @bvertrauliches_dokument,
|
||||
[unterschrift_links] = @bunterschrift_links,
|
||||
[unterschrift_rechts] = @bunterschrift_rechts,
|
||||
[monate_bis_zur_archivierung] = @imonate_bis_zur_archivierung,
|
||||
[aufbewahrungsfrist_elektronisch] = @iaufbewahrungsfrist_elektronisch,
|
||||
[aufbewahrungsfrist_physisch] = @iaufbewahrungsfrist_physisch,
|
||||
[mandantnr] = @imandantnr,
|
||||
[aktiv] = @baktiv,
|
||||
[erstellt_am] = @daerstellt_am,
|
||||
[mutiert_am] = @damutiert_am,
|
||||
[mutierer] = @imutierer,
|
||||
[office_vorlagenr] = @ioffice_vorlagenr,
|
||||
[dokumentart_kundendossier] = @idokumentart_kundendossier,
|
||||
[dokumentart_neuerstellung] = @idokumentart_neuerstellung,
|
||||
[dokumentart_retournierung] = @idokumentart_retournierung,
|
||||
[dokumentart_coldausgang] = @idokumentart_coldausgang,
|
||||
[dokumentart_coldeingang] = @idokumentart_coldeingang,
|
||||
[dokumentart_host] = @idokumentart_host,
|
||||
[dokumentart_weitere] = @idokumentart_weitere,
|
||||
[dokumentart_nativ] = @idokumentart_nativ,
|
||||
[prozessnr] = @iprozessnr,
|
||||
[prozessnr1] = @iprozessnr1,
|
||||
[amsdokument] = @bamsdokument,
|
||||
[hostdokument] = @bhostdokument,
|
||||
[hostdokumenttyp] = @shostdokumenttyp,
|
||||
[cold_folder] = @icold_folder,
|
||||
[physisches_archiv] = @iphysisches_archiv,
|
||||
[dokumentstatus] = @idokumentstatus,
|
||||
[Dokument_wird_erstellt] = @bDokument_wird_erstellt,
|
||||
[Dokument_wird_retourniert] = @bDokument_wird_retourniert,
|
||||
[cold_ersetzen] = @bcold_ersetzen,
|
||||
[email_versand] = @bemail_versand,
|
||||
[funktionen_zuweisen] = @bfunktionen_zuweisen,
|
||||
[dokumentstatus_barcode] = @idokumentstatus_barcode,
|
||||
[nurnative] = @bnurnative,
|
||||
[Owner] = @iOwner,
|
||||
[vertrag] = @bvertrag,
|
||||
[objektbezeichnungnr] = @iobjektbezeichnungnr,
|
||||
[bedingtretournierbar] = @bbedingtretournierbar,
|
||||
[doktypbedingteretournierung] = @idoktypbedingteretournierung,
|
||||
[tagebisvernichtungbedingteretournierung] = @itagebisvernichtungbedingteretournierung,
|
||||
[AnzeigeZurDokumenterstellung] = @bAnzeigeZurDokumenterstellung,
|
||||
[KundenDokument] = @bKundenDokument,
|
||||
[sb] = @bsb,
|
||||
[sbimport] = @bsbimport,
|
||||
[sbedituser] = @bsbedituser,
|
||||
[sbnur] = @bsbnur,
|
||||
[bezeichnungmut] = @bbezeichnungmut,
|
||||
[istFarbigArchiviert] = @bistFarbigArchiviert,
|
||||
[intern] = @bintern,
|
||||
[elDokImport] = @belDokImport,
|
||||
[Fachverantwortung] = @sFachverantwortung
|
||||
WHERE
|
||||
[dokumenttypnr] = @idokumenttypnr
|
||||
-- Get the Error Code for the statement just executed.
|
||||
SELECT @iErrorCode=@@ERROR
|
||||
GO
|
||||
|
||||
|
||||
-- //// Delete Stored procedure using Primary Key.
|
||||
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_dokumenttyp_Delete]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_dokumenttyp_Delete]
|
||||
GO
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
-- Stored procedure that will delete an existing row from the table 'dokumenttyp'
|
||||
-- using the Primary Key.
|
||||
-- Gets: @idokumenttypnr int
|
||||
-- Returns: @iErrorCode int
|
||||
---------------------------------------------------------------------------------
|
||||
CREATE PROCEDURE [dbo].[pr_dokumenttyp_Delete]
|
||||
@idokumenttypnr int,
|
||||
@iErrorCode int OUTPUT
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
-- DELETE an existing row from the table.
|
||||
DELETE FROM [dbo].[dokumenttyp]
|
||||
WHERE
|
||||
[dokumenttypnr] = @idokumenttypnr
|
||||
-- Get the Error Code for the statement just executed.
|
||||
SELECT @iErrorCode=@@ERROR
|
||||
GO
|
||||
|
||||
|
||||
-- //// Select Stored procedure, based on Primary Key.
|
||||
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_dokumenttyp_SelectOne]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_dokumenttyp_SelectOne]
|
||||
GO
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
-- Stored procedure that will select an existing row from the table 'dokumenttyp'
|
||||
-- based on the Primary Key.
|
||||
-- Gets: @idokumenttypnr int
|
||||
-- Returns: @iErrorCode int
|
||||
---------------------------------------------------------------------------------
|
||||
CREATE PROCEDURE [dbo].[pr_dokumenttyp_SelectOne]
|
||||
@idokumenttypnr int,
|
||||
@iErrorCode int OUTPUT
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
-- SELECT an existing row from the table.
|
||||
SELECT
|
||||
[dokumenttypnr],
|
||||
[bezeichnung],
|
||||
[beschreibung],
|
||||
[zu_vercolden],
|
||||
[zu_retournieren],
|
||||
[eingang_ersetzt_ausgang],
|
||||
[wird_importiert],
|
||||
[anzahl_tage],
|
||||
[dbearbeitungszeit],
|
||||
[tage_mutation],
|
||||
[partnersaldierung_statusalt],
|
||||
[wird_nicht_geloescht],
|
||||
[vertrauliches_dokument],
|
||||
[unterschrift_links],
|
||||
[unterschrift_rechts],
|
||||
[monate_bis_zur_archivierung],
|
||||
[aufbewahrungsfrist_elektronisch],
|
||||
[aufbewahrungsfrist_physisch],
|
||||
[mandantnr],
|
||||
[aktiv],
|
||||
[erstellt_am],
|
||||
[mutiert_am],
|
||||
[mutierer],
|
||||
[office_vorlagenr],
|
||||
[dokumentart_kundendossier],
|
||||
[dokumentart_neuerstellung],
|
||||
[dokumentart_retournierung],
|
||||
[dokumentart_coldausgang],
|
||||
[dokumentart_coldeingang],
|
||||
[dokumentart_host],
|
||||
[dokumentart_weitere],
|
||||
[dokumentart_nativ],
|
||||
[prozessnr],
|
||||
[prozessnr1],
|
||||
[amsdokument],
|
||||
[hostdokument],
|
||||
[hostdokumenttyp],
|
||||
[cold_folder],
|
||||
[physisches_archiv],
|
||||
[dokumentstatus],
|
||||
[Dokument_wird_erstellt],
|
||||
[Dokument_wird_retourniert],
|
||||
[cold_ersetzen],
|
||||
[email_versand],
|
||||
[funktionen_zuweisen],
|
||||
[dokumentstatus_barcode],
|
||||
[nurnative],
|
||||
[Owner],
|
||||
[vertrag],
|
||||
[objektbezeichnungnr],
|
||||
[bedingtretournierbar],
|
||||
[doktypbedingteretournierung],
|
||||
[tagebisvernichtungbedingteretournierung],
|
||||
[AnzeigeZurDokumenterstellung],
|
||||
[KundenDokument],
|
||||
[sb],
|
||||
[sbimport],
|
||||
[sbedituser],
|
||||
[sbnur],
|
||||
[bezeichnungmut],
|
||||
[istFarbigArchiviert],
|
||||
[intern],
|
||||
[elDokImport],
|
||||
[Fachverantwortung]
|
||||
FROM [dbo].[dokumenttyp]
|
||||
WHERE
|
||||
[dokumenttypnr] = @idokumenttypnr
|
||||
-- Get the Error Code for the statement just executed.
|
||||
SELECT @iErrorCode=@@ERROR
|
||||
GO
|
||||
|
||||
|
||||
-- //// Select All Stored procedure.
|
||||
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_dokumenttyp_SelectAll]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_dokumenttyp_SelectAll]
|
||||
GO
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
-- Stored procedure that will select all rows from the table 'dokumenttyp'
|
||||
-- Returns: @iErrorCode int
|
||||
---------------------------------------------------------------------------------
|
||||
CREATE PROCEDURE [dbo].[pr_dokumenttyp_SelectAll]
|
||||
@iErrorCode int OUTPUT
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
-- SELECT all rows from the table.
|
||||
SELECT
|
||||
[dokumenttypnr],
|
||||
[bezeichnung],
|
||||
[beschreibung],
|
||||
[zu_vercolden],
|
||||
[zu_retournieren],
|
||||
[eingang_ersetzt_ausgang],
|
||||
[wird_importiert],
|
||||
[anzahl_tage],
|
||||
[dbearbeitungszeit],
|
||||
[tage_mutation],
|
||||
[partnersaldierung_statusalt],
|
||||
[wird_nicht_geloescht],
|
||||
[vertrauliches_dokument],
|
||||
[unterschrift_links],
|
||||
[unterschrift_rechts],
|
||||
[monate_bis_zur_archivierung],
|
||||
[aufbewahrungsfrist_elektronisch],
|
||||
[aufbewahrungsfrist_physisch],
|
||||
[mandantnr],
|
||||
[aktiv],
|
||||
[erstellt_am],
|
||||
[mutiert_am],
|
||||
[mutierer],
|
||||
[office_vorlagenr],
|
||||
[dokumentart_kundendossier],
|
||||
[dokumentart_neuerstellung],
|
||||
[dokumentart_retournierung],
|
||||
[dokumentart_coldausgang],
|
||||
[dokumentart_coldeingang],
|
||||
[dokumentart_host],
|
||||
[dokumentart_weitere],
|
||||
[dokumentart_nativ],
|
||||
[prozessnr],
|
||||
[prozessnr1],
|
||||
[amsdokument],
|
||||
[hostdokument],
|
||||
[hostdokumenttyp],
|
||||
[cold_folder],
|
||||
[physisches_archiv],
|
||||
[dokumentstatus],
|
||||
[Dokument_wird_erstellt],
|
||||
[Dokument_wird_retourniert],
|
||||
[cold_ersetzen],
|
||||
[email_versand],
|
||||
[funktionen_zuweisen],
|
||||
[dokumentstatus_barcode],
|
||||
[nurnative],
|
||||
[Owner],
|
||||
[vertrag],
|
||||
[objektbezeichnungnr],
|
||||
[bedingtretournierbar],
|
||||
[doktypbedingteretournierung],
|
||||
[tagebisvernichtungbedingteretournierung],
|
||||
[AnzeigeZurDokumenterstellung],
|
||||
[KundenDokument],
|
||||
[sb],
|
||||
[sbimport],
|
||||
[sbedituser],
|
||||
[sbnur],
|
||||
[bezeichnungmut],
|
||||
[istFarbigArchiviert],
|
||||
[intern],
|
||||
[elDokImport],
|
||||
[Fachverantwortung]
|
||||
FROM [dbo].[dokumenttyp]
|
||||
ORDER BY
|
||||
[dokumenttypnr] ASC
|
||||
-- Get the Error Code for the statement just executed.
|
||||
SELECT @iErrorCode=@@ERROR
|
||||
GO
|
||||
|
||||
|
||||
-- [End of Stored Procedures for table: dokumenttyp]
|
||||
-- ========================================================================================================
|
||||
GO
|
||||
195
LBLLGEN/edoka_journale_LLBL_StoredProcedures.sql
Normal file
195
LBLLGEN/edoka_journale_LLBL_StoredProcedures.sql
Normal file
@@ -0,0 +1,195 @@
|
||||
-- ================================================================================================================
|
||||
-- Stored Procedures generated by LLBLGen v1.21.2003.712 Final on Sonntag, 19. September 2010, 09:41:03
|
||||
-- For the Low Level Business Logic Layer for the database 'edoka_journale'
|
||||
-- ================================================================================================================
|
||||
SET NOCOUNT ON
|
||||
GO
|
||||
USE [edoka_journale]
|
||||
GO
|
||||
|
||||
-- ========================================================================================================
|
||||
-- [Stored Procedures generated for table: Serienbrief_BL_Physiche_Ablage]
|
||||
GO
|
||||
|
||||
-- //// Insert Stored procedure.
|
||||
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_Serienbrief_BL_Physiche_Ablage_Insert]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_Serienbrief_BL_Physiche_Ablage_Insert]
|
||||
GO
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
-- Stored procedure that will insert 1 row in the table 'Serienbrief_BL_Physiche_Ablage'
|
||||
-- Gets: @iSerienbriefnr int
|
||||
-- Gets: @sBezeichnung varchar(255)
|
||||
-- Gets: @sTGNumer_Ersteller varchar(50)
|
||||
-- Gets: @iPartnernr int
|
||||
-- Gets: @sDokumentid varchar(255)
|
||||
-- Gets: @daTimestampe datetime
|
||||
-- Returns: @iEintragnr int
|
||||
-- Returns: @iErrorCode int
|
||||
---------------------------------------------------------------------------------
|
||||
CREATE PROCEDURE [dbo].[pr_Serienbrief_BL_Physiche_Ablage_Insert]
|
||||
@iSerienbriefnr int,
|
||||
@sBezeichnung varchar(255),
|
||||
@sTGNumer_Ersteller varchar(50),
|
||||
@iPartnernr int,
|
||||
@sDokumentid varchar(255),
|
||||
@daTimestampe datetime,
|
||||
@iEintragnr int OUTPUT,
|
||||
@iErrorCode int OUTPUT
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
-- INSERT a new row in the table.
|
||||
INSERT [dbo].[Serienbrief_BL_Physiche_Ablage]
|
||||
(
|
||||
[Serienbriefnr],
|
||||
[Bezeichnung],
|
||||
[TGNumer_Ersteller],
|
||||
[Partnernr],
|
||||
[Dokumentid],
|
||||
[Timestampe]
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
@iSerienbriefnr,
|
||||
@sBezeichnung,
|
||||
@sTGNumer_Ersteller,
|
||||
@iPartnernr,
|
||||
@sDokumentid,
|
||||
@daTimestampe
|
||||
)
|
||||
-- Get the Error Code for the statement just executed.
|
||||
SELECT @iErrorCode=@@ERROR
|
||||
-- Get the IDENTITY value for the row just inserted.
|
||||
SELECT @iEintragnr=SCOPE_IDENTITY()
|
||||
GO
|
||||
|
||||
|
||||
-- //// Update Stored procedure for updating one single row.
|
||||
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_Serienbrief_BL_Physiche_Ablage_Update]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_Serienbrief_BL_Physiche_Ablage_Update]
|
||||
GO
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
-- Stored procedure that will update an existing row in the table 'Serienbrief_BL_Physiche_Ablage'
|
||||
-- Gets: @iEintragnr int
|
||||
-- Gets: @iSerienbriefnr int
|
||||
-- Gets: @sBezeichnung varchar(255)
|
||||
-- Gets: @sTGNumer_Ersteller varchar(50)
|
||||
-- Gets: @iPartnernr int
|
||||
-- Gets: @sDokumentid varchar(255)
|
||||
-- Gets: @daTimestampe datetime
|
||||
-- Returns: @iErrorCode int
|
||||
---------------------------------------------------------------------------------
|
||||
CREATE PROCEDURE [dbo].[pr_Serienbrief_BL_Physiche_Ablage_Update]
|
||||
@iEintragnr int,
|
||||
@iSerienbriefnr int,
|
||||
@sBezeichnung varchar(255),
|
||||
@sTGNumer_Ersteller varchar(50),
|
||||
@iPartnernr int,
|
||||
@sDokumentid varchar(255),
|
||||
@daTimestampe datetime,
|
||||
@iErrorCode int OUTPUT
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
-- UPDATE an existing row in the table.
|
||||
UPDATE [dbo].[Serienbrief_BL_Physiche_Ablage]
|
||||
SET
|
||||
[Serienbriefnr] = @iSerienbriefnr,
|
||||
[Bezeichnung] = @sBezeichnung,
|
||||
[TGNumer_Ersteller] = @sTGNumer_Ersteller,
|
||||
[Partnernr] = @iPartnernr,
|
||||
[Dokumentid] = @sDokumentid,
|
||||
[Timestampe] = @daTimestampe
|
||||
WHERE
|
||||
[Eintragnr] = @iEintragnr
|
||||
-- Get the Error Code for the statement just executed.
|
||||
SELECT @iErrorCode=@@ERROR
|
||||
GO
|
||||
|
||||
|
||||
-- //// Delete Stored procedure using Primary Key.
|
||||
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_Serienbrief_BL_Physiche_Ablage_Delete]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_Serienbrief_BL_Physiche_Ablage_Delete]
|
||||
GO
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
-- Stored procedure that will delete an existing row from the table 'Serienbrief_BL_Physiche_Ablage'
|
||||
-- using the Primary Key.
|
||||
-- Gets: @iEintragnr int
|
||||
-- Returns: @iErrorCode int
|
||||
---------------------------------------------------------------------------------
|
||||
CREATE PROCEDURE [dbo].[pr_Serienbrief_BL_Physiche_Ablage_Delete]
|
||||
@iEintragnr int,
|
||||
@iErrorCode int OUTPUT
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
-- DELETE an existing row from the table.
|
||||
DELETE FROM [dbo].[Serienbrief_BL_Physiche_Ablage]
|
||||
WHERE
|
||||
[Eintragnr] = @iEintragnr
|
||||
-- Get the Error Code for the statement just executed.
|
||||
SELECT @iErrorCode=@@ERROR
|
||||
GO
|
||||
|
||||
|
||||
-- //// Select Stored procedure, based on Primary Key.
|
||||
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_Serienbrief_BL_Physiche_Ablage_SelectOne]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_Serienbrief_BL_Physiche_Ablage_SelectOne]
|
||||
GO
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
-- Stored procedure that will select an existing row from the table 'Serienbrief_BL_Physiche_Ablage'
|
||||
-- based on the Primary Key.
|
||||
-- Gets: @iEintragnr int
|
||||
-- Returns: @iErrorCode int
|
||||
---------------------------------------------------------------------------------
|
||||
CREATE PROCEDURE [dbo].[pr_Serienbrief_BL_Physiche_Ablage_SelectOne]
|
||||
@iEintragnr int,
|
||||
@iErrorCode int OUTPUT
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
-- SELECT an existing row from the table.
|
||||
SELECT
|
||||
[Eintragnr],
|
||||
[Serienbriefnr],
|
||||
[Bezeichnung],
|
||||
[TGNumer_Ersteller],
|
||||
[Partnernr],
|
||||
[Dokumentid],
|
||||
[Timestampe]
|
||||
FROM [dbo].[Serienbrief_BL_Physiche_Ablage]
|
||||
WHERE
|
||||
[Eintragnr] = @iEintragnr
|
||||
-- Get the Error Code for the statement just executed.
|
||||
SELECT @iErrorCode=@@ERROR
|
||||
GO
|
||||
|
||||
|
||||
-- //// Select All Stored procedure.
|
||||
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_Serienbrief_BL_Physiche_Ablage_SelectAll]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_Serienbrief_BL_Physiche_Ablage_SelectAll]
|
||||
GO
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
-- Stored procedure that will select all rows from the table 'Serienbrief_BL_Physiche_Ablage'
|
||||
-- Returns: @iErrorCode int
|
||||
---------------------------------------------------------------------------------
|
||||
CREATE PROCEDURE [dbo].[pr_Serienbrief_BL_Physiche_Ablage_SelectAll]
|
||||
@iErrorCode int OUTPUT
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
-- SELECT all rows from the table.
|
||||
SELECT
|
||||
[Eintragnr],
|
||||
[Serienbriefnr],
|
||||
[Bezeichnung],
|
||||
[TGNumer_Ersteller],
|
||||
[Partnernr],
|
||||
[Dokumentid],
|
||||
[Timestampe]
|
||||
FROM [dbo].[Serienbrief_BL_Physiche_Ablage]
|
||||
ORDER BY
|
||||
[Eintragnr] ASC
|
||||
-- Get the Error Code for the statement just executed.
|
||||
SELECT @iErrorCode=@@ERROR
|
||||
GO
|
||||
|
||||
|
||||
-- [End of Stored Procedures for table: Serienbrief_BL_Physiche_Ablage]
|
||||
-- ========================================================================================================
|
||||
GO
|
||||
Reference in New Issue
Block a user