Inti Commit

This commit is contained in:
2022-12-27 08:57:26 +01:00
commit 9d2049121f
336 changed files with 394751 additions and 0 deletions

BIN
.vs/EDKB09/v14/.suo Normal file

Binary file not shown.

BIN
.vs/EDKB09/v15/.suo Normal file

Binary file not shown.

View File

Binary file not shown.

BIN
.vs/EDKB09/v16/.suo Normal file

Binary file not shown.

View File

Binary file not shown.

31
AssemblyInfo.vb Normal file
View File

@@ -0,0 +1,31 @@
Imports System.Reflection
Imports System.Runtime.InteropServices
' Allgemeine Informationen über eine Assembly werden über die folgende
' Attributgruppe gesteuert. Ändern Sie diese Attributwerte, um Informationen,
' die mit einer Assembly verknüpft sind, zu bearbeiten.
' Die Werte der Assemblyattribute überprüfen
<Assembly: AssemblyTitle("")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("")>
<Assembly: AssemblyCopyright("")>
<Assembly: AssemblyTrademark("")>
<Assembly: CLSCompliant(True)>
'Die folgende GUID ist für die ID der Typbibliothek, wenn dieses Projekt in COM angezeigt wird
<Assembly: Guid("ED75E29A-FD26-43E7-848A-1E9D8991085E")>
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
'
' Haupversion
' Nebenversion
' Buildnummer
' Revisionsnummer
'
' Sie können alle Werte angeben oder auf die standardmäßigen Build- und Revisionsnummern
' zurückgreifen, indem Sie '*' wie unten angezeigt verwenden:
<Assembly: AssemblyVersion("2.0.*")>

31
Backup/AssemblyInfo.vb Normal file
View File

@@ -0,0 +1,31 @@
Imports System.Reflection
Imports System.Runtime.InteropServices
' Allgemeine Informationen über eine Assembly werden über die folgende
' Attributgruppe gesteuert. Ändern Sie diese Attributwerte, um Informationen,
' die mit einer Assembly verknüpft sind, zu bearbeiten.
' Die Werte der Assemblyattribute überprüfen
<Assembly: AssemblyTitle("")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("")>
<Assembly: AssemblyCopyright("")>
<Assembly: AssemblyTrademark("")>
<Assembly: CLSCompliant(True)>
'Die folgende GUID ist für die ID der Typbibliothek, wenn dieses Projekt in COM angezeigt wird
<Assembly: Guid("ED75E29A-FD26-43E7-848A-1E9D8991085E")>
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
'
' Haupversion
' Nebenversion
' Buildnummer
' Revisionsnummer
'
' Sie können alle Werte angeben oder auf die standardmäßigen Build- und Revisionsnummern
' zurückgreifen, indem Sie '*' wie unten angezeigt verwenden:
<Assembly: AssemblyVersion("2.0.*")>

1222
Backup/DB/clsApplikation.vb Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,289 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Connection Provider class for Database connection sharing
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 18. Mai 2003, 00:06:25
' // 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

View File

@@ -0,0 +1,202 @@
' //////////////////////////////////////////////////////////////////////////////////////////
' // Description: Base class for Database Interaction.
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 18. Mai 2003, 00:06:25
' // Because this class implements IDisposable, derived classes shouldn't do so.
' //////////////////////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Configuration
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Namespace edokadb
' /// <summary>
' /// Purpose: Error Enums used by this LLBL library.
' /// </summary>
Public Enum LLBLError
AllOk
' // Add more here (check the comma's!)
End Enum
' /// <summary>
' /// Purpose: General interface of the API generated. Contains only common methods of all classes.
' /// </summary>
Public Interface ICommonDBAccess
Function Insert() As Boolean
Function Update() As Boolean
Function Delete() As Boolean
Function SelectOne() As DataTable
Function SelectAll() As DataTable
End Interface
' /// <summary>
' /// Purpose: Abstract base class for Database Interaction classes.
' /// </summary>
Public MustInherit Class clsDBInteractionBase
Implements IDisposable
Implements ICommonDBAccess
#Region " Class Member Declarations "
Protected m_scoMainConnection As SqlConnection
Protected m_iErrorCode As SqlInt32
Protected m_bMainConnectionIsCreatedLocal As Boolean
Protected m_cpMainConnectionProvider As clsConnectionProvider
Private m_sConnectionString As String
Private m_bIsDisposed As Boolean
#End Region
' /// <summary>
' /// Purpose: Class constructor.
' /// </summary>
Public Sub New()
' // Initialize the class' members.
InitClass()
End Sub
' /// <summary>
' /// Purpose: Initializes class members.
' /// </summary>
Private Sub InitClass()
' // create all the objects and initialize other members.
m_scoMainConnection = new SqlConnection()
m_bMainConnectionIsCreatedLocal = True
m_cpMainConnectionProvider = Nothing
m_iErrorCode = New SqlInt32(LLBLError.AllOk)
m_bIsDisposed = False
End Sub
' /// <summary>
' /// Purpose: Implements the IDispose' method Dispose.
' /// </summary>
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
#End Region
End Class
End Namespace

1890
Backup/DB/clsDokument.vb Normal file

File diff suppressed because it is too large Load Diff

1430
Backup/DB/clsDokumenttyp.vb Normal file

File diff suppressed because it is too large Load Diff

View 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.
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.
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.
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

910
Backup/DB/clsMitarbeiter.vb Normal file
View File

