Initial commit
This commit is contained in:
20
EDKB14WS/Backup/EDKB14WS.sln
Normal file
20
EDKB14WS/Backup/EDKB14WS.sln
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EDKB14WS", "EDKB14WS\EDKB14WS.vbproj", "{F2551862-60EB-4134-8A62-4455B92F138F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{F2551862-60EB-4134-8A62-4455B92F138F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F2551862-60EB-4134-8A62-4455B92F138F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F2551862-60EB-4134-8A62-4455B92F138F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F2551862-60EB-4134-8A62-4455B92F138F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
BIN
EDKB14WS/Backup/EDKB14WS.v11.suo
Normal file
BIN
EDKB14WS/Backup/EDKB14WS.v11.suo
Normal file
Binary file not shown.
289
EDKB14WS/Backup/EDKB14WS/DB/clsConnectionProvider.vb
Normal file
289
EDKB14WS/Backup/EDKB14WS/DB/clsConnectionProvider.vb
Normal file
@@ -0,0 +1,289 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Connection Provider class for Database connection sharing
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 26. November 2002, 22:32:48
|
||||
' // 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
|
||||
202
EDKB14WS/Backup/EDKB14WS/DB/clsDBInteractionBase.vb
Normal file
202
EDKB14WS/Backup/EDKB14WS/DB/clsDBInteractionBase.vb
Normal file
@@ -0,0 +1,202 @@
|
||||
' //////////////////////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Base class for Database Interaction.
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 26. November 2002, 22:32:48
|
||||
' // 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
EDKB14WS/Backup/EDKB14WS/DB/clsDokument.vb
Normal file
1890
EDKB14WS/Backup/EDKB14WS/DB/clsDokument.vb
Normal file
File diff suppressed because it is too large
Load Diff
1530
EDKB14WS/Backup/EDKB14WS/DB/clsDokumenttyp.vb
Normal file
1530
EDKB14WS/Backup/EDKB14WS/DB/clsDokumenttyp.vb
Normal file
File diff suppressed because it is too large
Load Diff
410
EDKB14WS/Backup/EDKB14WS/DB/clsJournaleintrag.vb
Normal file
410
EDKB14WS/Backup/EDKB14WS/DB/clsJournaleintrag.vb
Normal file
@@ -0,0 +1,410 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'Journaleintrag'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 18. Mai 2003, 09:14:59
|
||||
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Data Access class for the table 'Journaleintrag'.
|
||||
' /// </summary>
|
||||
Public Class clsJournaleintrag
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_daDatumzeit As SqlDateTime
|
||||
Private m_iJournalnr, m_iJournaleintragnr As SqlInt32
|
||||
Private m_sEintrag As SqlString
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iJournalnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sEintrag. May be SqlString.Null</LI>
|
||||
' /// <LI>daDatumzeit. May be SqlDateTime.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iJournaleintragnr</LI>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journaleintrag_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournalnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iJournalnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@seintrag", SqlDbType.VarChar, 2048, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEintrag))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dadatumzeit", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDatumzeit))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@ijournaleintragnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iJournaleintragnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iJournaleintragnr = scmCmdToExecute.Parameters.Item("@ijournaleintragnr").Value
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Journaleintrag_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsJournaleintrag::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Update method. This method will Update one existing row in the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iJournaleintragnr</LI>
|
||||
' /// <LI>iJournalnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sEintrag. May be SqlString.Null</LI>
|
||||
' /// <LI>daDatumzeit. May be SqlDateTime.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Update() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journaleintrag_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournaleintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournaleintragnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournalnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iJournalnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@seintrag", SqlDbType.VarChar, 2048, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEintrag))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dadatumzeit", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDatumzeit))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Journaleintrag_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsJournaleintrag::Update::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iJournaleintragnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Delete() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journaleintrag_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ijournaleintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournaleintragnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Journaleintrag_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsJournaleintrag::Delete::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iJournaleintragnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iJournaleintragnr</LI>
|
||||
' /// <LI>iJournalnr</LI>
|
||||
' /// <LI>sEintrag</LI>
|
||||
' /// <LI>daDatumzeit</LI>
|
||||
' /// </UL>
|
||||
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectOne() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journaleintrag_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("Journaleintrag")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@ijournaleintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iJournaleintragnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Journaleintrag_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iJournaleintragnr = New SqlInt32(CType(dtToReturn.Rows(0)("journaleintragnr"), Integer))
|
||||
If dtToReturn.Rows(0)("journalnr") Is System.DBNull.Value Then
|
||||
m_iJournalnr = SqlInt32.Null
|
||||
Else
|
||||
m_iJournalnr = New SqlInt32(CType(dtToReturn.Rows(0)("journalnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("eintrag") Is System.DBNull.Value Then
|
||||
m_sEintrag = SqlString.Null
|
||||
Else
|
||||
m_sEintrag = New SqlString(CType(dtToReturn.Rows(0)("eintrag"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("datumzeit") Is System.DBNull.Value Then
|
||||
m_daDatumzeit = SqlDateTime.Null
|
||||
Else
|
||||
m_daDatumzeit = New SqlDateTime(CType(dtToReturn.Rows(0)("datumzeit"), Date))
|
||||
End If
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsJournaleintrag::SelectOne::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Journaleintrag_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("Journaleintrag")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Journaleintrag_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsJournaleintrag::SelectAll::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public Property [iJournaleintragnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iJournaleintragnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iJournaleintragnrTmp As SqlInt32 = Value
|
||||
If iJournaleintragnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iJournaleintragnr", "iJournaleintragnr can't be NULL")
|
||||
End If
|
||||
m_iJournaleintragnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iJournalnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iJournalnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iJournalnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sEintrag]() As SqlString
|
||||
Get
|
||||
Return m_sEintrag
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sEintrag = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daDatumzeit]() As SqlDateTime
|
||||
Get
|
||||
Return m_daDatumzeit
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daDatumzeit = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
490
EDKB14WS/Backup/EDKB14WS/DB/clsKey_tabelle.vb
Normal file
490
EDKB14WS/Backup/EDKB14WS/DB/clsKey_tabelle.vb
Normal file
@@ -0,0 +1,490 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'key_tabelle'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Samstag, 7. Dezember 2002, 22:50:12
|
||||
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Data Access class for the table 'key_tabelle'.
|
||||
' /// </summary>
|
||||
Public Class clsKey_tabelle
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bAktiv As SqlBoolean
|
||||
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
|
||||
Private m_iMutierer, m_iKeynr, m_iKey_wert, m_iMandantnr As SqlInt32
|
||||
Private m_sBeschreibung 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>iKeynr</LI>
|
||||
' /// <LI>sBeschreibung</LI>
|
||||
' /// <LI>iKey_wert</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>
|
||||
' /// </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_key_tabelle_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikeynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKeynr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikey_wert", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKey_wert))
|
||||
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("@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_key_tabelle_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("clsKey_tabelle::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>iKeynr</LI>
|
||||
' /// <LI>sBeschreibung</LI>
|
||||
' /// <LI>iKey_wert</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>
|
||||
' /// </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_key_tabelle_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikeynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKeynr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikey_wert", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKey_wert))
|
||||
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("@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_key_tabelle_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("clsKey_tabelle::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>iKeynr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Public Overrides Function Delete() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_key_tabelle_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikeynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKeynr))
|
||||
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_key_tabelle_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("clsKey_tabelle::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>iKeynr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iKeynr</LI>
|
||||
' /// <LI>sBeschreibung</LI>
|
||||
' /// <LI>iKey_wert</LI>
|
||||
' /// <LI>iMandantnr</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>iMutierer</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_key_tabelle_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("key_tabelle")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@ikeynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKeynr))
|
||||
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_key_tabelle_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iKeynr = New SqlInt32(CType(dtToReturn.Rows(0)("keynr"), Integer))
|
||||
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("beschreibung"), String))
|
||||
m_iKey_wert = New SqlInt32(CType(dtToReturn.Rows(0)("key_wert"), 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
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsKey_tabelle::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>
|
||||
Public Overrides Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_key_tabelle_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("key_tabelle")
|
||||
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_key_tabelle_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("clsKey_tabelle::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 [iKeynr]() As SqlInt32
|
||||
Get
|
||||
Return m_iKeynr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iKeynrTmp As SqlInt32 = Value
|
||||
If iKeynrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iKeynr", "iKeynr can't be NULL")
|
||||
End If
|
||||
m_iKeynr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBeschreibung]() As SqlString
|
||||
Get
|
||||
Return m_sBeschreibung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sBeschreibungTmp As SqlString = Value
|
||||
If sBeschreibungTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sBeschreibung", "sBeschreibung can't be NULL")
|
||||
End If
|
||||
m_sBeschreibung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iKey_wert]() As SqlInt32
|
||||
Get
|
||||
Return m_iKey_wert
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iKey_wertTmp As SqlInt32 = Value
|
||||
If iKey_wertTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iKey_wert", "iKey_wert can't be NULL")
|
||||
End If
|
||||
m_iKey_wert = 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
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
910
EDKB14WS/Backup/EDKB14WS/DB/clsMitarbeiter.vb
Normal file
910
EDKB14WS/Backup/EDKB14WS/DB/clsMitarbeiter.vb
Normal 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 = 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_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 = 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_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>
|
||||
Public Overrides 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 = 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_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 = 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_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>
|
||||
Public Overrides 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 = 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_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
|
||||
104
EDKB14WS/Backup/EDKB14WS/DB/clsMyDokumentDaten.vb
Normal file
104
EDKB14WS/Backup/EDKB14WS/DB/clsMyDokumentDaten.vb
Normal file
@@ -0,0 +1,104 @@
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
Public Class clsMyDokumentDaten
|
||||
Inherits edokadb.clsVorlagenfeld
|
||||
|
||||
Public Function SelectTestdata(ByVal dokumenttypnr As Long) As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[temp_sp_vorlagenfeld_Select]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("vorlagenfeld")
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dokumenttypnr))
|
||||
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_vorlagenfeld_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("clsVorlagenfeld::SelectAll::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Select_IDVMakros(ByVal dokumenttypnr As Long) As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[sp_idvmakros_Select]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("vorlagenfeld")
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dokumenttypnr))
|
||||
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 'sp_idvmakros_select' 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("sp_idvmakros_select::SelectAll::Error occured." + ex.Message, ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
61
EDKB14WS/Backup/EDKB14WS/DB/clsMyKey_Tabelle.vb
Normal file
61
EDKB14WS/Backup/EDKB14WS/DB/clsMyKey_Tabelle.vb
Normal file
@@ -0,0 +1,61 @@
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
Namespace edokadb
|
||||
Public Class clsMyKey_Tabelle
|
||||
Inherits edokadb.clsKey_tabelle
|
||||
|
||||
Public Function get_dbkey(ByVal Tablename As String) As Long
|
||||
Dim m_dbkey As Long
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[sp_get_dbkey]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@Tablename", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, Tablename))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dbkey", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_dbkey))
|
||||
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.
|
||||
Try
|
||||
scmCmdToExecute.Connection.Open()
|
||||
Catch ex As Exception
|
||||
Finally
|
||||
End Try
|
||||
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_dbkey = scmCmdToExecute.Parameters.Item("@dbkey").Value
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
scmCmdToExecute.Connection.Close()
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'sp_get_dbkey' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return m_dbkey
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsKey_tabelle::get_dbkey::Error occured." + ex.Message, ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
75
EDKB14WS/Backup/EDKB14WS/DB/clsMyMitarbeiter.vb
Normal file
75
EDKB14WS/Backup/EDKB14WS/DB/clsMyMitarbeiter.vb
Normal file
@@ -0,0 +1,75 @@
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Security.Principal
|
||||
|
||||
|
||||
Namespace edokaDB
|
||||
Public Class clsMyMitarbeiter
|
||||
Inherits edokaDB.clsMitarbeiter
|
||||
|
||||
#Region "Deklarationen"
|
||||
Private m_xtgnummer As String
|
||||
|
||||
Property xtgnummer() As String
|
||||
Get
|
||||
Return m_xtgnummer
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_xtgnummer = Value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Public Function SelectWithTGNummer() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[sp_mitarbeiter_SelectWithTGNummer]"
|
||||
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("@stgnummer", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_xtgnummer))
|
||||
|
||||
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_mitarbeiter_SelectAllWithTGNummer' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
Globals.CurrentMitarbeiterdata = dtToReturn
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsMitarbeiter::SelectWithTGNummer::Error occured." + ex.Message, ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
174
EDKB14WS/Backup/EDKB14WS/DB/clsMyPartner.vb
Normal file
174
EDKB14WS/Backup/EDKB14WS/DB/clsMyPartner.vb
Normal file
@@ -0,0 +1,174 @@
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
Public Class clsMyPartner
|
||||
Public Function search_partner(ByVal query As String, ByVal anzahl As String, ByVal fnkt As Integer) As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
Dim table As String = "dbo.partner"
|
||||
scmCmdToExecute.CommandText = "dbo.[sp_partner_search]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("partner")
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = conn.scoDBConnection
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@query", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, query))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@table", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, table))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@anz", SqlDbType.VarChar, 10, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, anzahl))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@fnkt", SqlDbType.VarChar, 1, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, fnkt))
|
||||
scmCmdToExecute.Connection.Open()
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsMyPartner::sp_partner_search::Error occured." + ex.Message, ex)
|
||||
Finally
|
||||
scmCmdToExecute.Connection.Close()
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function search_doppelte_partner(ByVal query As String, ByVal table As String, ByVal fnkt As Integer) As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[sp_partner_search]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("partner")
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = conn.scoDBConnection
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@query", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, query))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@table", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, table))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@anz", SqlDbType.VarChar, 10, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 0))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@fnkt", SqlDbType.VarChar, 1, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, 4))
|
||||
scmCmdToExecute.Connection.Open()
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsMyPartner::sp_partner_search::Error occured." + ex.Message, ex)
|
||||
Finally
|
||||
scmCmdToExecute.Connection.Close()
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
Public Function Partner_Detail(ByVal nrpar00 As String) As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
Dim table As String = "dbo.partner"
|
||||
scmCmdToExecute.CommandText = "dbo.[sp_partner_detail]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("partner")
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = conn.scoDBConnection
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@nrpar00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, nrpar00))
|
||||
scmCmdToExecute.Connection.Open()
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsMyPartner::sp_partner_detail::Error occured." + ex.Message, ex)
|
||||
Finally
|
||||
scmCmdToExecute.Connection.Close()
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Partner_VV(ByVal nrpar00 As String) As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
Dim table As String = "dbo.partner"
|
||||
scmCmdToExecute.CommandText = "dbo.[sp_partner_vv]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("partner")
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = conn.scoDBConnection
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@nrpar00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, nrpar00))
|
||||
scmCmdToExecute.Connection.Open()
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsMyPartner::sp_partner_vv::Error occured." + ex.Message, ex)
|
||||
Finally
|
||||
scmCmdToExecute.Connection.Close()
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Partner_Gebdat(ByVal nrpar00 As String) As String
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
Dim table As String = "dbo.partner"
|
||||
scmCmdToExecute.CommandText = "dbo.[sp_partner_gebdat]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("partner")
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = conn.scoDBConnection
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@nrpar00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, nrpar00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@gebdat", SqlDbType.VarChar, 255, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, ""))
|
||||
scmCmdToExecute.Connection.Open()
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
|
||||
Return scmCmdToExecute.Parameters("@gebdat").Value
|
||||
Catch ex As Exception
|
||||
' MsgBox(ex.Message)
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
' Throw New Exception("clsMyPartner::sp_partner_vv::Error occured." + ex.Message, ex)
|
||||
Return ""
|
||||
Finally
|
||||
scmCmdToExecute.Connection.Close()
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Partner_Betreuer(ByVal nrpar00 As String) As String
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
Dim table As String = "dbo.partner"
|
||||
scmCmdToExecute.CommandText = "dbo.[sp_partner_betreuer]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("partner")
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = conn.scoDBConnection
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@nrpar00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, nrpar00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@betreuer", SqlDbType.VarChar, 255, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, ""))
|
||||
scmCmdToExecute.Connection.Open()
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
Return scmCmdToExecute.Parameters("@betreuer").Value
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsMyPartner::sp_partner_vv::Error occured." + ex.Message, ex)
|
||||
Return ""
|
||||
Finally
|
||||
scmCmdToExecute.Connection.Close()
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
dtToReturn.Dispose()
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
559
EDKB14WS/Backup/EDKB14WS/DB/clsOffice_Vorlage_Datei.vb
Normal file
559
EDKB14WS/Backup/EDKB14WS/DB/clsOffice_Vorlage_Datei.vb
Normal file
@@ -0,0 +1,559 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'Office_Vorlage_Datei'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 25. Februar 2004, 23:48:51
|
||||
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokaDB
|
||||
' /// <summary>
|
||||
' /// Purpose: Data Access class for the table 'Office_Vorlage_Datei'.
|
||||
' /// </summary>
|
||||
Public Class clsOffice_Vorlage_Datei
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bAktiv, m_bFreigegeben As SqlBoolean
|
||||
Private m_daFragabe_am, m_daUebernahme_produktion, m_daMutiert_am As SqlDateTime
|
||||
Private m_blobVorlage As SqlBinary
|
||||
Private m_iFreigabe_durch, m_iOffice_vorlage_dateinr, m_iOffice_vorlagenr, m_iMutierer As SqlInt32
|
||||
Private m_sDateiname As SqlString
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iOffice_vorlage_dateinr</LI>
|
||||
' /// <LI>iOffice_vorlagenr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>blobVorlage. May be SqlBinary.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bFreigegeben. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daFragabe_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iFreigabe_durch. May be SqlInt32.Null</LI>
|
||||
' /// <LI>daUebernahme_produktion. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>sDateiname. May be SqlString.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Office_Vorlage_Datei_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ioffice_vorlage_dateinr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iOffice_vorlage_dateinr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ioffice_vorlagenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iOffice_vorlagenr))
|
||||
Dim iLength As Integer = 0
|
||||
If Not m_blobVorlage.IsNull Then
|
||||
iLength = m_blobVorlage.Length
|
||||
End If
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobvorlage", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobVorlage))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
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("@bfreigegeben", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bFreigegeben))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dafragabe_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daFragabe_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifreigabe_durch", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFreigabe_durch))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dauebernahme_produktion", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daUebernahme_produktion))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdateiname", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateiname))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Office_Vorlage_Datei_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_Datei::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_vorlage_dateinr</LI>
|
||||
' /// <LI>iOffice_vorlagenr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>blobVorlage. May be SqlBinary.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bFreigegeben. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daFragabe_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iFreigabe_durch. May be SqlInt32.Null</LI>
|
||||
' /// <LI>daUebernahme_produktion. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>sDateiname. May be SqlString.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Update() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Office_Vorlage_Datei_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ioffice_vorlage_dateinr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iOffice_vorlage_dateinr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ioffice_vorlagenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iOffice_vorlagenr))
|
||||
Dim iLength As Integer = 0
|
||||
If Not m_blobVorlage.IsNull Then
|
||||
iLength = m_blobVorlage.Length
|
||||
End If
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobvorlage", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobVorlage))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
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("@bfreigegeben", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bFreigegeben))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dafragabe_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daFragabe_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifreigabe_durch", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFreigabe_durch))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dauebernahme_produktion", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daUebernahme_produktion))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdateiname", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateiname))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Office_Vorlage_Datei_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_Datei::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_vorlage_dateinr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Public Overrides Function Delete() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Office_Vorlage_Datei_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ioffice_vorlage_dateinr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iOffice_vorlage_dateinr))
|
||||
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_Office_Vorlage_Datei_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_Datei::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_vorlage_dateinr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iOffice_vorlage_dateinr</LI>
|
||||
' /// <LI>iOffice_vorlagenr</LI>
|
||||
' /// <LI>blobVorlage</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>iMutierer</LI>
|
||||
' /// <LI>bFreigegeben</LI>
|
||||
' /// <LI>daFragabe_am</LI>
|
||||
' /// <LI>iFreigabe_durch</LI>
|
||||
' /// <LI>daUebernahme_produktion</LI>
|
||||
' /// <LI>sDateiname</LI>
|
||||
' /// </UL>
|
||||
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectOne() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Office_Vorlage_Datei_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("Office_Vorlage_Datei")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@ioffice_vorlage_dateinr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iOffice_vorlage_dateinr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Office_Vorlage_Datei_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iOffice_vorlage_dateinr = New SqlInt32(CType(dtToReturn.Rows(0)("office_vorlage_dateinr"), Integer))
|
||||
If dtToReturn.Rows(0)("office_vorlagenr") Is System.DBNull.Value Then
|
||||
m_iOffice_vorlagenr = SqlInt32.Null
|
||||
Else
|
||||
m_iOffice_vorlagenr = New SqlInt32(CType(dtToReturn.Rows(0)("office_vorlagenr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("vorlage") Is System.DBNull.Value Then
|
||||
m_blobVorlage = SqlBinary.Null
|
||||
Else
|
||||
m_blobVorlage = New SqlBinary(CType(dtToReturn.Rows(0)("vorlage"), Byte()))
|
||||
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)("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)("freigegeben") Is System.DBNull.Value Then
|
||||
m_bFreigegeben = SqlBoolean.Null
|
||||
Else
|
||||
m_bFreigegeben = New SqlBoolean(CType(dtToReturn.Rows(0)("freigegeben"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("fragabe_am") Is System.DBNull.Value Then
|
||||
m_daFragabe_am = SqlDateTime.Null
|
||||
Else
|
||||
m_daFragabe_am = New SqlDateTime(CType(dtToReturn.Rows(0)("fragabe_am"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("freigabe_durch") Is System.DBNull.Value Then
|
||||
m_iFreigabe_durch = SqlInt32.Null
|
||||
Else
|
||||
m_iFreigabe_durch = New SqlInt32(CType(dtToReturn.Rows(0)("freigabe_durch"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("uebernahme_produktion") Is System.DBNull.Value Then
|
||||
m_daUebernahme_produktion = SqlDateTime.Null
|
||||
Else
|
||||
m_daUebernahme_produktion = New SqlDateTime(CType(dtToReturn.Rows(0)("uebernahme_produktion"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("dateiname") Is System.DBNull.Value Then
|
||||
m_sDateiname = SqlString.Null
|
||||
Else
|
||||
m_sDateiname = New SqlString(CType(dtToReturn.Rows(0)("dateiname"), String))
|
||||
End If
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsOffice_Vorlage_Datei::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>
|
||||
Public Overrides Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_Office_Vorlage_Datei_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("Office_Vorlage_Datei")
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_Office_Vorlage_Datei_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_Datei::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_vorlage_dateinr]() As SqlInt32
|
||||
Get
|
||||
Return m_iOffice_vorlage_dateinr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iOffice_vorlage_dateinrTmp As SqlInt32 = Value
|
||||
If iOffice_vorlage_dateinrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iOffice_vorlage_dateinr", "iOffice_vorlage_dateinr can't be NULL")
|
||||
End If
|
||||
m_iOffice_vorlage_dateinr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iOffice_vorlagenr]() As SqlInt32
|
||||
Get
|
||||
Return m_iOffice_vorlagenr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iOffice_vorlagenr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [blobVorlage]() As SqlBinary
|
||||
Get
|
||||
Return m_blobVorlage
|
||||
End Get
|
||||
Set(ByVal Value As SqlBinary)
|
||||
m_blobVorlage = 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 [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 [bFreigegeben]() As SqlBoolean
|
||||
Get
|
||||
Return m_bFreigegeben
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bFreigegeben = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daFragabe_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daFragabe_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daFragabe_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iFreigabe_durch]() As SqlInt32
|
||||
Get
|
||||
Return m_iFreigabe_durch
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iFreigabe_durch = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daUebernahme_produktion]() As SqlDateTime
|
||||
Get
|
||||
Return m_daUebernahme_produktion
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daUebernahme_produktion = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDateiname]() As SqlString
|
||||
Get
|
||||
Return m_sDateiname
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDateiname = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
850
EDKB14WS/Backup/EDKB14WS/DB/clsOffice_vorlage.vb
Normal file
850
EDKB14WS/Backup/EDKB14WS/DB/clsOffice_vorlage.vb
Normal 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 = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_office_vorlage_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsOffice_vorlage::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: 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 = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_office_vorlage_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>
|
||||
Public Overrides 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 = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_office_vorlage_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 = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_office_vorlage_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>
|
||||
Public Overrides Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_office_vorlage_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("office_vorlage")
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_office_vorlage_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsOffice_vorlage::SelectAll::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public Property [iOffice_vorlagenr]() As SqlInt32
|
||||
Get
|
||||
Return m_iOffice_vorlagenr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iOffice_vorlagenrTmp As SqlInt32 = Value
|
||||
If iOffice_vorlagenrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iOffice_vorlagenr", "iOffice_vorlagenr can't be NULL")
|
||||
End If
|
||||
m_iOffice_vorlagenr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBezeichnung]() As SqlString
|
||||
Get
|
||||
Return m_sBezeichnung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBezeichnung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBeschreibung]() As SqlString
|
||||
Get
|
||||
Return m_sBeschreibung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBeschreibung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iVorlageid]() As SqlInt32
|
||||
Get
|
||||
Return m_iVorlageid
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iVorlageid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sVorlagename]() As SqlString
|
||||
Get
|
||||
Return m_sVorlagename
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sVorlagename = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sPrefix_dokumentname]() As SqlString
|
||||
Get
|
||||
Return m_sPrefix_dokumentname
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sPrefix_dokumentname = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bIdv_vorlage]() As SqlBoolean
|
||||
Get
|
||||
Return m_bIdv_vorlage
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
Dim bIdv_vorlageTmp As SqlBoolean = Value
|
||||
If bIdv_vorlageTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("bIdv_vorlage", "bIdv_vorlage can't be NULL")
|
||||
End If
|
||||
m_bIdv_vorlage = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sIdv_id]() As SqlString
|
||||
Get
|
||||
Return m_sIdv_id
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sIdv_id = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sOffice_vorlage]() As SqlString
|
||||
Get
|
||||
Return m_sOffice_vorlage
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sOffice_vorlage = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bAbsender_ersteller]() As SqlBoolean
|
||||
Get
|
||||
Return m_bAbsender_ersteller
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bAbsender_ersteller = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bIdv_nativ]() As SqlBoolean
|
||||
Get
|
||||
Return m_bIdv_nativ
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
Dim bIdv_nativTmp As SqlBoolean = Value
|
||||
If bIdv_nativTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("bIdv_nativ", "bIdv_nativ can't be NULL")
|
||||
End If
|
||||
m_bIdv_nativ = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bDokument_geschuetzt]() As SqlBoolean
|
||||
Get
|
||||
Return m_bDokument_geschuetzt
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bDokument_geschuetzt = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bKopfzeile_generieren]() As SqlBoolean
|
||||
Get
|
||||
Return m_bKopfzeile_generieren
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
Dim bKopfzeile_generierenTmp As SqlBoolean = Value
|
||||
If bKopfzeile_generierenTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("bKopfzeile_generieren", "bKopfzeile_generieren can't be NULL")
|
||||
End If
|
||||
m_bKopfzeile_generieren = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iKlassifizierung]() As SqlInt32
|
||||
Get
|
||||
Return m_iKlassifizierung
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iKlassifizierung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iBcpt]() As SqlInt32
|
||||
Get
|
||||
Return m_iBcpt
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iBcptTmp As SqlInt32 = Value
|
||||
If iBcptTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iBcpt", "iBcpt can't be NULL")
|
||||
End If
|
||||
m_iBcpt = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iBcpl]() As SqlInt32
|
||||
Get
|
||||
Return m_iBcpl
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iBcpl = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iBcw]() As SqlInt32
|
||||
Get
|
||||
Return m_iBcw
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iBcwTmp As SqlInt32 = Value
|
||||
If iBcwTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iBcw", "iBcw can't be NULL")
|
||||
End If
|
||||
m_iBcw = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iBch]() As SqlInt32
|
||||
Get
|
||||
Return m_iBch
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iBchTmp As SqlInt32 = Value
|
||||
If iBchTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iBch", "iBch can't be NULL")
|
||||
End If
|
||||
m_iBch = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bBchorizontal]() As SqlBoolean
|
||||
Get
|
||||
Return m_bBchorizontal
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bBchorizontal = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iMandantnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iMandantnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iMandantnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bAktiv]() As SqlBoolean
|
||||
Get
|
||||
Return m_bAktiv
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daErstellt_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daErstellt_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daErstellt_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daMutiert_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daMutiert_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daMutiert_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iMutierer]() As SqlInt32
|
||||
Get
|
||||
Return m_iMutierer
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iMutierer = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iAnwendungnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iAnwendungnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iAnwendungnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iOwner]() As SqlInt32
|
||||
Get
|
||||
Return m_iOwner
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iOwner = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
1121
EDKB14WS/Backup/EDKB14WS/DB/clsPartner.vb
Normal file
1121
EDKB14WS/Backup/EDKB14WS/DB/clsPartner.vb
Normal file
File diff suppressed because it is too large
Load Diff
874
EDKB14WS/Backup/EDKB14WS/DB/clsVorlagenfeld.vb
Normal file
874
EDKB14WS/Backup/EDKB14WS/DB/clsVorlagenfeld.vb
Normal file
@@ -0,0 +1,874 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'vorlagenfeld'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Donnerstag, 9. Januar 2003, 21:07:47
|
||||
' // 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 'vorlagenfeld'.
|
||||
' /// </summary>
|
||||
Public Class clsVorlagenfeld
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bEinstiegsmakro, m_bAusstiegsmakro, m_bAktiv As SqlBoolean
|
||||
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
|
||||
Private m_iVorlagenfeldnr, m_iMandantnr, m_iDokumenttypnr, m_iDokumenttypnrOld, m_iMutierer, m_iVorlagenfeldregelnr, m_iVorlagenfeldregelnrOld As SqlInt32
|
||||
Private m_sBeginntextmarke, m_sFeldname, m_sTestdaten, m_sEndetextmarke 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>iVorlagenfeldnr</LI>
|
||||
' /// <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iVorlagenfeldregelnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sFeldname. May be SqlString.Null</LI>
|
||||
' /// <LI>sBeginntextmarke. May be SqlString.Null</LI>
|
||||
' /// <LI>sEndetextmarke. May be SqlString.Null</LI>
|
||||
' /// <LI>bEinstiegsmakro. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bAusstiegsmakro. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>sTestdaten. May be SqlString.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>
|
||||
' /// </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_vorlagenfeld_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ivorlagenfeldnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iVorlagenfeldnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ivorlagenfeldregelnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVorlagenfeldregelnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfeldname", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFeldname))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeginntextmarke", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeginntextmarke))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sendetextmarke", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEndetextmarke))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@beinstiegsmakro", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bEinstiegsmakro))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bausstiegsmakro", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAusstiegsmakro))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stestdaten", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTestdaten))
|
||||
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("@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_vorlagenfeld_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("clsVorlagenfeld::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>iVorlagenfeldnr</LI>
|
||||
' /// <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iVorlagenfeldregelnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sFeldname. May be SqlString.Null</LI>
|
||||
' /// <LI>sBeginntextmarke. May be SqlString.Null</LI>
|
||||
' /// <LI>sEndetextmarke. May be SqlString.Null</LI>
|
||||
' /// <LI>bEinstiegsmakro. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bAusstiegsmakro. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>sTestdaten. May be SqlString.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>
|
||||
' /// </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_vorlagenfeld_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ivorlagenfeldnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iVorlagenfeldnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ivorlagenfeldregelnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVorlagenfeldregelnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfeldname", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFeldname))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeginntextmarke", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeginntextmarke))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sendetextmarke", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEndetextmarke))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@beinstiegsmakro", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bEinstiegsmakro))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bausstiegsmakro", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAusstiegsmakro))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stestdaten", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTestdaten))
|
||||
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("@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_vorlagenfeld_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("clsVorlagenfeld::Update::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 for updating one or more rows using the Foreign Key 'dokumenttypnr.
|
||||
' /// This method will Update one or more existing rows in the database. It will reset the field 'dokumenttypnr' in
|
||||
' /// all rows which have as value for this field the value as set in property 'iDokumenttypnrOld' to
|
||||
' /// the value as set in property 'iDokumenttypnr'.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iDokumenttypnrOld. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Public Function UpdateAllWdokumenttypnrLogic() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_vorlagenfeld_UpdateAllWdokumenttypnrLogic]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnrOld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnrOld))
|
||||
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_vorlagenfeld_UpdateAllWdokumenttypnrLogic' 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("clsVorlagenfeld::UpdateAllWdokumenttypnrLogic::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 for updating one or more rows using the Foreign Key 'vorlagenfeldregelnr.
|
||||
' /// This method will Update one or more existing rows in the database. It will reset the field 'vorlagenfeldregelnr' in
|
||||
' /// all rows which have as value for this field the value as set in property 'iVorlagenfeldregelnrOld' to
|
||||
' /// the value as set in property 'iVorlagenfeldregelnr'.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iVorlagenfeldregelnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iVorlagenfeldregelnrOld. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Public Function UpdateAllWvorlagenfeldregelnrLogic() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_vorlagenfeld_UpdateAllWvorlagenfeldregelnrLogic]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@ivorlagenfeldregelnr", SqlDbType.Int, 4, ParameterDirection.Input, false, 10, 0, "", DataRowVersion.Proposed, m_iVorlagenfeldregelnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@ivorlagenfeldregelnrOld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVorlagenfeldregelnrOld))
|
||||
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_vorlagenfeld_UpdateAllWvorlagenfeldregelnrLogic' 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("clsVorlagenfeld::UpdateAllWvorlagenfeldregelnrLogic::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>iVorlagenfeldnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Public Overrides Function Delete() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_vorlagenfeld_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ivorlagenfeldnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iVorlagenfeldnr))
|
||||
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_vorlagenfeld_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("clsVorlagenfeld::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>iVorlagenfeldnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iVorlagenfeldnr</LI>
|
||||
' /// <LI>iDokumenttypnr</LI>
|
||||
' /// <LI>iVorlagenfeldregelnr</LI>
|
||||
' /// <LI>sFeldname</LI>
|
||||
' /// <LI>sBeginntextmarke</LI>
|
||||
' /// <LI>sEndetextmarke</LI>
|
||||
' /// <LI>bEinstiegsmakro</LI>
|
||||
' /// <LI>bAusstiegsmakro</LI>
|
||||
' /// <LI>sTestdaten</LI>
|
||||
' /// <LI>iMandantnr</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>iMutierer</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_vorlagenfeld_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("vorlagenfeld")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@ivorlagenfeldnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iVorlagenfeldnr))
|
||||
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_vorlagenfeld_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iVorlagenfeldnr = New SqlInt32(CType(dtToReturn.Rows(0)("vorlagenfeldnr"), Integer))
|
||||
If dtToReturn.Rows(0)("dokumenttypnr") Is System.DBNull.Value Then
|
||||
m_iDokumenttypnr = SqlInt32.Null
|
||||
Else
|
||||
m_iDokumenttypnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumenttypnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("vorlagenfeldregelnr") Is System.DBNull.Value Then
|
||||
m_iVorlagenfeldregelnr = SqlInt32.Null
|
||||
Else
|
||||
m_iVorlagenfeldregelnr = New SqlInt32(CType(dtToReturn.Rows(0)("vorlagenfeldregelnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("feldname") Is System.DBNull.Value Then
|
||||
m_sFeldname = SqlString.Null
|
||||
Else
|
||||
m_sFeldname = New SqlString(CType(dtToReturn.Rows(0)("feldname"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("beginntextmarke") Is System.DBNull.Value Then
|
||||
m_sBeginntextmarke = SqlString.Null
|
||||
Else
|
||||
m_sBeginntextmarke = New SqlString(CType(dtToReturn.Rows(0)("beginntextmarke"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("endetextmarke") Is System.DBNull.Value Then
|
||||
m_sEndetextmarke = SqlString.Null
|
||||
Else
|
||||
m_sEndetextmarke = New SqlString(CType(dtToReturn.Rows(0)("endetextmarke"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("einstiegsmakro") Is System.DBNull.Value Then
|
||||
m_bEinstiegsmakro = SqlBoolean.Null
|
||||
Else
|
||||
m_bEinstiegsmakro = New SqlBoolean(CType(dtToReturn.Rows(0)("einstiegsmakro"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("ausstiegsmakro") Is System.DBNull.Value Then
|
||||
m_bAusstiegsmakro = SqlBoolean.Null
|
||||
Else
|
||||
m_bAusstiegsmakro = New SqlBoolean(CType(dtToReturn.Rows(0)("ausstiegsmakro"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("testdaten") Is System.DBNull.Value Then
|
||||
m_sTestdaten = SqlString.Null
|
||||
Else
|
||||
m_sTestdaten = New SqlString(CType(dtToReturn.Rows(0)("testdaten"), String))
|
||||
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
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsVorlagenfeld::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>
|
||||
Public Overrides Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_vorlagenfeld_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("vorlagenfeld")
|
||||
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_vorlagenfeld_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("clsVorlagenfeld::SelectAll::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: Select method for a foreign key. This method will Select one or more rows from the database, based on the Foreign Key 'dokumenttypnr'
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Public Function SelectAllWdokumenttypnrLogic() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_vorlagenfeld_SelectAllWdokumenttypnrLogic]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("vorlagenfeld")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
|
||||
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_vorlagenfeld_SelectAllWdokumenttypnrLogic' 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("clsVorlagenfeld::SelectAllWdokumenttypnrLogic::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: Select method for a foreign key. This method will Select one or more rows from the database, based on the Foreign Key 'vorlagenfeldregelnr'
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iVorlagenfeldregelnr. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Public Function SelectAllWvorlagenfeldregelnrLogic() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_vorlagenfeld_SelectAllWvorlagenfeldregelnrLogic]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("vorlagenfeld")
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ivorlagenfeldregelnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVorlagenfeldregelnr))
|
||||
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_vorlagenfeld_SelectAllWvorlagenfeldregelnrLogic' 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("clsVorlagenfeld::SelectAllWvorlagenfeldregelnrLogic::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 [iVorlagenfeldnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iVorlagenfeldnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iVorlagenfeldnrTmp As SqlInt32 = Value
|
||||
If iVorlagenfeldnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iVorlagenfeldnr", "iVorlagenfeldnr can't be NULL")
|
||||
End If
|
||||
m_iVorlagenfeldnr = 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 [iDokumenttypnrOld]() As SqlInt32
|
||||
Get
|
||||
Return m_iDokumenttypnrOld
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iDokumenttypnrOld = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iVorlagenfeldregelnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iVorlagenfeldregelnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iVorlagenfeldregelnr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property [iVorlagenfeldregelnrOld]() As SqlInt32
|
||||
Get
|
||||
Return m_iVorlagenfeldregelnrOld
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iVorlagenfeldregelnrOld = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sFeldname]() As SqlString
|
||||
Get
|
||||
Return m_sFeldname
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sFeldname = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBeginntextmarke]() As SqlString
|
||||
Get
|
||||
Return m_sBeginntextmarke
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBeginntextmarke = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sEndetextmarke]() As SqlString
|
||||
Get
|
||||
Return m_sEndetextmarke
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sEndetextmarke = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bEinstiegsmakro]() As SqlBoolean
|
||||
Get
|
||||
Return m_bEinstiegsmakro
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bEinstiegsmakro = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bAusstiegsmakro]() As SqlBoolean
|
||||
Get
|
||||
Return m_bAusstiegsmakro
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bAusstiegsmakro = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sTestdaten]() As SqlString
|
||||
Get
|
||||
Return m_sTestdaten
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sTestdaten = 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
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
528
EDKB14WS/Backup/EDKB14WS/DB/clsVv.vb
Normal file
528
EDKB14WS/Backup/EDKB14WS/DB/clsVv.vb
Normal file
@@ -0,0 +1,528 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'VV'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 17. September 2003, 00:12:40
|
||||
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Data Access class for the table 'VV'.
|
||||
' /// </summary>
|
||||
Public Class clsVV
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_iNRPRD00, m_iNRVBS00, m_iNRSPR00, m_iNRVVG00, m_iNRPAR00 As SqlInt32
|
||||
Private m_sNAVVG00, m_sSAREC00, m_sBEPRDLG, m_sTXRBK00, m_sNEVVG00 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>iNRVVG00</LI>
|
||||
' /// <LI>iNRPAR00. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iNRSPR00. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sBEPRDLG. May be SqlString.Null</LI>
|
||||
' /// <LI>iNRPRD00. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sTXRBK00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNEVVG00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNAVVG00. May be SqlString.Null</LI>
|
||||
' /// <LI>iNRVBS00. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sSAREC00. May be SqlString.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_VV_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRVVG00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRVVG00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPAR00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRPAR00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRSPR00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRSPR00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEPRDLG", SqlDbType.NVarChar, 35, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEPRDLG))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPRD00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRPRD00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sTXRBK00", SqlDbType.VarChar, 35, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTXRBK00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNEVVG00", SqlDbType.VarChar, 16, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNEVVG00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNAVVG00", SqlDbType.VarChar, 16, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNAVVG00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRVBS00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRVBS00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAREC00", SqlDbType.VarChar, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSAREC00))
|
||||
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_VV_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("clsVV::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>iNRVVG00</LI>
|
||||
' /// <LI>iNRPAR00. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iNRSPR00. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sBEPRDLG. May be SqlString.Null</LI>
|
||||
' /// <LI>iNRPRD00. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sTXRBK00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNEVVG00. May be SqlString.Null</LI>
|
||||
' /// <LI>sNAVVG00. May be SqlString.Null</LI>
|
||||
' /// <LI>iNRVBS00. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sSAREC00. May be SqlString.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Update() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_VV_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRVVG00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRVVG00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPAR00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRPAR00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRSPR00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRSPR00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEPRDLG", SqlDbType.NVarChar, 35, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEPRDLG))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPRD00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRPRD00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sTXRBK00", SqlDbType.VarChar, 35, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTXRBK00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNEVVG00", SqlDbType.VarChar, 16, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNEVVG00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNAVVG00", SqlDbType.VarChar, 16, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNAVVG00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRVBS00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRVBS00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAREC00", SqlDbType.VarChar, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSAREC00))
|
||||
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_VV_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("clsVV::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>iNRVVG00</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Public Overrides Function Delete() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_VV_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRVVG00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRVVG00))
|
||||
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_VV_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("clsVV::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>iNRVVG00</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iNRVVG00</LI>
|
||||
' /// <LI>iNRPAR00</LI>
|
||||
' /// <LI>iNRSPR00</LI>
|
||||
' /// <LI>sBEPRDLG</LI>
|
||||
' /// <LI>iNRPRD00</LI>
|
||||
' /// <LI>sTXRBK00</LI>
|
||||
' /// <LI>sNEVVG00</LI>
|
||||
' /// <LI>sNAVVG00</LI>
|
||||
' /// <LI>iNRVBS00</LI>
|
||||
' /// <LI>sSAREC00</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_VV_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("VV")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iNRVVG00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRVVG00))
|
||||
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_VV_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iNRVVG00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRVVG00"), Integer))
|
||||
If dtToReturn.Rows(0)("NRPAR00") Is System.DBNull.Value Then
|
||||
m_iNRPAR00 = SqlInt32.Null
|
||||
Else
|
||||
m_iNRPAR00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRPAR00"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("NRSPR00") Is System.DBNull.Value Then
|
||||
m_iNRSPR00 = SqlInt32.Null
|
||||
Else
|
||||
m_iNRSPR00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRSPR00"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("BEPRDLG") Is System.DBNull.Value Then
|
||||
m_sBEPRDLG = SqlString.Null
|
||||
Else
|
||||
m_sBEPRDLG = New SqlString(CType(dtToReturn.Rows(0)("BEPRDLG"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("NRPRD00") Is System.DBNull.Value Then
|
||||
m_iNRPRD00 = SqlInt32.Null
|
||||
Else
|
||||
m_iNRPRD00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRPRD00"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("TXRBK00") Is System.DBNull.Value Then
|
||||
m_sTXRBK00 = SqlString.Null
|
||||
Else
|
||||
m_sTXRBK00 = New SqlString(CType(dtToReturn.Rows(0)("TXRBK00"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("NEVVG00") Is System.DBNull.Value Then
|
||||
m_sNEVVG00 = SqlString.Null
|
||||
Else
|
||||
m_sNEVVG00 = New SqlString(CType(dtToReturn.Rows(0)("NEVVG00"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("NAVVG00") Is System.DBNull.Value Then
|
||||
m_sNAVVG00 = SqlString.Null
|
||||
Else
|
||||
m_sNAVVG00 = New SqlString(CType(dtToReturn.Rows(0)("NAVVG00"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("NRVBS00") Is System.DBNull.Value Then
|
||||
m_iNRVBS00 = SqlInt32.Null
|
||||
Else
|
||||
m_iNRVBS00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRVBS00"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("SAREC00") Is System.DBNull.Value Then
|
||||
m_sSAREC00 = SqlString.Null
|
||||
Else
|
||||
m_sSAREC00 = New SqlString(CType(dtToReturn.Rows(0)("SAREC00"), String))
|
||||
End If
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsVV::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>
|
||||
Public Overrides Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_VV_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("VV")
|
||||
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_VV_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("clsVV::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 [iNRVVG00]() As SqlInt32
|
||||
Get
|
||||
Return m_iNRVVG00
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iNRVVG00Tmp As SqlInt32 = Value
|
||||
If iNRVVG00Tmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iNRVVG00", "iNRVVG00 can't be NULL")
|
||||
End If
|
||||
m_iNRVVG00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iNRPAR00]() As SqlInt32
|
||||
Get
|
||||
Return m_iNRPAR00
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iNRPAR00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iNRSPR00]() As SqlInt32
|
||||
Get
|
||||
Return m_iNRSPR00
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iNRSPR00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBEPRDLG]() As SqlString
|
||||
Get
|
||||
Return m_sBEPRDLG
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBEPRDLG = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iNRPRD00]() As SqlInt32
|
||||
Get
|
||||
Return m_iNRPRD00
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iNRPRD00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sTXRBK00]() As SqlString
|
||||
Get
|
||||
Return m_sTXRBK00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sTXRBK00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNEVVG00]() As SqlString
|
||||
Get
|
||||
Return m_sNEVVG00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNEVVG00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNAVVG00]() As SqlString
|
||||
Get
|
||||
Return m_sNAVVG00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sNAVVG00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iNRVBS00]() As SqlInt32
|
||||
Get
|
||||
Return m_iNRVBS00
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iNRVBS00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sSAREC00]() As SqlString
|
||||
Get
|
||||
Return m_sSAREC00
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sSAREC00 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
169
EDKB14WS/Backup/EDKB14WS/EDKB14WS.vbproj
Normal file
169
EDKB14WS/Backup/EDKB14WS/EDKB14WS.vbproj
Normal file
@@ -0,0 +1,169 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{F2551862-60EB-4134-8A62-4455B92F138F}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>EDKB14WS.Service1</StartupObject>
|
||||
<RootNamespace>EDKB14WS</RootNamespace>
|
||||
<AssemblyName>EDKB14WS</AssemblyName>
|
||||
<MyType>Console</MyType>
|
||||
<SignManifests>false</SignManifests>
|
||||
<TargetZone>LocalIntranet</TargetZone>
|
||||
<GenerateManifests>false</GenerateManifests>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>EDKB14WS.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>EDKB14WS.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Interop.Acrobat, Version=1.0.0.0, Culture=neutral">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>bin\Debug\Interop.Acrobat.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Interop.ACRODISTXLib, Version=1.0.0.0, Culture=neutral">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>bin\Debug\Interop.ACRODISTXLib.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="Microsoft.Office.Tools.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Oracle.DataAccess, Version=2.111.7.20, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=x86">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>bin\Debug\Oracle.DataAccess.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DB\clsConnectionProvider.vb" />
|
||||
<Compile Include="DB\clsDBInteractionBase.vb" />
|
||||
<Compile Include="DB\clsDokument.vb" />
|
||||
<Compile Include="DB\clsDokumenttyp.vb" />
|
||||
<Compile Include="DB\clsJournaleintrag.vb" />
|
||||
<Compile Include="DB\clsKey_tabelle.vb" />
|
||||
<Compile Include="DB\clsMitarbeiter.vb" />
|
||||
<Compile Include="DB\clsMyDokumentDaten.vb" />
|
||||
<Compile Include="DB\clsMyKey_Tabelle.vb" />
|
||||
<Compile Include="DB\clsMyMitarbeiter.vb" />
|
||||
<Compile Include="DB\clsMyPartner.vb" />
|
||||
<Compile Include="DB\clsOffice_vorlage.vb" />
|
||||
<Compile Include="DB\clsOffice_Vorlage_Datei.vb" />
|
||||
<Compile Include="DB\clsPartner.vb" />
|
||||
<Compile Include="DB\clsVorlagenfeld.vb" />
|
||||
<Compile Include="DB\clsVv.vb" />
|
||||
<Compile Include="Globals.vb" />
|
||||
<Compile Include="Klassen\clsImportdata.vb" />
|
||||
<Compile Include="Klassen\DivFrnkt.vb" />
|
||||
<Compile Include="Klassen\Log.vb" />
|
||||
<Compile Include="Klassen\Parameters.vb" />
|
||||
<Compile Include="ModMain.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProjectInstaller.Designer.vb">
|
||||
<DependentUpon>ProjectInstaller.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProjectInstaller.vb">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Service1.vb">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Service1.Designer.vb">
|
||||
<DependentUpon>Service1.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ProjectInstaller.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>ProjectInstaller.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Service1.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>Service1.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BaseApplicationManifest Include="My Project\app.manifest" />
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<COMReference Include="Microsoft.Office.Core">
|
||||
<Guid>{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}</Guid>
|
||||
<VersionMajor>2</VersionMajor>
|
||||
<VersionMinor>5</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>primary</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
<Private>True</Private>
|
||||
</COMReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
16
EDKB14WS/Backup/EDKB14WS/EDKB14WS.vbproj.user
Normal file
16
EDKB14WS/Backup/EDKB14WS/EDKB14WS.vbproj.user
Normal file
@@ -0,0 +1,16 @@
|
||||
<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>
|
||||
</Project>
|
||||
70
EDKB14WS/Backup/EDKB14WS/Globals.vb
Normal file
70
EDKB14WS/Backup/EDKB14WS/Globals.vb
Normal file
@@ -0,0 +1,70 @@
|
||||
'*
|
||||
' 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
|
||||
|
||||
#Region "Deklarationen"
|
||||
Public Param As Parameters
|
||||
Public DivFnkt As New clsDivFnkt
|
||||
|
||||
Public Applikationsdaten As DataTable
|
||||
Public AppldataRow As Integer
|
||||
|
||||
|
||||
Public sConnectionString As String
|
||||
Public conn As New edokadb.clsConnectionProvider()
|
||||
Public connJournale As New edokadb.clsConnectionProvider
|
||||
|
||||
Public CurrentMitarbeiterdata As New DataTable()
|
||||
|
||||
Public profilnr As Integer
|
||||
Public TGNummer As String
|
||||
|
||||
|
||||
Public LogEntry As Log
|
||||
|
||||
Public LogData As New DataTable
|
||||
Public Startzeit As Date
|
||||
Public Endzeit As Date
|
||||
|
||||
#End Region
|
||||
|
||||
Public Function In_Runtime() As Boolean
|
||||
If Endzeit.ToString("t") < Startzeit.ToString("t") Then
|
||||
If Now.ToString("t") > Startzeit.ToString("t") Or Now.ToString("t") < Endzeit.ToString("t") Then Return True
|
||||
Else
|
||||
If Now.ToString("t") > Startzeit.ToString("t") And Now.ToString("t") < Endzeit.ToString("t") Then Return True
|
||||
End If
|
||||
Return True
|
||||
Return False
|
||||
End Function
|
||||
Public Function ApplicationPath() As String
|
||||
'Return Path.GetDirectoryName([Assembly].GetExecutingAssembly().Location)
|
||||
Return Path.GetDirectoryName([Assembly].GetEntryAssembly().Location) + "\"
|
||||
End Function
|
||||
|
||||
#Region "Syslog"
|
||||
|
||||
Dim EVLog As New EventLog("Log_EDKB14")
|
||||
|
||||
Public PrintLogType As EventLogEntryType
|
||||
|
||||
Public Sub PrintLog(ByVal message As String, Optional ByVal eventmessage As EventLogEntryType = EventLogEntryType.Information)
|
||||
If Not EventLog.SourceExists("EDKB14") Then
|
||||
EventLog.CreateEventSource("EDKB14", "EDKB14 Log")
|
||||
End If
|
||||
EVLog.Source = "EDKB14 Log"
|
||||
EventLog.WriteEntry(EVLog.Source, message, eventmessage)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Module
|
||||
41
EDKB14WS/Backup/EDKB14WS/Klassen/DivFrnkt.vb
Normal file
41
EDKB14WS/Backup/EDKB14WS/Klassen/DivFrnkt.vb
Normal file
@@ -0,0 +1,41 @@
|
||||
Imports System.IO
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Reflection
|
||||
|
||||
Public Class clsDivFnkt
|
||||
|
||||
#Region "Deklarationen"
|
||||
Dim clsjournaleintrag As New edokaDB.clsJournaleintrag
|
||||
|
||||
Public Enum Enum_InfoTyp
|
||||
Keine = 0
|
||||
Information = 1
|
||||
Warnung = 2
|
||||
Fehler = 3
|
||||
End Enum
|
||||
|
||||
#End Region
|
||||
|
||||
Public Sub InsertJournale(ByVal Message As String, ByVal sTyp As Enum_InfoTyp)
|
||||
Try
|
||||
|
||||
If sTyp <> Enum_InfoTyp.Keine Then
|
||||
End If
|
||||
clsjournaleintrag.iJournalnr = New SqlInt32(CType(-3, Int32))
|
||||
clsjournaleintrag.daDatumzeit = New SqlDateTime(CType(Now, DateTime))
|
||||
clsjournaleintrag.sEintrag = New SqlString(CType(Message, String))
|
||||
clsjournaleintrag.cpMainConnectionProvider = Globals.connJournale
|
||||
Console.WriteLine(Message)
|
||||
Globals.connJournale.OpenConnection()
|
||||
clsjournaleintrag.Insert()
|
||||
Globals.connJournale.CloseConnection(True)
|
||||
Catch ex As Exception
|
||||
LogEntry.Writelog(Log.Logtype.Debug, ex.Message)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
43
EDKB14WS/Backup/EDKB14WS/Klassen/Log.vb
Normal file
43
EDKB14WS/Backup/EDKB14WS/Klassen/Log.vb
Normal file
@@ -0,0 +1,43 @@
|
||||
Public Class Log
|
||||
Dim mLogFileOK As String
|
||||
Dim mLogfileNOK As String
|
||||
|
||||
Dim mLogFileDebug As String
|
||||
Dim mdebugmode As Boolean
|
||||
|
||||
Public Enum Logtype As Integer
|
||||
OK = 1
|
||||
NOK = 2
|
||||
Debug = 3
|
||||
End Enum
|
||||
|
||||
Sub New(ByVal LogFileOK As String, ByVal logfilenok As String, ByVal logfiledebug As String, ByVal debugmode As Boolean)
|
||||
mLogFileOK = LogFileOK
|
||||
mLogfileNOK = logfilenok
|
||||
mLogFileDebug = logfiledebug
|
||||
mdebugmode = debugmode
|
||||
End Sub
|
||||
|
||||
Public Sub set_file_names(ByVal LogFileOK As String, ByVal logfilenok As String)
|
||||
mLogFileOK = LogFileOK
|
||||
mLogfileNOK = logfilenok
|
||||
End Sub
|
||||
|
||||
Public Sub Writelog(ByVal logtype As Logtype, ByVal Inhalt As String)
|
||||
Select Case logtype
|
||||
Case Log.Logtype.OK
|
||||
FileOpen(99, mLogFileOK, OpenMode.Append)
|
||||
Case Log.Logtype.NOK
|
||||
FileOpen(99, mLogfileNOK, OpenMode.Append)
|
||||
Case Log.Logtype.Debug
|
||||
FileOpen(99, mLogFileDebug, OpenMode.Append)
|
||||
End Select
|
||||
If logtype = Log.Logtype.Debug And mdebugmode = True Then
|
||||
WriteLine(99, Now.ToString + Chr(9) + Inhalt)
|
||||
Else
|
||||
If logtype = Log.Logtype.OK Or logtype = Log.Logtype.NOK Then WriteLine(99, Now.ToString + Chr(9) + Inhalt)
|
||||
End If
|
||||
FileClose(99)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
256
EDKB14WS/Backup/EDKB14WS/Klassen/Parameters.vb
Normal file
256
EDKB14WS/Backup/EDKB14WS/Klassen/Parameters.vb
Normal file
@@ -0,0 +1,256 @@
|
||||
Imports System.Xml
|
||||
Imports System.IO
|
||||
Imports System.Reflection
|
||||
|
||||
Public Class Parameters
|
||||
Dim sconnectionstring As String
|
||||
Property connectionstring() As String
|
||||
Get
|
||||
Return sconnectionstring
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
sconnectionstring = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim sconnectionstring_Journale As String
|
||||
Property connectionstring_Journale() As String
|
||||
Get
|
||||
Return sconnectionstring_Journale
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
sconnectionstring_Journale = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Dim bDebugmode As Boolean
|
||||
Property DebugMode() As Boolean
|
||||
Get
|
||||
Return bDebugmode
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
bDebugmode = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim sworkdir As String
|
||||
Property WorkDir() As String
|
||||
Get
|
||||
Return sworkdir
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
sworkdir = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim sDsrDir As String 'Input-Directory für DSR-XML-Dateien
|
||||
Property DSRDir() As String
|
||||
Get
|
||||
Return sDsrDir
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
sDsrDir = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim iAnzDokumente As Integer
|
||||
Property AnzDokumente() As Integer
|
||||
Get
|
||||
Return iAnzDokumente
|
||||
End Get
|
||||
Set(ByVal value As Integer)
|
||||
iAnzDokumente = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim iDokTypeBriefvorlage As Integer
|
||||
Property DokTypeBriefvorlage() As Integer
|
||||
Get
|
||||
Return iDokTypeBriefvorlage
|
||||
End Get
|
||||
Set(ByVal value As Integer)
|
||||
iDokTypeBriefvorlage = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim sPSDir As String
|
||||
Property PSDir() As String
|
||||
Get
|
||||
Return sPSDir
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
sPSDir = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim sPDFDir As String
|
||||
Property PDFDir() As String
|
||||
Get
|
||||
Return sPDFDir
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
sPDFDir = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim sPSPrinter As String
|
||||
Property PSPrinter() As String
|
||||
Get
|
||||
Return sPSPrinter
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
sPSPrinter = value
|
||||
End Set
|
||||
End Property
|
||||
Dim m_edkb08dir
|
||||
Property EDKB08Dir() As String
|
||||
Get
|
||||
Return m_edkb08dir
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
m_edkb08dir = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_logdir As String
|
||||
Property LogDir() As String
|
||||
Get
|
||||
Return m_logdir
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
m_logdir = value
|
||||
End Set
|
||||
End Property
|
||||
Dim m_waitloop As Integer
|
||||
Property WaitLoop() As Integer
|
||||
Get
|
||||
Return m_waitloop
|
||||
End Get
|
||||
Set(ByVal value As Integer)
|
||||
m_waitloop = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_covertpdfdirect As Boolean
|
||||
Property ConvertPDFDirect() As Boolean
|
||||
Get
|
||||
Return m_covertpdfdirect
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
m_covertpdfdirect = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_oracleconnectionstring As String
|
||||
Property OracleConnectionString() As String
|
||||
Get
|
||||
Return m_oracleconnectionstring
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
m_oracleconnectionstring = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_AdresseAbOracle As Boolean
|
||||
Property AdresseAbOracle() As Boolean
|
||||
Get
|
||||
Return m_AdresseAbOracle
|
||||
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
m_AdresseAbOracle = value
|
||||
End Set
|
||||
End Property
|
||||
Dim m_UsePDFInOutDir As Boolean
|
||||
Property Use_PDFInOutDir() As Boolean
|
||||
Get
|
||||
Return m_UsePDFInOutDir
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
m_UsePDFInOutDir = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_Startzeit As String
|
||||
Property Startzeit() As String
|
||||
Get
|
||||
Return m_Startzeit
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
m_Startzeit = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim m_Laufzeit As String
|
||||
Property Laufzeit() As String
|
||||
Get
|
||||
Return m_Laufzeit
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
m_Laufzeit = value
|
||||
End Set
|
||||
End Property
|
||||
Dim m_mailadresse As String
|
||||
Property Mailadresse() As String
|
||||
Get
|
||||
Return m_mailadresse
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
m_mailadresse = value
|
||||
End Set
|
||||
End Property
|
||||
Dim m_timerintervall As Integer
|
||||
Property TimerIntevall() As Integer
|
||||
Get
|
||||
Return m_timerintervall * 60 * 1000
|
||||
End Get
|
||||
Set(ByVal value As Integer)
|
||||
m_timerintervall = value
|
||||
End Set
|
||||
End Property
|
||||
Dim m_CheckOffice2010 As Boolean
|
||||
Property CheckOffice2010() As Boolean
|
||||
Get
|
||||
Return m_CheckOffice2010
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
m_CheckOffice2010 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Dim xmldoc As New XmlDocument
|
||||
|
||||
Public Sub New()
|
||||
xmldoc.Load(Me.ApplicationPath + "Parameters.xml")
|
||||
Me.connectionstring = xmldoc.SelectSingleNode("/Configuration/SQLConnectionString").InnerText
|
||||
Me.connectionstring_Journale = xmldoc.SelectSingleNode("/Configuration/SQLConnectionStringJournale").InnerText
|
||||
Me.WorkDir = xmldoc.SelectSingleNode("/Configuration/WorkDir").InnerText
|
||||
Me.DebugMode = UCase(xmldoc.SelectSingleNode("/Configuration/DebugMode").InnerText) = "TRUE"
|
||||
Me.DSRDir = xmldoc.SelectSingleNode("/Configuration/DSRDir").InnerText
|
||||
Me.AnzDokumente = xmldoc.SelectSingleNode("/Configuration/AnzDokumente").InnerText
|
||||
Me.DokTypeBriefvorlage = xmldoc.SelectSingleNode("/Configuration/DoktypeBriefvorlage").InnerText
|
||||
Me.sPSDir = xmldoc.SelectSingleNode("/Configuration/PSDir").InnerText
|
||||
Me.sPDFDir = xmldoc.SelectSingleNode("/Configuration/PDFDir").InnerText
|
||||
Me.sPSPrinter = xmldoc.SelectSingleNode("/Configuration/PSPrinter").InnerText
|
||||
Me.Use_PDFInOutDir = xmldoc.SelectSingleNode("/Configuration/DistillerInOutDirs").InnerText = True
|
||||
Me.ConvertPDFDirect = xmldoc.SelectSingleNode("/Configuration/ConvertPDFDirect").InnerText = True
|
||||
Me.EDKB08Dir = xmldoc.SelectSingleNode("/Configuration/EDKB08Dir").InnerText
|
||||
Me.LogDir = xmldoc.SelectSingleNode("/Configuration/LogDir").InnerText
|
||||
Me.WaitLoop = xmldoc.SelectSingleNode("/Configuration/WaitLoop").InnerText
|
||||
Me.OracleConnectionString = xmldoc.SelectSingleNode("/Configuration/OraConnectionstring").InnerText
|
||||
Me.AdresseAbOracle = xmldoc.SelectSingleNode("/Configuration/OracleAdresse").InnerText = True
|
||||
Me.Startzeit = xmldoc.SelectSingleNode("/Configuration/Startzeit").InnerText
|
||||
Me.Laufzeit = xmldoc.SelectSingleNode("/Configuration/RunTimeInStd").InnerText
|
||||
Me.Mailadresse = xmldoc.SelectSingleNode("/Configuration/Mail").InnerText
|
||||
Me.TimerIntevall = xmldoc.SelectSingleNode("/Configuration/TimerIntervallInMinuten").InnerText
|
||||
Me.CheckOffice2010 = UCase(xmldoc.SelectSingleNode("/Configuration/CheckOffice2010").InnerText) = "TRUE"
|
||||
Globals.conn.sConnectionString = Me.connectionstring
|
||||
Globals.connJournale.sConnectionString = Me.connectionstring_Journale
|
||||
End Sub
|
||||
|
||||
Public Function ApplicationPath() As String
|
||||
Return Path.GetDirectoryName([Assembly].GetEntryAssembly().Location) + "\"
|
||||
End Function
|
||||
|
||||
End Class
|
||||
105
EDKB14WS/Backup/EDKB14WS/Klassen/clsImportdata.vb
Normal file
105
EDKB14WS/Backup/EDKB14WS/Klassen/clsImportdata.vb
Normal file
@@ -0,0 +1,105 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.IO
|
||||
|
||||
Public Class clsImportdata
|
||||
#Region "Deklarationen"
|
||||
Dim Importdata As New DataSet
|
||||
|
||||
#End Region
|
||||
|
||||
Dim m_partnernr As Integer
|
||||
Dim m_dokumenttypnr As Integer
|
||||
Dim m_dsrfilename As String
|
||||
Dim m_indexfilename As String
|
||||
Dim m_dokumentid As String
|
||||
Dim m_blkunde As Integer
|
||||
|
||||
Public Function Importdaten_erstellen(ByVal partnernr As Integer, ByVal dokumenttypnr As Integer, ByVal DSRFilename As String, ByVal indexfilename As String, ByVal edkb08dir As String, ByVal dokumentid As String, ByVal blkunde As Boolean) As Boolean
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Importdaten:")
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Partner:" + partnernr.ToString)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Doktype:" + dokumenttypnr.ToString)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "DSRFile:" + DSRFilename)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Indexfile:" + indexfilename)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "EDKB08Dir" + edkb08dir)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Dokumentid:" + dokumentid)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "BLKunde:" + blkunde.ToString)
|
||||
Try
|
||||
Importdata.Tables.Clear()
|
||||
Importdata.ReadXml(Globals.ApplicationPath + "edkb08struktur.xml")
|
||||
Importdata.Tables(0).Columns.Add("dokumentid")
|
||||
Importdata.Tables(0).Columns.Add("blkunde")
|
||||
|
||||
m_partnernr = partnernr
|
||||
m_dokumenttypnr = dokumenttypnr
|
||||
m_dsrfilename = DSRFilename
|
||||
m_indexfilename = indexfilename
|
||||
m_dokumentid = dokumentid
|
||||
If blkunde = True Then m_blkunde = 1 Else m_blkunde = 0
|
||||
If generate_indexdata() Then
|
||||
Dim filePath As String = DSRFilename
|
||||
Dim slashPosition As Integer = filePath.LastIndexOf("\")
|
||||
Dim filenameOnly As String = filePath.Substring(slashPosition + 1)
|
||||
IO.File.Move(DSRFilename, edkb08dir + filenameOnly)
|
||||
|
||||
filePath = indexfilename
|
||||
slashPosition = filePath.LastIndexOf("\")
|
||||
filenameOnly = filePath.Substring(slashPosition + 1)
|
||||
IO.File.Move(indexfilename, edkb08dir + filenameOnly)
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
Catch ex As Exception
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Importdaten generieren Fehler: " + ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
Public Function generate_indexdata()
|
||||
Try
|
||||
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") = Me.m_partnernr.ToString
|
||||
dr.Item("Dokumenttypnr") = Me.m_dokumenttypnr.ToString
|
||||
|
||||
Dim filePath As String = Me.m_dsrfilename
|
||||
Dim slashPosition = filePath.LastIndexOf("\")
|
||||
Dim filenameOnly = filePath.Substring(slashPosition + 1)
|
||||
|
||||
dr.Item("dateiname") = filenameOnly
|
||||
dr.Item("Dateiformat") = "PDF"
|
||||
dr.Item("Archivdatum") = Now.ToString
|
||||
dr.Item("Ersteller") = "EDKB14"
|
||||
dr.Item("HERKUNFTSAPPLIKATION") = "EDKB14"
|
||||
dr.Item("Dokumentid") = Me.m_dokumentid
|
||||
'dr.Item("Dokumentidbdr") = ""
|
||||
If m_blkunde = 1 Then
|
||||
dr.Item("BLKunde") = "1"
|
||||
Else
|
||||
dr.Item("BLKunde") = "0"
|
||||
End If
|
||||
'dr.Item("Bezeichnung") = ""
|
||||
Importdata.Tables(0).Rows.Add(dr)
|
||||
Importdata.Tables(0).Rows(0).Delete()
|
||||
Importdata.Tables(0).AcceptChanges()
|
||||
Importdata.WriteXml(Me.m_indexfilename)
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
End Class
|
||||
1480
EDKB14WS/Backup/EDKB14WS/ModMain.vb
Normal file
1480
EDKB14WS/Backup/EDKB14WS/ModMain.vb
Normal file
File diff suppressed because it is too large
Load Diff
13
EDKB14WS/Backup/EDKB14WS/My Project/Application.Designer.vb
generated
Normal file
13
EDKB14WS/Backup/EDKB14WS/My Project/Application.Designer.vb
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Dieser Code wurde von einem Tool generiert.
|
||||
' Laufzeitversion:2.0.50727.4961
|
||||
'
|
||||
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
' der Code erneut generiert wird.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
10
EDKB14WS/Backup/EDKB14WS/My Project/Application.myapp
Normal file
10
EDKB14WS/Backup/EDKB14WS/My Project/Application.myapp
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>false</MySubMain>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<ApplicationType>3</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
35
EDKB14WS/Backup/EDKB14WS/My Project/AssemblyInfo.vb
Normal file
35
EDKB14WS/Backup/EDKB14WS/My Project/AssemblyInfo.vb
Normal file
@@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
' die mit einer Assembly verknüpft sind.
|
||||
|
||||
' Die Werte der Assemblyattribute überprüfen
|
||||
|
||||
<Assembly: AssemblyTitle("EDKB14WS")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("EDKB14WS")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2010")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||
<Assembly: Guid("7c1d6185-7c7b-4f3e-9472-e3d72c8b480e")>
|
||||
|
||||
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
'
|
||||
' Hauptversion
|
||||
' Nebenversion
|
||||
' Buildnummer
|
||||
' Revision
|
||||
'
|
||||
' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
63
EDKB14WS/Backup/EDKB14WS/My Project/Resources.Designer.vb
generated
Normal file
63
EDKB14WS/Backup/EDKB14WS/My Project/Resources.Designer.vb
generated
Normal file
@@ -0,0 +1,63 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Dieser Code wurde von einem Tool generiert.
|
||||
' Laufzeitversion:2.0.50727.4961
|
||||
'
|
||||
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
' der Code erneut generiert wird.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||
'-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||
'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||
'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||
'''<summary>
|
||||
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("EDKB14WS.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||
''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
117
EDKB14WS/Backup/EDKB14WS/My Project/Resources.resx
Normal file
117
EDKB14WS/Backup/EDKB14WS/My Project/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
73
EDKB14WS/Backup/EDKB14WS/My Project/Settings.Designer.vb
generated
Normal file
73
EDKB14WS/Backup/EDKB14WS/My Project/Settings.Designer.vb
generated
Normal file
@@ -0,0 +1,73 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Dieser Code wurde von einem Tool generiert.
|
||||
' Laufzeitversion:2.0.50727.4961
|
||||
'
|
||||
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
' der Code erneut generiert wird.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings),MySettings)
|
||||
|
||||
#Region "Funktion zum automatischen Speichern von My.Settings"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.EDKB14WS.My.MySettings
|
||||
Get
|
||||
Return Global.EDKB14WS.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
7
EDKB14WS/Backup/EDKB14WS/My Project/Settings.settings
Normal file
7
EDKB14WS/Backup/EDKB14WS/My Project/Settings.settings
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
11
EDKB14WS/Backup/EDKB14WS/My Project/app.manifest
Normal file
11
EDKB14WS/Backup/EDKB14WS/My Project/app.manifest
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<applicationRequestMinimum>
|
||||
<defaultAssemblyRequest permissionSetReference="Custom" />
|
||||
<PermissionSet class="System.Security.PermissionSet" version="1" ID="Custom" SameSite="site" />
|
||||
</applicationRequestMinimum>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</asmv1:assembly>
|
||||
48
EDKB14WS/Backup/EDKB14WS/ProjectInstaller.Designer.vb
generated
Normal file
48
EDKB14WS/Backup/EDKB14WS/ProjectInstaller.Designer.vb
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
<System.ComponentModel.RunInstaller(True)> Partial Class ProjectInstaller
|
||||
Inherits System.Configuration.Install.Installer
|
||||
|
||||
'Installer überschreibt den Löschvorgang zum Bereinigen der Komponentenliste.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Komponenten-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Komponenten-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Komponenten-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.EDKB14Installer = New System.ServiceProcess.ServiceProcessInstaller
|
||||
Me.ServiceInstaller1 = New System.ServiceProcess.ServiceInstaller
|
||||
'
|
||||
'EDKB14Installer
|
||||
'
|
||||
Me.EDKB14Installer.Account = System.ServiceProcess.ServiceAccount.LocalSystem
|
||||
Me.EDKB14Installer.Installers.AddRange(New System.Configuration.Install.Installer() {Me.ServiceInstaller1})
|
||||
Me.EDKB14Installer.Password = Nothing
|
||||
Me.EDKB14Installer.Username = Nothing
|
||||
'
|
||||
'ServiceInstaller1
|
||||
'
|
||||
Me.ServiceInstaller1.Description = "EDKB14WS - DSR-Verarbeitung "
|
||||
Me.ServiceInstaller1.DisplayName = "EDKB14WS"
|
||||
Me.ServiceInstaller1.ServiceName = "EDKB14WS"
|
||||
'
|
||||
'ProjectInstaller
|
||||
'
|
||||
Me.Installers.AddRange(New System.Configuration.Install.Installer() {Me.EDKB14Installer})
|
||||
|
||||
End Sub
|
||||
Friend WithEvents EDKB14Installer As System.ServiceProcess.ServiceProcessInstaller
|
||||
Friend WithEvents ServiceInstaller1 As System.ServiceProcess.ServiceInstaller
|
||||
|
||||
End Class
|
||||
129
EDKB14WS/Backup/EDKB14WS/ProjectInstaller.resx
Normal file
129
EDKB14WS/Backup/EDKB14WS/ProjectInstaller.resx
Normal file
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="EDKB14Installer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="ServiceInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>197, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
16
EDKB14WS/Backup/EDKB14WS/ProjectInstaller.vb
Normal file
16
EDKB14WS/Backup/EDKB14WS/ProjectInstaller.vb
Normal file
@@ -0,0 +1,16 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Configuration.Install
|
||||
|
||||
Public Class ProjectInstaller
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'Dieser Aufruf ist für den Komponenten-Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
'Initialisierungscode nach dem Aufruf von InitializeComponent hinzufügen
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
51
EDKB14WS/Backup/EDKB14WS/Service1.Designer.vb
generated
Normal file
51
EDKB14WS/Backup/EDKB14WS/Service1.Designer.vb
generated
Normal file
@@ -0,0 +1,51 @@
|
||||
Imports System.ServiceProcess
|
||||
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class Service1
|
||||
Inherits System.ServiceProcess.ServiceBase
|
||||
|
||||
'UserService überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
' Der Haupteinstiegspunkt für den Prozess
|
||||
<MTAThread()> _
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Shared Sub Main()
|
||||
Dim ServicesToRun() As System.ServiceProcess.ServiceBase
|
||||
|
||||
' Innerhalb eines Prozesses können mehrere NT-Dienste ausgeführt werden. Um einen
|
||||
' weiteren Dienst zu diesem Prozess hinzuzufügen, ändern Sie die folgende Zeile,
|
||||
' um ein zweites Dienstobjekt zu erstellen. Zum Beispiel
|
||||
'
|
||||
' ServicesToRun = New System.ServiceProcess.ServiceBase () {New Service1, New MySecondUserService}
|
||||
'
|
||||
ServicesToRun = New System.ServiceProcess.ServiceBase() {New Service1}
|
||||
|
||||
System.ServiceProcess.ServiceBase.Run(ServicesToRun)
|
||||
End Sub
|
||||
|
||||
'Wird vom Komponenten-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
' Hinweis: Die folgende Prozedur ist für den Komponenten-Designer erforderlich.
|
||||
' Das Bearbeiten ist mit dem Komponenten-Designer möglich.
|
||||
' Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
'
|
||||
'Service1
|
||||
'
|
||||
Me.ServiceName = "EDKB14WS"
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
123
EDKB14WS/Backup/EDKB14WS/Service1.resx
Normal file
123
EDKB14WS/Backup/EDKB14WS/Service1.resx
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
210
EDKB14WS/Backup/EDKB14WS/Service1.vb
Normal file
210
EDKB14WS/Backup/EDKB14WS/Service1.vb
Normal file
@@ -0,0 +1,210 @@
|
||||
Imports System.ServiceProcess
|
||||
Imports System.Threading
|
||||
Imports System.IO
|
||||
Imports System.Reflection
|
||||
Imports System.IO.File
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.ComponentModel
|
||||
Imports System
|
||||
Imports System.SystemException
|
||||
Public Class Service1
|
||||
|
||||
#Region "Deklarationen"
|
||||
Dim Watch_Directory As String
|
||||
Dim FileWatch As New FileSystemWatcher()
|
||||
Dim LogFileOK As String = ""
|
||||
Dim LogFileNOK As String = ""
|
||||
Dim LogFileDebug As String = ""
|
||||
Dim WithEvents WatchTimer As New Timers.Timer()
|
||||
|
||||
#End Region
|
||||
Protected Overrides Sub OnStart(ByVal args() As String)
|
||||
'FileOpen(1, "D:\tssettings\Edoka\edkb14\Logs\Test.txt", OpenMode.Output)
|
||||
'WriteLine(1, "Start")
|
||||
Globals.Param = New Parameters
|
||||
|
||||
Dim hh, mm, ss As String
|
||||
hh = Param.Startzeit.Substring(0, 2)
|
||||
mm = Param.Startzeit.Substring(3, 2)
|
||||
ss = Param.Startzeit.Substring(6, 2)
|
||||
Globals.Startzeit = New Date(Now.Year, Now.Month, Now.Day, hh, mm, ss)
|
||||
Globals.Endzeit = Globals.Startzeit.AddHours(Param.Laufzeit)
|
||||
|
||||
LogFileOK = Param.LogDir + Format(Now, "ddMMyyyy hhmmss") + "_OK.txt"
|
||||
LogFileNOK = Param.LogDir + Format(Now, "ddMMyyyy hhmmss") + "_NOK.txt"
|
||||
LogFileDebug = Param.LogDir + Format(Now, "ddMMyyyy hhmmss") + "_Debug.txt"
|
||||
|
||||
Globals.LogEntry = New Log(LogFileOK, LogFileNOK, LogFileDebug, Param.DebugMode)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Start EDKB14")
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Parameter:")
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Connectionstring EDOKA: " + Param.connectionstring)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Connectionstring Journale: " + Param.connectionstring_Journale)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Anz Dokumente:" + Param.AnzDokumente.ToString)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "WorkDir: " + Param.WorkDir)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "DSRDir: " + Param.DSRDir)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "DokType Briefvorlage: " + Param.DokTypeBriefvorlage.ToString)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "PSDir: " + Param.PSDir)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "PDFDir " + Param.PDFDir)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "LogDir: " + Param.LogDir)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "PS Printer :" + Param.PSPrinter)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Distiller In Out Dirs:" + Param.Use_PDFInOutDir.ToString)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "EDKB08 Dir: " + Param.EDKB08Dir)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Wait Loop:" + Param.WaitLoop.ToString)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Oracle ConString: " + Param.OracleConnectionString)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Adresse aus Oracle: " + Param.AdresseAbOracle.ToString)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Startzeit: " + Param.Startzeit.ToString)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Laufzeit in Std: " + Param.Laufzeit.ToString)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Mail Durchlauf: " + Param.Mailadresse.ToString)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Timer-Intervall in Millisekunden: " + Param.TimerIntevall.ToString)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "CheckOffice 2010: " + Param.CheckOffice2010.ToString)
|
||||
|
||||
Globals.LogData.Columns.Add("Timestamp")
|
||||
Globals.LogData.Columns.Add("Partner")
|
||||
Globals.LogData.Columns.Add("VV")
|
||||
Globals.LogData.Columns.Add("Banklagernd")
|
||||
|
||||
Me.WatchTimer.Interval = Globals.Param.TimerIntevall
|
||||
Me.WatchTimer.Enabled = True
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Berechnete Endzeit:" + Globals.Endzeit.ToString)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "------------------------------------------------------------")
|
||||
Exit Sub
|
||||
|
||||
Me.Watch_Directory = Param.DSRDir
|
||||
If Not Init_Filewatcher() Then
|
||||
LogEntry.Writelog(Log.Logtype.NOK, "Filewacher konnte nicht initialisiert werden")
|
||||
End If
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Init Filewatcher durch")
|
||||
Me.Start_Watching()
|
||||
'FileClose(1)
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnStop()
|
||||
' Hier Code zum Ausführen erforderlicher Löschvorgänge zum Beenden des Dienstes einfügen.
|
||||
End Sub
|
||||
|
||||
#Region "Filewatcher"
|
||||
Private Function Init_Filewatcher() As Boolean
|
||||
Try
|
||||
FileWatch.Path = Watch_Directory
|
||||
FileWatch.IncludeSubdirectories = False
|
||||
FileWatch.Filter = "*.xml"
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
LogEntry.Writelog(Log.Logtype.NOK, "Init Filewacher: " + ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'''<summary>Eventhandler des FileWatching-Objektes aktivieren</summary>
|
||||
Private Function Start_Watching() As Boolean
|
||||
Try
|
||||
AddHandler FileWatch.Created, New FileSystemEventHandler(AddressOf OnFileEvent)
|
||||
FileWatch.EnableRaisingEvents = True
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Filewatch Event-Handler initialisiert: " + Me.Watch_Directory)
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Fehler bei der Event-Initialisierung " + ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Dim EventStopped As Boolean = False
|
||||
'''<summary>Aktivitäten im Inputverzeichnis verarbeiten</summary>
|
||||
'''<remarks>Wird eine Datei mit der Endung .IND angeliefert, wird der Eventhandler
|
||||
'''gestoppt und die anstehenden Dokumente verarbeitet.
|
||||
'''
|
||||
'''Nach abgeschlossener Verarbeitung wird der Eventhandler wieder
|
||||
'''eingeschaltet</remarks>
|
||||
'''<param name="source"></param>
|
||||
'''<param name="e"></param>
|
||||
Private Sub OnFileEvent(ByVal source As Object, ByVal e As FileSystemEventArgs)
|
||||
If EventStopped = True Then
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Neue Datei " + e.FullPath)
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Event Stoped")
|
||||
End If
|
||||
Exit Sub
|
||||
If UCase(Microsoft.VisualBasic.Right(e.FullPath, 4)) = ".XML" Then
|
||||
FileWatch.EnableRaisingEvents = False
|
||||
EventStopped = True
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Neue Datei " + e.FullPath)
|
||||
'ServiceIcon.Text = "Working..."
|
||||
Threading.Thread.Sleep(2000)
|
||||
ModMain.Main()
|
||||
EventStopped = False
|
||||
FileWatch.EnableRaisingEvents = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Function WriteToEventLog(ByVal Entry As String, _
|
||||
Optional ByVal AppName As String = "EDKB14WS", _
|
||||
Optional ByVal EventType As _
|
||||
EventLogEntryType = EventLogEntryType.Information, _
|
||||
Optional ByVal LogName As String = "EDKB14WS") As Boolean
|
||||
|
||||
'*************************************************************
|
||||
'PURPOSE: Write Entry to Event Log using VB.NET
|
||||
'PARAMETERS: Entry - Value to Write
|
||||
' AppName - Name of Client Application. Needed
|
||||
' because before writing to event log, you must
|
||||
' have a named EventLog source.
|
||||
' EventType - Entry Type, from EventLogEntryType
|
||||
' Structure e.g., EventLogEntryType.Warning,
|
||||
' EventLogEntryType.Error
|
||||
' LogName: Name of Log (System, Application;
|
||||
' Security is read-only) If you
|
||||
' specify a non-existent log, the log will be
|
||||
' created
|
||||
|
||||
'RETURNS: True if successful, false if not
|
||||
|
||||
'EXAMPLES:
|
||||
'1. Simple Example, Accepting All Defaults
|
||||
' WriteToEventLog "Hello Event Log"
|
||||
|
||||
'2. Specify EventSource, EventType, and LogName
|
||||
' WriteToEventLog("Danger, Danger, Danger", "MyVbApp", _
|
||||
' EventLogEntryType.Warning, "System")
|
||||
'
|
||||
'NOTE: EventSources are tightly tied to their log.
|
||||
' So don't use the same source name for different
|
||||
' logs, and vice versa
|
||||
'******************************************************
|
||||
|
||||
Dim objEventLog As New EventLog()
|
||||
|
||||
Try
|
||||
'Register the App as an Event Source
|
||||
If Not objEventLog.SourceExists(AppName) Then
|
||||
|
||||
objEventLog.CreateEventSource(AppName, LogName)
|
||||
End If
|
||||
|
||||
objEventLog.Source = AppName
|
||||
|
||||
'WriteEntry is overloaded; this is one
|
||||
'of 10 ways to call it
|
||||
objEventLog.WriteEntry(Entry, EventType)
|
||||
Return True
|
||||
Catch Ex As Exception
|
||||
Return False
|
||||
|
||||
End Try
|
||||
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
Private Sub WatchTimer_Elap()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub WatchTimer_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles WatchTimer.Elapsed
|
||||
LogEntry.Writelog(Log.Logtype.Debug, "Timer Elapsed")
|
||||
If Globals.In_Runtime Then
|
||||
Me.WatchTimer.Enabled = False
|
||||
ModMain.Main()
|
||||
End If
|
||||
Me.WatchTimer.Enabled = True
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user