@@ -0,0 +1,910 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'mitarbeiter'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 10. August 2003, 23:09:05
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokadb
' /// <summary>
' /// Purpose: Data Access class for the table 'mitarbeiter'.
' /// </summary>
Public Class clsMitarbeiter
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bMailempfang, m_bEdokaMesasge, m_bShowtip, m_bAktiv, m_bMailDirektVersenden, m_bEdoka_mail, m_bJournalisierung, m_bMailDokumentrueckgang As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iPartnernr, m_iKlassifizierung, m_iMutierer, m_iMandantnr, m_iFunktionnr, m_iMitarbeiternr, m_iFuermandant, m_iSprache As SqlInt32
Private m_sRang, m_sAnrede, m_sKurzzeichen, m_sVorname, m_sName, m_sFax, m_sTelefon, m_sUnterschrift_text, m_sFunktion, m_sTgnummer, 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>iMitarbeiternr</LI>
' /// <LI>sVorname. May be SqlString.Null</LI>
' /// <LI>sName. May be SqlString.Null</LI>
' /// <LI>sKurzzeichen. May be SqlString.Null</LI>
' /// <LI>sAnrede. May be SqlString.Null</LI>
' /// <LI>sTgnummer. May be SqlString.Null</LI>
' /// <LI>sEmail. May be SqlString.Null</LI>
' /// <LI>sFax. May be SqlString.Null</LI>
' /// <LI>sTelefon. May be SqlString.Null</LI>
' /// <LI>sUnterschrift_text. May be SqlString.Null</LI>
' /// <LI>iFunktionnr. May be SqlInt32.Null</LI>
' /// <LI>iSprache. May be SqlInt32.Null</LI>
' /// <LI>iFuermandant</LI>
' /// <LI>bShowtip</LI>
' /// <LI>iPartnernr</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>bMailempfang. May be SqlBoolean.Null</LI>
' /// <LI>bEdokaMesasge. May be SqlBoolean.Null</LI>
' /// <LI>sFunktion. May be SqlString.Null</LI>
' /// <LI>bMailDirektVersenden. May be SqlBoolean.Null</LI>
' /// <LI>sRang. May be SqlString.Null</LI>
' /// <LI>bMailDokumentrueckgang. May be SqlBoolean.Null</LI>
' /// <LI>iKlassifizierung. May be SqlInt32.Null</LI>
' /// <LI>bEdoka_mail. May be SqlBoolean.Null</LI>
' /// <LI>bJournalisierung. 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_mitarbeiter_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@svorname", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVorname))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sname", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sName))
scmCmdToExecute.Parameters.Add(New SqlParameter("@skurzzeichen", SqlDbType.VarChar, 10, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sKurzzeichen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sanrede", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAnrede))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stgnummer", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTgnummer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@semail", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEmail))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfax", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFax))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stelefon", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTelefon))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sunterschrift_text", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sUnterschrift_text))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifuermandant", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFuermandant))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bshowtip", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bShowtip))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ipartnernr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPartnernr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailempfang", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailempfang))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bEdokaMesasge", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bEdokaMesasge))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfunktion", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFunktion))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailDirektVersenden", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailDirektVersenden))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sRang", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRang))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailDokumentrueckgang", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailDokumentrueckgang))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iklassifizierung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iKlassifizierung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bedoka_mail", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bEdoka_mail))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bjournalisierung", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bJournalisierung))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_mitarbeiter_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("clsMitarbeiter::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>iMitarbeiternr</LI>
' /// <LI>sVorname. May be SqlString.Null</LI>
' /// <LI>sName. May be SqlString.Null</LI>
' /// <LI>sKurzzeichen. May be SqlString.Null</LI>
' /// <LI>sAnrede. May be SqlString.Null</LI>
' /// <LI>sTgnummer. May be SqlString.Null</LI>
' /// <LI>sEmail. May be SqlString.Null</LI>
' /// <LI>sFax. May be SqlString.Null</LI>
' /// <LI>sTelefon. May be SqlString.Null</LI>
' /// <LI>sUnterschrift_text. May be SqlString.Null</LI>
' /// <LI>iFunktionnr. May be SqlInt32.Null</LI>
' /// <LI>iSprache. May be SqlInt32.Null</LI>
' /// <LI>iFuermandant</LI>
' /// <LI>bShowtip</LI>
' /// <LI>iPartnernr</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>bMailempfang. May be SqlBoolean.Null</LI>
' /// <LI>bEdokaMesasge. May be SqlBoolean.Null</LI>
' /// <LI>sFunktion. May be SqlString.Null</LI>
' /// <LI>bMailDirektVersenden. May be SqlBoolean.Null</LI>
' /// <LI>sRang. May be SqlString.Null</LI>
' /// <LI>bMailDokumentrueckgang. May be SqlBoolean.Null</LI>
' /// <LI>iKlassifizierung. May be SqlInt32.Null</LI>
' /// <LI>bEdoka_mail. May be SqlBoolean.Null</LI>
' /// <LI>bJournalisierung. 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_mitarbeiter_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@svorname", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVorname))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sname", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sName))
scmCmdToExecute.Parameters.Add(New SqlParameter("@skurzzeichen", SqlDbType.VarChar, 10, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sKurzzeichen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sanrede", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAnrede))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stgnummer", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTgnummer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@semail", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEmail))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfax", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFax))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stelefon", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTelefon))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sunterschrift_text", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sUnterschrift_text))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifuermandant", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFuermandant))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bshowtip", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bShowtip))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ipartnernr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPartnernr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailempfang", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailempfang))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bEdokaMesasge", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bEdokaMesasge))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfunktion", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFunktion))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailDirektVersenden", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailDirektVersenden))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sRang", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRang))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailDokumentrueckgang", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailDokumentrueckgang))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iklassifizierung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iKlassifizierung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bedoka_mail", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bEdoka_mail))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bjournalisierung", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bJournalisierung))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_mitarbeiter_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("clsMitarbeiter::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>iMitarbeiternr</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_mitarbeiter_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_mitarbeiter_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("clsMitarbeiter::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>iMitarbeiternr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iMitarbeiternr</LI>
' /// <LI>sVorname</LI>
' /// <LI>sName</LI>
' /// <LI>sKurzzeichen</LI>
' /// <LI>sAnrede</LI>
' /// <LI>sTgnummer</LI>
' /// <LI>sEmail</LI>
' /// <LI>sFax</LI>
' /// <LI>sTelefon</LI>
' /// <LI>sUnterschrift_text</LI>
' /// <LI>iFunktionnr</LI>
' /// <LI>iSprache</LI>
' /// <LI>iFuermandant</LI>
' /// <LI>bShowtip</LI>
' /// <LI>iPartnernr</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>bMailempfang</LI>
' /// <LI>bEdokaMesasge</LI>
' /// <LI>sFunktion</LI>
' /// <LI>bMailDirektVersenden</LI>
' /// <LI>sRang</LI>
' /// <LI>bMailDokumentrueckgang</LI>
' /// <LI>iKlassifizierung</LI>
' /// <LI>bEdoka_mail</LI>
' /// <LI>bJournalisierung</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_mitarbeiter_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("mitarbeiter")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
sdaAdapter.Fill(dtToReturn)
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_mitarbeiter_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iMitarbeiternr = New SqlInt32(CType(dtToReturn.Rows(0)("mitarbeiternr"), Integer))
If dtToReturn.Rows(0)("vorname") Is System.DBNull.Value Then
m_sVorname = SqlString.Null
Else
m_sVorname = New SqlString(CType(dtToReturn.Rows(0)("vorname"), String))
End If
If dtToReturn.Rows(0)("name") Is System.DBNull.Value Then
m_sName = SqlString.Null
Else
m_sName = New SqlString(CType(dtToReturn.Rows(0)("name"), String))
End If
If dtToReturn.Rows(0)("kurzzeichen") Is System.DBNull.Value Then
m_sKurzzeichen = SqlString.Null
Else
m_sKurzzeichen = New SqlString(CType(dtToReturn.Rows(0)("kurzzeichen"), String))
End If
If dtToReturn.Rows(0)("anrede") Is System.DBNull.Value Then
m_sAnrede = SqlString.Null
Else
m_sAnrede = New SqlString(CType(dtToReturn.Rows(0)("anrede"), String))
End If
If dtToReturn.Rows(0)("tgnummer") Is System.DBNull.Value Then
m_sTgnummer = SqlString.Null
Else
m_sTgnummer = New SqlString(CType(dtToReturn.Rows(0)("tgnummer"), String))
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)("fax") Is System.DBNull.Value Then
m_sFax = SqlString.Null
Else
m_sFax = New SqlString(CType(dtToReturn.Rows(0)("fax"), String))
End If
If dtToReturn.Rows(0)("telefon") Is System.DBNull.Value Then
m_sTelefon = SqlString.Null
Else
m_sTelefon = New SqlString(CType(dtToReturn.Rows(0)("telefon"), String))
End If
If dtToReturn.Rows(0)("unterschrift_text") Is System.DBNull.Value Then
m_sUnterschrift_text = SqlString.Null
Else
m_sUnterschrift_text = New SqlString(CType(dtToReturn.Rows(0)("unterschrift_text"), String))
End If
If dtToReturn.Rows(0)("funktionnr") Is System.DBNull.Value Then
m_iFunktionnr = SqlInt32.Null
Else
m_iFunktionnr = New SqlInt32(CType(dtToReturn.Rows(0)("funktionnr"), Integer))
End If
If dtToReturn.Rows(0)("sprache") Is System.DBNull.Value Then
m_iSprache = SqlInt32.Null
Else
m_iSprache = New SqlInt32(CType(dtToReturn.Rows(0)("sprache"), Integer))
End If
m_iFuermandant = New SqlInt32(CType(dtToReturn.Rows(0)("fuermandant"), Integer))
m_bShowtip = New SqlBoolean(CType(dtToReturn.Rows(0)("showtip"), Boolean))
m_iPartnernr = New SqlInt32(CType(dtToReturn.Rows(0)("partnernr"), Integer))
If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then
m_iMandantnr = SqlInt32.Null
Else
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), 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)("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)("Mailempfang") Is System.DBNull.Value Then
m_bMailempfang = SqlBoolean.Null
Else
m_bMailempfang = New SqlBoolean(CType(dtToReturn.Rows(0)("Mailempfang"), Boolean))
End If
If dtToReturn.Rows(0)("EdokaMesasge") Is System.DBNull.Value Then
m_bEdokaMesasge = SqlBoolean.Null
Else
m_bEdokaMesasge = New SqlBoolean(CType(dtToReturn.Rows(0)("EdokaMesasge"), Boolean))
End If
If dtToReturn.Rows(0)("funktion") Is System.DBNull.Value Then
m_sFunktion = SqlString.Null
Else
m_sFunktion = New SqlString(CType(dtToReturn.Rows(0)("funktion"), String))
End If
If dtToReturn.Rows(0)("MailDirektVersenden") Is System.DBNull.Value Then
m_bMailDirektVersenden = SqlBoolean.Null
Else
m_bMailDirektVersenden = New SqlBoolean(CType(dtToReturn.Rows(0)("MailDirektVersenden"), Boolean))
End If
If dtToReturn.Rows(0)("Rang") Is System.DBNull.Value Then
m_sRang = SqlString.Null
Else
m_sRang = New SqlString(CType(dtToReturn.Rows(0)("Rang"), String))
End If
If dtToReturn.Rows(0)("MailDokumentrueckgang") Is System.DBNull.Value Then
m_bMailDokumentrueckgang = SqlBoolean.Null
Else
m_bMailDokumentrueckgang = New SqlBoolean(CType(dtToReturn.Rows(0)("MailDokumentrueckgang"), Boolean))
End If
If dtToReturn.Rows(0)("klassifizierung") Is System.DBNull.Value Then
m_iKlassifizierung = SqlInt32.Null
Else
m_iKlassifizierung = New SqlInt32(CType(dtToReturn.Rows(0)("klassifizierung"), Integer))
End If
If dtToReturn.Rows(0)("edoka_mail") Is System.DBNull.Value Then
m_bEdoka_mail = SqlBoolean.Null
Else
m_bEdoka_mail = New SqlBoolean(CType(dtToReturn.Rows(0)("edoka_mail"), Boolean))
End If
If dtToReturn.Rows(0)("journalisierung") Is System.DBNull.Value Then
m_bJournalisierung = SqlBoolean.Null
Else
m_bJournalisierung = New SqlBoolean(CType(dtToReturn.Rows(0)("journalisierung"), 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("clsMitarbeiter::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_mitarbeiter_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("mitarbeiter")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
sdaAdapter.Fill(dtToReturn)
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_mitarbeiter_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("clsMitarbeiter::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 [iMitarbeiternr]() As SqlInt32
Get
Return m_iMitarbeiternr
End Get
Set(ByVal Value As SqlInt32)
Dim iMitarbeiternrTmp As SqlInt32 = Value
If iMitarbeiternrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iMitarbeiternr", "iMitarbeiternr can't be NULL")
End If
m_iMitarbeiternr = Value
End Set
End Property
Public Property [sVorname]() As SqlString
Get
Return m_sVorname
End Get
Set(ByVal Value As SqlString)
m_sVorname = Value
End Set
End Property
Public Property [sName]() As SqlString
Get
Return m_sName
End Get
Set(ByVal Value As SqlString)
m_sName = Value
End Set
End Property
Public Property [sKurzzeichen]() As SqlString
Get
Return m_sKurzzeichen
End Get
Set(ByVal Value As SqlString)
m_sKurzzeichen = Value
End Set
End Property
Public Property [sAnrede]() As SqlString
Get
Return m_sAnrede
End Get
Set(ByVal Value As SqlString)
m_sAnrede = Value
End Set
End Property
Public Property [sTgnummer]() As SqlString
Get
Return m_sTgnummer
End Get
Set(ByVal Value As SqlString)
m_sTgnummer = 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 [sFax]() As SqlString
Get
Return m_sFax
End Get
Set(ByVal Value As SqlString)
m_sFax = Value
End Set
End Property
Public Property [sTelefon]() As SqlString
Get
Return m_sTelefon
End Get
Set(ByVal Value As SqlString)
m_sTelefon = Value
End Set
End Property
Public Property [sUnterschrift_text]() As SqlString
Get
Return m_sUnterschrift_text
End Get
Set(ByVal Value As SqlString)
m_sUnterschrift_text = Value
End Set
End Property
Public Property [iFunktionnr]() As SqlInt32
Get
Return m_iFunktionnr
End Get
Set(ByVal Value As SqlInt32)
m_iFunktionnr = Value
End Set
End Property
Public Property [iSprache]() As SqlInt32
Get
Return m_iSprache
End Get
Set(ByVal Value As SqlInt32)
m_iSprache = Value
End Set
End Property
Public Property [iFuermandant]() As SqlInt32
Get
Return m_iFuermandant
End Get
Set(ByVal Value As SqlInt32)
Dim iFuermandantTmp As SqlInt32 = Value
If iFuermandantTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iFuermandant", "iFuermandant can't be NULL")
End If
m_iFuermandant = Value
End Set
End Property
Public Property [bShowtip]() As SqlBoolean
Get
Return m_bShowtip
End Get
Set(ByVal Value As SqlBoolean)
Dim bShowtipTmp As SqlBoolean = Value
If bShowtipTmp.IsNull Then
Throw New ArgumentOutOfRangeException("bShowtip", "bShowtip can't be NULL")
End If
m_bShowtip = Value
End Set
End Property
Public Property [iPartnernr]() As SqlInt32
Get
Return m_iPartnernr
End Get
Set(ByVal Value As SqlInt32)
Dim iPartnernrTmp As SqlInt32 = Value
If iPartnernrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iPartnernr", "iPartnernr can't be NULL")
End If
m_iPartnernr = 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 [bMailempfang]() As SqlBoolean
Get
Return m_bMailempfang
End Get
Set(ByVal Value As SqlBoolean)
m_bMailempfang = Value
End Set
End Property
Public Property [bEdokaMesasge]() As SqlBoolean
Get
Return m_bEdokaMesasge
End Get
Set(ByVal Value As SqlBoolean)
m_bEdokaMesasge = Value
End Set
End Property
Public Property [sFunktion]() As SqlString
Get
Return m_sFunktion
End Get
Set(ByVal Value As SqlString)
m_sFunktion = Value
End Set
End Property
Public Property [bMailDirektVersenden]() As SqlBoolean
Get
Return m_bMailDirektVersenden
End Get
Set(ByVal Value As SqlBoolean)
m_bMailDirektVersenden = Value
End Set
End Property
Public Property [sRang]() As SqlString
Get
Return m_sRang
End Get
Set(ByVal Value As SqlString)
m_sRang = Value
End Set
End Property
Public Property [bMailDokumentrueckgang]() As SqlBoolean
Get
Return m_bMailDokumentrueckgang
End Get
Set(ByVal Value As SqlBoolean)
m_bMailDokumentrueckgang = 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 [bEdoka_mail]() As SqlBoolean
Get
Return m_bEdoka_mail
End Get
Set(ByVal Value As SqlBoolean)
m_bEdoka_mail = Value
End Set
End Property
Public Property [bJournalisierung]() As SqlBoolean
Get
Return m_bJournalisierung
End Get
Set(ByVal Value As SqlBoolean)
m_bJournalisierung = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,850 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'office_vorlage'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Donnerstag, 26. Februar 2004, 22:30:42
' // 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_bAktiv, m_bBchorizontal, m_bKopfzeile_generieren, m_bIdv_vorlage As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iMandantnr, m_iBch, m_iBcw, m_iOffice_vorlagenr, m_iMutierer, m_iAnwendungnr, m_iOwner, m_iKlassifizierung, m_iVorlageid, m_iBcpl, m_iBcpt As SqlInt32
Private m_sPrefix_dokumentname, m_sIdv_id, m_sOffice_vorlage, m_sBezeichnung, m_sBeschreibung, m_sVorlagename 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>
' /// </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, 1, 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, 1, 0, "", DataRowVersion.Proposed, m_bAbsender_ersteller))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bidv_nativ", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bIdv_nativ))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_geschuetzt", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_geschuetzt))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bkopfzeile_generieren", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 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, 1, 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, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_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: 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>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>
' /// </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_office_vorlage_Update]"
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, 1, 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, 1, 0, "", DataRowVersion.Proposed, m_bAbsender_ersteller))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bidv_nativ", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bIdv_nativ))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_geschuetzt", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_geschuetzt))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bkopfzeile_generieren", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 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, 1, 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, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_office_vorlage_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("clsOffice_vorlage::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>iOffice_vorlagenr</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_office_vorlage_Delete]"
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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_office_vorlage_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("clsOffice_vorlage::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>iOffice_vorlagenr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iOffice_vorlagenr</LI>
' /// <LI>sBezeichnung</LI>
' /// <LI>sBeschreibung</LI>
' /// <LI>iVorlageid</LI>
' /// <LI>sVorlagename</LI>
' /// <LI>sPrefix_dokumentname</LI>
' /// <LI>bIdv_vorlage</LI>
' /// <LI>sIdv_id</LI>
' /// <LI>sOffice_vorlage</LI>
' /// <LI>bAbsender_ersteller</LI>
' /// <LI>bIdv_nativ</LI>
' /// <LI>bDokument_geschuetzt</LI>
' /// <LI>bKopfzeile_generieren</LI>
' /// <LI>iKlassifizierung</LI>
' /// <LI>iBcpt</LI>
' /// <LI>iBcpl</LI>
' /// <LI>iBcw</LI>
' /// <LI>iBch</LI>
' /// <LI>bBchorizontal</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>iAnwendungnr</LI>
' /// <LI>iOwner</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_office_vorlage_SelectOne]"
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("@ioffice_vorlagenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iOffice_vorlagenr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
sdaAdapter.Fill(dtToReturn)
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_office_vorlage_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iOffice_vorlagenr = New SqlInt32(CType(dtToReturn.Rows(0)("office_vorlagenr"), 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)("beschreibung") Is System.DBNull.Value Then
m_sBeschreibung = SqlString.Null
Else
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("beschreibung"), String))
End If
If dtToReturn.Rows(0)("vorlageid") Is System.DBNull.Value Then
m_iVorlageid = SqlInt32.Null
Else
m_iVorlageid = New SqlInt32(CType(dtToReturn.Rows(0)("vorlageid"), Integer))
End If
If dtToReturn.Rows(0)("vorlagename") Is System.DBNull.Value Then
m_sVorlagename = SqlString.Null
Else
m_sVorlagename = New SqlString(CType(dtToReturn.Rows(0)("vorlagename"), String))
End If
If dtToReturn.Rows(0)("prefix_dokumentname") Is System.DBNull.Value Then
m_sPrefix_dokumentname = SqlString.Null
Else
m_sPrefix_dokumentname = New SqlString(CType(dtToReturn.Rows(0)("prefix_dokumentname"), String))
End If
m_bIdv_vorlage = New SqlBoolean(CType(dtToReturn.Rows(0)("idv_vorlage"), Boolean))
If dtToReturn.Rows(0)("idv_id") Is System.DBNull.Value Then
m_sIdv_id = SqlString.Null
Else
m_sIdv_id = New SqlString(CType(dtToReturn.Rows(0)("idv_id"), String))
End If
If dtToReturn.Rows(0)("office_vorlage") Is System.DBNull.Value Then
m_sOffice_vorlage = SqlString.Null
Else
m_sOffice_vorlage = New SqlString(CType(dtToReturn.Rows(0)("office_vorlage"), String))
End If
If dtToReturn.Rows(0)("absender_ersteller") Is System.DBNull.Value Then
m_bAbsender_ersteller = SqlBoolean.Null
Else
m_bAbsender_ersteller = New SqlBoolean(CType(dtToReturn.Rows(0)("absender_ersteller"), Boolean))
End If
m_bIdv_nativ = New SqlBoolean(CType(dtToReturn.Rows(0)("idv_nativ"), Boolean))
If dtToReturn.Rows(0)("dokument_geschuetzt") Is System.DBNull.Value Then
m_bDokument_geschuetzt = SqlBoolean.Null
Else
m_bDokument_geschuetzt = New SqlBoolean(CType(dtToReturn.Rows(0)("dokument_geschuetzt"), Boolean))
End If
m_bKopfzeile_generieren = New SqlBoolean(CType(dtToReturn.Rows(0)("kopfzeile_generieren"), Boolean))
If dtToReturn.Rows(0)("klassifizierung") Is System.DBNull.Value Then
m_iKlassifizierung = SqlInt32.Null
Else
m_iKlassifizierung = New SqlInt32(CType(dtToReturn.Rows(0)("klassifizierung"), Integer))
End If
m_iBcpt = New SqlInt32(CType(dtToReturn.Rows(0)("bcpt"), Integer))
If dtToReturn.Rows(0)("bcpl") Is System.DBNull.Value Then
m_iBcpl = SqlInt32.Null
Else
m_iBcpl = New SqlInt32(CType(dtToReturn.Rows(0)("bcpl"), Integer))
End If
m_iBcw = New SqlInt32(CType(dtToReturn.Rows(0)("bcw"), Integer))
m_iBch = New SqlInt32(CType(dtToReturn.Rows(0)("bch"), Integer))
If dtToReturn.Rows(0)("bchorizontal") Is System.DBNull.Value Then
m_bBchorizontal = SqlBoolean.Null
Else
m_bBchorizontal = New SqlBoolean(CType(dtToReturn.Rows(0)("bchorizontal"), Boolean))
End If
If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then
m_iMandantnr = SqlInt32.Null
Else
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), 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)("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)("anwendungnr") Is System.DBNull.Value Then
m_iAnwendungnr = SqlInt32.Null
Else
m_iAnwendungnr = New SqlInt32(CType(dtToReturn.Rows(0)("anwendungnr"), Integer))
End If
If dtToReturn.Rows(0)("owner") Is System.DBNull.Value Then
m_iOwner = SqlInt32.Null
Else
m_iOwner = New SqlInt32(CType(dtToReturn.Rows(0)("owner"), 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("clsOffice_vorlage::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_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 = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
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
#End Region
End Class
End Namespace

View 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.
scmCmdToExecute.ExecuteNonQuery()
m_iEintragnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iEintragnr").Value, SqlInt32))
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.
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.
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

View File

@@ -0,0 +1,37 @@
Imports System.ComponentModel
Imports Microsoft.VisualBasic
Namespace EDOKA
Public Class DB_Connection
Public Sub New()
''Edoka
'FileOpen(1, Globals.ApplicationPath + "edokaconn.cfg", OpenMode.Input)
'Input(1, sConnectionString_edoka)
'FileClose(1)
'FileOpen(1, Globals.ApplicationPath + "journaleconn.cfg", OpenMode.Input)
'Input(1, sConnectionString_journale)
'FileClose(1)
'Globals.conn_edoka.sConnectionString = sConnectionString_edoka
'Globals.conn_journale.sConnectionString = sConnectionString_journale
'Exit Sub
oread = IO.File.OpenText(Globals.ApplicationPath + "edokaconn.cfg")
sConnectionString_edoka = oread.ReadLine
Globals.sConnectionString_edoka = sConnectionString_edoka
oread.Close()
'Journale
oread = IO.File.OpenText(Globals.ApplicationPath + "journaleconn.cfg")
sConnectionString_journale = oread.ReadLine
Globals.sConnectionString_journale = sConnectionString_journale
oread.Close()
Globals.conn_edoka.sConnectionString = sConnectionString_edoka
Globals.conn_journale.sConnectionString = sConnectionString_journale
End Sub
End Class
End Namespace

19
Backup/EDKB09.sln Normal file
View File

@@ -0,0 +1,19 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EDKB09", "EDKB09.vbproj", "{6EDCD2BE-A7D3-47B4-A8CB-03B41044D054}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6EDCD2BE-A7D3-47B4-A8CB-03B41044D054}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6EDCD2BE-A7D3-47B4-A8CB-03B41044D054}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6EDCD2BE-A7D3-47B4-A8CB-03B41044D054}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6EDCD2BE-A7D3-47B4-A8CB-03B41044D054}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

BIN
Backup/EDKB09.suo Normal file

Binary file not shown.

207
Backup/EDKB09.vbproj Normal file
View File

@@ -0,0 +1,207 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{6EDCD2BE-A7D3-47B4-A8CB-03B41044D054}</ProjectGuid>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>EDKB09</AssemblyName>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyMode>None</AssemblyOriginatorKeyMode>
<DefaultClientScript>JScript</DefaultClientScript>
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Exe</OutputType>
<OptionCompare>Binary</OptionCompare>
<OptionExplicit>On</OptionExplicit>
<OptionStrict>Off</OptionStrict>
<RootNamespace>EDKB09</RootNamespace>
<StartupObject>
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
<MyType>Console</MyType>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationVersion>2.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\</OutputPath>
<DocumentationFile>EDKB09.xml</DocumentationFile>
<BaseAddress>285212672</BaseAddress>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>
</DefineConstants>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<DebugSymbols>true</DebugSymbols>
<Optimize>false</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>1</WarningLevel>
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\</OutputPath>
<DocumentationFile>EDKB09.xml</DocumentationFile>
<BaseAddress>285212672</BaseAddress>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>
</DefineConstants>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<DebugSymbols>false</DebugSymbols>
<Optimize>true</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>1</WarningLevel>
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
<DebugType>none</DebugType>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="BMS, Version=2.0.4126.29238, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\EDKB10\BMS\BMSDll\bin\BMS.dll</HintPath>
</Reference>
<Reference Include="Common, Version=2.0.4126.29238, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\EDKB10\BMS\BMSDll\bin\Common.dll</HintPath>
</Reference>
<Reference Include="DataAccess, Version=2.0.4126.29238, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\EDKB10\BMS\BMSDll\bin\DataAccess.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Office.Interop.Word, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="Office, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="System">
<Name>System</Name>
</Reference>
<Reference Include="System.Data">
<Name>System.Data</Name>
</Reference>
<Reference Include="System.Xml">
<Name>System.XML</Name>
</Reference>
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft" />
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="DB\clsApplikation.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="DB\clsConnectionProvider.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="DB\clsDBInteractionBase.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="DB\clsDokument.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="DB\clsDokumenttyp.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="DB\clsEdex_sb_serienbrief.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="DB\clsMitarbeiter.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="DB\clsOffice_vorlage.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="DB\clsSerienbrief_BL_Physiche_Ablage.vb" />
<Compile Include="DB\db_connection.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="Klassen\clsEmpfaengerdata.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="Klassen\clsImportData.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="Main.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="utils\clsParameter.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="utils\Globals.vb">
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
<Visible>False</Visible>
<ProductName>.NET Framework 2.0</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<COMReference Include="Acrobat">
<Guid>{E64169B3-3592-47D2-816E-602C5C13F328}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>1</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
</COMReference>
</ItemGroup>
<ItemGroup>
<Folder Include="My Project\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>

34
Backup/EDKB09.vbproj.user Normal file
View File

@@ -0,0 +1,34 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory>publish\</PublishUrlHistory>
<InstallUrlHistory>
</InstallUrlHistory>
<SupportUrlHistory>
</SupportUrlHistory>
<UpdateUrlHistory>
</UpdateUrlHistory>
<BootstrapperUrlHistory>
</BootstrapperUrlHistory>
<ApplicationRevision>0</ApplicationRevision>
<FallbackCulture>de-DE</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<StartAction>Project</StartAction>
<RemoteDebugEnabled>false</RemoteDebugEnabled>
<RemoteDebugMachine>sb1201z</RemoteDebugMachine>
<StartWorkingDirectory>
</StartWorkingDirectory>
<StartArguments>E:\Software-Projekte\EDOKA\Batches\Office_2010\EDKB09\bin\</StartArguments>
<StartProgram>\\sb1201z\c$\Program Files\Edoka\EDOKA_Entwicklung\Batches\EDKB09\bin\edkb09.exe</StartProgram>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<StartAction>Project</StartAction>
<RemoteDebugEnabled>false</RemoteDebugEnabled>
<RemoteDebugMachine>sb1201z</RemoteDebugMachine>
<StartWorkingDirectory>
</StartWorkingDirectory>
<StartArguments>E:\Software-Projekte\EDOKA\Batches\Office_2010\EDKB09\bin\</StartArguments>
<StartProgram>\\sb1201z\c$\Program Files\Edoka\EDOKA_Entwicklung\Batches\EDKB09\bin\edkb09.exe</StartProgram>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,423 @@
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Imports System.IO
Public Class clsEmpfaengerdata
#Region "Deklarationen"
Dim dsempfaenger As DataSet
Dim Serienbriefnr As Integer
#End Region
#Region "öffentliche Methoden"
Public Sub New(ByRef DsEmpfaenger As DataSet, ByVal Serienbriefnr As Integer)
Me.dsempfaenger = DsEmpfaenger
Me.Serienbriefnr = Serienbriefnr
End Sub
Public Sub Get_Empfaenger()
Load_Empfaenger()
End Sub
Public Function Vorlagendaten_aufbreiten() As DataTable
Return Datentabelle_Generieren()
End Function
Public Sub save()
save_empfaenger()
End Sub
Private Function save_empfaenger() As Boolean
Try
Dim dokumentname As String = Globals.Params.Pfad_Serienbrief_Daten + Me.Serienbriefnr.ToString + "_empfaenger.xml"
Me.dsempfaenger.WriteXml(dokumentname)
Dim Connection As New SqlConnection()
Dim DA As New SqlDataAdapter("select * from edex_sb_empfaenger where serienbriefnr=" + Str(Me.Serienbriefnr), Connection)
Dim cb As SqlCommandBuilder = New SqlCommandBuilder(DA)
Dim ds As New DataSet()
Dim fs As New FileStream(dokumentname, FileMode.Open, FileAccess.Read)
Dim mydata(fs.Length) As Byte
Try
fs.Read(mydata, 0, fs.Length)
fs.Close()
Connection.ConnectionString = Globals.sConnectionString_edoka
Connection.Open()
DA.Fill(ds, "empf")
Dim myRow As DataRow
If ds.Tables(0).Rows.Count = 0 Then
'Neue Serienbrief_Empfaenger speichern
myRow = ds.Tables(0).NewRow
myRow.Item(1) = Me.Serienbriefnr
myRow.Item(2) = mydata
ds.Tables(0).Rows.Add(myRow)
DA.Update(ds, "empf")
Else
' Bestehende Empfängerliste überschreiben
myRow = ds.Tables(0).Rows(0)
myRow.Item(2) = mydata
DA.Update(ds, "empf")
End If
Catch ex As Exception
Return False
End Try
fs = Nothing
cb = Nothing
ds = Nothing
DA = Nothing
Connection.Close()
Connection = Nothing
Return True
Catch EX As Exception
Return False
End Try
End Function
Private Function hascoltodelete(ByRef edata As DataTable, ByVal Prefix As String) As Boolean
Dim i As Integer
Dim s As String = ""
For i = 0 To edata.Columns.Count - 1
If Left(edata.Columns(i).ColumnName, 2) = Prefix Then
s = edata.Columns(i).ColumnName
Exit For
End If
Next
If s <> "" Then
edata.Columns.Remove(s)
Return True
End If
Return False
End Function
#End Region
#Region "Datentabelle"
Private Function Datentabelle_Generieren() As DataTable
Try
Dim dt As New DataTable()
Dim dn As DataRow
Dim i As Integer
Dim s As String
Dim aPrimaryKey(0) As DataColumn
Dim oDatacolumn As DataColumn
Me.dsempfaenger.Tables(0).Columns.Add("IntEintragnr")
For i = 0 To Me.dsempfaenger.Tables(0).Rows.Count - 1
Me.dsempfaenger.Tables(0).Rows(i).Item("IntEintragNr") = i
Next
oDatacolumn = Me.dsempfaenger.Tables(0).Columns("IntEintragnr")
aPrimaryKey(0) = oDatacolumn
Me.dsempfaenger.Tables(0).PrimaryKey = aPrimaryKey
dt.TableName = "EDKB09_" + Me.Serienbriefnr.ToString
For i = 0 To Me.dsempfaenger.Tables(0).Columns.Count - 1
dt.Columns.Add(Me.dsempfaenger.Tables(0).Columns(i).ColumnName)
Next
Dim dv As DataRow()
i = 0
Dim dav As New DataView(Me.dsempfaenger.Tables(0), "Status='1'", "Partnernr, Name, Vorname", DataViewRowState.CurrentRows)
Dim darv As DataRowView
dv = Me.dsempfaenger.Tables(0).Select("Status='1'")
For Each darv In dav
dt.ImportRow(darv.Row)
i = i + 1
If i > Params.Anzahl_Dokumente_Auftrag Then Exit For
Next
'Dim dc As DataColumn
'For Each dc In dt.Columns
' dc.ColumnName = dc.ColumnName.Replace(" ", "_")
' dc.ColumnName = dc.ColumnName.Replace(" ", "_")
' dc.ColumnName = dc.ColumnName.Replace("ö", "oe")
' dc.ColumnName = dc.ColumnName.Replace("Ö", "OE")
' dc.ColumnName = dc.ColumnName.Replace("ü", "ue")
' dc.ColumnName = dc.ColumnName.Replace("Ü", "UE")
' dc.ColumnName = dc.ColumnName.Replace("ä", "ae")
' dc.ColumnName = dc.ColumnName.Replace("Ä", "AE")
' dc.ColumnName = dc.ColumnName.Replace("-", "_")
' dc.ColumnName = dc.ColumnName.Replace("/", "_")
' dc.ColumnName = dc.ColumnName.Replace("\", "_")
' dc.ColumnName = dc.ColumnName.Replace(".", "_")
' dc.ColumnName = dc.ColumnName.Replace(":", "_")
' dc.ColumnName = dc.ColumnName.Replace(",", "_")
' Select Case Left(dc.ColumnName, 1)
' Case "1", "2", "3", "4", "5", "6", "7", "8", "9", "0"
' dc.ColumnName = "_" + dc.ColumnName
' End Select
' If resword(dc.ColumnName) Then
' dc.ColumnName = dc.ColumnName + "_"
' End If
'Next
' dt = Me.dsempfaenger.Tables(0).Copy
Dim tmkopfzeile As Boolean = False
For i = 0 To Me.dsempfaenger.Tables("UsedFelder").Rows.Count - 1
If Me.dsempfaenger.Tables("UsedFelder").Rows(i).Item("Nr") = 33 Then
tmkopfzeile = True
End If
Next
If tmkopfzeile = False Then
dn = Me.dsempfaenger.Tables("UsedFelder").NewRow
dn.Item(0) = 33
dn.Item(1) = "TGEDKCompanyBBEB99"
dn.Item(2) = ""
dn.Item(3) = "TGEDKCompanyBBEB99"
dn.Item(4) = ""
Me.dsempfaenger.Tables("UsedFelder").Rows.Add(dn)
End If
Me.dsempfaenger.Tables("UsedFelder").Columns.Add("TempFeldname")
Me.dsempfaenger.Tables("UsedFelder").Columns.Add("Fnkt")
For i = 0 To Me.dsempfaenger.Tables("UsedFelder").Rows.Count - 1
If Me.dsempfaenger.Tables("UsedFelder").Rows(i).Item("Nr") <> 0 Then
s = "F_09_" + Me.dsempfaenger.Tables("UsedFelder").Rows(i).Item("Nr")
Me.dsempfaenger.Tables("UsedFelder").Rows(i).Item("fnkt") = s
s = Insert_DT_Column(dt, s)
Me.dsempfaenger.Tables("UsedFelder").Rows(i).Item("Tempfeldname") = s
Else
s = "I_09_" + Me.dsempfaenger.Tables("UsedFelder").Rows(i).Item("Beginntextmarke")
Me.dsempfaenger.Tables("UsedFelder").Rows(i).Item("fnkt") = s
s = Insert_DT_Column(dt, s)
Me.dsempfaenger.Tables("UsedFelder").Rows(i).Item("Tempfeldname") = s
End If
Next
Create_SQL_Server_Table(dt)
Save_Data_To_Temptable(dt)
Return Fill_And_Get_Data(dt.Rows.Count)
Catch ex As Exception
Throw New Exception("Serienbrief: " + Me.Serienbriefnr.ToString + ": Generierung der Datentabelle ist fehlgeschlagen:" + ex.Message)
End Try
End Function
'GAGA
Private Function Insert_DT_Column(ByRef dt As DataTable, ByVal colname As String) As String
Dim i As Integer = 0
Dim dc As DataColumn
For Each dc In dt.Columns
If UCase(Microsoft.VisualBasic.Left(dc.ColumnName, Len(colname))) = UCase(colname) Then
i = i + 1
End If
Next
If i > 0 Then colname = colname + "_" + i.ToString
dt.Columns.Add(colname)
Return colname
End Function
#End Region
#Region "Datenzugriffe"
Dim Dokid As Integer
Private Function Fill_And_Get_Data(ByVal rowcount As Integer) As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandTimeout = Params.TimeOutKleinAuftraege
Dim i As Integer
Dim dtToReturn As DataTable = New DataTable()
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
scmCmdToExecute.CommandText = "dbo.sp_edex_sb_fill_sbdata"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
scmCmdToExecute.Connection = Globals.conn_edoka.scoDBConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@serienbriefnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.Serienbriefnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ROWCOUNT", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, rowcount))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, 0))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bedr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, 0))
sdaAdapter.Fill(dtToReturn)
Dokid = scmCmdToExecute.Parameters("@dokumentid").Value
For i = 0 To dtToReturn.Rows.Count - 1
dtToReturn.Rows(i).Item("Dokumentid") = Generate_Key(Dokid)
Dokid = Dokid + 1
If scmCmdToExecute.Parameters("@bedr").Value = 1 Then
dtToReturn.Rows(i).Item("dokumentidbdr") = Generate_Key(Dokid)
Dokid = Dokid + 1
End If
Next
Return dtToReturn
Catch ex As Exception
Throw New Exception("sp_check_dokumentreaktivierung::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
Finally
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
Private Sub Create_SQL_Server_Table(ByRef dt As DataTable)
Try
Dim s As String
Dim s1 As String
Dim i As Integer
'dt.Columns.Add("NRPAR00")
'dt.Columns.Add("IntEintragNr")
s1 = "Drop Table dbo.EDKB09_" + Me.Serienbriefnr.ToString
's = "Create Table EDKB09_" + Me.Serienbriefnr.ToString + "( NRPAR00 int, intEintragNr int,"
s = "Create Table dbo.EDKB09_" + Me.Serienbriefnr.ToString + "( NRPAR00 varchar(11),"
For i = 1 To dt.Columns.Count - 1
s = s + "[" + dt.Columns(i).ColumnName + "]" + " varchar(255),"
Next
s = Left(s, Len(s) - 1)
s = s + ")"
Dim conn As New SqlConnection()
conn.ConnectionString = Globals.sConnectionString_edoka
conn.Open()
Dim sqlcmd0 As New SqlCommand(s1, conn)
Try
sqlcmd0.ExecuteNonQuery()
Catch
End Try
Dim sqlcmd As New SqlCommand(s, conn)
sqlcmd.ExecuteNonQuery()
conn.Close()
Catch ex As Exception
Throw New Exception("Serienbrief: " + Me.Serienbriefnr.ToString + ": Temp. Tabelle konnte nicht erstellt werden:" + ex.Message)
End Try
End Sub
Private Sub Save_Data_To_Temptable(ByRef dt As DataTable)
Dim tdt As New DataTable("EDKB09_" + Me.Serienbriefnr.ToString)
tdt = dt.Copy
tdt.Columns(0).ColumnName = "NRPAR00"
Dim connection As New SqlConnection()
Dim da As New SqlDataAdapter("Select * from EDKB09_" + Me.Serienbriefnr.ToString, connection)
Dim cb As New SqlCommandBuilder(da)
connection.ConnectionString = Globals.sConnectionString_edoka
connection.Open()
da.Update(tdt)
connection.Close()
End Sub
Private Sub Load_Empfaenger()
Dim dokumentname As String = Globals.Params.Pfad_Serienbrief_Daten + Me.Serienbriefnr.ToString + "_empfaenger.xml"
If File.Exists(dokumentname) Then
Try
File.Delete(dokumentname)
Catch ex As Exception
Globals.BMS_Log(Globals.BMS_Fnkt.BMSMessage, "EDKB09: EDKB09: Load_Empfaenger :" + Serienbriefnr.ToString + ex.Message, Globals.Enum_BMS_Typen.Information)
End Try
End If
Try
Me.dsempfaenger.Tables.Clear()
Dim Connection As New SqlConnection()
Dim DA As New SqlDataAdapter("select * from edex_sb_empfaenger where serienbriefnr=" + Str(Me.Serienbriefnr), Connection)
Dim cb As SqlCommandBuilder = New SqlCommandBuilder(DA)
Dim ds As New DataSet()
Try
Connection.ConnectionString = Globals.sConnectionString_edoka
Connection.Open()
DA.Fill(ds, "empf")
Dim myRow As DataRow
If ds.Tables(0).Rows.Count = 0 Then
MsgBox("Empfänger konnten nicht geladen werden.")
Else
myRow = ds.Tables(0).Rows(0)
Dim MyData() As Byte
MyData = myRow.Item(2)
Dim K As Long
K = UBound(MyData)
Dim fs As New FileStream(dokumentname, FileMode.OpenOrCreate, FileAccess.Write)
fs.Write(MyData, 0, K)
fs.Close()
fs = Nothing
Me.dsempfaenger.ReadXml(dokumentname)
End If
Catch ex As Exception
End Try
cb = Nothing
ds = Nothing
DA = Nothing
Connection.Close()
Connection = Nothing
Catch EX As Exception
Throw New Exception("Serienbrief: " + Me.Serienbriefnr.ToString + ": Empfängerdaten konnten nicht aus der DB gelesen werden:" + ex.Message)
Finally
Try
File.Delete(dokumentname)
Catch ex As Exception
End Try
End Try
End Sub
Public Function Generate_Key(ByVal key As Long) As String
Dim skey As String
Dim s As String
skey = "OFFEDK000"
s = Str(Year(Now))
While Microsoft.VisualBasic.Left(s, 1) = " "
s = Microsoft.VisualBasic.Right(s, Len(s) - 1)
End While
skey = skey + s
s = Str(key)
While Microsoft.VisualBasic.Left(s, 1) = " "
s = Microsoft.VisualBasic.Right(s, Len(s) - 1)
End While
While Len(s) < 8
s = "0" + s
End While
skey = skey + s
s = Pruefziffer(Microsoft.VisualBasic.Right(skey, 15))
While Microsoft.VisualBasic.Left(s, 1) = " "
s = Microsoft.VisualBasic.Right(s, Len(s) - 1)
End While
skey = skey + s
Generate_Key = skey
End Function
Public Function Pruefziffer(ByVal zahl As String) As String
Dim ptab(9, 9) As Integer
Dim pz(9) As Integer
Dim s1, s2, s3 As String
Dim i1, i2 As Long
s1 = "0,9,4,6,8,2,7,1,3,5"
s2 = s1
For i1 = 0 To 9
For i2 = 0 To 9
ptab(i1, i2) = Mid(s2, (i2 * 2) + 1, 1)
Next
s3 = Microsoft.VisualBasic.Left(s1, 1)
s1 = Microsoft.VisualBasic.Right(s1, Len(s1) - 2)
s1 = s1 + "," + s3
s2 = s1
Next
pz(0) = 0
pz(1) = 9
pz(2) = 8
pz(3) = 7
pz(4) = 6
pz(5) = 5
pz(6) = 4
pz(7) = 3
pz(8) = 2
pz(9) = 1
Dim i, x, y As Integer
y = 0
For i = 1 To Len(zahl)
x = Val(Mid(zahl, i, 1))
y = ptab(x, y)
Next
Pruefziffer = Str(pz(y))
End Function
#End Region
End Class

View File

@@ -0,0 +1,193 @@
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Imports System.IO
Public Class clsImportData
#Region "Deklarationen"
Dim dsempfaenger As DataSet
Dim Serienbriefnr As Integer
Dim importdata As New DataSet()
Dim sb As edokadb.clsEdex_sb_serienbrief
Dim hasdata As Boolean = False
#End Region
#Region "öffentliche Methoden"
Public Sub New(ByRef DsEmpfaenger As DataSet, ByVal Serienbriefnr As Integer, ByVal sbdata As edokadb.clsEdex_sb_serienbrief)
Me.dsempfaenger = DsEmpfaenger
Me.Serienbriefnr = Serienbriefnr
Me.sb = sbdata
create_importdata()
End Sub
Private Sub create_importdata()
importdata.ReadXml(Globals.ApplicationPath + "edkb08struktur.xml")
importdata.Tables(0).Rows.Clear()
importdata.Tables(0).Columns.Add("BLKunde")
importdata.Tables(0).Columns.Add("Dokumentidbdr")
importdata.Tables(0).Columns.Add("Dokumentid")
importdata.Tables(0).Columns.Add("Bezeichnung")
End Sub
Public Sub Create_Import_Data()
Dim dv As DataRow
Dim i As Integer
For i = 0 To Me.dsempfaenger.Tables(0).Rows.Count - 1
Try
dv = Me.dsempfaenger.Tables(0).Rows(i)
If dv.Item("Status") = "4" And dv.Item("Dokument_Gedruckt") <> "2" Then
dv.Item("Dokument_Gedruckt") = "2"
'dv.Item("Status") = 2
If dv.Item("partnernr") <> "" Then
Write_Import_Files(dv)
End If
End If
Catch ex1 As Exception
End Try
Next
If hasdata = True Then
importdata.WriteXml(Globals.Params.Pfad_EDKB08 + "SBImport_" + Format(Now, "yyyyMMddHHmmss") + ".ind")
Me.save_empfaenger()
End If
End Sub
Private Sub Write_Import_Files(ByRef dv As DataRow)
Try
Dim dt As New edokadb.clsDokumenttyp()
dt.cpMainConnectionProvider = Globals.conn_edoka
dt.iDokumenttypnr = New SqlInt32(CType(sb.iDokumenttypnr.Value, Int32))
dt.SelectOne()
If dt.bNurnative.Value = True Then
dt.Dispose()
Exit Sub
End If
dt.Dispose()
Catch ex As Exception
Exit Sub
End Try
Dim sourcedok As String = Globals.Params.Pfad_Serienbrief_Daten + Me.Serienbriefnr.ToString + "\" + dv.Item("Dokumentid") + ".pdf"
Dim destdok As String = Globals.Params.Pfad_EDKB08 + dv.Item("Dokumentid") + ".pdf"
If IO.File.Exists(sourcedok) Then
IO.File.Copy(sourcedok, destdok, True)
Dim dr As DataRow
Dim i As Integer = 0
dr = importdata.Tables(0).NewRow
Try
While i < 40
dr.Item(i) = ""
i = i + 1
End While
Catch
End Try
dr.Item("Funktion") = "ADD"
dr.Item("PARTNERNR") = dv.Item("Partnernr")
dr.Item("Dokumenttypnr") = sb.iDokumenttypnr.Value
dr.Item("dateiname") = dv.Item("Dokumentid") + ".pdf"
dr.Item("Dateiformat") = "PDF"
dr.Item("Archivdatum") = Now.ToString
dr.Item("Ersteller") = get_tgnummer(dv.Item("Ersteller"))
dr.Item("HERKUNFTSAPPLIKATION") = "EDKB09"
dr.Item("Dokumentid") = dv.Item("Dokumentid")
dr.Item("Dokumentidbdr") = dv.Item("Dokumentidbdr")
'Rel. 4.1 - Nur als BL-Kunde kennzeichnen, sofern so im Serienbrief festgehalten
If sb.iBldossier.Value.ToString = "1" Then
dr.Item("BLKunde") = dv.Item("BLKUNDE")
Else
If dv.Item("BLKunde") = "1" Then
insert_sb_bl_physiche_ablage_journal(Me.Serienbriefnr, sb.sBezeichnung.Value.ToString, get_tgnummer(dv.Item("Ersteller")), dv.Item("Partnernr"), dv.Item("DokumentID"))
End If
dr.Item("BLKunde") = "0"
End If
dr.Item("Bezeichnung") = sb.sBezeichnung.Value
dr.Item("DOKUMENTWERT2") = "Serienbriefnr;" + Me.Serienbriefnr.ToString
importdata.Tables(0).Rows.Add(dr)
hasdata = True
End If
End Sub
Private Sub insert_sb_bl_physiche_ablage_journal(ByVal sbnr As Integer, ByVal bezeichnung As String, ByVal tgnummer As String, ByVal partnernr As Integer, ByVal dokumentid As String)
Try
Dim j As New edokadb.clsSerienbrief_BL_Physiche_Ablage
j.cpMainConnectionProvider = Globals.conn_journale
j.iSerienbriefnr = New SqlInt32(CType(sbnr, Int32))
j.sBezeichnung = New SqlString(CType(bezeichnung, String))
j.sTGNumer_Ersteller = New SqlString(CType(tgnummer, String))
j.iPartnernr = New SqlInt32(CType(partnernr, Int32))
j.sDokumentid = New SqlString(CType(dokumentid, String))
j.daTimestampe = New SqlDateTime(CType(Now, DateTime))
Globals.conn_journale.OpenConnection()
j.Insert()
Globals.conn_journale.CloseConnection(True)
j.Dispose()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Function get_tgnummer(ByVal mitarbeiternr As Integer) As String
Dim x As New edokadb.clsMitarbeiter
Try
x.cpMainConnectionProvider = Globals.conn_edoka
x.iMitarbeiternr = New SqlInt32(CType(mitarbeiternr, Int32))
x.SelectOne()
Return x.sTgnummer.Value
Catch
Return mitarbeiternr.ToString
Finally
x.Dispose()
End Try
End Function
Private Function save_empfaenger() As Boolean
Try
Dim dokumentname As String = Globals.Params.Pfad_Serienbrief_Daten + Me.Serienbriefnr.ToString + "_empfaenger.xml"
Me.dsempfaenger.WriteXml(dokumentname)
Dim Connection As New SqlConnection
Dim DA As New SqlDataAdapter("select * from edex_sb_empfaenger where serienbriefnr=" + Str(Me.Serienbriefnr), Connection)
Dim cb As SqlCommandBuilder = New SqlCommandBuilder(DA)
Dim ds As New DataSet
Dim fs As New FileStream(dokumentname, FileMode.Open, FileAccess.Read)
Dim mydata(fs.Length) As Byte
Try
fs.Read(mydata, 0, fs.Length)
fs.Close()
Connection.ConnectionString = Globals.sConnectionString_edoka
Connection.Open()
DA.Fill(ds, "empf")
Dim myRow As DataRow
If ds.Tables(0).Rows.Count = 0 Then
'Neue Serienbrief_Empfaenger speichern
myRow = ds.Tables(0).NewRow
myRow.Item(1) = Me.Serienbriefnr
myRow.Item(2) = mydata
ds.Tables(0).Rows.Add(myRow)
DA.Update(ds, "empf")
Else
' Bestehende Empfängerliste überschreiben
myRow = ds.Tables(0).Rows(0)
myRow.Item(2) = mydata
DA.Update(ds, "empf")
End If
Catch ex As Exception
Return False
End Try
fs = Nothing
cb = Nothing
ds = Nothing
DA = Nothing
Connection.Close()
Connection = Nothing
Return True
Catch EX As Exception
Return False
End Try
End Function
#End Region
End Class

1568
Backup/Main.vb Normal file

File diff suppressed because it is too large Load Diff

91
Backup/utils/Globals.vb Normal file
View File

@@ -0,0 +1,91 @@
'*
' Modul Globals
'
' Dieses Modul beinhaltet Public Objekte und Variablen, welche während der gesamten
' Luafzeit von EDOKA benötigt werden
'
' Autor: Stefan Hutter
' Datum: 2.12.2002
'*
Imports System.Reflection
Imports System.IO
Module Globals
'Datenbankvariablen
Public Indextyp As Integer = 1
Public Applikationsdaten As DataTable
Public AppldataRow As Integer
Public sConnectionString_edoka As String
Public sConnectionString_journale As String
Public sConnectionString_ams As String
Public args As String() = Environment.GetCommandLineArgs()
Public conn_edoka As New edokadb.clsConnectionProvider()
Public conn_journale As New edokadb.clsConnectionProvider()
Public Fehler As Integer = 0
Public Warning As Integer = 0
Public DokumentID As String
Public ColdDokumentID As String
Public KeyNr As Long
Public Params As New ClsParameters()
Public oread As System.IO.StreamReader
Public oread1 As System.IO.StreamReader
Public Aufgehoben As Boolean
Public edokadokumentid As String
Public dokumenttyp As Integer
Public save_dokumentid As String
'Public ReservedWords As New Collection()
#Region "BMS"
Public Enum Enum_BMS_Typen
Information = 1
Warnung = 2
Fehler = 3
End Enum
Public Enum BMS_Fnkt
BMSStart = 1
BMSMessage = 2
BMSStop = 3
End Enum
Public m_log As New bms.Logging(11, Common.Common.JobType.StartJob)
Public Sub BMS_Log(ByVal Fnkt As Integer, Optional ByVal Message As String = "", Optional ByVal MSGType As Enum_BMS_Typen = 1)
Select Case Fnkt
Case 1
' Dim m_log As New bms.Logging(11, Common.Common.JobType.StartJob)
m_log.Start()
Case 2
m_log.Log(Message, MSGType)
Case 3
m_log.Ende()
Case Else
'BMS Else
End Select
End Sub
'Public Function BMS_Send_Mail(ByVal EMail As String, ByVal Betreff As String, ByVal Meldung As String)
'End Function
#End Region
Public Function ApplicationPath() As String
'Return Path.GetDirectoryName([Assembly].GetExecutingAssembly().Location)
Return Path.GetDirectoryName([Assembly].GetEntryAssembly().Location) + "\"
End Function
End Module

View File

@@ -0,0 +1,200 @@
Public Class ClsParameters
#Region "Deklarationen"
Dim m_applicationid As String
Property ApplicationID() As String
Get
Return m_applicationid
End Get
Set(ByVal Value As String)
m_applicationid = Value
End Set
End Property
Dim m_pathtmpsb As String
Property Pfad_Serienbrief_Daten() As String
Get
Return m_pathtmpsb
End Get
Set(ByVal Value As String)
m_pathtmpsb = Value
End Set
End Property
Dim m_pfadps As String
Property Pfad_PS() As String
Get
Return m_pfadps
End Get
Set(ByVal Value As String)
m_pfadps = Value
End Set
End Property
Dim m_pfadpdf As String
Property Pfad_Pdf() As String
Get
Return m_pfadpdf
End Get
Set(ByVal Value As String)
m_pfadpdf = Value
End Set
End Property
Dim m_dokumente_kleinauftrag As Integer
Property Anzahl_Dokumente_Kleinauftrag() As Integer
Get
Return m_dokumente_kleinauftrag
End Get
Set(ByVal Value As Integer)
m_dokumente_kleinauftrag = Value
End Set
End Property
Dim m_anzahl_dokumente_druckjob As Integer
Property Anzahl_Dokumente_Druckjob() As Integer
Get
Return m_anzahl_dokumente_druckjob
End Get
Set(ByVal Value As Integer)
m_anzahl_dokumente_druckjob = Value
End Set
End Property
Dim m_Dokumente_Auftrag As Integer
Property Anzahl_Dokumente_Auftrag() As Integer
Get
Return m_Dokumente_Auftrag
End Get
Set(ByVal Value As Integer)
m_Dokumente_Auftrag = Value
End Set
End Property
Dim m_pfad_edkb08 As String
Property Pfad_EDKB08() As String
Get
Return m_pfad_edkb08
End Get
Set(ByVal Value As String)
m_pfad_edkb08 = Value
End Set
End Property
Dim m_PrinterDriver As String
Property PrinterDriver() As String
Get
Return m_PrinterDriver
End Get
Set(ByVal Value As String)
m_PrinterDriver = Value
End Set
End Property
Dim m_mailempfaenger As String
Property MailEmpfanger() As String
Get
Return m_mailempfaenger
End Get
Set(ByVal Value As String)
m_mailempfaenger = Value
End Set
End Property
Dim m_timeOutKleinAuftrage As String
Property TimeOutKleinAuftraege() As String
Get
Return m_timeOutKleinAuftrage
End Get
Set(ByVal Value As String)
m_timeOutKleinAuftrage = Value
End Set
End Property
Dim m_timeOutGrossAuftrage As String
Property TimeOutGrossAuftraege() As String
Get
Return m_timeOutGrossAuftrage
End Get
Set(ByVal Value As String)
m_timeOutGrossAuftrage = Value
End Set
End Property
Dim m_wordwait As String
Property Wordwait() As String
Get
Return m_wordwait
End Get
Set(ByVal value As String)
m_wordwait = value
End Set
End Property
Dim m_maxwait As Integer
Property MaxWait() As Integer
Get
Return m_maxwait
End Get
Set(ByVal value As Integer)
m_maxwait = value
End Set
End Property
Dim m_Office2010 As Boolean
Property Office2010() As Boolean
Get
Return m_Office2010
End Get
Set(ByVal value As Boolean)
m_Office2010 = value
End Set
End Property
#End Region
Sub New()
Loadparameters()
End Sub
Public Function Loadparameters() As String
Try
oread = IO.File.OpenText(Globals.ApplicationPath + "parameters.cfg")
Me.ApplicationID = ParamValue(oread.ReadLine)
Me.Pfad_Serienbrief_Daten = ParamValue(oread.ReadLine)
Me.Pfad_PS = ParamValue(oread.ReadLine)
Me.Pfad_Pdf = ParamValue(oread.ReadLine)
Me.Anzahl_Dokumente_Kleinauftrag = ParamValue(oread.ReadLine)
Me.Anzahl_Dokumente_Druckjob = ParamValue(oread.ReadLine)
Me.Anzahl_Dokumente_Auftrag = ParamValue(oread.ReadLine)
Me.Pfad_EDKB08 = ParamValue(oread.ReadLine)
Me.PrinterDriver = ParamValue(oread.ReadLine)
Me.MailEmpfanger = ParamValue(oread.ReadLine)
Me.TimeOutGrossAuftraege = ParamValue(oread.ReadLine)
Me.TimeOutKleinAuftraege = ParamValue(oread.ReadLine)
Try
Me.Wordwait = ParamValue(oread.ReadLine)
Catch
Me.Wordwait = 500
End Try
Try
Me.MaxWait = ParamValue(oread.ReadLine)
Catch
Me.MaxWait = 2
End Try
Me.Office2010 = ParamValue(oread.ReadLine) = "True"
oread.Close()
Return Nothing
Catch ex As Exception
Return ex.Message
End Try
End Function
Private Function ParamValue(ByVal sinput As String) As String
Dim splitter() As String
splitter = Split(sinput, "=")
ParamValue = splitter(1)
End Function
End Class

31
Backup1/AssemblyInfo.vb Normal file
View File

@@ -0,0 +1,31 @@
Imports System.Reflection
Imports System.Runtime.InteropServices
' Allgemeine Informationen über eine Assembly werden über die folgende
' Attributgruppe gesteuert. Ändern Sie diese Attributwerte, um Informationen,
' die mit einer Assembly verknüpft sind, zu bearbeiten.
' Die Werte der Assemblyattribute überprüfen
<Assembly: AssemblyTitle("")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("")>
<Assembly: AssemblyCopyright("")>
<Assembly: AssemblyTrademark("")>
<Assembly: CLSCompliant(True)>
'Die folgende GUID ist für die ID der Typbibliothek, wenn dieses Projekt in COM angezeigt wird
<Assembly: Guid("ED75E29A-FD26-43E7-848A-1E9D8991085E")>
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
'
' Haupversion
' Nebenversion
' Buildnummer
' Revisionsnummer
'
' Sie können alle Werte angeben oder auf die standardmäßigen Build- und Revisionsnummern
' zurückgreifen, indem Sie '*' wie unten angezeigt verwenden:
<Assembly: AssemblyVersion("2.0.*")>

1222
Backup1/DB/clsApplikation.vb Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,289 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Connection Provider class for Database connection sharing
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 18. Mai 2003, 00:06:25
' // 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

View File

@@ -0,0 +1,202 @@
' //////////////////////////////////////////////////////////////////////////////////////////
' // Description: Base class for Database Interaction.
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 18. Mai 2003, 00:06:25
' // Because this class implements IDisposable, derived classes shouldn't do so.
' //////////////////////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Configuration
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Namespace edokadb
' /// <summary>
' /// Purpose: Error Enums used by this LLBL library.
' /// </summary>
Public Enum LLBLError
AllOk
' // Add more here (check the comma's!)
End Enum
' /// <summary>
' /// Purpose: General interface of the API generated. Contains only common methods of all classes.
' /// </summary>
Public Interface ICommonDBAccess
Function Insert() As Boolean
Function Update() As Boolean
Function Delete() As Boolean
Function SelectOne() As DataTable
Function SelectAll() As DataTable
End Interface
' /// <summary>
' /// Purpose: Abstract base class for Database Interaction classes.
' /// </summary>
Public MustInherit Class clsDBInteractionBase
Implements IDisposable
Implements ICommonDBAccess
#Region " Class Member Declarations "
Protected m_scoMainConnection As SqlConnection
Protected m_iErrorCode As SqlInt32
Protected m_bMainConnectionIsCreatedLocal As Boolean
Protected m_cpMainConnectionProvider As clsConnectionProvider
Private m_sConnectionString As String
Private m_bIsDisposed As Boolean
#End Region
' /// <summary>
' /// Purpose: Class constructor.
' /// </summary>
Public Sub New()
' // Initialize the class' members.
InitClass()
End Sub
' /// <summary>
' /// Purpose: Initializes class members.
' /// </summary>
Private Sub InitClass()
' // create all the objects and initialize other members.
m_scoMainConnection = new SqlConnection()
m_bMainConnectionIsCreatedLocal = True
m_cpMainConnectionProvider = Nothing
m_iErrorCode = New SqlInt32(LLBLError.AllOk)
m_bIsDisposed = False
End Sub
' /// <summary>
' /// Purpose: Implements the IDispose' method Dispose.
' /// </summary>
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
#End Region
End Class
End Namespace

1890
Backup1/DB/clsDokument.vb Normal file

File diff suppressed because it is too large Load Diff

1430
Backup1/DB/clsDokumenttyp.vb Normal file

File diff suppressed because it is too large Load Diff

View 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.
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.
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.
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

View File

@@ -0,0 +1,910 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'mitarbeiter'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 10. August 2003, 23:09:05
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokadb
' /// <summary>
' /// Purpose: Data Access class for the table 'mitarbeiter'.
' /// </summary>
Public Class clsMitarbeiter
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bMailempfang, m_bEdokaMesasge, m_bShowtip, m_bAktiv, m_bMailDirektVersenden, m_bEdoka_mail, m_bJournalisierung, m_bMailDokumentrueckgang As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iPartnernr, m_iKlassifizierung, m_iMutierer, m_iMandantnr, m_iFunktionnr, m_iMitarbeiternr, m_iFuermandant, m_iSprache As SqlInt32
Private m_sRang, m_sAnrede, m_sKurzzeichen, m_sVorname, m_sName, m_sFax, m_sTelefon, m_sUnterschrift_text, m_sFunktion, m_sTgnummer, 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>iMitarbeiternr</LI>
' /// <LI>sVorname. May be SqlString.Null</LI>
' /// <LI>sName. May be SqlString.Null</LI>
' /// <LI>sKurzzeichen. May be SqlString.Null</LI>
' /// <LI>sAnrede. May be SqlString.Null</LI>
' /// <LI>sTgnummer. May be SqlString.Null</LI>
' /// <LI>sEmail. May be SqlString.Null</LI>
' /// <LI>sFax. May be SqlString.Null</LI>
' /// <LI>sTelefon. May be SqlString.Null</LI>
' /// <LI>sUnterschrift_text. May be SqlString.Null</LI>
' /// <LI>iFunktionnr. May be SqlInt32.Null</LI>
' /// <LI>iSprache. May be SqlInt32.Null</LI>
' /// <LI>iFuermandant</LI>
' /// <LI>bShowtip</LI>
' /// <LI>iPartnernr</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>bMailempfang. May be SqlBoolean.Null</LI>
' /// <LI>bEdokaMesasge. May be SqlBoolean.Null</LI>
' /// <LI>sFunktion. May be SqlString.Null</LI>
' /// <LI>bMailDirektVersenden. May be SqlBoolean.Null</LI>
' /// <LI>sRang. May be SqlString.Null</LI>
' /// <LI>bMailDokumentrueckgang. May be SqlBoolean.Null</LI>
' /// <LI>iKlassifizierung. May be SqlInt32.Null</LI>
' /// <LI>bEdoka_mail. May be SqlBoolean.Null</LI>
' /// <LI>bJournalisierung. 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_mitarbeiter_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@svorname", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVorname))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sname", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sName))
scmCmdToExecute.Parameters.Add(New SqlParameter("@skurzzeichen", SqlDbType.VarChar, 10, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sKurzzeichen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sanrede", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAnrede))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stgnummer", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTgnummer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@semail", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEmail))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfax", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFax))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stelefon", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTelefon))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sunterschrift_text", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sUnterschrift_text))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifuermandant", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFuermandant))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bshowtip", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bShowtip))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ipartnernr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPartnernr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailempfang", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailempfang))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bEdokaMesasge", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bEdokaMesasge))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfunktion", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFunktion))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailDirektVersenden", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailDirektVersenden))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sRang", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRang))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailDokumentrueckgang", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailDokumentrueckgang))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iklassifizierung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iKlassifizierung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bedoka_mail", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bEdoka_mail))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bjournalisierung", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bJournalisierung))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_mitarbeiter_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("clsMitarbeiter::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>iMitarbeiternr</LI>
' /// <LI>sVorname. May be SqlString.Null</LI>
' /// <LI>sName. May be SqlString.Null</LI>
' /// <LI>sKurzzeichen. May be SqlString.Null</LI>
' /// <LI>sAnrede. May be SqlString.Null</LI>
' /// <LI>sTgnummer. May be SqlString.Null</LI>
' /// <LI>sEmail. May be SqlString.Null</LI>
' /// <LI>sFax. May be SqlString.Null</LI>
' /// <LI>sTelefon. May be SqlString.Null</LI>
' /// <LI>sUnterschrift_text. May be SqlString.Null</LI>
' /// <LI>iFunktionnr. May be SqlInt32.Null</LI>
' /// <LI>iSprache. May be SqlInt32.Null</LI>
' /// <LI>iFuermandant</LI>
' /// <LI>bShowtip</LI>
' /// <LI>iPartnernr</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>bMailempfang. May be SqlBoolean.Null</LI>
' /// <LI>bEdokaMesasge. May be SqlBoolean.Null</LI>
' /// <LI>sFunktion. May be SqlString.Null</LI>
' /// <LI>bMailDirektVersenden. May be SqlBoolean.Null</LI>
' /// <LI>sRang. May be SqlString.Null</LI>
' /// <LI>bMailDokumentrueckgang. May be SqlBoolean.Null</LI>
' /// <LI>iKlassifizierung. May be SqlInt32.Null</LI>
' /// <LI>bEdoka_mail. May be SqlBoolean.Null</LI>
' /// <LI>bJournalisierung. 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_mitarbeiter_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@svorname", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVorname))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sname", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sName))
scmCmdToExecute.Parameters.Add(New SqlParameter("@skurzzeichen", SqlDbType.VarChar, 10, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sKurzzeichen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sanrede", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAnrede))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stgnummer", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTgnummer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@semail", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEmail))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfax", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFax))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stelefon", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTelefon))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sunterschrift_text", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sUnterschrift_text))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifuermandant", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFuermandant))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bshowtip", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bShowtip))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ipartnernr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPartnernr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailempfang", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailempfang))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bEdokaMesasge", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bEdokaMesasge))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfunktion", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFunktion))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailDirektVersenden", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailDirektVersenden))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sRang", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRang))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailDokumentrueckgang", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailDokumentrueckgang))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iklassifizierung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iKlassifizierung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bedoka_mail", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bEdoka_mail))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bjournalisierung", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bJournalisierung))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_mitarbeiter_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("clsMitarbeiter::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>iMitarbeiternr</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_mitarbeiter_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_mitarbeiter_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("clsMitarbeiter::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>iMitarbeiternr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iMitarbeiternr</LI>
' /// <LI>sVorname</LI>
' /// <LI>sName</LI>
' /// <LI>sKurzzeichen</LI>
' /// <LI>sAnrede</LI>
' /// <LI>sTgnummer</LI>
' /// <LI>sEmail</LI>
' /// <LI>sFax</LI>
' /// <LI>sTelefon</LI>
' /// <LI>sUnterschrift_text</LI>
' /// <LI>iFunktionnr</LI>
' /// <LI>iSprache</LI>
' /// <LI>iFuermandant</LI>
' /// <LI>bShowtip</LI>
' /// <LI>iPartnernr</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>bMailempfang</LI>
' /// <LI>bEdokaMesasge</LI>
' /// <LI>sFunktion</LI>
' /// <LI>bMailDirektVersenden</LI>
' /// <LI>sRang</LI>
' /// <LI>bMailDokumentrueckgang</LI>
' /// <LI>iKlassifizierung</LI>
' /// <LI>bEdoka_mail</LI>
' /// <LI>bJournalisierung</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_mitarbeiter_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("mitarbeiter")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
sdaAdapter.Fill(dtToReturn)
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_mitarbeiter_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iMitarbeiternr = New SqlInt32(CType(dtToReturn.Rows(0)("mitarbeiternr"), Integer))
If dtToReturn.Rows(0)("vorname") Is System.DBNull.Value Then
m_sVorname = SqlString.Null
Else
m_sVorname = New SqlString(CType(dtToReturn.Rows(0)("vorname"), String))
End If
If dtToReturn.Rows(0)("name") Is System.DBNull.Value Then
m_sName = SqlString.Null
Else
m_sName = New SqlString(CType(dtToReturn.Rows(0)("name"), String))
End If
If dtToReturn.Rows(0)("kurzzeichen") Is System.DBNull.Value Then
m_sKurzzeichen = SqlString.Null
Else
m_sKurzzeichen = New SqlString(CType(dtToReturn.Rows(0)("kurzzeichen"), String))
End If
If dtToReturn.Rows(0)("anrede") Is System.DBNull.Value Then
m_sAnrede = SqlString.Null
Else
m_sAnrede = New SqlString(CType(dtToReturn.Rows(0)("anrede"), String))
End If
If dtToReturn.Rows(0)("tgnummer") Is System.DBNull.Value Then
m_sTgnummer = SqlString.Null
Else
m_sTgnummer = New SqlString(CType(dtToReturn.Rows(0)("tgnummer"), String))
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)("fax") Is System.DBNull.Value Then
m_sFax = SqlString.Null
Else
m_sFax = New SqlString(CType(dtToReturn.Rows(0)("fax"), String))
End If
If dtToReturn.Rows(0)("telefon") Is System.DBNull.Value Then
m_sTelefon = SqlString.Null
Else
m_sTelefon = New SqlString(CType(dtToReturn.Rows(0)("telefon"), String))
End If
If dtToReturn.Rows(0)("unterschrift_text") Is System.DBNull.Value Then
m_sUnterschrift_text = SqlString.Null
Else
m_sUnterschrift_text = New SqlString(CType(dtToReturn.Rows(0)("unterschrift_text"), String))
End If
If dtToReturn.Rows(0)("funktionnr") Is System.DBNull.Value Then
m_iFunktionnr = SqlInt32.Null
Else
m_iFunktionnr = New SqlInt32(CType(dtToReturn.Rows(0)("funktionnr"), Integer))
End If
If dtToReturn.Rows(0)("sprache") Is System.DBNull.Value Then
m_iSprache = SqlInt32.Null
Else
m_iSprache = New SqlInt32(CType(dtToReturn.Rows(0)("sprache"), Integer))
End If
m_iFuermandant = New SqlInt32(CType(dtToReturn.Rows(0)("fuermandant"), Integer))
m_bShowtip = New SqlBoolean(CType(dtToReturn.Rows(0)("showtip"), Boolean))
m_iPartnernr = New SqlInt32(CType(dtToReturn.Rows(0)("partnernr"), Integer))
If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then
m_iMandantnr = SqlInt32.Null
Else
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), 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)("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)("Mailempfang") Is System.DBNull.Value Then
m_bMailempfang = SqlBoolean.Null
Else
m_bMailempfang = New SqlBoolean(CType(dtToReturn.Rows(0)("Mailempfang"), Boolean))
End If
If dtToReturn.Rows(0)("EdokaMesasge") Is System.DBNull.Value Then
m_bEdokaMesasge = SqlBoolean.Null
Else
m_bEdokaMesasge = New SqlBoolean(CType(dtToReturn.Rows(0)("EdokaMesasge"), Boolean))
End If
If dtToReturn.Rows(0)("funktion") Is System.DBNull.Value Then
m_sFunktion = SqlString.Null
Else
m_sFunktion = New SqlString(CType(dtToReturn.Rows(0)("funktion"), String))
End If
If dtToReturn.Rows(0)("MailDirektVersenden") Is System.DBNull.Value Then
m_bMailDirektVersenden = SqlBoolean.Null
Else
m_bMailDirektVersenden = New SqlBoolean(CType(dtToReturn.Rows(0)("MailDirektVersenden"), Boolean))
End If
If dtToReturn.Rows(0)("Rang") Is System.DBNull.Value Then
m_sRang = SqlString.Null
Else
m_sRang = New SqlString(CType(dtToReturn.Rows(0)("Rang"), String))
End If
If dtToReturn.Rows(0)("MailDokumentrueckgang") Is System.DBNull.Value Then
m_bMailDokumentrueckgang = SqlBoolean.Null
Else
m_bMailDokumentrueckgang = New SqlBoolean(CType(dtToReturn.Rows(0)("MailDokumentrueckgang"), Boolean))
End If
If dtToReturn.Rows(0)("klassifizierung") Is System.DBNull.Value Then
m_iKlassifizierung = SqlInt32.Null
Else
m_iKlassifizierung = New SqlInt32(CType(dtToReturn.Rows(0)("klassifizierung"), Integer))
End If
If dtToReturn.Rows(0)("edoka_mail") Is System.DBNull.Value Then
m_bEdoka_mail = SqlBoolean.Null
Else
m_bEdoka_mail = New SqlBoolean(CType(dtToReturn.Rows(0)("edoka_mail"), Boolean))
End If
If dtToReturn.Rows(0)("journalisierung") Is System.DBNull.Value Then
m_bJournalisierung = SqlBoolean.Null
Else
m_bJournalisierung = New SqlBoolean(CType(dtToReturn.Rows(0)("journalisierung"), 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("clsMitarbeiter::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_mitarbeiter_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("mitarbeiter")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
sdaAdapter.Fill(dtToReturn)
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_mitarbeiter_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("clsMitarbeiter::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 [iMitarbeiternr]() As SqlInt32
Get
Return m_iMitarbeiternr
End Get
Set(ByVal Value As SqlInt32)
Dim iMitarbeiternrTmp As SqlInt32 = Value
If iMitarbeiternrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iMitarbeiternr", "iMitarbeiternr can't be NULL")
End If
m_iMitarbeiternr = Value
End Set
End Property
Public Property [sVorname]() As SqlString
Get
Return m_sVorname
End Get
Set(ByVal Value As SqlString)
m_sVorname = Value
End Set
End Property
Public Property [sName]() As SqlString
Get
Return m_sName
End Get
Set(ByVal Value As SqlString)
m_sName = Value
End Set
End Property
Public Property [sKurzzeichen]() As SqlString
Get
Return m_sKurzzeichen
End Get
Set(ByVal Value As SqlString)
m_sKurzzeichen = Value
End Set
End Property
Public Property [sAnrede]() As SqlString
Get
Return m_sAnrede
End Get
Set(ByVal Value As SqlString)
m_sAnrede = Value
End Set
End Property
Public Property [sTgnummer]() As SqlString
Get
Return m_sTgnummer
End Get
Set(ByVal Value As SqlString)
m_sTgnummer = 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 [sFax]() As SqlString
Get
Return m_sFax
End Get
Set(ByVal Value As SqlString)
m_sFax = Value
End Set
End Property
Public Property [sTelefon]() As SqlString
Get
Return m_sTelefon
End Get
Set(ByVal Value As SqlString)
m_sTelefon = Value
End Set
End Property
Public Property [sUnterschrift_text]() As SqlString
Get
Return m_sUnterschrift_text
End Get
Set(ByVal Value As SqlString)
m_sUnterschrift_text = Value
End Set
End Property
Public Property [iFunktionnr]() As SqlInt32
Get
Return m_iFunktionnr
End Get
Set(ByVal Value As SqlInt32)
m_iFunktionnr = Value
End Set
End Property
Public Property [iSprache]() As SqlInt32
Get
Return m_iSprache
End Get
Set(ByVal Value As SqlInt32)
m_iSprache = Value
End Set
End Property
Public Property [iFuermandant]() As SqlInt32
Get
Return m_iFuermandant
End Get
Set(ByVal Value As SqlInt32)
Dim iFuermandantTmp As SqlInt32 = Value
If iFuermandantTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iFuermandant", "iFuermandant can't be NULL")
End If
m_iFuermandant = Value
End Set
End Property
Public Property [bShowtip]() As SqlBoolean
Get
Return m_bShowtip
End Get
Set(ByVal Value As SqlBoolean)
Dim bShowtipTmp As SqlBoolean = Value
If bShowtipTmp.IsNull Then
Throw New ArgumentOutOfRangeException("bShowtip", "bShowtip can't be NULL")
End If
m_bShowtip = Value
End Set
End Property
Public Property [iPartnernr]() As SqlInt32
Get
Return m_iPartnernr
End Get
Set(ByVal Value As SqlInt32)
Dim iPartnernrTmp As SqlInt32 = Value
If iPartnernrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iPartnernr", "iPartnernr can't be NULL")
End If
m_iPartnernr = 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 [bMailempfang]() As SqlBoolean
Get
Return m_bMailempfang
End Get
Set(ByVal Value As SqlBoolean)
m_bMailempfang = Value
End Set
End Property
Public Property [bEdokaMesasge]() As SqlBoolean
Get
Return m_bEdokaMesasge
End Get
Set(ByVal Value As SqlBoolean)
m_bEdokaMesasge = Value
End Set
End Property
Public Property [sFunktion]() As SqlString
Get
Return m_sFunktion
End Get
Set(ByVal Value As SqlString)
m_sFunktion = Value
End Set
End Property
Public Property [bMailDirektVersenden]() As SqlBoolean
Get
Return m_bMailDirektVersenden
End Get
Set(ByVal Value As SqlBoolean)
m_bMailDirektVersenden = Value
End Set
End Property
Public Property [sRang]() As SqlString
Get
Return m_sRang
End Get
Set(ByVal Value As SqlString)
m_sRang = Value
End Set
End Property
Public Property [bMailDokumentrueckgang]() As SqlBoolean
Get
Return m_bMailDokumentrueckgang
End Get
Set(ByVal Value As SqlBoolean)
m_bMailDokumentrueckgang = 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 [bEdoka_mail]() As SqlBoolean
Get
Return m_bEdoka_mail
End Get
Set(ByVal Value As SqlBoolean)
m_bEdoka_mail = Value
End Set
End Property
Public Property [bJournalisierung]() As SqlBoolean
Get
Return m_bJournalisierung
End Get
Set(ByVal Value As SqlBoolean)
m_bJournalisierung = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,850 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'office_vorlage'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Donnerstag, 26. Februar 2004, 22:30:42
' // 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_bAktiv, m_bBchorizontal, m_bKopfzeile_generieren, m_bIdv_vorlage As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iMandantnr, m_iBch, m_iBcw, m_iOffice_vorlagenr, m_iMutierer, m_iAnwendungnr, m_iOwner, m_iKlassifizierung, m_iVorlageid, m_iBcpl, m_iBcpt As SqlInt32
Private m_sPrefix_dokumentname, m_sIdv_id, m_sOffice_vorlage, m_sBezeichnung, m_sBeschreibung, m_sVorlagename 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>
' /// </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, 1, 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, 1, 0, "", DataRowVersion.Proposed, m_bAbsender_ersteller))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bidv_nativ", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bIdv_nativ))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_geschuetzt", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_geschuetzt))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bkopfzeile_generieren", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 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, 1, 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, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_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: 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>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>
' /// </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_office_vorlage_Update]"
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, 1, 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, 1, 0, "", DataRowVersion.Proposed, m_bAbsender_ersteller))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bidv_nativ", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bIdv_nativ))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_geschuetzt", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_geschuetzt))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bkopfzeile_generieren", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 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, 1, 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, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_office_vorlage_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("clsOffice_vorlage::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>iOffice_vorlagenr</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_office_vorlage_Delete]"
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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_office_vorlage_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("clsOffice_vorlage::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>iOffice_vorlagenr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iOffice_vorlagenr</LI>
' /// <LI>sBezeichnung</LI>
' /// <LI>sBeschreibung</LI>
' /// <LI>iVorlageid</LI>
' /// <LI>sVorlagename</LI>
' /// <LI>sPrefix_dokumentname</LI>
' /// <LI>bIdv_vorlage</LI>
' /// <LI>sIdv_id</LI>
' /// <LI>sOffice_vorlage</LI>
' /// <LI>bAbsender_ersteller</LI>
' /// <LI>bIdv_nativ</LI>
' /// <LI>bDokument_geschuetzt</LI>
' /// <LI>bKopfzeile_generieren</LI>
' /// <LI>iKlassifizierung</LI>
' /// <LI>iBcpt</LI>
' /// <LI>iBcpl</LI>
' /// <LI>iBcw</LI>
' /// <LI>iBch</LI>
' /// <LI>bBchorizontal</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>iAnwendungnr</LI>
' /// <LI>iOwner</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_office_vorlage_SelectOne]"
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("@ioffice_vorlagenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iOffice_vorlagenr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
sdaAdapter.Fill(dtToReturn)
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_office_vorlage_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iOffice_vorlagenr = New SqlInt32(CType(dtToReturn.Rows(0)("office_vorlagenr"), 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)("beschreibung") Is System.DBNull.Value Then
m_sBeschreibung = SqlString.Null
Else
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("beschreibung"), String))
End If
If dtToReturn.Rows(0)("vorlageid") Is System.DBNull.Value Then
m_iVorlageid = SqlInt32.Null
Else
m_iVorlageid = New SqlInt32(CType(dtToReturn.Rows(0)("vorlageid"), Integer))
End If
If dtToReturn.Rows(0)("vorlagename") Is System.DBNull.Value Then
m_sVorlagename = SqlString.Null
Else
m_sVorlagename = New SqlString(CType(dtToReturn.Rows(0)("vorlagename"), String))
End If
If dtToReturn.Rows(0)("prefix_dokumentname") Is System.DBNull.Value Then
m_sPrefix_dokumentname = SqlString.Null
Else
m_sPrefix_dokumentname = New SqlString(CType(dtToReturn.Rows(0)("prefix_dokumentname"), String))
End If
m_bIdv_vorlage = New SqlBoolean(CType(dtToReturn.Rows(0)("idv_vorlage"), Boolean))
If dtToReturn.Rows(0)("idv_id") Is System.DBNull.Value Then
m_sIdv_id = SqlString.Null
Else
m_sIdv_id = New SqlString(CType(dtToReturn.Rows(0)("idv_id"), String))
End If
If dtToReturn.Rows(0)("office_vorlage") Is System.DBNull.Value Then
m_sOffice_vorlage = SqlString.Null
Else
m_sOffice_vorlage = New SqlString(CType(dtToReturn.Rows(0)("office_vorlage"), String))
End If
If dtToReturn.Rows(0)("absender_ersteller") Is System.DBNull.Value Then
m_bAbsender_ersteller = SqlBoolean.Null
Else
m_bAbsender_ersteller = New SqlBoolean(CType(dtToReturn.Rows(0)("absender_ersteller"), Boolean))
End If
m_bIdv_nativ = New SqlBoolean(CType(dtToReturn.Rows(0)("idv_nativ"), Boolean))
If dtToReturn.Rows(0)("dokument_geschuetzt") Is System.DBNull.Value Then
m_bDokument_geschuetzt = SqlBoolean.Null
Else
m_bDokument_geschuetzt = New SqlBoolean(CType(dtToReturn.Rows(0)("dokument_geschuetzt"), Boolean))
End If
m_bKopfzeile_generieren = New SqlBoolean(CType(dtToReturn.Rows(0)("kopfzeile_generieren"), Boolean))
If dtToReturn.Rows(0)("klassifizierung") Is System.DBNull.Value Then
m_iKlassifizierung = SqlInt32.Null
Else
m_iKlassifizierung = New SqlInt32(CType(dtToReturn.Rows(0)("klassifizierung"), Integer))
End If
m_iBcpt = New SqlInt32(CType(dtToReturn.Rows(0)("bcpt"), Integer))
If dtToReturn.Rows(0)("bcpl") Is System.DBNull.Value Then
m_iBcpl = SqlInt32.Null
Else
m_iBcpl = New SqlInt32(CType(dtToReturn.Rows(0)("bcpl"), Integer))
End If
m_iBcw = New SqlInt32(CType(dtToReturn.Rows(0)("bcw"), Integer))
m_iBch = New SqlInt32(CType(dtToReturn.Rows(0)("bch"), Integer))
If dtToReturn.Rows(0)("bchorizontal") Is System.DBNull.Value Then
m_bBchorizontal = SqlBoolean.Null
Else
m_bBchorizontal = New SqlBoolean(CType(dtToReturn.Rows(0)("bchorizontal"), Boolean))
End If
If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then
m_iMandantnr = SqlInt32.Null
Else
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), 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)("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)("anwendungnr") Is System.DBNull.Value Then
m_iAnwendungnr = SqlInt32.Null
Else
m_iAnwendungnr = New SqlInt32(CType(dtToReturn.Rows(0)("anwendungnr"), Integer))
End If
If dtToReturn.Rows(0)("owner") Is System.DBNull.Value Then
m_iOwner = SqlInt32.Null
Else
m_iOwner = New SqlInt32(CType(dtToReturn.Rows(0)("owner"), 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("clsOffice_vorlage::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_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 = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
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
#End Region
End Class
End Namespace

View 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.
scmCmdToExecute.ExecuteNonQuery()
m_iEintragnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iEintragnr").Value, SqlInt32))
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.
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.
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

View File

@@ -0,0 +1,37 @@
Imports System.ComponentModel
Imports Microsoft.VisualBasic
Namespace EDOKA
Public Class DB_Connection
Public Sub New()
''Edoka
'FileOpen(1, Globals.ApplicationPath + "edokaconn.cfg", OpenMode.Input)
'Input(1, sConnectionString_edoka)
'FileClose(1)
'FileOpen(1, Globals.ApplicationPath + "journaleconn.cfg", OpenMode.Input)
'Input(1, sConnectionString_journale)
'FileClose(1)
'Globals.conn_edoka.sConnectionString = sConnectionString_edoka
'Globals.conn_journale.sConnectionString = sConnectionString_journale
'Exit Sub
oread = IO.File.OpenText(Globals.ApplicationPath + "edokaconn.cfg")
sConnectionString_edoka = oread.ReadLine
Globals.sConnectionString_edoka = sConnectionString_edoka
oread.Close()
'Journale
oread = IO.File.OpenText(Globals.ApplicationPath + "journaleconn.cfg")
sConnectionString_journale = oread.ReadLine
Globals.sConnectionString_journale = sConnectionString_journale
oread.Close()
Globals.conn_edoka.sConnectionString = sConnectionString_edoka
Globals.conn_journale.sConnectionString = sConnectionString_journale
End Sub
End Class
End Namespace

19
Backup1/EDKB09.sln Normal file
View File

@@ -0,0 +1,19 @@
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EDKB09", "EDKB09.vbproj", "{6EDCD2BE-A7D3-47B4-A8CB-03B41044D054}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6EDCD2BE-A7D3-47B4-A8CB-03B41044D054}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6EDCD2BE-A7D3-47B4-A8CB-03B41044D054}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6EDCD2BE-A7D3-47B4-A8CB-03B41044D054}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6EDCD2BE-A7D3-47B4-A8CB-03B41044D054}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

BIN
Backup1/EDKB09.suo Normal file

Binary file not shown.

209
Backup1/EDKB09.vbproj Normal file
View File

@@ -0,0 +1,209 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{6EDCD2BE-A7D3-47B4-A8CB-03B41044D054}</ProjectGuid>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>EDKB09</AssemblyName>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyMode>None</AssemblyOriginatorKeyMode>
<DefaultClientScript>JScript</DefaultClientScript>
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Exe</OutputType>
<OptionCompare>Binary</OptionCompare>
<OptionExplicit>On</OptionExplicit>
<OptionStrict>Off</OptionStrict>
<RootNamespace>EDKB09</RootNamespace>
<StartupObject>
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
<MyType>Console</MyType>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationVersion>2.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<BootstrapperEnabled>true</BootstrapperEnabled>
<OldToolsVersion>2.0</OldToolsVersion>
<ApplicationRevision>0</ApplicationRevision>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\</OutputPath>
<DocumentationFile>EDKB09.xml</DocumentationFile>
<BaseAddress>285212672</BaseAddress>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>
</DefineConstants>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<DebugSymbols>true</DebugSymbols>
<Optimize>false</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>1</WarningLevel>
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\</OutputPath>
<DocumentationFile>EDKB09.xml</DocumentationFile>
<BaseAddress>285212672</BaseAddress>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>
</DefineConstants>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<DebugSymbols>false</DebugSymbols>
<Optimize>true</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>1</WarningLevel>
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
<DebugType>none</DebugType>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="BMS, Version=2.0.4126.29238, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\EDKB10\BMS\BMSDll\bin\BMS.dll</HintPath>
</Reference>
<Reference Include="Common, Version=2.0.4126.29238, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\EDKB10\BMS\BMSDll\bin\Common.dll</HintPath>
</Reference>
<Reference Include="DataAccess, Version=2.0.4126.29238, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\EDKB10\BMS\BMSDll\bin\DataAccess.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Office.Interop.Word, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="Office, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="System">
<Name>System</Name>
</Reference>
<Reference Include="System.Data">
<Name>System.Data</Name>
</Reference>
<Reference Include="System.Xml">
<Name>System.XML</Name>
</Reference>
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft" />
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="DB\clsApplikation.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="DB\clsConnectionProvider.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="DB\clsDBInteractionBase.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="DB\clsDokument.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="DB\clsDokumenttyp.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="DB\clsEdex_sb_serienbrief.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="DB\clsMitarbeiter.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="DB\clsOffice_vorlage.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="DB\clsSerienbrief_BL_Physiche_Ablage.vb" />
<Compile Include="DB\db_connection.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="Klassen\clsEmpfaengerdata.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="Klassen\clsImportData.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="Main.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="utils\clsParameter.vb">
<SubType>Code</SubType>
</Compile>
<Compile Include="utils\Globals.vb">
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
<Visible>False</Visible>
<ProductName>.NET Framework 2.0</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<COMReference Include="Acrobat">
<Guid>{E64169B3-3592-47D2-816E-602C5C13F328}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>1</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
</COMReference>
</ItemGroup>
<ItemGroup>
<Folder Include="My Project\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,33 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory>publish\</PublishUrlHistory>
<InstallUrlHistory>
</InstallUrlHistory>
<SupportUrlHistory>
</SupportUrlHistory>
<UpdateUrlHistory>
</UpdateUrlHistory>
<BootstrapperUrlHistory>
</BootstrapperUrlHistory>
<FallbackCulture>de-DE</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<StartAction>Project</StartAction>
<RemoteDebugEnabled>false</RemoteDebugEnabled>
<RemoteDebugMachine>sb1201z</RemoteDebugMachine>
<StartWorkingDirectory>
</StartWorkingDirectory>
<StartArguments>E:\Software-Projekte\EDOKA\Batches\Office_2010\EDKB09\bin\</StartArguments>
<StartProgram>\\sb1201z\c$\Program Files\Edoka\EDOKA_Entwicklung\Batches\EDKB09\bin\edkb09.exe</StartProgram>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<StartAction>Project</StartAction>
<RemoteDebugEnabled>false</RemoteDebugEnabled>
<RemoteDebugMachine>sb1201z</RemoteDebugMachine>
<StartWorkingDirectory>
</StartWorkingDirectory>
<StartArguments>E:\Software-Projekte\EDOKA\Batches\Office_2010\EDKB09\bin\</StartArguments>
<StartProgram>\\sb1201z\c$\Program Files\Edoka\EDOKA_Entwicklung\Batches\EDKB09\bin\edkb09.exe</StartProgram>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,423 @@
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Imports System.IO
Public Class clsEmpfaengerdata
#Region "Deklarationen"
Dim dsempfaenger As DataSet
Dim Serienbriefnr As Integer
#End Region
#Region "öffentliche Methoden"
Public Sub New(ByRef DsEmpfaenger As DataSet, ByVal Serienbriefnr As Integer)
Me.dsempfaenger = DsEmpfaenger
Me.Serienbriefnr = Serienbriefnr
End Sub
Public Sub Get_Empfaenger()
Load_Empfaenger()
End Sub
Public Function Vorlagendaten_aufbreiten() As DataTable
Return Datentabelle_Generieren()
End Function
Public Sub save()
save_empfaenger()
End Sub
Private Function save_empfaenger() As Boolean
Try
Dim dokumentname As String = Globals.Params.Pfad_Serienbrief_Daten + Me.Serienbriefnr.ToString + "_empfaenger.xml"
Me.dsempfaenger.WriteXml(dokumentname)
Dim Connection As New SqlConnection()
Dim DA As New SqlDataAdapter("select * from edex_sb_empfaenger where serienbriefnr=" + Str(Me.Serienbriefnr), Connection)
Dim cb As SqlCommandBuilder = New SqlCommandBuilder(DA)
Dim ds As New DataSet()
Dim fs As New FileStream(dokumentname, FileMode.Open, FileAccess.Read)
Dim mydata(fs.Length) As Byte
Try
fs.Read(mydata, 0, fs.Length)
fs.Close()
Connection.ConnectionString = Globals.sConnectionString_edoka
Connection.Open()
DA.Fill(ds, "empf")
Dim myRow As DataRow
If ds.Tables(0).Rows.Count = 0 Then
'Neue Serienbrief_Empfaenger speichern
myRow = ds.Tables(0).NewRow
myRow.Item(1) = Me.Serienbriefnr
myRow.Item(2) = mydata
ds.Tables(0).Rows.Add(myRow)
DA.Update(ds, "empf")
Else
' Bestehende Empfängerliste überschreiben
myRow = ds.Tables(0).Rows(0)
myRow.Item(2) = mydata
DA.Update(ds, "empf")
End If
Catch ex As Exception
Return False
End Try
fs = Nothing
cb = Nothing
ds = Nothing
DA = Nothing
Connection.Close()
Connection = Nothing
Return True
Catch EX As Exception
Return False
End Try
End Function
Private Function hascoltodelete(ByRef edata As DataTable, ByVal Prefix As String) As Boolean
Dim i As Integer
Dim s As String = ""
For i = 0 To edata.Columns.Count - 1
If Left(edata.Columns(i).ColumnName, 2) = Prefix Then
s = edata.Columns(i).ColumnName
Exit For
End If
Next
If s <> "" Then
edata.Columns.Remove(s)
Return True
End If
Return False
End Function
#End Region
#Region "Datentabelle"
Private Function Datentabelle_Generieren() As DataTable
Try
Dim dt As New DataTable()
Dim dn As DataRow
Dim i As Integer
Dim s As String
Dim aPrimaryKey(0) As DataColumn
Dim oDatacolumn As DataColumn
Me.dsempfaenger.Tables(0).Columns.Add("IntEintragnr")
For i = 0 To Me.dsempfaenger.Tables(0).Rows.Count - 1
Me.dsempfaenger.Tables(0).Rows(i).Item("IntEintragNr") = i
Next
oDatacolumn = Me.dsempfaenger.Tables(0).Columns("IntEintragnr")
aPrimaryKey(0) = oDatacolumn
Me.dsempfaenger.Tables(0).PrimaryKey = aPrimaryKey
dt.TableName = "EDKB09_" + Me.Serienbriefnr.ToString
For i = 0 To Me.dsempfaenger.Tables(0).Columns.Count - 1
dt.Columns.Add(Me.dsempfaenger.Tables(0).Columns(i).ColumnName)
Next
Dim dv As DataRow()
i = 0
Dim dav As New DataView(Me.dsempfaenger.Tables(0), "Status='1'", "Partnernr, Name, Vorname", DataViewRowState.CurrentRows)
Dim darv As DataRowView
dv = Me.dsempfaenger.Tables(0).Select("Status='1'")
For Each darv In dav
dt.ImportRow(darv.Row)
i = i + 1
If i > Params.Anzahl_Dokumente_Auftrag Then Exit For
Next
'Dim dc As DataColumn
'For Each dc In dt.Columns
' dc.ColumnName = dc.ColumnName.Replace(" ", "_")
' dc.ColumnName = dc.ColumnName.Replace(" ", "_")
' dc.ColumnName = dc.ColumnName.Replace("ö", "oe")
' dc.ColumnName = dc.ColumnName.Replace("Ö", "OE")
' dc.ColumnName = dc.ColumnName.Replace("ü", "ue")
' dc.ColumnName = dc.ColumnName.Replace("Ü", "UE")
' dc.ColumnName = dc.ColumnName.Replace("ä", "ae")
' dc.ColumnName = dc.ColumnName.Replace("Ä", "AE")
' dc.ColumnName = dc.ColumnName.Replace("-", "_")
' dc.ColumnName = dc.ColumnName.Replace("/", "_")
' dc.ColumnName = dc.ColumnName.Replace("\", "_")
' dc.ColumnName = dc.ColumnName.Replace(".", "_")
' dc.ColumnName = dc.ColumnName.Replace(":", "_")
' dc.ColumnName = dc.ColumnName.Replace(",", "_")
' Select Case Left(dc.ColumnName, 1)
' Case "1", "2", "3", "4", "5", "6", "7", "8", "9", "0"
' dc.ColumnName = "_" + dc.ColumnName
' End Select
' If resword(dc.ColumnName) Then
' dc.ColumnName = dc.ColumnName + "_"
' End If
'Next
' dt = Me.dsempfaenger.Tables(0).Copy
Dim tmkopfzeile As Boolean = False
For i = 0 To Me.dsempfaenger.Tables("UsedFelder").Rows.Count - 1
If Me.dsempfaenger.Tables("UsedFelder").Rows(i).Item("Nr") = 33 Then
tmkopfzeile = True
End If
Next
If tmkopfzeile = False Then
dn = Me.dsempfaenger.Tables("UsedFelder").NewRow
dn.Item(0) = 33
dn.Item(1) = "TGEDKCompanyBBEB99"
dn.Item(2) = ""
dn.Item(3) = "TGEDKCompanyBBEB99"
dn.Item(4) = ""
Me.dsempfaenger.Tables("UsedFelder").Rows.Add(dn)
End If
Me.dsempfaenger.Tables("UsedFelder").Columns.Add("TempFeldname")
Me.dsempfaenger.Tables("UsedFelder").Columns.Add("Fnkt")
For i = 0 To Me.dsempfaenger.Tables("UsedFelder").Rows.Count - 1
If Me.dsempfaenger.Tables("UsedFelder").Rows(i).Item("Nr") <> 0 Then
s = "F_09_" + Me.dsempfaenger.Tables("UsedFelder").Rows(i).Item("Nr")
Me.dsempfaenger.Tables("UsedFelder").Rows(i).Item("fnkt") = s
s = Insert_DT_Column(dt, s)
Me.dsempfaenger.Tables("UsedFelder").Rows(i).Item("Tempfeldname") = s
Else
s = "I_09_" + Me.dsempfaenger.Tables("UsedFelder").Rows(i).Item("Beginntextmarke")
Me.dsempfaenger.Tables("UsedFelder").Rows(i).Item("fnkt") = s
s = Insert_DT_Column(dt, s)
Me.dsempfaenger.Tables("UsedFelder").Rows(i).Item("Tempfeldname") = s
End If
Next
Create_SQL_Server_Table(dt)
Save_Data_To_Temptable(dt)
Return Fill_And_Get_Data(dt.Rows.Count)
Catch ex As Exception
Throw New Exception("Serienbrief: " + Me.Serienbriefnr.ToString + ": Generierung der Datentabelle ist fehlgeschlagen:" + ex.Message)
End Try
End Function
'GAGA
Private Function Insert_DT_Column(ByRef dt As DataTable, ByVal colname As String) As String
Dim i As Integer = 0
Dim dc As DataColumn
For Each dc In dt.Columns
If UCase(Microsoft.VisualBasic.Left(dc.ColumnName, Len(colname))) = UCase(colname) Then
i = i + 1
End If
Next
If i > 0 Then colname = colname + "_" + i.ToString
dt.Columns.Add(colname)
Return colname
End Function
#End Region
#Region "Datenzugriffe"
Dim Dokid As Integer
Private Function Fill_And_Get_Data(ByVal rowcount As Integer) As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandTimeout = Params.TimeOutKleinAuftraege
Dim i As Integer
Dim dtToReturn As DataTable = New DataTable()
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
scmCmdToExecute.CommandText = "dbo.sp_edex_sb_fill_sbdata"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
scmCmdToExecute.Connection = Globals.conn_edoka.scoDBConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@serienbriefnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Me.Serienbriefnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ROWCOUNT", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, rowcount))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumentid", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, 0))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bedr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, 0))
sdaAdapter.Fill(dtToReturn)
Dokid = scmCmdToExecute.Parameters("@dokumentid").Value
For i = 0 To dtToReturn.Rows.Count - 1
dtToReturn.Rows(i).Item("Dokumentid") = Generate_Key(Dokid)
Dokid = Dokid + 1
If scmCmdToExecute.Parameters("@bedr").Value = 1 Then
dtToReturn.Rows(i).Item("dokumentidbdr") = Generate_Key(Dokid)
Dokid = Dokid + 1
End If
Next
Return dtToReturn
Catch ex As Exception
Throw New Exception("sp_check_dokumentreaktivierung::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
Finally
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
Private Sub Create_SQL_Server_Table(ByRef dt As DataTable)
Try
Dim s As String
Dim s1 As String
Dim i As Integer
'dt.Columns.Add("NRPAR00")
'dt.Columns.Add("IntEintragNr")
s1 = "Drop Table dbo.EDKB09_" + Me.Serienbriefnr.ToString
's = "Create Table EDKB09_" + Me.Serienbriefnr.ToString + "( NRPAR00 int, intEintragNr int,"
s = "Create Table dbo.EDKB09_" + Me.Serienbriefnr.ToString + "( NRPAR00 varchar(11),"
For i = 1 To dt.Columns.Count - 1
s = s + "[" + dt.Columns(i).ColumnName + "]" + " varchar(255),"
Next
s = Left(s, Len(s) - 1)
s = s + ")"
Dim conn As New SqlConnection()
conn.ConnectionString = Globals.sConnectionString_edoka
conn.Open()
Dim sqlcmd0 As New SqlCommand(s1, conn)
Try
sqlcmd0.ExecuteNonQuery()
Catch
End Try
Dim sqlcmd As New SqlCommand(s, conn)
sqlcmd.ExecuteNonQuery()
conn.Close()
Catch ex As Exception
Throw New Exception("Serienbrief: " + Me.Serienbriefnr.ToString + ": Temp. Tabelle konnte nicht erstellt werden:" + ex.Message)
End Try
End Sub
Private Sub Save_Data_To_Temptable(ByRef dt As DataTable)
Dim tdt As New DataTable("EDKB09_" + Me.Serienbriefnr.ToString)
tdt = dt.Copy
tdt.Columns(0).ColumnName = "NRPAR00"
Dim connection As New SqlConnection()
Dim da As New SqlDataAdapter("Select * from EDKB09_" + Me.Serienbriefnr.ToString, connection)
Dim cb As New SqlCommandBuilder(da)
connection.ConnectionString = Globals.sConnectionString_edoka
connection.Open()
da.Update(tdt)
connection.Close()
End Sub
Private Sub Load_Empfaenger()
Dim dokumentname As String = Globals.Params.Pfad_Serienbrief_Daten + Me.Serienbriefnr.ToString + "_empfaenger.xml"
If File.Exists(dokumentname) Then
Try
File.Delete(dokumentname)
Catch ex As Exception
Globals.BMS_Log(Globals.BMS_Fnkt.BMSMessage, "EDKB09: EDKB09: Load_Empfaenger :" + Serienbriefnr.ToString + ex.Message, Globals.Enum_BMS_Typen.Information)
End Try
End If
Try
Me.dsempfaenger.Tables.Clear()
Dim Connection As New SqlConnection()
Dim DA As New SqlDataAdapter("select * from edex_sb_empfaenger where serienbriefnr=" + Str(Me.Serienbriefnr), Connection)
Dim cb As SqlCommandBuilder = New SqlCommandBuilder(DA)
Dim ds As New DataSet()
Try
Connection.ConnectionString = Globals.sConnectionString_edoka
Connection.Open()
DA.Fill(ds, "empf")
Dim myRow As DataRow
If ds.Tables(0).Rows.Count = 0 Then
MsgBox("Empfänger konnten nicht geladen werden.")
Else
myRow = ds.Tables(0).Rows(0)
Dim MyData() As Byte
MyData = myRow.Item(2)
Dim K As Long
K = UBound(MyData)
Dim fs As New FileStream(dokumentname, FileMode.OpenOrCreate, FileAccess.Write)
fs.Write(MyData, 0, K)
fs.Close()
fs = Nothing
Me.dsempfaenger.ReadXml(dokumentname)
End If
Catch ex As Exception
End Try
cb = Nothing
ds = Nothing
DA = Nothing
Connection.Close()
Connection = Nothing
Catch EX As Exception
Throw New Exception("Serienbrief: " + Me.Serienbriefnr.ToString + ": Empfängerdaten konnten nicht aus der DB gelesen werden:" + ex.Message)
Finally
Try
File.Delete(dokumentname)
Catch ex As Exception
End Try
End Try
End Sub
Public Function Generate_Key(ByVal key As Long) As String
Dim skey As String
Dim s As String
skey = "OFFEDK000"
s = Str(Year(Now))
While Microsoft.VisualBasic.Left(s, 1) = " "
s = Microsoft.VisualBasic.Right(s, Len(s) - 1)
End While
skey = skey + s
s = Str(key)
While Microsoft.VisualBasic.Left(s, 1) = " "
s = Microsoft.VisualBasic.Right(s, Len(s) - 1)
End While
While Len(s) < 8
s = "0" + s
End While
skey = skey + s
s = Pruefziffer(Microsoft.VisualBasic.Right(skey, 15))
While Microsoft.VisualBasic.Left(s, 1) = " "
s = Microsoft.VisualBasic.Right(s, Len(s) - 1)
End While
skey = skey + s
Generate_Key = skey
End Function
Public Function Pruefziffer(ByVal zahl As String) As String
Dim ptab(9, 9) As Integer
Dim pz(9) As Integer
Dim s1, s2, s3 As String
Dim i1, i2 As Long
s1 = "0,9,4,6,8,2,7,1,3,5"
s2 = s1
For i1 = 0 To 9
For i2 = 0 To 9
ptab(i1, i2) = Mid(s2, (i2 * 2) + 1, 1)
Next
s3 = Microsoft.VisualBasic.Left(s1, 1)
s1 = Microsoft.VisualBasic.Right(s1, Len(s1) - 2)
s1 = s1 + "," + s3
s2 = s1
Next
pz(0) = 0
pz(1) = 9
pz(2) = 8
pz(3) = 7
pz(4) = 6
pz(5) = 5
pz(6) = 4
pz(7) = 3
pz(8) = 2
pz(9) = 1
Dim i, x, y As Integer
y = 0
For i = 1 To Len(zahl)
x = Val(Mid(zahl, i, 1))
y = ptab(x, y)
Next
Pruefziffer = Str(pz(y))
End Function
#End Region
End Class

View File

@@ -0,0 +1,193 @@
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Imports System.IO
Public Class clsImportData
#Region "Deklarationen"
Dim dsempfaenger As DataSet
Dim Serienbriefnr As Integer
Dim importdata As New DataSet()
Dim sb As edokadb.clsEdex_sb_serienbrief
Dim hasdata As Boolean = False
#End Region
#Region "öffentliche Methoden"
Public Sub New(ByRef DsEmpfaenger As DataSet, ByVal Serienbriefnr As Integer, ByVal sbdata As edokadb.clsEdex_sb_serienbrief)
Me.dsempfaenger = DsEmpfaenger
Me.Serienbriefnr = Serienbriefnr
Me.sb = sbdata
create_importdata()
End Sub
Private Sub create_importdata()
importdata.ReadXml(Globals.ApplicationPath + "edkb08struktur.xml")
importdata.Tables(0).Rows.Clear()
importdata.Tables(0).Columns.Add("BLKunde")
importdata.Tables(0).Columns.Add("Dokumentidbdr")
importdata.Tables(0).Columns.Add("Dokumentid")
importdata.Tables(0).Columns.Add("Bezeichnung")
End Sub
Public Sub Create_Import_Data()
Dim dv As DataRow
Dim i As Integer
For i = 0 To Me.dsempfaenger.Tables(0).Rows.Count - 1
Try
dv = Me.dsempfaenger.Tables(0).Rows(i)
If dv.Item("Status") = "4" And dv.Item("Dokument_Gedruckt") <> "2" Then
dv.Item("Dokument_Gedruckt") = "2"
'dv.Item("Status") = 2
If dv.Item("partnernr") <> "" Then
Write_Import_Files(dv)
End If
End If
Catch ex1 As Exception
End Try
Next
If hasdata = True Then
importdata.WriteXml(Globals.Params.Pfad_EDKB08 + "SBImport_" + Format(Now, "yyyyMMddHHmmss") + ".ind")
Me.save_empfaenger()
End If
End Sub
Private Sub Write_Import_Files(ByRef dv As DataRow)
Try
Dim dt As New edokadb.clsDokumenttyp()
dt.cpMainConnectionProvider = Globals.conn_edoka
dt.iDokumenttypnr = New SqlInt32(CType(sb.iDokumenttypnr.Value, Int32))
dt.SelectOne()
If dt.bNurnative.Value = True Then
dt.Dispose()
Exit Sub
End If
dt.Dispose()
Catch ex As Exception
Exit Sub
End Try
Dim sourcedok As String = Globals.Params.Pfad_Serienbrief_Daten + Me.Serienbriefnr.ToString + "\" + dv.Item("Dokumentid") + ".pdf"
Dim destdok As String = Globals.Params.Pfad_EDKB08 + dv.Item("Dokumentid") + ".pdf"
If IO.File.Exists(sourcedok) Then
IO.File.Copy(sourcedok, destdok, True)
Dim dr As DataRow
Dim i As Integer = 0
dr = importdata.Tables(0).NewRow
Try
While i < 40
dr.Item(i) = ""
i = i + 1
End While
Catch
End Try
dr.Item("Funktion") = "ADD"
dr.Item("PARTNERNR") = dv.Item("Partnernr")
dr.Item("Dokumenttypnr") = sb.iDokumenttypnr.Value
dr.Item("dateiname") = dv.Item("Dokumentid") + ".pdf"
dr.Item("Dateiformat") = "PDF"
dr.Item("Archivdatum") = Now.ToString
dr.Item("Ersteller") = get_tgnummer(dv.Item("Ersteller"))
dr.Item("HERKUNFTSAPPLIKATION") = "EDKB09"
dr.Item("Dokumentid") = dv.Item("Dokumentid")
dr.Item("Dokumentidbdr") = dv.Item("Dokumentidbdr")
'Rel. 4.1 - Nur als BL-Kunde kennzeichnen, sofern so im Serienbrief festgehalten
If sb.iBldossier.Value.ToString = "1" Then
dr.Item("BLKunde") = dv.Item("BLKUNDE")
Else
If dv.Item("BLKunde") = "1" Then
insert_sb_bl_physiche_ablage_journal(Me.Serienbriefnr, sb.sBezeichnung.Value.ToString, get_tgnummer(dv.Item("Ersteller")), dv.Item("Partnernr"), dv.Item("DokumentID"))
End If
dr.Item("BLKunde") = "0"
End If
dr.Item("Bezeichnung") = sb.sBezeichnung.Value
dr.Item("DOKUMENTWERT2") = "Serienbriefnr;" + Me.Serienbriefnr.ToString
importdata.Tables(0).Rows.Add(dr)
hasdata = True
End If
End Sub
Private Sub insert_sb_bl_physiche_ablage_journal(ByVal sbnr As Integer, ByVal bezeichnung As String, ByVal tgnummer As String, ByVal partnernr As Integer, ByVal dokumentid As String)
Try
Dim j As New edokadb.clsSerienbrief_BL_Physiche_Ablage
j.cpMainConnectionProvider = Globals.conn_journale
j.iSerienbriefnr = New SqlInt32(CType(sbnr, Int32))
j.sBezeichnung = New SqlString(CType(bezeichnung, String))
j.sTGNumer_Ersteller = New SqlString(CType(tgnummer, String))
j.iPartnernr = New SqlInt32(CType(partnernr, Int32))
j.sDokumentid = New SqlString(CType(dokumentid, String))
j.daTimestampe = New SqlDateTime(CType(Now, DateTime))
Globals.conn_journale.OpenConnection()
j.Insert()
Globals.conn_journale.CloseConnection(True)
j.Dispose()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Function get_tgnummer(ByVal mitarbeiternr As Integer) As String
Dim x As New edokadb.clsMitarbeiter
Try
x.cpMainConnectionProvider = Globals.conn_edoka
x.iMitarbeiternr = New SqlInt32(CType(mitarbeiternr, Int32))
x.SelectOne()
Return x.sTgnummer.Value
Catch
Return mitarbeiternr.ToString
Finally
x.Dispose()
End Try
End Function
Private Function save_empfaenger() As Boolean
Try
Dim dokumentname As String = Globals.Params.Pfad_Serienbrief_Daten + Me.Serienbriefnr.ToString + "_empfaenger.xml"
Me.dsempfaenger.WriteXml(dokumentname)
Dim Connection As New SqlConnection
Dim DA As New SqlDataAdapter("select * from edex_sb_empfaenger where serienbriefnr=" + Str(Me.Serienbriefnr), Connection)
Dim cb As SqlCommandBuilder = New SqlCommandBuilder(DA)
Dim ds As New DataSet
Dim fs As New FileStream(dokumentname, FileMode.Open, FileAccess.Read)
Dim mydata(fs.Length) As Byte
Try
fs.Read(mydata, 0, fs.Length)
fs.Close()
Connection.ConnectionString = Globals.sConnectionString_edoka
Connection.Open()
DA.Fill(ds, "empf")
Dim myRow As DataRow
If ds.Tables(0).Rows.Count = 0 Then
'Neue Serienbrief_Empfaenger speichern
myRow = ds.Tables(0).NewRow
myRow.Item(1) = Me.Serienbriefnr
myRow.Item(2) = mydata
ds.Tables(0).Rows.Add(myRow)
DA.Update(ds, "empf")
Else
' Bestehende Empfängerliste überschreiben
myRow = ds.Tables(0).Rows(0)
myRow.Item(2) = mydata
DA.Update(ds, "empf")
End If
Catch ex As Exception
Return False
End Try
fs = Nothing
cb = Nothing
ds = Nothing
DA = Nothing
Connection.Close()
Connection = Nothing
Return True
Catch EX As Exception
Return False
End Try
End Function
#End Region
End Class

1568
Backup1/Main.vb Normal file

File diff suppressed because it is too large Load Diff

91
Backup1/utils/Globals.vb Normal file
View File

@@ -0,0 +1,91 @@
'*
' Modul Globals
'
' Dieses Modul beinhaltet Public Objekte und Variablen, welche während der gesamten
' Luafzeit von EDOKA benötigt werden
'
' Autor: Stefan Hutter
' Datum: 2.12.2002
'*
Imports System.Reflection
Imports System.IO
Module Globals
'Datenbankvariablen
Public Indextyp As Integer = 1
Public Applikationsdaten As DataTable
Public AppldataRow As Integer
Public sConnectionString_edoka As String
Public sConnectionString_journale As String
Public sConnectionString_ams As String
Public args As String() = Environment.GetCommandLineArgs()
Public conn_edoka As New edokadb.clsConnectionProvider()
Public conn_journale As New edokadb.clsConnectionProvider()
Public Fehler As Integer = 0
Public Warning As Integer = 0
Public DokumentID As String
Public ColdDokumentID As String
Public KeyNr As Long
Public Params As New ClsParameters()
Public oread As System.IO.StreamReader
Public oread1 As System.IO.StreamReader
Public Aufgehoben As Boolean
Public edokadokumentid As String
Public dokumenttyp As Integer
Public save_dokumentid As String
'Public ReservedWords As New Collection()
#Region "BMS"
Public Enum Enum_BMS_Typen
Information = 1
Warnung = 2
Fehler = 3
End Enum
Public Enum BMS_Fnkt
BMSStart = 1
BMSMessage = 2
BMSStop = 3
End Enum
Public m_log As New bms.Logging(11, Common.Common.JobType.StartJob)
Public Sub BMS_Log(ByVal Fnkt As Integer, Optional ByVal Message As String = "", Optional ByVal MSGType As Enum_BMS_Typen = 1)
Select Case Fnkt
Case 1
' Dim m_log As New bms.Logging(11, Common.Common.JobType.StartJob)
m_log.Start()
Case 2
m_log.Log(Message, MSGType)
Case 3
m_log.Ende()
Case Else
'BMS Else
End Select
End Sub
'Public Function BMS_Send_Mail(ByVal EMail As String, ByVal Betreff As String, ByVal Meldung As String)
'End Function
#End Region
Public Function ApplicationPath() As String
'Return Path.GetDirectoryName([Assembly].GetExecutingAssembly().Location)
Return Path.GetDirectoryName([Assembly].GetEntryAssembly().Location) + "\"
End Function
End Module

View File

@@ -0,0 +1,200 @@
Public Class ClsParameters
#Region "Deklarationen"
Dim m_applicationid As String
Property ApplicationID() As String
Get
Return m_applicationid
End Get
Set(ByVal Value As String)
m_applicationid = Value
End Set
End Property
Dim m_pathtmpsb As String
Property Pfad_Serienbrief_Daten() As String
Get
Return m_pathtmpsb
End Get
Set(ByVal Value As String)
m_pathtmpsb = Value
End Set
End Property
Dim m_pfadps As String
Property Pfad_PS() As String
Get
Return m_pfadps
End Get
Set(ByVal Value As String)
m_pfadps = Value
End Set
End Property
Dim m_pfadpdf As String
Property Pfad_Pdf() As String
Get
Return m_pfadpdf
End Get
Set(ByVal Value As String)
m_pfadpdf = Value
End Set
End Property
Dim m_dokumente_kleinauftrag As Integer
Property Anzahl_Dokumente_Kleinauftrag() As Integer
Get
Return m_dokumente_kleinauftrag
End Get
Set(ByVal Value As Integer)
m_dokumente_kleinauftrag = Value
End Set
End Property
Dim m_anzahl_dokumente_druckjob As Integer
Property Anzahl_Dokumente_Druckjob() As Integer
Get
Return m_anzahl_dokumente_druckjob
End Get
Set(ByVal Value As Integer)
m_anzahl_dokumente_druckjob = Value
End Set
End Property
Dim m_Dokumente_Auftrag As Integer
Property Anzahl_Dokumente_Auftrag() As Integer
Get
Return m_Dokumente_Auftrag
End Get
Set(ByVal Value As Integer)
m_Dokumente_Auftrag = Value
End Set
End Property
Dim m_pfad_edkb08 As String
Property Pfad_EDKB08() As String
Get
Return m_pfad_edkb08
End Get
Set(ByVal Value As String)
m_pfad_edkb08 = Value
End Set
End Property
Dim m_PrinterDriver As String
Property PrinterDriver() As String
Get
Return m_PrinterDriver
End Get
Set(ByVal Value As String)
m_PrinterDriver = Value
End Set
End Property
Dim m_mailempfaenger As String
Property MailEmpfanger() As String
Get
Return m_mailempfaenger
End Get
Set(ByVal Value As String)
m_mailempfaenger = Value
End Set
End Property
Dim m_timeOutKleinAuftrage As String
Property TimeOutKleinAuftraege() As String
Get
Return m_timeOutKleinAuftrage
End Get
Set(ByVal Value As String)
m_timeOutKleinAuftrage = Value
End Set
End Property
Dim m_timeOutGrossAuftrage As String
Property TimeOutGrossAuftraege() As String
Get
Return m_timeOutGrossAuftrage
End Get
Set(ByVal Value As String)
m_timeOutGrossAuftrage = Value
End Set
End Property
Dim m_wordwait As String
Property Wordwait() As String
Get
Return m_wordwait
End Get
Set(ByVal value As String)
m_wordwait = value
End Set
End Property
Dim m_maxwait As Integer
Property MaxWait() As Integer
Get
Return m_maxwait
End Get
Set(ByVal value As Integer)
m_maxwait = value
End Set
End Property
Dim m_Office2010 As Boolean
Property Office2010() As Boolean
Get
Return m_Office2010
End Get
Set(ByVal value As Boolean)
m_Office2010 = value
End Set
End Property
#End Region
Sub New()
Loadparameters()
End Sub
Public Function Loadparameters() As String
Try
oread = IO.File.OpenText(Globals.ApplicationPath + "parameters.cfg")
Me.ApplicationID = ParamValue(oread.ReadLine)
Me.Pfad_Serienbrief_Daten = ParamValue(oread.ReadLine)
Me.Pfad_PS = ParamValue(oread.ReadLine)
Me.Pfad_Pdf = ParamValue(oread.ReadLine)
Me.Anzahl_Dokumente_Kleinauftrag = ParamValue(oread.ReadLine)
Me.Anzahl_Dokumente_Druckjob = ParamValue(oread.ReadLine)
Me.Anzahl_Dokumente_Auftrag = ParamValue(oread.ReadLine)
Me.Pfad_EDKB08 = ParamValue(oread.ReadLine)
Me.PrinterDriver = ParamValue(oread.ReadLine)
Me.MailEmpfanger = ParamValue(oread.ReadLine)
Me.TimeOutGrossAuftraege = ParamValue(oread.ReadLine)
Me.TimeOutKleinAuftraege = ParamValue(oread.ReadLine)
Try
Me.Wordwait = ParamValue(oread.ReadLine)
Catch
Me.Wordwait = 500
End Try
Try
Me.MaxWait = ParamValue(oread.ReadLine)
Catch
Me.MaxWait = 2
End Try
Me.Office2010 = ParamValue(oread.ReadLine) = "True"
oread.Close()
Return Nothing
Catch ex As Exception
Return ex.Message
End Try
End Function
Private Function ParamValue(ByVal sinput As String) As String
Dim splitter() As String
splitter = Split(sinput, "=")
ParamValue = splitter(1)
End Function
End Class

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More