Initial commit

This commit is contained in:
2021-04-20 07:39:40 +02:00
commit 1efa65864e
3895 changed files with 2126363 additions and 0 deletions

View File

@@ -0,0 +1,368 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'anreden'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 6. Mai 2003, 23:34:48
' // 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 'anreden'.
' /// </summary>
Public Class clsAnreden
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_iNrard00 As SqlInt32
Private m_sCaprs00 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>iNrard00</LI>
' /// <LI>sCaprs00. 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_anreden_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inrard00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNrard00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@scaprs00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCaprs00))
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_anreden_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("clsAnreden::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>iNrard00</LI>
' /// <LI>sCaprs00. 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_anreden_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inrard00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNrard00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@scaprs00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCaprs00))
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_anreden_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("clsAnreden::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>iNrard00</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_anreden_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inrard00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNrard00))
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_anreden_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("clsAnreden::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>iNrard00</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iNrard00</LI>
' /// <LI>sCaprs00</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_anreden_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("anreden")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@inrard00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNrard00))
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_anreden_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iNrard00 = New SqlInt32(CType(dtToReturn.Rows(0)("nrard00"), Integer))
If dtToReturn.Rows(0)("caprs00") Is System.DBNull.Value Then
m_sCaprs00 = SqlString.Null
Else
m_sCaprs00 = New SqlString(CType(dtToReturn.Rows(0)("caprs00"), 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("clsAnreden::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_anreden_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("anreden")
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_anreden_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("clsAnreden::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 [iNrard00]() As SqlInt32
Get
Return m_iNrard00
End Get
Set(ByVal Value As SqlInt32)
Dim iNrard00Tmp As SqlInt32 = Value
If iNrard00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("iNrard00", "iNrard00 can't be NULL")
End If
m_iNrard00 = Value
End Set
End Property
Public Property [sCaprs00]() As SqlString
Get
Return m_sCaprs00
End Get
Set(ByVal Value As SqlString)
m_sCaprs00 = Value
End Set
End Property
#End Region
End Class
End Namespace

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,470 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'barcodeetikette'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Montag, 7. April 2003, 20:53:27
' // 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 'barcodeetikette'.
' /// </summary>
Public Class clsBarcodeetikette
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iMandantnr, m_iBarcodenr As SqlInt32
Private m_sDokumentid 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>iBarcodenr</LI>
' /// <LI>sDokumentid. 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_barcodeetikette_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibarcodenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBarcodenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
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_barcodeetikette_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("clsBarcodeetikette::Insert::Error occured." + ex.Message, 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>iBarcodenr</LI>
' /// <LI>sDokumentid. 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_barcodeetikette_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibarcodenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBarcodenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
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_barcodeetikette_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("clsBarcodeetikette::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>iBarcodenr</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_barcodeetikette_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibarcodenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBarcodenr))
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_barcodeetikette_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("clsBarcodeetikette::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>iBarcodenr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iBarcodenr</LI>
' /// <LI>sDokumentid</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_barcodeetikette_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("barcodeetikette")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@ibarcodenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBarcodenr))
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_barcodeetikette_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iBarcodenr = New SqlInt32(CType(dtToReturn.Rows(0)("barcodenr"), Integer))
If dtToReturn.Rows(0)("dokumentid") Is System.DBNull.Value Then
m_sDokumentid = SqlString.Null
Else
m_sDokumentid = New SqlString(CType(dtToReturn.Rows(0)("dokumentid"), String))
End If
If dtToReturn.Rows(0)("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("clsBarcodeetikette::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_barcodeetikette_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("barcodeetikette")
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_barcodeetikette_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("clsBarcodeetikette::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 [iBarcodenr]() As SqlInt32
Get
Return m_iBarcodenr
End Get
Set(ByVal Value As SqlInt32)
Dim iBarcodenrTmp As SqlInt32 = Value
If iBarcodenrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iBarcodenr", "iBarcodenr can't be NULL")
End If
m_iBarcodenr = Value
End Set
End Property
Public Property [sDokumentid]() As SqlString
Get
Return m_sDokumentid
End Get
Set(ByVal Value As SqlString)
m_sDokumentid = Value
End Set
End Property
Public Property [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

View File

@@ -0,0 +1,510 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'cold_folder'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Freitag, 27. Dezember 2002, 13:58:56
' // 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 'cold_folder'.
' /// </summary>
Public Class clsCold_folder
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iMandantnr, m_iCold_foldernr As SqlInt32
Private m_sBezeichnung, m_sBatch_parameter, 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>iCold_foldernr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
' /// <LI>sBatch_parameter. 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_cold_folder_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@icold_foldernr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iCold_foldernr))
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("@sbatch_parameter", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBatch_parameter))
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_cold_folder_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("clsCold_folder::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>iCold_foldernr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
' /// <LI>sBatch_parameter. 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_cold_folder_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@icold_foldernr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iCold_foldernr))
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("@sbatch_parameter", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBatch_parameter))
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_cold_folder_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("clsCold_folder::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>iCold_foldernr</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_cold_folder_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@icold_foldernr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iCold_foldernr))
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_cold_folder_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("clsCold_folder::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>iCold_foldernr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iCold_foldernr</LI>
' /// <LI>sBezeichnung</LI>
' /// <LI>sBeschreibung</LI>
' /// <LI>sBatch_parameter</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_cold_folder_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("cold_folder")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@icold_foldernr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iCold_foldernr))
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_cold_folder_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iCold_foldernr = New SqlInt32(CType(dtToReturn.Rows(0)("cold_foldernr"), 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)("batch_parameter") Is System.DBNull.Value Then
m_sBatch_parameter = SqlString.Null
Else
m_sBatch_parameter = New SqlString(CType(dtToReturn.Rows(0)("batch_parameter"), 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("clsCold_folder::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_cold_folder_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("cold_folder")
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_cold_folder_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("clsCold_folder::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 [iCold_foldernr]() As SqlInt32
Get
Return m_iCold_foldernr
End Get
Set(ByVal Value As SqlInt32)
Dim iCold_foldernrTmp As SqlInt32 = Value
If iCold_foldernrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iCold_foldernr", "iCold_foldernr can't be NULL")
End If
m_iCold_foldernr = 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 [sBatch_parameter]() As SqlString
Get
Return m_sBatch_parameter
End Get
Set(ByVal Value As SqlString)
m_sBatch_parameter = 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

View File

@@ -0,0 +1,814 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'coldindex'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Donnerstag, 26. Dezember 2002, 01:05:46
' // 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 'coldindex'.
' /// </summary>
Public Class clsColdindex
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bZwingend, m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iCold_indexfeldnr, m_iCold_indexfeldnrOld, m_iMutierer, m_iCold_foldernr, m_iCold_foldernrOld, m_iMandantnr, m_iColdindexnr As SqlInt32
Private m_sBezeichnung, 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>iColdindexnr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
' /// <LI>bZwingend</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>iCold_indexfeldnr. May be SqlInt32.Null</LI>
' /// <LI>iCold_foldernr. 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_coldindex_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@icoldindexnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iColdindexnr))
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("@bzwingend", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bZwingend))
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("@icold_indexfeldnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCold_indexfeldnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@icold_foldernr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCold_foldernr))
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_coldindex_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("clsColdindex::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>iColdindexnr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
' /// <LI>bZwingend</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>iCold_indexfeldnr. May be SqlInt32.Null</LI>
' /// <LI>iCold_foldernr. 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_coldindex_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@icoldindexnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iColdindexnr))
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("@bzwingend", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bZwingend))
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("@icold_indexfeldnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCold_indexfeldnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@icold_foldernr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCold_foldernr))
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_coldindex_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("clsColdindex::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 'cold_indexfeldnr.
' /// This method will Update one or more existing rows in the database. It will reset the field 'cold_indexfeldnr' in
' /// all rows which have as value for this field the value as set in property 'iCold_indexfeldnrOld' to
' /// the value as set in property 'iCold_indexfeldnr'.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iCold_indexfeldnr. May be SqlInt32.Null</LI>
' /// <LI>iCold_indexfeldnrOld. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function UpdateAllWcold_indexfeldnrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_coldindex_UpdateAllWcold_indexfeldnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@icold_indexfeldnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iCold_indexfeldnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@icold_indexfeldnrOld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCold_indexfeldnrOld))
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_coldindex_UpdateAllWcold_indexfeldnrLogic' 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("clsColdindex::UpdateAllWcold_indexfeldnrLogic::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 'cold_foldernr.
' /// This method will Update one or more existing rows in the database. It will reset the field 'cold_foldernr' in
' /// all rows which have as value for this field the value as set in property 'iCold_foldernrOld' to
' /// the value as set in property 'iCold_foldernr'.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iCold_foldernr. May be SqlInt32.Null</LI>
' /// <LI>iCold_foldernrOld. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function UpdateAllWcold_foldernrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_coldindex_UpdateAllWcold_foldernrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@icold_foldernr", SqlDbType.Int, 4, ParameterDirection.Input, false, 10, 0, "", DataRowVersion.Proposed, m_iCold_foldernr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@icold_foldernrOld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCold_foldernrOld))
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_coldindex_UpdateAllWcold_foldernrLogic' 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("clsColdindex::UpdateAllWcold_foldernrLogic::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>iColdindexnr</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_coldindex_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@icoldindexnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iColdindexnr))
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_coldindex_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("clsColdindex::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>iColdindexnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iColdindexnr</LI>
' /// <LI>sBezeichnung</LI>
' /// <LI>sBeschreibung</LI>
' /// <LI>bZwingend</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>iCold_indexfeldnr</LI>
' /// <LI>iCold_foldernr</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_coldindex_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("coldindex")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@icoldindexnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iColdindexnr))
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_coldindex_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iColdindexnr = New SqlInt32(CType(dtToReturn.Rows(0)("coldindexnr"), 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
m_bZwingend = New SqlBoolean(CType(dtToReturn.Rows(0)("zwingend"), Boolean))
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)("cold_indexfeldnr") Is System.DBNull.Value Then
m_iCold_indexfeldnr = SqlInt32.Null
Else
m_iCold_indexfeldnr = New SqlInt32(CType(dtToReturn.Rows(0)("cold_indexfeldnr"), Integer))
End If
If dtToReturn.Rows(0)("cold_foldernr") Is System.DBNull.Value Then
m_iCold_foldernr = SqlInt32.Null
Else
m_iCold_foldernr = New SqlInt32(CType(dtToReturn.Rows(0)("cold_foldernr"), 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("clsColdindex::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_coldindex_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("coldindex")
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_coldindex_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("clsColdindex::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 'cold_indexfeldnr'
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iCold_indexfeldnr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function SelectAllWcold_indexfeldnrLogic() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_coldindex_SelectAllWcold_indexfeldnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("coldindex")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@icold_indexfeldnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCold_indexfeldnr))
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_coldindex_SelectAllWcold_indexfeldnrLogic' 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("clsColdindex::SelectAllWcold_indexfeldnrLogic::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 'cold_foldernr'
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iCold_foldernr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function SelectAllWcold_foldernrLogic() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_coldindex_SelectAllWcold_foldernrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("coldindex")
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@icold_foldernr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCold_foldernr))
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_coldindex_SelectAllWcold_foldernrLogic' 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("clsColdindex::SelectAllWcold_foldernrLogic::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 [iColdindexnr]() As SqlInt32
Get
Return m_iColdindexnr
End Get
Set(ByVal Value As SqlInt32)
Dim iColdindexnrTmp As SqlInt32 = Value
If iColdindexnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iColdindexnr", "iColdindexnr can't be NULL")
End If
m_iColdindexnr = 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 [bZwingend]() As SqlBoolean
Get
Return m_bZwingend
End Get
Set(ByVal Value As SqlBoolean)
Dim bZwingendTmp As SqlBoolean = Value
If bZwingendTmp.IsNull Then
Throw New ArgumentOutOfRangeException("bZwingend", "bZwingend can't be NULL")
End If
m_bZwingend = 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 [iCold_indexfeldnr]() As SqlInt32
Get
Return m_iCold_indexfeldnr
End Get
Set(ByVal Value As SqlInt32)
m_iCold_indexfeldnr = Value
End Set
End Property
Public Property [iCold_indexfeldnrOld]() As SqlInt32
Get
Return m_iCold_indexfeldnrOld
End Get
Set(ByVal Value As SqlInt32)
m_iCold_indexfeldnrOld = Value
End Set
End Property
Public Property [iCold_foldernr]() As SqlInt32
Get
Return m_iCold_foldernr
End Get
Set(ByVal Value As SqlInt32)
m_iCold_foldernr = Value
End Set
End Property
Public Property [iCold_foldernrOld]() As SqlInt32
Get
Return m_iCold_foldernrOld
End Get
Set(ByVal Value As SqlInt32)
m_iCold_foldernrOld = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,368 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'Doks'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Montag, 31. März 2003, 23:02:56
' // 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 'Doks'.
' /// </summary>
Public Class clsDoks
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_biDokument As SqlBinary
Private m_sDokumentID 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>sDokumentID</LI>
' /// <LI>biDokument. May be SqlBinary.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_Doks_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDokumentID", SqlDbType.VarChar, 22, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumentID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@biDokument", SqlDbType.Binary, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_biDokument))
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_Doks_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("clsDoks::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>sDokumentID</LI>
' /// <LI>biDokument. May be SqlBinary.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_Doks_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDokumentID", SqlDbType.VarChar, 22, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumentID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@biDokument", SqlDbType.Binary, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_biDokument))
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_Doks_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("clsDoks::Update::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>sDokumentID</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Overrides Function Delete() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Doks_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDokumentID", SqlDbType.VarChar, 22, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumentID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = 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_Doks_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("clsDoks::Delete::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>sDokumentID</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>sDokumentID</LI>
' /// <LI>biDokument</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_Doks_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Doks")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@sDokumentID", SqlDbType.VarChar, 22, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumentID))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
sdaAdapter.Fill(dtToReturn)
m_iErrorCode = 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_Doks_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_sDokumentID = New SqlString(CType(dtToReturn.Rows(0)("DokumentID"), String))
If dtToReturn.Rows(0)("Dokument") Is System.DBNull.Value Then
m_biDokument = SqlBinary.Null
Else
m_biDokument = New SqlBinary(CType(dtToReturn.Rows(0)("Dokument"), Byte()))
End If
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsDoks::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_Doks_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("Doks")
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_Doks_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("clsDoks::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 [sDokumentID]() As SqlString
Get
Return m_sDokumentID
End Get
Set(ByVal Value As SqlString)
Dim sDokumentIDTmp As SqlString = Value
If sDokumentIDTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sDokumentID", "sDokumentID can't be NULL")
End If
m_sDokumentID = Value
End Set
End Property
Public Property [biDokument]() As SqlBinary
Get
Return m_biDokument
End Get
Set(ByVal Value As SqlBinary)
m_biDokument = Value
End Set
End Property
#End Region
End Class
End Namespace

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,591 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'dokument_status'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Montag, 9. Juni 2003, 08:18:09
' // 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 'dokument_status'.
' /// </summary>
Public Class clsDokument_status
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bDokument_bearbeitung_moeglich, m_bFolgestatus_durch_anderen_verantwortlichen, m_bDokument_ausgangsarchivierung, m_bAktiv, m_bDokument_bearbeitung_abgeschlossen As SqlBoolean
Private m_daErstellt_am As SqlDateTime
Private m_iDokument_statusnr, m_iMutierer, m_iStatus_bezeichnungnr, m_iErledigung_ab As SqlInt32
Private m_sReihenfolge, m_sBezeichnung, m_sDokumenitid 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>sDokumenitid. May be SqlString.Null</LI>
' /// <LI>iStatus_bezeichnungnr. May be SqlInt32.Null</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sReihenfolge. May be SqlString.Null</LI>
' /// <LI>bFolgestatus_durch_anderen_verantwortlichen. May be SqlBoolean.Null</LI>
' /// <LI>bDokument_bearbeitung_moeglich. May be SqlBoolean.Null</LI>
' /// <LI>iErledigung_ab. May be SqlInt32.Null</LI>
' /// <LI>bDokument_ausgangsarchivierung. May be SqlBoolean.Null</LI>
' /// <LI>bDokument_bearbeitung_abgeschlossen. May be SqlBoolean.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>daErstellt_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>iDokument_statusnr</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_dokument_status_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumenitid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumenitid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus_bezeichnungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus_bezeichnungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sreihenfolge", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReihenfolge))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bfolgestatus_durch_anderen_verantwortlichen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bFolgestatus_durch_anderen_verantwortlichen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_bearbeitung_moeglich", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_bearbeitung_moeglich))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ierledigung_ab", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iErledigung_ab))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_ausgangsarchivierung", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_ausgangsarchivierung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_bearbeitung_abgeschlossen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_bearbeitung_abgeschlossen))
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("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(new SqlParameter("@idokument_statusnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iDokument_statusnr))
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_iDokument_statusnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@idokument_statusnr").Value, SqlInt32))
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_dokument_status_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("clsDokument_status::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>iDokument_statusnr</LI>
' /// <LI>sDokumenitid. May be SqlString.Null</LI>
' /// <LI>iStatus_bezeichnungnr. May be SqlInt32.Null</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sReihenfolge. May be SqlString.Null</LI>
' /// <LI>bFolgestatus_durch_anderen_verantwortlichen. May be SqlBoolean.Null</LI>
' /// <LI>bDokument_bearbeitung_moeglich. May be SqlBoolean.Null</LI>
' /// <LI>iErledigung_ab. May be SqlInt32.Null</LI>
' /// <LI>bDokument_ausgangsarchivierung. May be SqlBoolean.Null</LI>
' /// <LI>bDokument_bearbeitung_abgeschlossen. May be SqlBoolean.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>daErstellt_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_dokument_status_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokument_statusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokument_statusnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumenitid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumenitid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus_bezeichnungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus_bezeichnungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sreihenfolge", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReihenfolge))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bfolgestatus_durch_anderen_verantwortlichen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bFolgestatus_durch_anderen_verantwortlichen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_bearbeitung_moeglich", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_bearbeitung_moeglich))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ierledigung_ab", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iErledigung_ab))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_ausgangsarchivierung", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_ausgangsarchivierung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_bearbeitung_abgeschlossen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_bearbeitung_abgeschlossen))
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("@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_dokument_status_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("clsDokument_status::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>iDokument_statusnr</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_dokument_status_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokument_statusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokument_statusnr))
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_dokument_status_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("clsDokument_status::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>iDokument_statusnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iDokument_statusnr</LI>
' /// <LI>sDokumenitid</LI>
' /// <LI>iStatus_bezeichnungnr</LI>
' /// <LI>sBezeichnung</LI>
' /// <LI>sReihenfolge</LI>
' /// <LI>bFolgestatus_durch_anderen_verantwortlichen</LI>
' /// <LI>bDokument_bearbeitung_moeglich</LI>
' /// <LI>iErledigung_ab</LI>
' /// <LI>bDokument_ausgangsarchivierung</LI>
' /// <LI>bDokument_bearbeitung_abgeschlossen</LI>
' /// <LI>bAktiv</LI>
' /// <LI>daErstellt_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_dokument_status_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("dokument_status")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@idokument_statusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokument_statusnr))
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_dokument_status_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iDokument_statusnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokument_statusnr"), Integer))
If dtToReturn.Rows(0)("dokumenitid") Is System.DBNull.Value Then
m_sDokumenitid = SqlString.Null
Else
m_sDokumenitid = New SqlString(CType(dtToReturn.Rows(0)("dokumenitid"), String))
End If
If dtToReturn.Rows(0)("status_bezeichnungnr") Is System.DBNull.Value Then
m_iStatus_bezeichnungnr = SqlInt32.Null
Else
m_iStatus_bezeichnungnr = New SqlInt32(CType(dtToReturn.Rows(0)("status_bezeichnungnr"), Integer))
End If
If dtToReturn.Rows(0)("bezeichnung") Is System.DBNull.Value Then
m_sBezeichnung = SqlString.Null
Else
m_sBezeichnung = New SqlString(CType(dtToReturn.Rows(0)("bezeichnung"), String))
End If
If dtToReturn.Rows(0)("reihenfolge") Is System.DBNull.Value Then
m_sReihenfolge = SqlString.Null
Else
m_sReihenfolge = New SqlString(CType(dtToReturn.Rows(0)("reihenfolge"), String))
End If
If dtToReturn.Rows(0)("folgestatus_durch_anderen_verantwortlichen") Is System.DBNull.Value Then
m_bFolgestatus_durch_anderen_verantwortlichen = SqlBoolean.Null
Else
m_bFolgestatus_durch_anderen_verantwortlichen = New SqlBoolean(CType(dtToReturn.Rows(0)("folgestatus_durch_anderen_verantwortlichen"), Boolean))
End If
If dtToReturn.Rows(0)("dokument_bearbeitung_moeglich") Is System.DBNull.Value Then
m_bDokument_bearbeitung_moeglich = SqlBoolean.Null
Else
m_bDokument_bearbeitung_moeglich = New SqlBoolean(CType(dtToReturn.Rows(0)("dokument_bearbeitung_moeglich"), Boolean))
End If
If dtToReturn.Rows(0)("erledigung_ab") Is System.DBNull.Value Then
m_iErledigung_ab = SqlInt32.Null
Else
m_iErledigung_ab = New SqlInt32(CType(dtToReturn.Rows(0)("erledigung_ab"), Integer))
End If
If dtToReturn.Rows(0)("dokument_ausgangsarchivierung") Is System.DBNull.Value Then
m_bDokument_ausgangsarchivierung = SqlBoolean.Null
Else
m_bDokument_ausgangsarchivierung = New SqlBoolean(CType(dtToReturn.Rows(0)("dokument_ausgangsarchivierung"), Boolean))
End If
If dtToReturn.Rows(0)("dokument_bearbeitung_abgeschlossen") Is System.DBNull.Value Then
m_bDokument_bearbeitung_abgeschlossen = SqlBoolean.Null
Else
m_bDokument_bearbeitung_abgeschlossen = New SqlBoolean(CType(dtToReturn.Rows(0)("dokument_bearbeitung_abgeschlossen"), Boolean))
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)("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("clsDokument_status::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_dokument_status_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("dokument_status")
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_dokument_status_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("clsDokument_status::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 [iDokument_statusnr]() As SqlInt32
Get
Return m_iDokument_statusnr
End Get
Set(ByVal Value As SqlInt32)
Dim iDokument_statusnrTmp As SqlInt32 = Value
If iDokument_statusnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iDokument_statusnr", "iDokument_statusnr can't be NULL")
End If
m_iDokument_statusnr = Value
End Set
End Property
Public Property [sDokumenitid]() As SqlString
Get
Return m_sDokumenitid
End Get
Set(ByVal Value As SqlString)
m_sDokumenitid = Value
End Set
End Property
Public Property [iStatus_bezeichnungnr]() As SqlInt32
Get
Return m_iStatus_bezeichnungnr
End Get
Set(ByVal Value As SqlInt32)
m_iStatus_bezeichnungnr = 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 [sReihenfolge]() As SqlString
Get
Return m_sReihenfolge
End Get
Set(ByVal Value As SqlString)
m_sReihenfolge = Value
End Set
End Property
Public Property [bFolgestatus_durch_anderen_verantwortlichen]() As SqlBoolean
Get
Return m_bFolgestatus_durch_anderen_verantwortlichen
End Get
Set(ByVal Value As SqlBoolean)
m_bFolgestatus_durch_anderen_verantwortlichen = Value
End Set
End Property
Public Property [bDokument_bearbeitung_moeglich]() As SqlBoolean
Get
Return m_bDokument_bearbeitung_moeglich
End Get
Set(ByVal Value As SqlBoolean)
m_bDokument_bearbeitung_moeglich = Value
End Set
End Property
Public Property [iErledigung_ab]() As SqlInt32
Get
Return m_iErledigung_ab
End Get
Set(ByVal Value As SqlInt32)
m_iErledigung_ab = Value
End Set
End Property
Public Property [bDokument_ausgangsarchivierung]() As SqlBoolean
Get
Return m_bDokument_ausgangsarchivierung
End Get
Set(ByVal Value As SqlBoolean)
m_bDokument_ausgangsarchivierung = Value
End Set
End Property
Public Property [bDokument_bearbeitung_abgeschlossen]() As SqlBoolean
Get
Return m_bDokument_bearbeitung_abgeschlossen
End Get
Set(ByVal Value As SqlBoolean)
m_bDokument_bearbeitung_abgeschlossen = 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 [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

View File

@@ -0,0 +1,590 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'Dokumentart'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Donnerstag, 26. Dezember 2002, 13:00:24
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokadb
' /// <summary>
' /// Purpose: Data Access class for the table 'Dokumentart'.
' /// </summary>
Public Class clsDokumentart
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iMandantnr, m_iSprache, m_iImageindexopen, m_iMutierer, m_iDokumentartnr, m_iParentid, m_iImageindex, m_iSort As SqlInt32
Private m_sBezeichnung, 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>iDokumentartnr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>iParentid. May be SqlInt32.Null</LI>
' /// <LI>iSort. May be SqlInt32.Null</LI>
' /// <LI>iImageindex. May be SqlInt32.Null</LI>
' /// <LI>iImageindexopen. May be SqlInt32.Null</LI>
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>iSprache. 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_Dokumentart_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentartnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentartnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iparentid", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isort", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSort))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iimageindex", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageindex))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iimageindexopen", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageindexopen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
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_Dokumentart_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("clsDokumentart::Insert::Error occured." + ex.Message, 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>iDokumentartnr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>iParentid. May be SqlInt32.Null</LI>
' /// <LI>iSort. May be SqlInt32.Null</LI>
' /// <LI>iImageindex. May be SqlInt32.Null</LI>
' /// <LI>iImageindexopen. May be SqlInt32.Null</LI>
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>iSprache. 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_Dokumentart_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentartnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentartnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iparentid", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isort", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSort))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iimageindex", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageindex))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iimageindexopen", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageindexopen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
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_Dokumentart_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("clsDokumentart::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>iDokumentartnr</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_Dokumentart_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentartnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentartnr))
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_Dokumentart_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("clsDokumentart::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>iDokumentartnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iDokumentartnr</LI>
' /// <LI>sBezeichnung</LI>
' /// <LI>iParentid</LI>
' /// <LI>iSort</LI>
' /// <LI>iImageindex</LI>
' /// <LI>iImageindexopen</LI>
' /// <LI>sBeschreibung</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>iSprache</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_Dokumentart_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Dokumentart")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@idokumentartnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentartnr))
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_Dokumentart_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iDokumentartnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumentartnr"), Integer))
If dtToReturn.Rows(0)("bezeichnung") Is System.DBNull.Value Then
m_sBezeichnung = SqlString.Null
Else
m_sBezeichnung = New SqlString(CType(dtToReturn.Rows(0)("bezeichnung"), String))
End If
If dtToReturn.Rows(0)("parentid") Is System.DBNull.Value Then
m_iParentid = SqlInt32.Null
Else
m_iParentid = New SqlInt32(CType(dtToReturn.Rows(0)("parentid"), Integer))
End If
If dtToReturn.Rows(0)("sort") Is System.DBNull.Value Then
m_iSort = SqlInt32.Null
Else
m_iSort = New SqlInt32(CType(dtToReturn.Rows(0)("sort"), Integer))
End If
If dtToReturn.Rows(0)("imageindex") Is System.DBNull.Value Then
m_iImageindex = SqlInt32.Null
Else
m_iImageindex = New SqlInt32(CType(dtToReturn.Rows(0)("imageindex"), Integer))
End If
If dtToReturn.Rows(0)("imageindexopen") Is System.DBNull.Value Then
m_iImageindexopen = SqlInt32.Null
Else
m_iImageindexopen = New SqlInt32(CType(dtToReturn.Rows(0)("imageindexopen"), Integer))
End If
If dtToReturn.Rows(0)("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)("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)("sprache") Is System.DBNull.Value Then
m_iSprache = SqlInt32.Null
Else
m_iSprache = New SqlInt32(CType(dtToReturn.Rows(0)("sprache"), 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("clsDokumentart::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_Dokumentart_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("Dokumentart")
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_Dokumentart_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("clsDokumentart::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 [iDokumentartnr]() As SqlInt32
Get
Return m_iDokumentartnr
End Get
Set(ByVal Value As SqlInt32)
Dim iDokumentartnrTmp As SqlInt32 = Value
If iDokumentartnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iDokumentartnr", "iDokumentartnr can't be NULL")
End If
m_iDokumentartnr = Value
End Set
End Property
Public Property [sBezeichnung]() As SqlString
Get
Return m_sBezeichnung
End Get
Set(ByVal Value As SqlString)
m_sBezeichnung = Value
End Set
End Property
Public Property [iParentid]() As SqlInt32
Get
Return m_iParentid
End Get
Set(ByVal Value As SqlInt32)
m_iParentid = Value
End Set
End Property
Public Property [iSort]() As SqlInt32
Get
Return m_iSort
End Get
Set(ByVal Value As SqlInt32)
m_iSort = Value
End Set
End Property
Public Property [iImageindex]() As SqlInt32
Get
Return m_iImageindex
End Get
Set(ByVal Value As SqlInt32)
m_iImageindex = Value
End Set
End Property
Public Property [iImageindexopen]() As SqlInt32
Get
Return m_iImageindexopen
End Get
Set(ByVal Value As SqlInt32)
m_iImageindexopen = Value
End Set
End Property
Public Property [sBeschreibung]() As SqlString
Get
Return m_sBeschreibung
End Get
Set(ByVal Value As SqlString)
m_sBeschreibung = Value
End Set
End Property
Public Property [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr = 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 [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

View File

@@ -0,0 +1,469 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'dokumentaufhebung'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 22. Juni 2003, 13:06:43
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokadb
' /// <summary>
' /// Purpose: Data Access class for the table 'dokumentaufhebung'.
' /// </summary>
Public Class clsDokumentaufhebung
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iAufhebungnr, m_iFunktionnr, m_iDokumenttypnr As SqlInt32
#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>iAufhebungnr</LI>
' /// <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
' /// <LI>iFunktionnr. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_dokumentaufhebung_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iaufhebungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iAufhebungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionnr))
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("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
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_dokumentaufhebung_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("clsDokumentaufhebung::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>iAufhebungnr</LI>
' /// <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
' /// <LI>iFunktionnr. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_dokumentaufhebung_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iaufhebungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iAufhebungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionnr))
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("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
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_dokumentaufhebung_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("clsDokumentaufhebung::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>iAufhebungnr</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_dokumentaufhebung_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iaufhebungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iAufhebungnr))
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_dokumentaufhebung_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("clsDokumentaufhebung::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>iAufhebungnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iAufhebungnr</LI>
' /// <LI>iDokumenttypnr</LI>
' /// <LI>iFunktionnr</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>bAktiv</LI>
' /// </UL>
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
' /// </remarks>
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_dokumentaufhebung_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("dokumentaufhebung")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iaufhebungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iAufhebungnr))
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_dokumentaufhebung_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iAufhebungnr = New SqlInt32(CType(dtToReturn.Rows(0)("aufhebungnr"), 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)("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)("erstellt_am") Is System.DBNull.Value Then
m_daErstellt_am = SqlDateTime.Null
Else
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
End If
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
m_daMutiert_am = SqlDateTime.Null
Else
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
End If
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
m_iMutierer = SqlInt32.Null
Else
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
End If
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
m_bAktiv = SqlBoolean.Null
Else
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
End If
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsDokumentaufhebung::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_dokumentaufhebung_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("dokumentaufhebung")
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_dokumentaufhebung_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("clsDokumentaufhebung::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 [iAufhebungnr]() As SqlInt32
Get
Return m_iAufhebungnr
End Get
Set(ByVal Value As SqlInt32)
Dim iAufhebungnrTmp As SqlInt32 = Value
If iAufhebungnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iAufhebungnr", "iAufhebungnr can't be NULL")
End If
m_iAufhebungnr = 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 [iFunktionnr]() As SqlInt32
Get
Return m_iFunktionnr
End Get
Set(ByVal Value As SqlInt32)
m_iFunktionnr = Value
End Set
End Property
Public Property [daErstellt_am]() As SqlDateTime
Get
Return m_daErstellt_am
End Get
Set(ByVal Value As SqlDateTime)
m_daErstellt_am = Value
End Set
End Property
Public Property [daMutiert_am]() As SqlDateTime
Get
Return m_daMutiert_am
End Get
Set(ByVal Value As SqlDateTime)
m_daMutiert_am = Value
End Set
End Property
Public Property [iMutierer]() As SqlInt32
Get
Return m_iMutierer
End Get
Set(ByVal Value As SqlInt32)
m_iMutierer = Value
End Set
End Property
Public Property [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
m_bAktiv = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,751 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'dokumentcoldindexwert'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 6. April 2005, 10:10:46
' // 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 'dokumentcoldindexwert'.
' /// </summary>
Public Class clsDokumentcoldindexwert
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iIndextyp, m_iColdindexwertnr, m_iMutierer, m_iMandantnr As SqlInt32
Private m_sNRSTA00, m_sNRDOC00, m_sBEGSF00, m_sBERES03, m_sBEUSR00, m_sBKPAR00, m_sNAVVG00, m_sDokumentid, m_sNRPAR00, m_sBEBEZ00, m_sBESTA00, m_sBEORT00, m_sDMSTA01, m_sBEDAT00 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>iIndextyp. May be SqlInt32.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>sDokumentid. May be SqlString.Null</LI>
' /// <LI>sNRPAR00. May be SqlString.Null</LI>
' /// <LI>sBKPAR00. May be SqlString.Null</LI>
' /// <LI>sNAVVG00. May be SqlString.Null</LI>
' /// <LI>sBEBEZ00. May be SqlString.Null</LI>
' /// <LI>sDMSTA01. May be SqlString.Null</LI>
' /// <LI>sBEDAT00. May be SqlString.Null</LI>
' /// <LI>sBESTA00. May be SqlString.Null</LI>
' /// <LI>sBEORT00. May be SqlString.Null</LI>
' /// <LI>sNRDOC00. May be SqlString.Null</LI>
' /// <LI>sNRSTA00. May be SqlString.Null</LI>
' /// <LI>sBEGSF00. May be SqlString.Null</LI>
' /// <LI>sBEUSR00. May be SqlString.Null</LI>
' /// <LI>sBERES03. May be SqlString.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>iColdindexwertnr</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_dokumentcoldindexwert_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iindextyp", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iIndextyp))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRPAR00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRPAR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBKPAR00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBKPAR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNAVVG00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNAVVG00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEBEZ00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEBEZ00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDMSTA01", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDMSTA01))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEDAT00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEDAT00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBESTA00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBESTA00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEORT00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEORT00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRDOC00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRDOC00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRSTA00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRSTA00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEGSF00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEGSF00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEUSR00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEUSR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBERES03", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBERES03))
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("@icoldindexwertnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iColdindexwertnr))
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_iColdindexwertnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@icoldindexwertnr").Value, SqlInt32))
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_dokumentcoldindexwert_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("clsDokumentcoldindexwert::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>iColdindexwertnr</LI>
' /// <LI>iIndextyp. May be SqlInt32.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>sDokumentid. May be SqlString.Null</LI>
' /// <LI>sNRPAR00. May be SqlString.Null</LI>
' /// <LI>sBKPAR00. May be SqlString.Null</LI>
' /// <LI>sNAVVG00. May be SqlString.Null</LI>
' /// <LI>sBEBEZ00. May be SqlString.Null</LI>
' /// <LI>sDMSTA01. May be SqlString.Null</LI>
' /// <LI>sBEDAT00. May be SqlString.Null</LI>
' /// <LI>sBESTA00. May be SqlString.Null</LI>
' /// <LI>sBEORT00. May be SqlString.Null</LI>
' /// <LI>sNRDOC00. May be SqlString.Null</LI>
' /// <LI>sNRSTA00. May be SqlString.Null</LI>
' /// <LI>sBEGSF00. May be SqlString.Null</LI>
' /// <LI>sBEUSR00. May be SqlString.Null</LI>
' /// <LI>sBERES03. May be SqlString.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_dokumentcoldindexwert_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@icoldindexwertnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iColdindexwertnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iindextyp", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iIndextyp))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRPAR00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRPAR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBKPAR00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBKPAR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNAVVG00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNAVVG00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEBEZ00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEBEZ00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDMSTA01", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDMSTA01))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEDAT00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEDAT00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBESTA00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBESTA00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEORT00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEORT00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRDOC00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRDOC00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRSTA00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRSTA00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEGSF00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEGSF00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEUSR00", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEUSR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBERES03", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBERES03))
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_dokumentcoldindexwert_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("clsDokumentcoldindexwert::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>iColdindexwertnr</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_dokumentcoldindexwert_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@icoldindexwertnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iColdindexwertnr))
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_dokumentcoldindexwert_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("clsDokumentcoldindexwert::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>iColdindexwertnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iColdindexwertnr</LI>
' /// <LI>iIndextyp</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>sDokumentid</LI>
' /// <LI>sNRPAR00</LI>
' /// <LI>sBKPAR00</LI>
' /// <LI>sNAVVG00</LI>
' /// <LI>sBEBEZ00</LI>
' /// <LI>sDMSTA01</LI>
' /// <LI>sBEDAT00</LI>
' /// <LI>sBESTA00</LI>
' /// <LI>sBEORT00</LI>
' /// <LI>sNRDOC00</LI>
' /// <LI>sNRSTA00</LI>
' /// <LI>sBEGSF00</LI>
' /// <LI>sBEUSR00</LI>
' /// <LI>sBERES03</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_dokumentcoldindexwert_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("dokumentcoldindexwert")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@icoldindexwertnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iColdindexwertnr))
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_dokumentcoldindexwert_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iColdindexwertnr = New SqlInt32(CType(dtToReturn.Rows(0)("coldindexwertnr"), Integer))
If dtToReturn.Rows(0)("indextyp") Is System.DBNull.Value Then
m_iIndextyp = SqlInt32.Null
Else
m_iIndextyp = New SqlInt32(CType(dtToReturn.Rows(0)("indextyp"), Integer))
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)("dokumentid") Is System.DBNull.Value Then
m_sDokumentid = SqlString.Null
Else
m_sDokumentid = New SqlString(CType(dtToReturn.Rows(0)("dokumentid"), String))
End If
If dtToReturn.Rows(0)("NRPAR00") Is System.DBNull.Value Then
m_sNRPAR00 = SqlString.Null
Else
m_sNRPAR00 = New SqlString(CType(dtToReturn.Rows(0)("NRPAR00"), String))
End If
If dtToReturn.Rows(0)("BKPAR00") Is System.DBNull.Value Then
m_sBKPAR00 = SqlString.Null
Else
m_sBKPAR00 = New SqlString(CType(dtToReturn.Rows(0)("BKPAR00"), 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)("BEBEZ00") Is System.DBNull.Value Then
m_sBEBEZ00 = SqlString.Null
Else
m_sBEBEZ00 = New SqlString(CType(dtToReturn.Rows(0)("BEBEZ00"), String))
End If
If dtToReturn.Rows(0)("DMSTA01") Is System.DBNull.Value Then
m_sDMSTA01 = SqlString.Null
Else
m_sDMSTA01 = New SqlString(CType(dtToReturn.Rows(0)("DMSTA01"), String))
End If
If dtToReturn.Rows(0)("BEDAT00") Is System.DBNull.Value Then
m_sBEDAT00 = SqlString.Null
Else
m_sBEDAT00 = New SqlString(CType(dtToReturn.Rows(0)("BEDAT00"), String))
End If
If dtToReturn.Rows(0)("BESTA00") Is System.DBNull.Value Then
m_sBESTA00 = SqlString.Null
Else
m_sBESTA00 = New SqlString(CType(dtToReturn.Rows(0)("BESTA00"), String))
End If
If dtToReturn.Rows(0)("BEORT00") Is System.DBNull.Value Then
m_sBEORT00 = SqlString.Null
Else
m_sBEORT00 = New SqlString(CType(dtToReturn.Rows(0)("BEORT00"), String))
End If
If dtToReturn.Rows(0)("NRDOC00") Is System.DBNull.Value Then
m_sNRDOC00 = SqlString.Null
Else
m_sNRDOC00 = New SqlString(CType(dtToReturn.Rows(0)("NRDOC00"), String))
End If
If dtToReturn.Rows(0)("NRSTA00") Is System.DBNull.Value Then
m_sNRSTA00 = SqlString.Null
Else
m_sNRSTA00 = New SqlString(CType(dtToReturn.Rows(0)("NRSTA00"), String))
End If
If dtToReturn.Rows(0)("BEGSF00") Is System.DBNull.Value Then
m_sBEGSF00 = SqlString.Null
Else
m_sBEGSF00 = New SqlString(CType(dtToReturn.Rows(0)("BEGSF00"), String))
End If
If dtToReturn.Rows(0)("BEUSR00") Is System.DBNull.Value Then
m_sBEUSR00 = SqlString.Null
Else
m_sBEUSR00 = New SqlString(CType(dtToReturn.Rows(0)("BEUSR00"), String))
End If
If dtToReturn.Rows(0)("BERES03") Is System.DBNull.Value Then
m_sBERES03 = SqlString.Null
Else
m_sBERES03 = New SqlString(CType(dtToReturn.Rows(0)("BERES03"), String))
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("clsDokumentcoldindexwert::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_dokumentcoldindexwert_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("dokumentcoldindexwert")
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_dokumentcoldindexwert_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("clsDokumentcoldindexwert::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 [iColdindexwertnr]() As SqlInt32
Get
Return m_iColdindexwertnr
End Get
Set(ByVal Value As SqlInt32)
Dim iColdindexwertnrTmp As SqlInt32 = Value
If iColdindexwertnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iColdindexwertnr", "iColdindexwertnr can't be NULL")
End If
m_iColdindexwertnr = Value
End Set
End Property
Public Property [iIndextyp]() As SqlInt32
Get
Return m_iIndextyp
End Get
Set(ByVal Value As SqlInt32)
m_iIndextyp = 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 [sDokumentid]() As SqlString
Get
Return m_sDokumentid
End Get
Set(ByVal Value As SqlString)
m_sDokumentid = Value
End Set
End Property
Public Property [sNRPAR00]() As SqlString
Get
Return m_sNRPAR00
End Get
Set(ByVal Value As SqlString)
m_sNRPAR00 = Value
End Set
End Property
Public Property [sBKPAR00]() As SqlString
Get
Return m_sBKPAR00
End Get
Set(ByVal Value As SqlString)
m_sBKPAR00 = 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 [sBEBEZ00]() As SqlString
Get
Return m_sBEBEZ00
End Get
Set(ByVal Value As SqlString)
m_sBEBEZ00 = Value
End Set
End Property
Public Property [sDMSTA01]() As SqlString
Get
Return m_sDMSTA01
End Get
Set(ByVal Value As SqlString)
m_sDMSTA01 = Value
End Set
End Property
Public Property [sBEDAT00]() As SqlString
Get
Return m_sBEDAT00
End Get
Set(ByVal Value As SqlString)
m_sBEDAT00 = Value
End Set
End Property
Public Property [sBESTA00]() As SqlString
Get
Return m_sBESTA00
End Get
Set(ByVal Value As SqlString)
m_sBESTA00 = Value
End Set
End Property
Public Property [sBEORT00]() As SqlString
Get
Return m_sBEORT00
End Get
Set(ByVal Value As SqlString)
m_sBEORT00 = Value
End Set
End Property
Public Property [sNRDOC00]() As SqlString
Get
Return m_sNRDOC00
End Get
Set(ByVal Value As SqlString)
m_sNRDOC00 = Value
End Set
End Property
Public Property [sNRSTA00]() As SqlString
Get
Return m_sNRSTA00
End Get
Set(ByVal Value As SqlString)
m_sNRSTA00 = Value
End Set
End Property
Public Property [sBEGSF00]() As SqlString
Get
Return m_sBEGSF00
End Get
Set(ByVal Value As SqlString)
m_sBEGSF00 = Value
End Set
End Property
Public Property [sBEUSR00]() As SqlString
Get
Return m_sBEUSR00
End Get
Set(ByVal Value As SqlString)
m_sBEUSR00 = Value
End Set
End Property
Public Property [sBERES03]() As SqlString
Get
Return m_sBERES03
End Get
Set(ByVal Value As SqlString)
m_sBERES03 = 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

View File

@@ -0,0 +1,470 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'dokumentfavoriten'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 9. März 2003, 21:42:03
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokadb
' /// <summary>
' /// Purpose: Data Access class for the table 'dokumentfavoriten'.
' /// </summary>
Public Class clsDokumentfavoriten
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iDokumentfavoritenstrukturnr, m_iDokumenttypnr, m_iDokumentfavoritnr As SqlInt32
#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>iDokumentfavoritenstrukturnr. May be SqlInt32.Null</LI>
' /// <LI>iDokumenttypnr. 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>iDokumentfavoritnr</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_dokumentfavoriten_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentfavoritenstrukturnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentfavoritenstrukturnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
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("@idokumentfavoritnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentfavoritnr))
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_iDokumentfavoritnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@idokumentfavoritnr").Value, SqlInt32))
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_dokumentfavoriten_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("clsDokumentfavoriten::Insert::Error occured." + ex.Message, 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>iDokumentfavoritnr</LI>
' /// <LI>iDokumentfavoritenstrukturnr. May be SqlInt32.Null</LI>
' /// <LI>iDokumenttypnr. 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_dokumentfavoriten_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentfavoritnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentfavoritnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentfavoritenstrukturnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentfavoritenstrukturnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
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_dokumentfavoriten_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("clsDokumentfavoriten::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>iDokumentfavoritnr</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_dokumentfavoriten_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentfavoritnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentfavoritnr))
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_dokumentfavoriten_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("clsDokumentfavoriten::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>iDokumentfavoritnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iDokumentfavoritnr</LI>
' /// <LI>iDokumentfavoritenstrukturnr</LI>
' /// <LI>iDokumenttypnr</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_dokumentfavoriten_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("dokumentfavoriten")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@idokumentfavoritnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentfavoritnr))
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_dokumentfavoriten_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iDokumentfavoritnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumentfavoritnr"), Integer))
If dtToReturn.Rows(0)("dokumentfavoritenstrukturnr") Is System.DBNull.Value Then
m_iDokumentfavoritenstrukturnr = SqlInt32.Null
Else
m_iDokumentfavoritenstrukturnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumentfavoritenstrukturnr"), Integer))
End If
If dtToReturn.Rows(0)("dokumenttypnr") Is System.DBNull.Value Then
m_iDokumenttypnr = SqlInt32.Null
Else
m_iDokumenttypnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumenttypnr"), Integer))
End If
If dtToReturn.Rows(0)("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("clsDokumentfavoriten::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_dokumentfavoriten_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("dokumentfavoriten")
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_dokumentfavoriten_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("clsDokumentfavoriten::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 [iDokumentfavoritnr]() As SqlInt32
Get
Return m_iDokumentfavoritnr
End Get
Set(ByVal Value As SqlInt32)
Dim iDokumentfavoritnrTmp As SqlInt32 = Value
If iDokumentfavoritnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iDokumentfavoritnr", "iDokumentfavoritnr can't be NULL")
End If
m_iDokumentfavoritnr = Value
End Set
End Property
Public Property [iDokumentfavoritenstrukturnr]() As SqlInt32
Get
Return m_iDokumentfavoritenstrukturnr
End Get
Set(ByVal Value As SqlInt32)
m_iDokumentfavoritenstrukturnr = 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 [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

View File

@@ -0,0 +1,611 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'dokumentfavoriten_struktur'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 9. März 2003, 21:42:08
' // 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 'dokumentfavoriten_struktur'.
' /// </summary>
Public Class clsDokumentfavoriten_struktur
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMandantnr, m_iSprache, m_iMutierer, m_iImageindexopen, m_iParentid, m_iMitarbeiternr, m_iDokumentfavoritennr, m_iImageindex, m_iSort As SqlInt32
Private m_sBeschreibung, m_sBezeichnung As SqlString
#End Region
' /// <summary>
' /// Purpose: Class constructor.
' /// </summary>
Public Sub New()
' // Nothing for now.
End Sub
' /// <summary>
' /// Purpose: Insert method. This method will insert one new row into the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iMitarbeiternr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>iParentid. May be SqlInt32.Null</LI>
' /// <LI>iSort. May be SqlInt32.Null</LI>
' /// <LI>iImageindex. May be SqlInt32.Null</LI>
' /// <LI>iImageindexopen. May be SqlInt32.Null</LI>
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>iSprache</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iDokumentfavoritennr</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_dokumentfavoriten_struktur_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("@sbezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iparentid", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isort", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSort))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iimageindex", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageindex))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iimageindexopen", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageindexopen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 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("@idokumentfavoritennr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentfavoritennr))
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_iDokumentfavoritennr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@idokumentfavoritennr").Value, SqlInt32))
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_dokumentfavoriten_struktur_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("clsDokumentfavoriten_struktur::Insert::Error occured." + ex.Message, 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>iDokumentfavoritennr</LI>
' /// <LI>iMitarbeiternr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>iParentid. May be SqlInt32.Null</LI>
' /// <LI>iSort. May be SqlInt32.Null</LI>
' /// <LI>iImageindex. May be SqlInt32.Null</LI>
' /// <LI>iImageindexopen. May be SqlInt32.Null</LI>
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>iSprache</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// </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_dokumentfavoriten_struktur_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentfavoritennr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentfavoritennr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iparentid", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isort", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSort))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iimageindex", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageindex))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iimageindexopen", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageindexopen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 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_dokumentfavoriten_struktur_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("clsDokumentfavoriten_struktur::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>iDokumentfavoritennr</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_dokumentfavoriten_struktur_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentfavoritennr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentfavoritennr))
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_dokumentfavoriten_struktur_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("clsDokumentfavoriten_struktur::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>iDokumentfavoritennr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iDokumentfavoritennr</LI>
' /// <LI>iMitarbeiternr</LI>
' /// <LI>sBezeichnung</LI>
' /// <LI>iParentid</LI>
' /// <LI>iSort</LI>
' /// <LI>iImageindex</LI>
' /// <LI>iImageindexopen</LI>
' /// <LI>sBeschreibung</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>iSprache</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_dokumentfavoriten_struktur_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("dokumentfavoriten_struktur")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@idokumentfavoritennr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentfavoritennr))
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_dokumentfavoriten_struktur_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iDokumentfavoritennr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumentfavoritennr"), Integer))
m_iMitarbeiternr = New SqlInt32(CType(dtToReturn.Rows(0)("mitarbeiternr"), Integer))
If dtToReturn.Rows(0)("bezeichnung") Is System.DBNull.Value Then
m_sBezeichnung = SqlString.Null
Else
m_sBezeichnung = New SqlString(CType(dtToReturn.Rows(0)("bezeichnung"), String))
End If
If dtToReturn.Rows(0)("parentid") Is System.DBNull.Value Then
m_iParentid = SqlInt32.Null
Else
m_iParentid = New SqlInt32(CType(dtToReturn.Rows(0)("parentid"), Integer))
End If
If dtToReturn.Rows(0)("sort") Is System.DBNull.Value Then
m_iSort = SqlInt32.Null
Else
m_iSort = New SqlInt32(CType(dtToReturn.Rows(0)("sort"), Integer))
End If
If dtToReturn.Rows(0)("imageindex") Is System.DBNull.Value Then
m_iImageindex = SqlInt32.Null
Else
m_iImageindex = New SqlInt32(CType(dtToReturn.Rows(0)("imageindex"), Integer))
End If
If dtToReturn.Rows(0)("imageindexopen") Is System.DBNull.Value Then
m_iImageindexopen = SqlInt32.Null
Else
m_iImageindexopen = New SqlInt32(CType(dtToReturn.Rows(0)("imageindexopen"), Integer))
End If
If dtToReturn.Rows(0)("beschreibung") Is System.DBNull.Value Then
m_sBeschreibung = SqlString.Null
Else
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("beschreibung"), String))
End If
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
m_iSprache = New SqlInt32(CType(dtToReturn.Rows(0)("sprache"), Integer))
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
m_bAktiv = SqlBoolean.Null
Else
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
End If
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
m_daErstellt_am = SqlDateTime.Null
Else
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
End If
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
m_daMutiert_am = SqlDateTime.Null
Else
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
End If
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
m_iMutierer = SqlInt32.Null
Else
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
End If
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsDokumentfavoriten_struktur::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_dokumentfavoriten_struktur_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("dokumentfavoriten_struktur")
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_dokumentfavoriten_struktur_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("clsDokumentfavoriten_struktur::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 [iDokumentfavoritennr]() As SqlInt32
Get
Return m_iDokumentfavoritennr
End Get
Set(ByVal Value As SqlInt32)
Dim iDokumentfavoritennrTmp As SqlInt32 = Value
If iDokumentfavoritennrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iDokumentfavoritennr", "iDokumentfavoritennr can't be NULL")
End If
m_iDokumentfavoritennr = Value
End Set
End Property
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 [sBezeichnung]() As SqlString
Get
Return m_sBezeichnung
End Get
Set(ByVal Value As SqlString)
m_sBezeichnung = Value
End Set
End Property
Public Property [iParentid]() As SqlInt32
Get
Return m_iParentid
End Get
Set(ByVal Value As SqlInt32)
m_iParentid = Value
End Set
End Property
Public Property [iSort]() As SqlInt32
Get
Return m_iSort
End Get
Set(ByVal Value As SqlInt32)
m_iSort = Value
End Set
End Property
Public Property [iImageindex]() As SqlInt32
Get
Return m_iImageindex
End Get
Set(ByVal Value As SqlInt32)
m_iImageindex = Value
End Set
End Property
Public Property [iImageindexopen]() As SqlInt32
Get
Return m_iImageindexopen
End Get
Set(ByVal Value As SqlInt32)
m_iImageindexopen = Value
End Set
End Property
Public Property [sBeschreibung]() As SqlString
Get
Return m_sBeschreibung
End Get
Set(ByVal Value As SqlString)
m_sBeschreibung = Value
End Set
End Property
Public Property [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
Dim iMandantnrTmp As SqlInt32 = Value
If iMandantnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iMandantnr", "iMandantnr can't be NULL")
End If
m_iMandantnr = Value
End Set
End Property
Public Property [iSprache]() As SqlInt32
Get
Return m_iSprache
End Get
Set(ByVal Value As SqlInt32)
Dim iSpracheTmp As SqlInt32 = Value
If iSpracheTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iSprache", "iSprache can't be NULL")
End If
m_iSprache = Value
End Set
End Property
Public Property [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
m_bAktiv = Value
End Set
End Property
Public Property [daErstellt_am]() As SqlDateTime
Get
Return m_daErstellt_am
End Get
Set(ByVal Value As SqlDateTime)
m_daErstellt_am = Value
End Set
End Property
Public Property [daMutiert_am]() As SqlDateTime
Get
Return m_daMutiert_am
End Get
Set(ByVal Value As SqlDateTime)
m_daMutiert_am = Value
End Set
End Property
Public Property [iMutierer]() As SqlInt32
Get
Return m_iMutierer
End Get
Set(ByVal Value As SqlInt32)
m_iMutierer = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,336 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'dokumentfavorithierarchie'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 11. Februar 2003, 14:08:01
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokadb
' /// <summary>
' /// Purpose: Data Access class for the table 'dokumentfavorithierarchie'.
' /// </summary>
Public Class clsDokumentfavorithierarchie
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iMitarbeiternr, m_iSprache, m_iMandantnr, m_iParentid, m_iMutierer, m_iDokumentfavorithierarchinr, m_iImageindexopen, m_iImageindex, m_iSort As SqlInt32
Private m_sBezeichnung, 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>iDokumentfavorithierarchinr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>iParentid. May be SqlInt32.Null</LI>
' /// <LI>iSort. May be SqlInt32.Null</LI>
' /// <LI>iImageindex. May be SqlInt32.Null</LI>
' /// <LI>iImageindexopen. May be SqlInt32.Null</LI>
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
' /// <LI>iMitarbeiternr</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>iSprache</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Overrides Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_dokumentfavorithierarchie_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentfavorithierarchinr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentfavorithierarchinr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iparentid", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isort", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSort))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iimageindex", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageindex))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iimageindexopen", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageindexopen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 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_dokumentfavorithierarchie_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("clsDokumentfavorithierarchie::Insert::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: SelectAll method. This method will Select all rows from the table.
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Overrides Function SelectAll() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_dokumentfavorithierarchie_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("dokumentfavorithierarchie")
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_dokumentfavorithierarchie_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("clsDokumentfavorithierarchie::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 [iDokumentfavorithierarchinr]() As SqlInt32
Get
Return m_iDokumentfavorithierarchinr
End Get
Set(ByVal Value As SqlInt32)
Dim iDokumentfavorithierarchinrTmp As SqlInt32 = Value
If iDokumentfavorithierarchinrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iDokumentfavorithierarchinr", "iDokumentfavorithierarchinr can't be NULL")
End If
m_iDokumentfavorithierarchinr = Value
End Set
End Property
Public Property [sBezeichnung]() As SqlString
Get
Return m_sBezeichnung
End Get
Set(ByVal Value As SqlString)
m_sBezeichnung = Value
End Set
End Property
Public Property [iParentid]() As SqlInt32
Get
Return m_iParentid
End Get
Set(ByVal Value As SqlInt32)
m_iParentid = Value
End Set
End Property
Public Property [iSort]() As SqlInt32
Get
Return m_iSort
End Get
Set(ByVal Value As SqlInt32)
m_iSort = Value
End Set
End Property
Public Property [iImageindex]() As SqlInt32
Get
Return m_iImageindex
End Get
Set(ByVal Value As SqlInt32)
m_iImageindex = Value
End Set
End Property
Public Property [iImageindexopen]() As SqlInt32
Get
Return m_iImageindexopen
End Get
Set(ByVal Value As SqlInt32)
m_iImageindexopen = Value
End Set
End Property
Public Property [sBeschreibung]() As SqlString
Get
Return m_sBeschreibung
End Get
Set(ByVal Value As SqlString)
m_sBeschreibung = Value
End Set
End Property
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 [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
Dim iMandantnrTmp As SqlInt32 = Value
If iMandantnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iMandantnr", "iMandantnr can't be NULL")
End If
m_iMandantnr = Value
End Set
End Property
Public Property [iSprache]() As SqlInt32
Get
Return m_iSprache
End Get
Set(ByVal Value As SqlInt32)
Dim iSpracheTmp As SqlInt32 = Value
If iSpracheTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iSprache", "iSprache can't be NULL")
End If
m_iSprache = Value
End Set
End Property
Public Property [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
m_bAktiv = Value
End Set
End Property
Public Property [daErstellt_am]() As SqlDateTime
Get
Return m_daErstellt_am
End Get
Set(ByVal Value As SqlDateTime)
m_daErstellt_am = Value
End Set
End Property
Public Property [daMutiert_am]() As SqlDateTime
Get
Return m_daMutiert_am
End Get
Set(ByVal Value As SqlDateTime)
m_daMutiert_am = Value
End Set
End Property
Public Property [iMutierer]() As SqlInt32
Get
Return m_iMutierer
End Get
Set(ByVal Value As SqlInt32)
m_iMutierer = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,469 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'dokumentindexmutation'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 22. Juni 2003, 13:06: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 'dokumentindexmutation'.
' /// </summary>
Public Class clsDokumentindexmutation
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iIndexmutationnr, m_iFunktionnr, m_iDokumenttypnr As SqlInt32
#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>iIndexmutationnr</LI>
' /// <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
' /// <LI>iFunktionnr. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_dokumentindexmutation_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iindexmutationnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iIndexmutationnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionnr))
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("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
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_dokumentindexmutation_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("clsDokumentindexmutation::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>iIndexmutationnr</LI>
' /// <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
' /// <LI>iFunktionnr. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_dokumentindexmutation_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iindexmutationnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iIndexmutationnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionnr))
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("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
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_dokumentindexmutation_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("clsDokumentindexmutation::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>iIndexmutationnr</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_dokumentindexmutation_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iindexmutationnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iIndexmutationnr))
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_dokumentindexmutation_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("clsDokumentindexmutation::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>iIndexmutationnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iIndexmutationnr</LI>
' /// <LI>iDokumenttypnr</LI>
' /// <LI>iFunktionnr</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>bAktiv</LI>
' /// </UL>
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
' /// </remarks>
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_dokumentindexmutation_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("dokumentindexmutation")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iindexmutationnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iIndexmutationnr))
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_dokumentindexmutation_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iIndexmutationnr = New SqlInt32(CType(dtToReturn.Rows(0)("indexmutationnr"), 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)("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)("erstellt_am") Is System.DBNull.Value Then
m_daErstellt_am = SqlDateTime.Null
Else
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
End If
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
m_daMutiert_am = SqlDateTime.Null
Else
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
End If
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
m_iMutierer = SqlInt32.Null
Else
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
End If
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
m_bAktiv = SqlBoolean.Null
Else
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
End If
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsDokumentindexmutation::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_dokumentindexmutation_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("dokumentindexmutation")
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_dokumentindexmutation_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("clsDokumentindexmutation::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 [iIndexmutationnr]() As SqlInt32
Get
Return m_iIndexmutationnr
End Get
Set(ByVal Value As SqlInt32)
Dim iIndexmutationnrTmp As SqlInt32 = Value
If iIndexmutationnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iIndexmutationnr", "iIndexmutationnr can't be NULL")
End If
m_iIndexmutationnr = 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 [iFunktionnr]() As SqlInt32
Get
Return m_iFunktionnr
End Get
Set(ByVal Value As SqlInt32)
m_iFunktionnr = Value
End Set
End Property
Public Property [daErstellt_am]() As SqlDateTime
Get
Return m_daErstellt_am
End Get
Set(ByVal Value As SqlDateTime)
m_daErstellt_am = Value
End Set
End Property
Public Property [daMutiert_am]() As SqlDateTime
Get
Return m_daMutiert_am
End Get
Set(ByVal Value As SqlDateTime)
m_daMutiert_am = Value
End Set
End Property
Public Property [iMutierer]() As SqlInt32
Get
Return m_iMutierer
End Get
Set(ByVal Value As SqlInt32)
m_iMutierer = Value
End Set
End Property
Public Property [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
m_bAktiv = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,649 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'dokumentstatus'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Samstag, 8. März 2003, 22:06: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 'dokumentstatus'.
' /// </summary>
Public Class clsDokumentstatus
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bDokumentbearbeitung_moeglich, m_bFolgestatus_durch_anderen_verantwortlichen, m_bDokument_bearbeitung_abgeschlossen, m_bDokument_ausgangsarchivieren, m_bAktiv As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iStatustyp, m_iMutierer, m_iMandantnr, m_iStatustypnr, m_iDokumenttypnr, m_iDokumentstatusnr, m_iErledigung_ab, m_iReihenfolge, m_iStatus_bezeichnungnr As SqlInt32
#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>iDokumentstatusnr</LI>
' /// <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
' /// <LI>iStatustypnr. May be SqlInt32.Null</LI>
' /// <LI>iStatus_bezeichnungnr. May be SqlInt32.Null</LI>
' /// <LI>iReihenfolge</LI>
' /// <LI>bFolgestatus_durch_anderen_verantwortlichen</LI>
' /// <LI>bDokumentbearbeitung_moeglich</LI>
' /// <LI>iErledigung_ab</LI>
' /// <LI>bDokument_ausgangsarchivieren. May be SqlBoolean.Null</LI>
' /// <LI>bDokument_bearbeitung_abgeschlossen. 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>iStatustyp. 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_dokumentstatus_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentstatusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatusnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatustypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatustypnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus_bezeichnungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus_bezeichnungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireihenfolge", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReihenfolge))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bfolgestatus_durch_anderen_verantwortlichen", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bFolgestatus_durch_anderen_verantwortlichen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokumentbearbeitung_moeglich", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bDokumentbearbeitung_moeglich))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ierledigung_ab", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iErledigung_ab))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_ausgangsarchivieren", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_ausgangsarchivieren))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_bearbeitung_abgeschlossen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_bearbeitung_abgeschlossen))
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("@istatustyp", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatustyp))
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_dokumentstatus_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("clsDokumentstatus::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>iDokumentstatusnr</LI>
' /// <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
' /// <LI>iStatustypnr. May be SqlInt32.Null</LI>
' /// <LI>iStatus_bezeichnungnr. May be SqlInt32.Null</LI>
' /// <LI>iReihenfolge</LI>
' /// <LI>bFolgestatus_durch_anderen_verantwortlichen</LI>
' /// <LI>bDokumentbearbeitung_moeglich</LI>
' /// <LI>iErledigung_ab</LI>
' /// <LI>bDokument_ausgangsarchivieren. May be SqlBoolean.Null</LI>
' /// <LI>bDokument_bearbeitung_abgeschlossen. 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>iStatustyp. 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_dokumentstatus_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentstatusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatusnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatustypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatustypnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus_bezeichnungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus_bezeichnungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireihenfolge", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReihenfolge))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bfolgestatus_durch_anderen_verantwortlichen", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bFolgestatus_durch_anderen_verantwortlichen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokumentbearbeitung_moeglich", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bDokumentbearbeitung_moeglich))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ierledigung_ab", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iErledigung_ab))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_ausgangsarchivieren", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_ausgangsarchivieren))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_bearbeitung_abgeschlossen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_bearbeitung_abgeschlossen))
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("@istatustyp", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatustyp))
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_dokumentstatus_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("clsDokumentstatus::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>iDokumentstatusnr</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_dokumentstatus_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentstatusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatusnr))
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_dokumentstatus_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("clsDokumentstatus::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>iDokumentstatusnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iDokumentstatusnr</LI>
' /// <LI>iDokumenttypnr</LI>
' /// <LI>iStatustypnr</LI>
' /// <LI>iStatus_bezeichnungnr</LI>
' /// <LI>iReihenfolge</LI>
' /// <LI>bFolgestatus_durch_anderen_verantwortlichen</LI>
' /// <LI>bDokumentbearbeitung_moeglich</LI>
' /// <LI>iErledigung_ab</LI>
' /// <LI>bDokument_ausgangsarchivieren</LI>
' /// <LI>bDokument_bearbeitung_abgeschlossen</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>iStatustyp</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_dokumentstatus_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("dokumentstatus")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@idokumentstatusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatusnr))
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_dokumentstatus_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iDokumentstatusnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumentstatusnr"), 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)("statustypnr") Is System.DBNull.Value Then
m_iStatustypnr = SqlInt32.Null
Else
m_iStatustypnr = New SqlInt32(CType(dtToReturn.Rows(0)("statustypnr"), Integer))
End If
If dtToReturn.Rows(0)("status_bezeichnungnr") Is System.DBNull.Value Then
m_iStatus_bezeichnungnr = SqlInt32.Null
Else
m_iStatus_bezeichnungnr = New SqlInt32(CType(dtToReturn.Rows(0)("status_bezeichnungnr"), Integer))
End If
m_iReihenfolge = New SqlInt32(CType(dtToReturn.Rows(0)("reihenfolge"), Integer))
m_bFolgestatus_durch_anderen_verantwortlichen = New SqlBoolean(CType(dtToReturn.Rows(0)("folgestatus_durch_anderen_verantwortlichen"), Boolean))
m_bDokumentbearbeitung_moeglich = New SqlBoolean(CType(dtToReturn.Rows(0)("dokumentbearbeitung_moeglich"), Boolean))
m_iErledigung_ab = New SqlInt32(CType(dtToReturn.Rows(0)("erledigung_ab"), Integer))
If dtToReturn.Rows(0)("dokument_ausgangsarchivieren") Is System.DBNull.Value Then
m_bDokument_ausgangsarchivieren = SqlBoolean.Null
Else
m_bDokument_ausgangsarchivieren = New SqlBoolean(CType(dtToReturn.Rows(0)("dokument_ausgangsarchivieren"), Boolean))
End If
If dtToReturn.Rows(0)("dokument_bearbeitung_abgeschlossen") Is System.DBNull.Value Then
m_bDokument_bearbeitung_abgeschlossen = SqlBoolean.Null
Else
m_bDokument_bearbeitung_abgeschlossen = New SqlBoolean(CType(dtToReturn.Rows(0)("dokument_bearbeitung_abgeschlossen"), 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)("statustyp") Is System.DBNull.Value Then
m_iStatustyp = SqlInt32.Null
Else
m_iStatustyp = New SqlInt32(CType(dtToReturn.Rows(0)("statustyp"), 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("clsDokumentstatus::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_dokumentstatus_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("dokumentstatus")
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_dokumentstatus_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("clsDokumentstatus::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 [iDokumentstatusnr]() As SqlInt32
Get
Return m_iDokumentstatusnr
End Get
Set(ByVal Value As SqlInt32)
Dim iDokumentstatusnrTmp As SqlInt32 = Value
If iDokumentstatusnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iDokumentstatusnr", "iDokumentstatusnr can't be NULL")
End If
m_iDokumentstatusnr = 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 [iStatustypnr]() As SqlInt32
Get
Return m_iStatustypnr
End Get
Set(ByVal Value As SqlInt32)
m_iStatustypnr = Value
End Set
End Property
Public Property [iStatus_bezeichnungnr]() As SqlInt32
Get
Return m_iStatus_bezeichnungnr
End Get
Set(ByVal Value As SqlInt32)
m_iStatus_bezeichnungnr = Value
End Set
End Property
Public Property [iReihenfolge]() As SqlInt32
Get
Return m_iReihenfolge
End Get
Set(ByVal Value As SqlInt32)
Dim iReihenfolgeTmp As SqlInt32 = Value
If iReihenfolgeTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iReihenfolge", "iReihenfolge can't be NULL")
End If
m_iReihenfolge = Value
End Set
End Property
Public Property [bFolgestatus_durch_anderen_verantwortlichen]() As SqlBoolean
Get
Return m_bFolgestatus_durch_anderen_verantwortlichen
End Get
Set(ByVal Value As SqlBoolean)
Dim bFolgestatus_durch_anderen_verantwortlichenTmp As SqlBoolean = Value
If bFolgestatus_durch_anderen_verantwortlichenTmp.IsNull Then
Throw New ArgumentOutOfRangeException("bFolgestatus_durch_anderen_verantwortlichen", "bFolgestatus_durch_anderen_verantwortlichen can't be NULL")
End If
m_bFolgestatus_durch_anderen_verantwortlichen = Value
End Set
End Property
Public Property [bDokumentbearbeitung_moeglich]() As SqlBoolean
Get
Return m_bDokumentbearbeitung_moeglich
End Get
Set(ByVal Value As SqlBoolean)
Dim bDokumentbearbeitung_moeglichTmp As SqlBoolean = Value
If bDokumentbearbeitung_moeglichTmp.IsNull Then
Throw New ArgumentOutOfRangeException("bDokumentbearbeitung_moeglich", "bDokumentbearbeitung_moeglich can't be NULL")
End If
m_bDokumentbearbeitung_moeglich = Value
End Set
End Property
Public Property [iErledigung_ab]() As SqlInt32
Get
Return m_iErledigung_ab
End Get
Set(ByVal Value As SqlInt32)
Dim iErledigung_abTmp As SqlInt32 = Value
If iErledigung_abTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iErledigung_ab", "iErledigung_ab can't be NULL")
End If
m_iErledigung_ab = Value
End Set
End Property
Public Property [bDokument_ausgangsarchivieren]() As SqlBoolean
Get
Return m_bDokument_ausgangsarchivieren
End Get
Set(ByVal Value As SqlBoolean)
m_bDokument_ausgangsarchivieren = Value
End Set
End Property
Public Property [bDokument_bearbeitung_abgeschlossen]() As SqlBoolean
Get
Return m_bDokument_bearbeitung_abgeschlossen
End Get
Set(ByVal Value As SqlBoolean)
m_bDokument_bearbeitung_abgeschlossen = 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 [iStatustyp]() As SqlInt32
Get
Return m_iStatustyp
End Get
Set(ByVal Value As SqlInt32)
m_iStatustyp = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,621 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'dokumentstatus_funktion'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 4. Mai 2003, 12:49: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 'dokumentstatus_funktion'.
' /// </summary>
Public Class clsDokumentstatus_funktion
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iMandantnr, m_iDokumentstatusnr, m_iDokumentstatusnrOld, m_iFunktionnr, m_iDokumentstatus_funktionnr As SqlInt32
#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>iDokumentstatus_funktionnr</LI>
' /// <LI>iDokumentstatusnr. May be SqlInt32.Null</LI>
' /// <LI>iFunktionnr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// </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_dokumentstatus_funktion_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentstatus_funktionnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatus_funktionnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentstatusnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatusnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
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_dokumentstatus_funktion_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("clsDokumentstatus_funktion::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>iDokumentstatus_funktionnr</LI>
' /// <LI>iDokumentstatusnr. May be SqlInt32.Null</LI>
' /// <LI>iFunktionnr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// </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_dokumentstatus_funktion_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentstatus_funktionnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatus_funktionnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentstatusnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatusnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
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_dokumentstatus_funktion_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("clsDokumentstatus_funktion::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 'dokumentstatusnr.
' /// This method will Update one or more existing rows in the database. It will reset the field 'dokumentstatusnr' in
' /// all rows which have as value for this field the value as set in property 'iDokumentstatusnrOld' to
' /// the value as set in property 'iDokumentstatusnr'.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iDokumentstatusnr. May be SqlInt32.Null</LI>
' /// <LI>iDokumentstatusnrOld. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function UpdateAllWdokumentstatusnrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_dokumentstatus_funktion_UpdateAllWdokumentstatusnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentstatusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatusnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentstatusnrOld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatusnrOld))
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_dokumentstatus_funktion_UpdateAllWdokumentstatusnrLogic' 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("clsDokumentstatus_funktion::UpdateAllWdokumentstatusnrLogic::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>iDokumentstatus_funktionnr</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_dokumentstatus_funktion_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentstatus_funktionnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatus_funktionnr))
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_dokumentstatus_funktion_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("clsDokumentstatus_funktion::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>iDokumentstatus_funktionnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iDokumentstatus_funktionnr</LI>
' /// <LI>iDokumentstatusnr</LI>
' /// <LI>iFunktionnr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>iMandantnr</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>
Public Overrides Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_dokumentstatus_funktion_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("dokumentstatus_funktion")
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentstatus_funktionnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatus_funktionnr))
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_dokumentstatus_funktion_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iDokumentstatus_funktionnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumentstatus_funktionnr"), Integer))
If dtToReturn.Rows(0)("dokumentstatusnr") Is System.DBNull.Value Then
m_iDokumentstatusnr = SqlInt32.Null
Else
m_iDokumentstatusnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumentstatusnr"), Integer))
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)("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)("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)("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("clsDokumentstatus_funktion::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_dokumentstatus_funktion_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("dokumentstatus_funktion")
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_dokumentstatus_funktion_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("clsDokumentstatus_funktion::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 'dokumentstatusnr'
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iDokumentstatusnr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function SelectAllWdokumentstatusnrLogic() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_dokumentstatus_funktion_SelectAllWdokumentstatusnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("dokumentstatus_funktion")
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentstatusnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatusnr))
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_dokumentstatus_funktion_SelectAllWdokumentstatusnrLogic' 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("clsDokumentstatus_funktion::SelectAllWdokumentstatusnrLogic::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 [iDokumentstatus_funktionnr]() As SqlInt32
Get
Return m_iDokumentstatus_funktionnr
End Get
Set(ByVal Value As SqlInt32)
Dim iDokumentstatus_funktionnrTmp As SqlInt32 = Value
If iDokumentstatus_funktionnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iDokumentstatus_funktionnr", "iDokumentstatus_funktionnr can't be NULL")
End If
m_iDokumentstatus_funktionnr = Value
End Set
End Property
Public Property [iDokumentstatusnr]() As SqlInt32
Get
Return m_iDokumentstatusnr
End Get
Set(ByVal Value As SqlInt32)
m_iDokumentstatusnr = Value
End Set
End Property
Public Property [iDokumentstatusnrOld]() As SqlInt32
Get
Return m_iDokumentstatusnrOld
End Get
Set(ByVal Value As SqlInt32)
m_iDokumentstatusnrOld = 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 [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
m_bAktiv = 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 [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

View File

@@ -0,0 +1,489 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'dokumentstatus_rolle'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Donnerstag, 9. Januar 2003, 12:46:50
' // 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 'dokumentstatus_rolle'.
' /// </summary>
Public Class clsDokumentstatus_rolle
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iMandantnr, m_iDokumentstatusnr, m_iRollenr, m_iDokumentstatus_rollenr As SqlInt32
#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>iDokumentstatus_rollenr</LI>
' /// <LI>iDokumentstatusnr. May be SqlInt32.Null</LI>
' /// <LI>iRollenr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// </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_dokumentstatus_rolle_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentstatus_rollenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatus_rollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentstatusnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatusnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
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_dokumentstatus_rolle_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("clsDokumentstatus_rolle::Insert::Error occured." + ex.Message, 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>iDokumentstatus_rollenr</LI>
' /// <LI>iDokumentstatusnr. May be SqlInt32.Null</LI>
' /// <LI>iRollenr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// </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_dokumentstatus_rolle_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentstatus_rollenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatus_rollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentstatusnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatusnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
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_dokumentstatus_rolle_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("clsDokumentstatus_rolle::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>iDokumentstatus_rollenr</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_dokumentstatus_rolle_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentstatus_rollenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatus_rollenr))
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_dokumentstatus_rolle_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("clsDokumentstatus_rolle::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>iDokumentstatus_rollenr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iDokumentstatus_rollenr</LI>
' /// <LI>iDokumentstatusnr</LI>
' /// <LI>iRollenr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>iMandantnr</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_dokumentstatus_rolle_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("dokumentstatus_rolle")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@idokumentstatus_rollenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentstatus_rollenr))
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_dokumentstatus_rolle_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iDokumentstatus_rollenr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumentstatus_rollenr"), Integer))
If dtToReturn.Rows(0)("dokumentstatusnr") Is System.DBNull.Value Then
m_iDokumentstatusnr = SqlInt32.Null
Else
m_iDokumentstatusnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumentstatusnr"), Integer))
End If
If dtToReturn.Rows(0)("rollenr") Is System.DBNull.Value Then
m_iRollenr = SqlInt32.Null
Else
m_iRollenr = New SqlInt32(CType(dtToReturn.Rows(0)("rollenr"), 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)("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)("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("clsDokumentstatus_rolle::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_dokumentstatus_rolle_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("dokumentstatus_rolle")
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_dokumentstatus_rolle_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("clsDokumentstatus_rolle::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 [iDokumentstatus_rollenr]() As SqlInt32
Get
Return m_iDokumentstatus_rollenr
End Get
Set(ByVal Value As SqlInt32)
Dim iDokumentstatus_rollenrTmp As SqlInt32 = Value
If iDokumentstatus_rollenrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iDokumentstatus_rollenr", "iDokumentstatus_rollenr can't be NULL")
End If
m_iDokumentstatus_rollenr = Value
End Set
End Property
Public Property [iDokumentstatusnr]() As SqlInt32
Get
Return m_iDokumentstatusnr
End Get
Set(ByVal Value As SqlInt32)
m_iDokumentstatusnr = Value
End Set
End Property
Public Property [iRollenr]() As SqlInt32
Get
Return m_iRollenr
End Get
Set(ByVal Value As SqlInt32)
m_iRollenr = 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 [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr = 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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,488 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'edoka_adressen'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 9. Februar 2003, 12:18: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 'edoka_adressen'.
' /// </summary>
Public Class clsEdoka_adressen
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_iNrpar00 As SqlInt32
Private m_sAdresszeile5, m_sAdresszeile6, m_sAdresszeile7, m_sAdresszeile4, m_sAdresszeile1, m_sAdresszeile2, m_sAdresszeile3 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>iNrpar00</LI>
' /// <LI>sAdresszeile1. May be SqlString.Null</LI>
' /// <LI>sAdresszeile2. May be SqlString.Null</LI>
' /// <LI>sAdresszeile3. May be SqlString.Null</LI>
' /// <LI>sAdresszeile4. May be SqlString.Null</LI>
' /// <LI>sAdresszeile5. May be SqlString.Null</LI>
' /// <LI>sAdresszeile6. May be SqlString.Null</LI>
' /// <LI>sAdresszeile7. 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_edoka_adressen_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inrpar00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNrpar00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sadresszeile1", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAdresszeile1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sadresszeile2", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAdresszeile2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sadresszeile3", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAdresszeile3))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sadresszeile4", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAdresszeile4))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sadresszeile5", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAdresszeile5))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sadresszeile6", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAdresszeile6))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sadresszeile7", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAdresszeile7))
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_edoka_adressen_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("clsEdoka_adressen::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>iNrpar00</LI>
' /// <LI>sAdresszeile1. May be SqlString.Null</LI>
' /// <LI>sAdresszeile2. May be SqlString.Null</LI>
' /// <LI>sAdresszeile3. May be SqlString.Null</LI>
' /// <LI>sAdresszeile4. May be SqlString.Null</LI>
' /// <LI>sAdresszeile5. May be SqlString.Null</LI>
' /// <LI>sAdresszeile6. May be SqlString.Null</LI>
' /// <LI>sAdresszeile7. 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_edoka_adressen_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inrpar00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNrpar00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sadresszeile1", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAdresszeile1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sadresszeile2", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAdresszeile2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sadresszeile3", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAdresszeile3))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sadresszeile4", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAdresszeile4))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sadresszeile5", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAdresszeile5))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sadresszeile6", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAdresszeile6))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sadresszeile7", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAdresszeile7))
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_edoka_adressen_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("clsEdoka_adressen::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>iNrpar00</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_edoka_adressen_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inrpar00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNrpar00))
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_edoka_adressen_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("clsEdoka_adressen::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>iNrpar00</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iNrpar00</LI>
' /// <LI>sAdresszeile1</LI>
' /// <LI>sAdresszeile2</LI>
' /// <LI>sAdresszeile3</LI>
' /// <LI>sAdresszeile4</LI>
' /// <LI>sAdresszeile5</LI>
' /// <LI>sAdresszeile6</LI>
' /// <LI>sAdresszeile7</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_edoka_adressen_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("edoka_adressen")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@inrpar00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNrpar00))
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_edoka_adressen_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iNrpar00 = New SqlInt32(CType(dtToReturn.Rows(0)("nrpar00"), Integer))
If dtToReturn.Rows(0)("adresszeile1") Is System.DBNull.Value Then
m_sAdresszeile1 = SqlString.Null
Else
m_sAdresszeile1 = New SqlString(CType(dtToReturn.Rows(0)("adresszeile1"), String))
End If
If dtToReturn.Rows(0)("adresszeile2") Is System.DBNull.Value Then
m_sAdresszeile2 = SqlString.Null
Else
m_sAdresszeile2 = New SqlString(CType(dtToReturn.Rows(0)("adresszeile2"), String))
End If
If dtToReturn.Rows(0)("adresszeile3") Is System.DBNull.Value Then
m_sAdresszeile3 = SqlString.Null
Else
m_sAdresszeile3 = New SqlString(CType(dtToReturn.Rows(0)("adresszeile3"), String))
End If
If dtToReturn.Rows(0)("adresszeile4") Is System.DBNull.Value Then
m_sAdresszeile4 = SqlString.Null
Else
m_sAdresszeile4 = New SqlString(CType(dtToReturn.Rows(0)("adresszeile4"), String))
End If
If dtToReturn.Rows(0)("adresszeile5") Is System.DBNull.Value Then
m_sAdresszeile5 = SqlString.Null
Else
m_sAdresszeile5 = New SqlString(CType(dtToReturn.Rows(0)("adresszeile5"), String))
End If
If dtToReturn.Rows(0)("adresszeile6") Is System.DBNull.Value Then
m_sAdresszeile6 = SqlString.Null
Else
m_sAdresszeile6 = New SqlString(CType(dtToReturn.Rows(0)("adresszeile6"), String))
End If
If dtToReturn.Rows(0)("adresszeile7") Is System.DBNull.Value Then
m_sAdresszeile7 = SqlString.Null
Else
m_sAdresszeile7 = New SqlString(CType(dtToReturn.Rows(0)("adresszeile7"), 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("clsEdoka_adressen::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_edoka_adressen_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("edoka_adressen")
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_edoka_adressen_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("clsEdoka_adressen::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 [iNrpar00]() As SqlInt32
Get
Return m_iNrpar00
End Get
Set(ByVal Value As SqlInt32)
Dim iNrpar00Tmp As SqlInt32 = Value
If iNrpar00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("iNrpar00", "iNrpar00 can't be NULL")
End If
m_iNrpar00 = Value
End Set
End Property
Public Property [sAdresszeile1]() As SqlString
Get
Return m_sAdresszeile1
End Get
Set(ByVal Value As SqlString)
m_sAdresszeile1 = Value
End Set
End Property
Public Property [sAdresszeile2]() As SqlString
Get
Return m_sAdresszeile2
End Get
Set(ByVal Value As SqlString)
m_sAdresszeile2 = Value
End Set
End Property
Public Property [sAdresszeile3]() As SqlString
Get
Return m_sAdresszeile3
End Get
Set(ByVal Value As SqlString)
m_sAdresszeile3 = Value
End Set
End Property
Public Property [sAdresszeile4]() As SqlString
Get
Return m_sAdresszeile4
End Get
Set(ByVal Value As SqlString)
m_sAdresszeile4 = Value
End Set
End Property
Public Property [sAdresszeile5]() As SqlString
Get
Return m_sAdresszeile5
End Get
Set(ByVal Value As SqlString)
m_sAdresszeile5 = Value
End Set
End Property
Public Property [sAdresszeile6]() As SqlString
Get
Return m_sAdresszeile6
End Get
Set(ByVal Value As SqlString)
m_sAdresszeile6 = Value
End Set
End Property
Public Property [sAdresszeile7]() As SqlString
Get
Return m_sAdresszeile7
End Get
Set(ByVal Value As SqlString)
m_sAdresszeile7 = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,570 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'edoka_etbez0'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 26. April 2005, 15:08:37
' // 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 'edoka_etbez0'.
' /// </summary>
Public Class clsEdoka_etbez0
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_sCDMUTER, m_sSAREC00 As SqlString
Private m_daTSMUT00, m_daDMERF00 As SqlDateTime
Private m_iNRVVG00, m_iNRPAR00, m_iNRBEU01, m_iNRBEZ00, m_iNRBEU02 As SqlInt32
Private m_siNRBEO00, m_siNRVRN00, m_siNRPDM00 As SqlInt16
#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>iNRBEZ00</LI>
' /// <LI>siNRVRN00</LI>
' /// <LI>iNRBEU01</LI>
' /// <LI>iNRBEU02. May be SqlInt32.Null</LI>
' /// <LI>siNRBEO00</LI>
' /// <LI>iNRPAR00. May be SqlInt32.Null</LI>
' /// <LI>iNRVVG00. May be SqlInt32.Null</LI>
' /// <LI>siNRPDM00. May be SqlInt16.Null</LI>
' /// <LI>sCDMUTER</LI>
' /// <LI>daTSMUT00</LI>
' /// <LI>daDMERF00</LI>
' /// <LI>sSAREC00</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_edoka_etbez0_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRBEZ00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRBEZ00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRVRN00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRVRN00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRBEU01", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRBEU01))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRBEU02", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRBEU02))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRBEO00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRBEO00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPAR00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRPAR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRVVG00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRVVG00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRPDM00", SqlDbType.SmallInt, 2, ParameterDirection.Input, True, 5, 0, "", DataRowVersion.Proposed, m_siNRPDM00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDMUTER", SqlDbType.Char, 8, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDMUTER))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daTSMUT00", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daTSMUT00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMERF00", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daDMERF00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAREC00", SqlDbType.Char, 1, ParameterDirection.Input, False, 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_edoka_etbez0_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("clsEdoka_etbez0::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>iNRBEZ00</LI>
' /// <LI>siNRVRN00</LI>
' /// <LI>iNRBEU01</LI>
' /// <LI>iNRBEU02. May be SqlInt32.Null</LI>
' /// <LI>siNRBEO00</LI>
' /// <LI>iNRPAR00. May be SqlInt32.Null</LI>
' /// <LI>iNRVVG00. May be SqlInt32.Null</LI>
' /// <LI>siNRPDM00. May be SqlInt16.Null</LI>
' /// <LI>sCDMUTER</LI>
' /// <LI>daTSMUT00</LI>
' /// <LI>daDMERF00</LI>
' /// <LI>sSAREC00</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_edoka_etbez0_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRBEZ00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRBEZ00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRVRN00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRVRN00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRBEU01", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRBEU01))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRBEU02", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRBEU02))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRBEO00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRBEO00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPAR00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRPAR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRVVG00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRVVG00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRPDM00", SqlDbType.SmallInt, 2, ParameterDirection.Input, True, 5, 0, "", DataRowVersion.Proposed, m_siNRPDM00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDMUTER", SqlDbType.Char, 8, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDMUTER))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daTSMUT00", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daTSMUT00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMERF00", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daDMERF00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAREC00", SqlDbType.Char, 1, ParameterDirection.Input, False, 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_edoka_etbez0_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("clsEdoka_etbez0::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>iNRBEZ00</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_edoka_etbez0_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRBEZ00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRBEZ00))
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_edoka_etbez0_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("clsEdoka_etbez0::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>iNRBEZ00</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iNRBEZ00</LI>
' /// <LI>siNRVRN00</LI>
' /// <LI>iNRBEU01</LI>
' /// <LI>iNRBEU02</LI>
' /// <LI>siNRBEO00</LI>
' /// <LI>iNRPAR00</LI>
' /// <LI>iNRVVG00</LI>
' /// <LI>siNRPDM00</LI>
' /// <LI>sCDMUTER</LI>
' /// <LI>daTSMUT00</LI>
' /// <LI>daDMERF00</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_edoka_etbez0_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("edoka_etbez0")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iNRBEZ00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRBEZ00))
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_edoka_etbez0_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iNRBEZ00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRBEZ00"), Integer))
m_siNRVRN00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRVRN00"), Short))
m_iNRBEU01 = New SqlInt32(CType(dtToReturn.Rows(0)("NRBEU01"), Integer))
If dtToReturn.Rows(0)("NRBEU02") Is System.DBNull.Value Then
m_iNRBEU02 = SqlInt32.Null
Else
m_iNRBEU02 = New SqlInt32(CType(dtToReturn.Rows(0)("NRBEU02"), Integer))
End If
m_siNRBEO00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRBEO00"), Short))
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)("NRVVG00") Is System.DBNull.Value Then
m_iNRVVG00 = SqlInt32.Null
Else
m_iNRVVG00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRVVG00"), Integer))
End If
If dtToReturn.Rows(0)("NRPDM00") Is System.DBNull.Value Then
m_siNRPDM00 = SqlInt16.Null
Else
m_siNRPDM00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRPDM00"), Short))
End If
m_sCDMUTER = New SqlString(CType(dtToReturn.Rows(0)("CDMUTER"), String))
m_daTSMUT00 = New SqlDateTime(CType(dtToReturn.Rows(0)("TSMUT00"), Date))
m_daDMERF00 = New SqlDateTime(CType(dtToReturn.Rows(0)("DMERF00"), Date))
m_sSAREC00 = New SqlString(CType(dtToReturn.Rows(0)("SAREC00"), String))
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEdoka_etbez0::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_edoka_etbez0_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("edoka_etbez0")
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_edoka_etbez0_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("clsEdoka_etbez0::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 [iNRBEZ00]() As SqlInt32
Get
Return m_iNRBEZ00
End Get
Set(ByVal Value As SqlInt32)
Dim iNRBEZ00Tmp As SqlInt32 = Value
If iNRBEZ00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("iNRBEZ00", "iNRBEZ00 can't be NULL")
End If
m_iNRBEZ00 = Value
End Set
End Property
Public Property [siNRVRN00]() As SqlInt16
Get
Return m_siNRVRN00
End Get
Set(ByVal Value As SqlInt16)
Dim siNRVRN00Tmp As SqlInt16 = Value
If siNRVRN00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("siNRVRN00", "siNRVRN00 can't be NULL")
End If
m_siNRVRN00 = Value
End Set
End Property
Public Property [iNRBEU01]() As SqlInt32
Get
Return m_iNRBEU01
End Get
Set(ByVal Value As SqlInt32)
Dim iNRBEU01Tmp As SqlInt32 = Value
If iNRBEU01Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("iNRBEU01", "iNRBEU01 can't be NULL")
End If
m_iNRBEU01 = Value
End Set
End Property
Public Property [iNRBEU02]() As SqlInt32
Get
Return m_iNRBEU02
End Get
Set(ByVal Value As SqlInt32)
m_iNRBEU02 = Value
End Set
End Property
Public Property [siNRBEO00]() As SqlInt16
Get
Return m_siNRBEO00
End Get
Set(ByVal Value As SqlInt16)
Dim siNRBEO00Tmp As SqlInt16 = Value
If siNRBEO00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("siNRBEO00", "siNRBEO00 can't be NULL")
End If
m_siNRBEO00 = 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 [iNRVVG00]() As SqlInt32
Get
Return m_iNRVVG00
End Get
Set(ByVal Value As SqlInt32)
m_iNRVVG00 = Value
End Set
End Property
Public Property [siNRPDM00]() As SqlInt16
Get
Return m_siNRPDM00
End Get
Set(ByVal Value As SqlInt16)
m_siNRPDM00 = Value
End Set
End Property
Public Property [sCDMUTER]() As SqlString
Get
Return m_sCDMUTER
End Get
Set(ByVal Value As SqlString)
Dim sCDMUTERTmp As SqlString = Value
If sCDMUTERTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sCDMUTER", "sCDMUTER can't be NULL")
End If
m_sCDMUTER = Value
End Set
End Property
Public Property [daTSMUT00]() As SqlDateTime
Get
Return m_daTSMUT00
End Get
Set(ByVal Value As SqlDateTime)
Dim daTSMUT00Tmp As SqlDateTime = Value
If daTSMUT00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("daTSMUT00", "daTSMUT00 can't be NULL")
End If
m_daTSMUT00 = Value
End Set
End Property
Public Property [daDMERF00]() As SqlDateTime
Get
Return m_daDMERF00
End Get
Set(ByVal Value As SqlDateTime)
Dim daDMERF00Tmp As SqlDateTime = Value
If daDMERF00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("daDMERF00", "daDMERF00 can't be NULL")
End If
m_daDMERF00 = Value
End Set
End Property
Public Property [sSAREC00]() As SqlString
Get
Return m_sSAREC00
End Get
Set(ByVal Value As SqlString)
Dim sSAREC00Tmp As SqlString = Value
If sSAREC00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("sSAREC00", "sSAREC00 can't be NULL")
End If
m_sSAREC00 = Value
End Set
End Property
#End Region
End Class
End Namespace

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,810 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'etparn'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 26. April 2005, 15:11:43
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokadb
' /// <summary>
' /// Purpose: Data Access class for the table 'etparn'.
' /// </summary>
Public Class clsEtparn
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_sBEGEB00, m_sBEBGO00, m_sCDMUTER, m_sCDIPA00, m_sCDAHV00, m_sSAREC00, m_sBEBERAL As SqlString
Private m_daTSMUT00, m_daDMGEB00, m_daDMERF00, m_daDMTOD00 As SqlDateTime
Private m_iNRBER01, m_iNRPAR00, m_iNRBER02 As SqlInt32
Private m_siNRABE00, m_siNRBVG00, m_siDMTODJJ, m_siNRSEX00, m_siNRVRN00, m_siDMGEBJJ, m_siNRABD00, m_siNRERW00, m_siNRZVS00, m_siNRGST00 As SqlInt16
#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>iNRPAR00</LI>
' /// <LI>siNRVRN00</LI>
' /// <LI>daDMGEB00. May be SqlDateTime.Null</LI>
' /// <LI>siDMGEBJJ</LI>
' /// <LI>sBEGEB00</LI>
' /// <LI>sBEBGO00</LI>
' /// <LI>daDMTOD00. May be SqlDateTime.Null</LI>
' /// <LI>siDMTODJJ</LI>
' /// <LI>siNRSEX00</LI>
' /// <LI>siNRZVS00</LI>
' /// <LI>siNRGST00</LI>
' /// <LI>siNRABD00</LI>
' /// <LI>sBEBERAL</LI>
' /// <LI>iNRBER01</LI>
' /// <LI>iNRBER02</LI>
' /// <LI>siNRERW00</LI>
' /// <LI>sCDAHV00</LI>
' /// <LI>siNRBVG00</LI>
' /// <LI>siNRABE00</LI>
' /// <LI>sCDIPA00</LI>
' /// <LI>sCDMUTER</LI>
' /// <LI>daTSMUT00</LI>
' /// <LI>daDMERF00</LI>
' /// <LI>sSAREC00</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_etparn_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPAR00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRPAR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRVRN00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRVRN00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMGEB00", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDMGEB00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siDMGEBJJ", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siDMGEBJJ))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEGEB00", SqlDbType.Char, 35, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBEGEB00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEBGO00", SqlDbType.Char, 35, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBEBGO00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMTOD00", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDMTOD00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siDMTODJJ", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siDMTODJJ))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRSEX00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRSEX00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRZVS00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRZVS00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRGST00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRGST00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRABD00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRABD00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEBERAL", SqlDbType.Char, 35, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBEBERAL))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRBER01", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRBER01))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRBER02", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRBER02))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRERW00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRERW00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDAHV00", SqlDbType.Char, 11, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDAHV00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRBVG00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRBVG00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRABE00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRABE00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDIPA00", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDIPA00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDMUTER", SqlDbType.Char, 8, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDMUTER))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daTSMUT00", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daTSMUT00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMERF00", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daDMERF00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAREC00", SqlDbType.Char, 1, ParameterDirection.Input, False, 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_etparn_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("clsEtparn::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>iNRPAR00</LI>
' /// <LI>siNRVRN00</LI>
' /// <LI>daDMGEB00. May be SqlDateTime.Null</LI>
' /// <LI>siDMGEBJJ</LI>
' /// <LI>sBEGEB00</LI>
' /// <LI>sBEBGO00</LI>
' /// <LI>daDMTOD00. May be SqlDateTime.Null</LI>
' /// <LI>siDMTODJJ</LI>
' /// <LI>siNRSEX00</LI>
' /// <LI>siNRZVS00</LI>
' /// <LI>siNRGST00</LI>
' /// <LI>siNRABD00</LI>
' /// <LI>sBEBERAL</LI>
' /// <LI>iNRBER01</LI>
' /// <LI>iNRBER02</LI>
' /// <LI>siNRERW00</LI>
' /// <LI>sCDAHV00</LI>
' /// <LI>siNRBVG00</LI>
' /// <LI>siNRABE00</LI>
' /// <LI>sCDIPA00</LI>
' /// <LI>sCDMUTER</LI>
' /// <LI>daTSMUT00</LI>
' /// <LI>daDMERF00</LI>
' /// <LI>sSAREC00</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_etparn_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPAR00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRPAR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRVRN00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRVRN00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMGEB00", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDMGEB00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siDMGEBJJ", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siDMGEBJJ))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEGEB00", SqlDbType.Char, 35, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBEGEB00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEBGO00", SqlDbType.Char, 35, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBEBGO00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMTOD00", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDMTOD00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siDMTODJJ", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siDMTODJJ))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRSEX00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRSEX00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRZVS00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRZVS00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRGST00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRGST00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRABD00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRABD00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEBERAL", SqlDbType.Char, 35, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBEBERAL))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRBER01", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRBER01))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRBER02", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRBER02))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRERW00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRERW00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDAHV00", SqlDbType.Char, 11, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDAHV00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRBVG00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRBVG00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRABE00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRABE00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDIPA00", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDIPA00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDMUTER", SqlDbType.Char, 8, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDMUTER))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daTSMUT00", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daTSMUT00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMERF00", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daDMERF00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAREC00", SqlDbType.Char, 1, ParameterDirection.Input, False, 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_etparn_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("clsEtparn::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>iNRPAR00</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_etparn_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPAR00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRPAR00))
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_etparn_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("clsEtparn::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>iNRPAR00</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iNRPAR00</LI>
' /// <LI>siNRVRN00</LI>
' /// <LI>daDMGEB00</LI>
' /// <LI>siDMGEBJJ</LI>
' /// <LI>sBEGEB00</LI>
' /// <LI>sBEBGO00</LI>
' /// <LI>daDMTOD00</LI>
' /// <LI>siDMTODJJ</LI>
' /// <LI>siNRSEX00</LI>
' /// <LI>siNRZVS00</LI>
' /// <LI>siNRGST00</LI>
' /// <LI>siNRABD00</LI>
' /// <LI>sBEBERAL</LI>
' /// <LI>iNRBER01</LI>
' /// <LI>iNRBER02</LI>
' /// <LI>siNRERW00</LI>
' /// <LI>sCDAHV00</LI>
' /// <LI>siNRBVG00</LI>
' /// <LI>siNRABE00</LI>
' /// <LI>sCDIPA00</LI>
' /// <LI>sCDMUTER</LI>
' /// <LI>daTSMUT00</LI>
' /// <LI>daDMERF00</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_etparn_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("etparn")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iNRPAR00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRPAR00))
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_etparn_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iNRPAR00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRPAR00"), Integer))
m_siNRVRN00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRVRN00"), Short))
If dtToReturn.Rows(0)("DMGEB00") Is System.DBNull.Value Then
m_daDMGEB00 = SqlDateTime.Null
Else
m_daDMGEB00 = New SqlDateTime(CType(dtToReturn.Rows(0)("DMGEB00"), Date))
End If
m_siDMGEBJJ = New SqlInt16(CType(dtToReturn.Rows(0)("DMGEBJJ"), Short))
m_sBEGEB00 = New SqlString(CType(dtToReturn.Rows(0)("BEGEB00"), String))
m_sBEBGO00 = New SqlString(CType(dtToReturn.Rows(0)("BEBGO00"), String))
If dtToReturn.Rows(0)("DMTOD00") Is System.DBNull.Value Then
m_daDMTOD00 = SqlDateTime.Null
Else
m_daDMTOD00 = New SqlDateTime(CType(dtToReturn.Rows(0)("DMTOD00"), Date))
End If
m_siDMTODJJ = New SqlInt16(CType(dtToReturn.Rows(0)("DMTODJJ"), Short))
m_siNRSEX00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRSEX00"), Short))
m_siNRZVS00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRZVS00"), Short))
m_siNRGST00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRGST00"), Short))
m_siNRABD00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRABD00"), Short))
m_sBEBERAL = New SqlString(CType(dtToReturn.Rows(0)("BEBERAL"), String))
m_iNRBER01 = New SqlInt32(CType(dtToReturn.Rows(0)("NRBER01"), Integer))
m_iNRBER02 = New SqlInt32(CType(dtToReturn.Rows(0)("NRBER02"), Integer))
m_siNRERW00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRERW00"), Short))
m_sCDAHV00 = New SqlString(CType(dtToReturn.Rows(0)("CDAHV00"), String))
m_siNRBVG00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRBVG00"), Short))
m_siNRABE00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRABE00"), Short))
m_sCDIPA00 = New SqlString(CType(dtToReturn.Rows(0)("CDIPA00"), String))
m_sCDMUTER = New SqlString(CType(dtToReturn.Rows(0)("CDMUTER"), String))
m_daTSMUT00 = New SqlDateTime(CType(dtToReturn.Rows(0)("TSMUT00"), Date))
m_daDMERF00 = New SqlDateTime(CType(dtToReturn.Rows(0)("DMERF00"), Date))
m_sSAREC00 = New SqlString(CType(dtToReturn.Rows(0)("SAREC00"), String))
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEtparn::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_etparn_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("etparn")
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_etparn_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("clsEtparn::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 [iNRPAR00]() As SqlInt32
Get
Return m_iNRPAR00
End Get
Set(ByVal Value As SqlInt32)
Dim iNRPAR00Tmp As SqlInt32 = Value
If iNRPAR00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("iNRPAR00", "iNRPAR00 can't be NULL")
End If
m_iNRPAR00 = Value
End Set
End Property
Public Property [siNRVRN00]() As SqlInt16
Get
Return m_siNRVRN00
End Get
Set(ByVal Value As SqlInt16)
Dim siNRVRN00Tmp As SqlInt16 = Value
If siNRVRN00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("siNRVRN00", "siNRVRN00 can't be NULL")
End If
m_siNRVRN00 = Value
End Set
End Property
Public Property [daDMGEB00]() As SqlDateTime
Get
Return m_daDMGEB00
End Get
Set(ByVal Value As SqlDateTime)
m_daDMGEB00 = Value
End Set
End Property
Public Property [siDMGEBJJ]() As SqlInt16
Get
Return m_siDMGEBJJ
End Get
Set(ByVal Value As SqlInt16)
Dim siDMGEBJJTmp As SqlInt16 = Value
If siDMGEBJJTmp.IsNull Then
Throw New ArgumentOutOfRangeException("siDMGEBJJ", "siDMGEBJJ can't be NULL")
End If
m_siDMGEBJJ = Value
End Set
End Property
Public Property [sBEGEB00]() As SqlString
Get
Return m_sBEGEB00
End Get
Set(ByVal Value As SqlString)
Dim sBEGEB00Tmp As SqlString = Value
If sBEGEB00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("sBEGEB00", "sBEGEB00 can't be NULL")
End If
m_sBEGEB00 = Value
End Set
End Property
Public Property [sBEBGO00]() As SqlString
Get
Return m_sBEBGO00
End Get
Set(ByVal Value As SqlString)
Dim sBEBGO00Tmp As SqlString = Value
If sBEBGO00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("sBEBGO00", "sBEBGO00 can't be NULL")
End If
m_sBEBGO00 = Value
End Set
End Property
Public Property [daDMTOD00]() As SqlDateTime
Get
Return m_daDMTOD00
End Get
Set(ByVal Value As SqlDateTime)
m_daDMTOD00 = Value
End Set
End Property
Public Property [siDMTODJJ]() As SqlInt16
Get
Return m_siDMTODJJ
End Get
Set(ByVal Value As SqlInt16)
Dim siDMTODJJTmp As SqlInt16 = Value
If siDMTODJJTmp.IsNull Then
Throw New ArgumentOutOfRangeException("siDMTODJJ", "siDMTODJJ can't be NULL")
End If
m_siDMTODJJ = Value
End Set
End Property
Public Property [siNRSEX00]() As SqlInt16
Get
Return m_siNRSEX00
End Get
Set(ByVal Value As SqlInt16)
Dim siNRSEX00Tmp As SqlInt16 = Value
If siNRSEX00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("siNRSEX00", "siNRSEX00 can't be NULL")
End If
m_siNRSEX00 = Value
End Set
End Property
Public Property [siNRZVS00]() As SqlInt16
Get
Return m_siNRZVS00
End Get
Set(ByVal Value As SqlInt16)
Dim siNRZVS00Tmp As SqlInt16 = Value
If siNRZVS00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("siNRZVS00", "siNRZVS00 can't be NULL")
End If
m_siNRZVS00 = Value
End Set
End Property
Public Property [siNRGST00]() As SqlInt16
Get
Return m_siNRGST00
End Get
Set(ByVal Value As SqlInt16)
Dim siNRGST00Tmp As SqlInt16 = Value
If siNRGST00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("siNRGST00", "siNRGST00 can't be NULL")
End If
m_siNRGST00 = Value
End Set
End Property
Public Property [siNRABD00]() As SqlInt16
Get
Return m_siNRABD00
End Get
Set(ByVal Value As SqlInt16)
Dim siNRABD00Tmp As SqlInt16 = Value
If siNRABD00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("siNRABD00", "siNRABD00 can't be NULL")
End If
m_siNRABD00 = Value
End Set
End Property
Public Property [sBEBERAL]() As SqlString
Get
Return m_sBEBERAL
End Get
Set(ByVal Value As SqlString)
Dim sBEBERALTmp As SqlString = Value
If sBEBERALTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sBEBERAL", "sBEBERAL can't be NULL")
End If
m_sBEBERAL = Value
End Set
End Property
Public Property [iNRBER01]() As SqlInt32
Get
Return m_iNRBER01
End Get
Set(ByVal Value As SqlInt32)
Dim iNRBER01Tmp As SqlInt32 = Value
If iNRBER01Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("iNRBER01", "iNRBER01 can't be NULL")
End If
m_iNRBER01 = Value
End Set
End Property
Public Property [iNRBER02]() As SqlInt32
Get
Return m_iNRBER02
End Get
Set(ByVal Value As SqlInt32)
Dim iNRBER02Tmp As SqlInt32 = Value
If iNRBER02Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("iNRBER02", "iNRBER02 can't be NULL")
End If
m_iNRBER02 = Value
End Set
End Property
Public Property [siNRERW00]() As SqlInt16
Get
Return m_siNRERW00
End Get
Set(ByVal Value As SqlInt16)
Dim siNRERW00Tmp As SqlInt16 = Value
If siNRERW00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("siNRERW00", "siNRERW00 can't be NULL")
End If
m_siNRERW00 = Value
End Set
End Property
Public Property [sCDAHV00]() As SqlString
Get
Return m_sCDAHV00
End Get
Set(ByVal Value As SqlString)
Dim sCDAHV00Tmp As SqlString = Value
If sCDAHV00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("sCDAHV00", "sCDAHV00 can't be NULL")
End If
m_sCDAHV00 = Value
End Set
End Property
Public Property [siNRBVG00]() As SqlInt16
Get
Return m_siNRBVG00
End Get
Set(ByVal Value As SqlInt16)
Dim siNRBVG00Tmp As SqlInt16 = Value
If siNRBVG00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("siNRBVG00", "siNRBVG00 can't be NULL")
End If
m_siNRBVG00 = Value
End Set
End Property
Public Property [siNRABE00]() As SqlInt16
Get
Return m_siNRABE00
End Get
Set(ByVal Value As SqlInt16)
Dim siNRABE00Tmp As SqlInt16 = Value
If siNRABE00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("siNRABE00", "siNRABE00 can't be NULL")
End If
m_siNRABE00 = Value
End Set
End Property
Public Property [sCDIPA00]() As SqlString
Get
Return m_sCDIPA00
End Get
Set(ByVal Value As SqlString)
Dim sCDIPA00Tmp As SqlString = Value
If sCDIPA00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("sCDIPA00", "sCDIPA00 can't be NULL")
End If
m_sCDIPA00 = Value
End Set
End Property
Public Property [sCDMUTER]() As SqlString
Get
Return m_sCDMUTER
End Get
Set(ByVal Value As SqlString)
Dim sCDMUTERTmp As SqlString = Value
If sCDMUTERTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sCDMUTER", "sCDMUTER can't be NULL")
End If
m_sCDMUTER = Value
End Set
End Property
Public Property [daTSMUT00]() As SqlDateTime
Get
Return m_daTSMUT00
End Get
Set(ByVal Value As SqlDateTime)
Dim daTSMUT00Tmp As SqlDateTime = Value
If daTSMUT00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("daTSMUT00", "daTSMUT00 can't be NULL")
End If
m_daTSMUT00 = Value
End Set
End Property
Public Property [daDMERF00]() As SqlDateTime
Get
Return m_daDMERF00
End Get
Set(ByVal Value As SqlDateTime)
Dim daDMERF00Tmp As SqlDateTime = Value
If daDMERF00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("daDMERF00", "daDMERF00 can't be NULL")
End If
m_daDMERF00 = Value
End Set
End Property
Public Property [sSAREC00]() As SqlString
Get
Return m_sSAREC00
End Get
Set(ByVal Value As SqlString)
Dim sSAREC00Tmp As SqlString = Value
If sSAREC00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("sSAREC00", "sSAREC00 can't be NULL")
End If
m_sSAREC00 = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,691 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'etparu'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Montag, 2. Mai 2005, 09:56:15
' // 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 'etparu'.
' /// </summary>
Public Class clsEtparu
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_sCDNOG01, m_sCDNOG02, m_sCDIPA00, m_sCDSWI00, m_sSAREC00, m_sCDMUTER As SqlString
Private m_daDMERF00, m_daTSMUT00, m_daDMHDR00, m_daDMAFL00, m_daDMGRD00 As SqlDateTime
Private m_dcNRSIC00, m_dcAZBSC00 As SqlDecimal
Private m_iNRPAR00 As SqlInt32
Private m_siNRVRN00, m_siCDBRA00, m_siDMAFLJJ, m_siDMGRDJJ As SqlInt16
#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>iNRPAR00</LI>
' /// <LI>siNRVRN00</LI>
' /// <LI>siCDBRA00. May be SqlInt16.Null</LI>
' /// <LI>daDMGRD00. May be SqlDateTime.Null</LI>
' /// <LI>siDMGRDJJ</LI>
' /// <LI>daDMAFL00. May be SqlDateTime.Null</LI>
' /// <LI>siDMAFLJJ</LI>
' /// <LI>dcAZBSC00. May be SqlDecimal.Null</LI>
' /// <LI>daDMHDR00. May be SqlDateTime.Null</LI>
' /// <LI>sCDIPA00</LI>
' /// <LI>sCDSWI00</LI>
' /// <LI>dcNRSIC00</LI>
' /// <LI>sCDNOG01. May be SqlString.Null</LI>
' /// <LI>sCDNOG02. May be SqlString.Null</LI>
' /// <LI>sCDMUTER</LI>
' /// <LI>daTSMUT00</LI>
' /// <LI>daDMERF00</LI>
' /// <LI>sSAREC00</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_etparu_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPAR00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRPAR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRVRN00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRVRN00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siCDBRA00", SqlDbType.SmallInt, 2, ParameterDirection.Input, True, 5, 0, "", DataRowVersion.Proposed, m_siCDBRA00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMGRD00", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDMGRD00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siDMGRDJJ", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siDMGRDJJ))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMAFL00", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDMAFL00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siDMAFLJJ", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siDMAFLJJ))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dcAZBSC00", SqlDbType.Decimal, 9, ParameterDirection.Input, True, 11, 1, "", DataRowVersion.Proposed, m_dcAZBSC00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMHDR00", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDMHDR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDIPA00", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDIPA00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDSWI00", SqlDbType.Char, 11, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDSWI00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dcNRSIC00", SqlDbType.Decimal, 5, ParameterDirection.Input, False, 6, 1, "", DataRowVersion.Proposed, m_dcNRSIC00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDNOG01", SqlDbType.Char, 6, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDNOG01))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDNOG02", SqlDbType.Char, 6, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDNOG02))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDMUTER", SqlDbType.Char, 8, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDMUTER))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daTSMUT00", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daTSMUT00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMERF00", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daDMERF00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAREC00", SqlDbType.Char, 1, ParameterDirection.Input, False, 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_etparu_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("clsEtparu::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>iNRPAR00</LI>
' /// <LI>siNRVRN00</LI>
' /// <LI>siCDBRA00. May be SqlInt16.Null</LI>
' /// <LI>daDMGRD00. May be SqlDateTime.Null</LI>
' /// <LI>siDMGRDJJ</LI>
' /// <LI>daDMAFL00. May be SqlDateTime.Null</LI>
' /// <LI>siDMAFLJJ</LI>
' /// <LI>dcAZBSC00. May be SqlDecimal.Null</LI>
' /// <LI>daDMHDR00. May be SqlDateTime.Null</LI>
' /// <LI>sCDIPA00</LI>
' /// <LI>sCDSWI00</LI>
' /// <LI>dcNRSIC00</LI>
' /// <LI>sCDNOG01. May be SqlString.Null</LI>
' /// <LI>sCDNOG02. May be SqlString.Null</LI>
' /// <LI>sCDMUTER</LI>
' /// <LI>daTSMUT00</LI>
' /// <LI>daDMERF00</LI>
' /// <LI>sSAREC00</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_etparu_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPAR00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRPAR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siNRVRN00", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siNRVRN00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siCDBRA00", SqlDbType.SmallInt, 2, ParameterDirection.Input, True, 5, 0, "", DataRowVersion.Proposed, m_siCDBRA00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMGRD00", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDMGRD00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siDMGRDJJ", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siDMGRDJJ))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMAFL00", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDMAFL00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@siDMAFLJJ", SqlDbType.SmallInt, 2, ParameterDirection.Input, False, 5, 0, "", DataRowVersion.Proposed, m_siDMAFLJJ))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dcAZBSC00", SqlDbType.Decimal, 9, ParameterDirection.Input, True, 11, 1, "", DataRowVersion.Proposed, m_dcAZBSC00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMHDR00", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDMHDR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDIPA00", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDIPA00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDSWI00", SqlDbType.Char, 11, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDSWI00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dcNRSIC00", SqlDbType.Decimal, 5, ParameterDirection.Input, False, 6, 1, "", DataRowVersion.Proposed, m_dcNRSIC00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDNOG01", SqlDbType.Char, 6, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDNOG01))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDNOG02", SqlDbType.Char, 6, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDNOG02))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDMUTER", SqlDbType.Char, 8, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sCDMUTER))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daTSMUT00", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daTSMUT00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMERF00", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daDMERF00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAREC00", SqlDbType.Char, 1, ParameterDirection.Input, False, 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_etparu_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("clsEtparu::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>iNRPAR00</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_etparu_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPAR00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRPAR00))
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_etparu_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("clsEtparu::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>iNRPAR00</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iNRPAR00</LI>
' /// <LI>siNRVRN00</LI>
' /// <LI>siCDBRA00</LI>
' /// <LI>daDMGRD00</LI>
' /// <LI>siDMGRDJJ</LI>
' /// <LI>daDMAFL00</LI>
' /// <LI>siDMAFLJJ</LI>
' /// <LI>dcAZBSC00</LI>
' /// <LI>daDMHDR00</LI>
' /// <LI>sCDIPA00</LI>
' /// <LI>sCDSWI00</LI>
' /// <LI>dcNRSIC00</LI>
' /// <LI>sCDNOG01</LI>
' /// <LI>sCDNOG02</LI>
' /// <LI>sCDMUTER</LI>
' /// <LI>daTSMUT00</LI>
' /// <LI>daDMERF00</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_etparu_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("etparu")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iNRPAR00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRPAR00))
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_etparu_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iNRPAR00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRPAR00"), Integer))
m_siNRVRN00 = New SqlInt16(CType(dtToReturn.Rows(0)("NRVRN00"), Short))
If dtToReturn.Rows(0)("CDBRA00") Is System.DBNull.Value Then
m_siCDBRA00 = SqlInt16.Null
Else
m_siCDBRA00 = New SqlInt16(CType(dtToReturn.Rows(0)("CDBRA00"), Short))
End If
If dtToReturn.Rows(0)("DMGRD00") Is System.DBNull.Value Then
m_daDMGRD00 = SqlDateTime.Null
Else
m_daDMGRD00 = New SqlDateTime(CType(dtToReturn.Rows(0)("DMGRD00"), Date))
End If
m_siDMGRDJJ = New SqlInt16(CType(dtToReturn.Rows(0)("DMGRDJJ"), Short))
If dtToReturn.Rows(0)("DMAFL00") Is System.DBNull.Value Then
m_daDMAFL00 = SqlDateTime.Null
Else
m_daDMAFL00 = New SqlDateTime(CType(dtToReturn.Rows(0)("DMAFL00"), Date))
End If
m_siDMAFLJJ = New SqlInt16(CType(dtToReturn.Rows(0)("DMAFLJJ"), Short))
If dtToReturn.Rows(0)("AZBSC00") Is System.DBNull.Value Then
m_dcAZBSC00 = SqlDecimal.Null
Else
m_dcAZBSC00 = New SqlDecimal(CType(dtToReturn.Rows(0)("AZBSC00"), Decimal))
End If
If dtToReturn.Rows(0)("DMHDR00") Is System.DBNull.Value Then
m_daDMHDR00 = SqlDateTime.Null
Else
m_daDMHDR00 = New SqlDateTime(CType(dtToReturn.Rows(0)("DMHDR00"), Date))
End If
m_sCDIPA00 = New SqlString(CType(dtToReturn.Rows(0)("CDIPA00"), String))
m_sCDSWI00 = New SqlString(CType(dtToReturn.Rows(0)("CDSWI00"), String))
m_dcNRSIC00 = New SqlDecimal(CType(dtToReturn.Rows(0)("NRSIC00"), Decimal))
If dtToReturn.Rows(0)("CDNOG01") Is System.DBNull.Value Then
m_sCDNOG01 = SqlString.Null
Else
m_sCDNOG01 = New SqlString(CType(dtToReturn.Rows(0)("CDNOG01"), String))
End If
If dtToReturn.Rows(0)("CDNOG02") Is System.DBNull.Value Then
m_sCDNOG02 = SqlString.Null
Else
m_sCDNOG02 = New SqlString(CType(dtToReturn.Rows(0)("CDNOG02"), String))
End If
m_sCDMUTER = New SqlString(CType(dtToReturn.Rows(0)("CDMUTER"), String))
m_daTSMUT00 = New SqlDateTime(CType(dtToReturn.Rows(0)("TSMUT00"), Date))
m_daDMERF00 = New SqlDateTime(CType(dtToReturn.Rows(0)("DMERF00"), Date))
m_sSAREC00 = New SqlString(CType(dtToReturn.Rows(0)("SAREC00"), String))
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsEtparu::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_etparu_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("etparu")
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_etparu_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("clsEtparu::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 [iNRPAR00]() As SqlInt32
Get
Return m_iNRPAR00
End Get
Set(ByVal Value As SqlInt32)
Dim iNRPAR00Tmp As SqlInt32 = Value
If iNRPAR00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("iNRPAR00", "iNRPAR00 can't be NULL")
End If
m_iNRPAR00 = Value
End Set
End Property
Public Property [siNRVRN00]() As SqlInt16
Get
Return m_siNRVRN00
End Get
Set(ByVal Value As SqlInt16)
Dim siNRVRN00Tmp As SqlInt16 = Value
If siNRVRN00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("siNRVRN00", "siNRVRN00 can't be NULL")
End If
m_siNRVRN00 = Value
End Set
End Property
Public Property [siCDBRA00]() As SqlInt16
Get
Return m_siCDBRA00
End Get
Set(ByVal Value As SqlInt16)
m_siCDBRA00 = Value
End Set
End Property
Public Property [daDMGRD00]() As SqlDateTime
Get
Return m_daDMGRD00
End Get
Set(ByVal Value As SqlDateTime)
m_daDMGRD00 = Value
End Set
End Property
Public Property [siDMGRDJJ]() As SqlInt16
Get
Return m_siDMGRDJJ
End Get
Set(ByVal Value As SqlInt16)
Dim siDMGRDJJTmp As SqlInt16 = Value
If siDMGRDJJTmp.IsNull Then
Throw New ArgumentOutOfRangeException("siDMGRDJJ", "siDMGRDJJ can't be NULL")
End If
m_siDMGRDJJ = Value
End Set
End Property
Public Property [daDMAFL00]() As SqlDateTime
Get
Return m_daDMAFL00
End Get
Set(ByVal Value As SqlDateTime)
m_daDMAFL00 = Value
End Set
End Property
Public Property [siDMAFLJJ]() As SqlInt16
Get
Return m_siDMAFLJJ
End Get
Set(ByVal Value As SqlInt16)
Dim siDMAFLJJTmp As SqlInt16 = Value
If siDMAFLJJTmp.IsNull Then
Throw New ArgumentOutOfRangeException("siDMAFLJJ", "siDMAFLJJ can't be NULL")
End If
m_siDMAFLJJ = Value
End Set
End Property
Public Property [dcAZBSC00]() As SqlDecimal
Get
Return m_dcAZBSC00
End Get
Set(ByVal Value As SqlDecimal)
m_dcAZBSC00 = Value
End Set
End Property
Public Property [daDMHDR00]() As SqlDateTime
Get
Return m_daDMHDR00
End Get
Set(ByVal Value As SqlDateTime)
m_daDMHDR00 = Value
End Set
End Property
Public Property [sCDIPA00]() As SqlString
Get
Return m_sCDIPA00
End Get
Set(ByVal Value As SqlString)
Dim sCDIPA00Tmp As SqlString = Value
If sCDIPA00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("sCDIPA00", "sCDIPA00 can't be NULL")
End If
m_sCDIPA00 = Value
End Set
End Property
Public Property [sCDSWI00]() As SqlString
Get
Return m_sCDSWI00
End Get
Set(ByVal Value As SqlString)
Dim sCDSWI00Tmp As SqlString = Value
If sCDSWI00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("sCDSWI00", "sCDSWI00 can't be NULL")
End If
m_sCDSWI00 = Value
End Set
End Property
Public Property [dcNRSIC00]() As SqlDecimal
Get
Return m_dcNRSIC00
End Get
Set(ByVal Value As SqlDecimal)
Dim dcNRSIC00Tmp As SqlDecimal = Value
If dcNRSIC00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("dcNRSIC00", "dcNRSIC00 can't be NULL")
End If
m_dcNRSIC00 = Value
End Set
End Property
Public Property [sCDNOG01]() As SqlString
Get
Return m_sCDNOG01
End Get
Set(ByVal Value As SqlString)
m_sCDNOG01 = Value
End Set
End Property
Public Property [sCDNOG02]() As SqlString
Get
Return m_sCDNOG02
End Get
Set(ByVal Value As SqlString)
m_sCDNOG02 = Value
End Set
End Property
Public Property [sCDMUTER]() As SqlString
Get
Return m_sCDMUTER
End Get
Set(ByVal Value As SqlString)
Dim sCDMUTERTmp As SqlString = Value
If sCDMUTERTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sCDMUTER", "sCDMUTER can't be NULL")
End If
m_sCDMUTER = Value
End Set
End Property
Public Property [daTSMUT00]() As SqlDateTime
Get
Return m_daTSMUT00
End Get
Set(ByVal Value As SqlDateTime)
Dim daTSMUT00Tmp As SqlDateTime = Value
If daTSMUT00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("daTSMUT00", "daTSMUT00 can't be NULL")
End If
m_daTSMUT00 = Value
End Set
End Property
Public Property [daDMERF00]() As SqlDateTime
Get
Return m_daDMERF00
End Get
Set(ByVal Value As SqlDateTime)
Dim daDMERF00Tmp As SqlDateTime = Value
If daDMERF00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("daDMERF00", "daDMERF00 can't be NULL")
End If
m_daDMERF00 = Value
End Set
End Property
Public Property [sSAREC00]() As SqlString
Get
Return m_sSAREC00
End Get
Set(ByVal Value As SqlString)
Dim sSAREC00Tmp As SqlString = Value
If sSAREC00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("sSAREC00", "sSAREC00 can't be NULL")
End If
m_sSAREC00 = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,489 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'funktionsgruppe_reportgruppe'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 15. Oktober 2003, 16:30: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 'funktionsgruppe_reportgruppe'.
' /// </summary>
Public Class clsFunktionsgruppe_reportgruppe
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iMutierer, m_iMandantnr, m_iFunktionsgruppeNr, m_iReportgruppeNr, m_iFunktionsgruppeReportgruppeNr As SqlInt32
#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>iFunktionsgruppeReportgruppeNr</LI>
' /// <LI>iFunktionsgruppeNr. May be SqlInt32.Null</LI>
' /// <LI>iReportgruppeNr</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>daErstellt_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_funktionsgruppe_reportgruppe_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iFunktionsgruppeReportgruppeNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgruppeReportgruppeNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionsgruppeNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgruppeNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireportgruppeNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReportgruppeNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
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("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_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_funktionsgruppe_reportgruppe_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("clsFunktionsgruppe_reportgruppe::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>iFunktionsgruppeReportgruppeNr</LI>
' /// <LI>iFunktionsgruppeNr. May be SqlInt32.Null</LI>
' /// <LI>iReportgruppeNr</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>daErstellt_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_funktionsgruppe_reportgruppe_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iFunktionsgruppeReportgruppeNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgruppeReportgruppeNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionsgruppeNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgruppeNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireportgruppeNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReportgruppeNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
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("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_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_funktionsgruppe_reportgruppe_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("clsFunktionsgruppe_reportgruppe::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>iFunktionsgruppeReportgruppeNr</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_funktionsgruppe_reportgruppe_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iFunktionsgruppeReportgruppeNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgruppeReportgruppeNr))
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_funktionsgruppe_reportgruppe_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("clsFunktionsgruppe_reportgruppe::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>iFunktionsgruppeReportgruppeNr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iFunktionsgruppeReportgruppeNr</LI>
' /// <LI>iFunktionsgruppeNr</LI>
' /// <LI>iReportgruppeNr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>daErstellt_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_funktionsgruppe_reportgruppe_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("funktionsgruppe_reportgruppe")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iFunktionsgruppeReportgruppeNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgruppeReportgruppeNr))
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_funktionsgruppe_reportgruppe_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iFunktionsgruppeReportgruppeNr = New SqlInt32(CType(dtToReturn.Rows(0)("FunktionsgruppeReportgruppeNr"), Integer))
If dtToReturn.Rows(0)("funktionsgruppeNr") Is System.DBNull.Value Then
m_iFunktionsgruppeNr = SqlInt32.Null
Else
m_iFunktionsgruppeNr = New SqlInt32(CType(dtToReturn.Rows(0)("funktionsgruppeNr"), Integer))
End If
m_iReportgruppeNr = New SqlInt32(CType(dtToReturn.Rows(0)("reportgruppeNr"), Integer))
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
m_bAktiv = SqlBoolean.Null
Else
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
End If
If dtToReturn.Rows(0)("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)("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)("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)("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("clsFunktionsgruppe_reportgruppe::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_funktionsgruppe_reportgruppe_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("funktionsgruppe_reportgruppe")
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_funktionsgruppe_reportgruppe_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("clsFunktionsgruppe_reportgruppe::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 [iFunktionsgruppeReportgruppeNr]() As SqlInt32
Get
Return m_iFunktionsgruppeReportgruppeNr
End Get
Set(ByVal Value As SqlInt32)
Dim iFunktionsgruppeReportgruppeNrTmp As SqlInt32 = Value
If iFunktionsgruppeReportgruppeNrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iFunktionsgruppeReportgruppeNr", "iFunktionsgruppeReportgruppeNr can't be NULL")
End If
m_iFunktionsgruppeReportgruppeNr = Value
End Set
End Property
Public Property [iFunktionsgruppeNr]() As SqlInt32
Get
Return m_iFunktionsgruppeNr
End Get
Set(ByVal Value As SqlInt32)
m_iFunktionsgruppeNr = Value
End Set
End Property
Public Property [iReportgruppeNr]() As SqlInt32
Get
Return m_iReportgruppeNr
End Get
Set(ByVal Value As SqlInt32)
Dim iReportgruppeNrTmp As SqlInt32 = Value
If iReportgruppeNrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iReportgruppeNr", "iReportgruppeNr can't be NULL")
End If
m_iReportgruppeNr = 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 [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr = 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 [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 [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

View File

@@ -0,0 +1,489 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'funktionsgruppe_rolle'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 12. Januar 2003, 09:23:29
' // 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 'funktionsgruppe_rolle'.
' /// </summary>
Public Class clsFunktionsgruppe_rolle
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iFunktionsgruppenr, m_iFunktionsgrupperollenr, m_iMandantnr, m_iRollenr As SqlInt32
#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>iFunktionsgrupperollenr</LI>
' /// <LI>iFunktionsgruppenr. May be SqlInt32.Null</LI>
' /// <LI>iRollenr. May be SqlInt32.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_funktionsgruppe_rolle_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iFunktionsgrupperollenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgrupperollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionsgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgruppenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
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_funktionsgruppe_rolle_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("clsFunktionsgruppe_rolle::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>iFunktionsgrupperollenr</LI>
' /// <LI>iFunktionsgruppenr. May be SqlInt32.Null</LI>
' /// <LI>iRollenr. May be SqlInt32.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_funktionsgruppe_rolle_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iFunktionsgrupperollenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgrupperollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionsgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgruppenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
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_funktionsgruppe_rolle_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("clsFunktionsgruppe_rolle::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>iFunktionsgrupperollenr</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_funktionsgruppe_rolle_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iFunktionsgrupperollenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgrupperollenr))
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_funktionsgruppe_rolle_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("clsFunktionsgruppe_rolle::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>iFunktionsgrupperollenr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iFunktionsgrupperollenr</LI>
' /// <LI>iFunktionsgruppenr</LI>
' /// <LI>iRollenr</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_funktionsgruppe_rolle_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("funktionsgruppe_rolle")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iFunktionsgrupperollenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgrupperollenr))
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_funktionsgruppe_rolle_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iFunktionsgrupperollenr = New SqlInt32(CType(dtToReturn.Rows(0)("Funktionsgrupperollenr"), Integer))
If dtToReturn.Rows(0)("funktionsgruppenr") Is System.DBNull.Value Then
m_iFunktionsgruppenr = SqlInt32.Null
Else
m_iFunktionsgruppenr = New SqlInt32(CType(dtToReturn.Rows(0)("funktionsgruppenr"), Integer))
End If
If dtToReturn.Rows(0)("rollenr") Is System.DBNull.Value Then
m_iRollenr = SqlInt32.Null
Else
m_iRollenr = New SqlInt32(CType(dtToReturn.Rows(0)("rollenr"), Integer))
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("clsFunktionsgruppe_rolle::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_funktionsgruppe_rolle_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("funktionsgruppe_rolle")
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_funktionsgruppe_rolle_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("clsFunktionsgruppe_rolle::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 [iFunktionsgrupperollenr]() As SqlInt32
Get
Return m_iFunktionsgrupperollenr
End Get
Set(ByVal Value As SqlInt32)
Dim iFunktionsgrupperollenrTmp As SqlInt32 = Value
If iFunktionsgrupperollenrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iFunktionsgrupperollenr", "iFunktionsgrupperollenr can't be NULL")
End If
m_iFunktionsgrupperollenr = Value
End Set
End Property
Public Property [iFunktionsgruppenr]() As SqlInt32
Get
Return m_iFunktionsgruppenr
End Get
Set(ByVal Value As SqlInt32)
m_iFunktionsgruppenr = Value
End Set
End Property
Public Property [iRollenr]() As SqlInt32
Get
Return m_iRollenr
End Get
Set(ByVal Value As SqlInt32)
m_iRollenr = 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

View File

@@ -0,0 +1,773 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'idvmakro_office_vorlage'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 25. Dezember 2002, 19:35:23
' // 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 'idvmakro_office_vorlage'.
' /// </summary>
Public Class clsIdvmakro_office_vorlage
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iOffice_vorlagenr, m_iOffice_vorlagenrOld, m_iIdvmakronr, m_iIdvmakronrOld, m_iMandantnr, m_iReihenfolge, m_iIdvmakroofficevorlagenr As SqlInt32
#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>iIdvmakroofficevorlagenr</LI>
' /// <LI>iReihenfolge</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</LI>
' /// <LI>iOffice_vorlagenr. May be SqlInt32.Null</LI>
' /// <LI>iIdvmakronr. 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_idvmakro_office_vorlage_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iidvmakroofficevorlagenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iIdvmakroofficevorlagenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireihenfolge", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReihenfolge))
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, False, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ioffice_vorlagenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iOffice_vorlagenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iidvmakronr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iIdvmakronr))
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_idvmakro_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("clsIdvmakro_office_vorlage::Insert::Error occured." + ex.Message, 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>iIdvmakroofficevorlagenr</LI>
' /// <LI>iReihenfolge</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</LI>
' /// <LI>iOffice_vorlagenr. May be SqlInt32.Null</LI>
' /// <LI>iIdvmakronr. 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_idvmakro_office_vorlage_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iidvmakroofficevorlagenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iIdvmakroofficevorlagenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireihenfolge", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReihenfolge))
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, False, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ioffice_vorlagenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iOffice_vorlagenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iidvmakronr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iIdvmakronr))
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_idvmakro_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("clsIdvmakro_office_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: Update method for updating one or more rows using the Foreign Key 'office_vorlagenr.
' /// This method will Update one or more existing rows in the database. It will reset the field 'office_vorlagenr' in
' /// all rows which have as value for this field the value as set in property 'iOffice_vorlagenrOld' to
' /// the value as set in property 'iOffice_vorlagenr'.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iOffice_vorlagenr. May be SqlInt32.Null</LI>
' /// <LI>iOffice_vorlagenrOld. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function UpdateAllWoffice_vorlagenrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_idvmakro_office_vorlage_UpdateAllWoffice_vorlagenrLogic]"
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("@ioffice_vorlagenrOld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iOffice_vorlagenrOld))
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_idvmakro_office_vorlage_UpdateAllWoffice_vorlagenrLogic' 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("clsIdvmakro_office_vorlage::UpdateAllWoffice_vorlagenrLogic::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 'idvmakronr.
' /// This method will Update one or more existing rows in the database. It will reset the field 'idvmakronr' in
' /// all rows which have as value for this field the value as set in property 'iIdvmakronrOld' to
' /// the value as set in property 'iIdvmakronr'.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iIdvmakronr. May be SqlInt32.Null</LI>
' /// <LI>iIdvmakronrOld. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function UpdateAllWidvmakronrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_idvmakro_office_vorlage_UpdateAllWidvmakronrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iidvmakronr", SqlDbType.Int, 4, ParameterDirection.Input, false, 10, 0, "", DataRowVersion.Proposed, m_iIdvmakronr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iidvmakronrOld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iIdvmakronrOld))
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_idvmakro_office_vorlage_UpdateAllWidvmakronrLogic' 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("clsIdvmakro_office_vorlage::UpdateAllWidvmakronrLogic::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>iIdvmakroofficevorlagenr</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_idvmakro_office_vorlage_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iidvmakroofficevorlagenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iIdvmakroofficevorlagenr))
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_idvmakro_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("clsIdvmakro_office_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>iIdvmakroofficevorlagenr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iIdvmakroofficevorlagenr</LI>
' /// <LI>iReihenfolge</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>iOffice_vorlagenr</LI>
' /// <LI>iIdvmakronr</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_idvmakro_office_vorlage_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("idvmakro_office_vorlage")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iidvmakroofficevorlagenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iIdvmakroofficevorlagenr))
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_idvmakro_office_vorlage_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iIdvmakroofficevorlagenr = New SqlInt32(CType(dtToReturn.Rows(0)("idvmakroofficevorlagenr"), Integer))
m_iReihenfolge = New SqlInt32(CType(dtToReturn.Rows(0)("reihenfolge"), 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
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), 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)("idvmakronr") Is System.DBNull.Value Then
m_iIdvmakronr = SqlInt32.Null
Else
m_iIdvmakronr = New SqlInt32(CType(dtToReturn.Rows(0)("idvmakronr"), 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("clsIdvmakro_office_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_idvmakro_office_vorlage_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("idvmakro_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_idvmakro_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("clsIdvmakro_office_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
' /// <summary>
' /// Purpose: Select method for a foreign key. This method will Select one or more rows from the database, based on the Foreign Key 'office_vorlagenr'
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iOffice_vorlagenr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function SelectAllWoffice_vorlagenrLogic() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_idvmakro_office_vorlage_SelectAllWoffice_vorlagenrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("idvmakro_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, True, 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_idvmakro_office_vorlage_SelectAllWoffice_vorlagenrLogic' 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("clsIdvmakro_office_vorlage::SelectAllWoffice_vorlagenrLogic::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 'idvmakronr'
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iIdvmakronr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function SelectAllWidvmakronrLogic() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_idvmakro_office_vorlage_SelectAllWidvmakronrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("idvmakro_office_vorlage")
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iidvmakronr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iIdvmakronr))
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_idvmakro_office_vorlage_SelectAllWidvmakronrLogic' 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("clsIdvmakro_office_vorlage::SelectAllWidvmakronrLogic::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 [iIdvmakroofficevorlagenr]() As SqlInt32
Get
Return m_iIdvmakroofficevorlagenr
End Get
Set(ByVal Value As SqlInt32)
Dim iIdvmakroofficevorlagenrTmp As SqlInt32 = Value
If iIdvmakroofficevorlagenrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iIdvmakroofficevorlagenr", "iIdvmakroofficevorlagenr can't be NULL")
End If
m_iIdvmakroofficevorlagenr = Value
End Set
End Property
Public Property [iReihenfolge]() As SqlInt32
Get
Return m_iReihenfolge
End Get
Set(ByVal Value As SqlInt32)
Dim iReihenfolgeTmp As SqlInt32 = Value
If iReihenfolgeTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iReihenfolge", "iReihenfolge can't be NULL")
End If
m_iReihenfolge = 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)
Dim iMutiererTmp As SqlInt32 = Value
If iMutiererTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iMutierer", "iMutierer can't be NULL")
End If
m_iMutierer = 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 [iOffice_vorlagenrOld]() As SqlInt32
Get
Return m_iOffice_vorlagenrOld
End Get
Set(ByVal Value As SqlInt32)
m_iOffice_vorlagenrOld = Value
End Set
End Property
Public Property [iIdvmakronr]() As SqlInt32
Get
Return m_iIdvmakronr
End Get
Set(ByVal Value As SqlInt32)
m_iIdvmakronr = Value
End Set
End Property
Public Property [iIdvmakronrOld]() As SqlInt32
Get
Return m_iIdvmakronrOld
End Get
Set(ByVal Value As SqlInt32)
m_iIdvmakronrOld = Value
End Set
End Property
#End Region
End Class
End Namespace

View 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

View File

@@ -0,0 +1,986 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'kostenstelle'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Donnerstag, 3. April 2003, 11:33: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 'kostenstelle'.
' /// </summary>
Public Class clsKostenstelle
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iBankinformationnr, m_iBankinformationnrOld, m_iMandantnr, m_iMutierer, m_iNiederlassungnr, m_iNiederlassungnrOld, m_iKostenstellenummer, m_iKostenstellenr, m_iMarktbereichnr, m_iMarktbereichnrOld As SqlInt32
Private m_sBezeichnung, m_sDokument_kopfzeile, 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>iKostenstellenr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
' /// <LI>iKostenstellenummer. May be SqlInt32.Null</LI>
' /// <LI>sDokument_kopfzeile. May be SqlString.Null</LI>
' /// <LI>iMarktbereichnr. May be SqlInt32.Null</LI>
' /// <LI>iNiederlassungnr. May be SqlInt32.Null</LI>
' /// <LI>iBankinformationnr. May be SqlInt32.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_kostenstelle_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikostenstellenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKostenstellenr))
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("@ikostenstellenummer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iKostenstellenummer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokument_kopfzeile", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokument_kopfzeile))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imarktbereichnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMarktbereichnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iniederlassungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNiederlassungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibankinformationnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBankinformationnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
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("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
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_kostenstelle_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("clsKostenstelle::Insert::Error occured." + ex.Message, 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>iKostenstellenr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
' /// <LI>iKostenstellenummer. May be SqlInt32.Null</LI>
' /// <LI>sDokument_kopfzeile. May be SqlString.Null</LI>
' /// <LI>iMarktbereichnr. May be SqlInt32.Null</LI>
' /// <LI>iNiederlassungnr. May be SqlInt32.Null</LI>
' /// <LI>iBankinformationnr. May be SqlInt32.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_kostenstelle_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikostenstellenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKostenstellenr))
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("@ikostenstellenummer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iKostenstellenummer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokument_kopfzeile", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokument_kopfzeile))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imarktbereichnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMarktbereichnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iniederlassungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNiederlassungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibankinformationnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBankinformationnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
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("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
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_kostenstelle_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("clsKostenstelle::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 'marktbereichnr.
' /// This method will Update one or more existing rows in the database. It will reset the field 'marktbereichnr' in
' /// all rows which have as value for this field the value as set in property 'iMarktbereichnrOld' to
' /// the value as set in property 'iMarktbereichnr'.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iMarktbereichnr. May be SqlInt32.Null</LI>
' /// <LI>iMarktbereichnrOld. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function UpdateAllWmarktbereichnrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_kostenstelle_UpdateAllWmarktbereichnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imarktbereichnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMarktbereichnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imarktbereichnrOld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMarktbereichnrOld))
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_kostenstelle_UpdateAllWmarktbereichnrLogic' 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("clsKostenstelle::UpdateAllWmarktbereichnrLogic::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 'niederlassungnr.
' /// This method will Update one or more existing rows in the database. It will reset the field 'niederlassungnr' in
' /// all rows which have as value for this field the value as set in property 'iNiederlassungnrOld' to
' /// the value as set in property 'iNiederlassungnr'.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iNiederlassungnr. May be SqlInt32.Null</LI>
' /// <LI>iNiederlassungnrOld. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function UpdateAllWniederlassungnrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_kostenstelle_UpdateAllWniederlassungnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iniederlassungnr", SqlDbType.Int, 4, ParameterDirection.Input, false, 10, 0, "", DataRowVersion.Proposed, m_iNiederlassungnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iniederlassungnrOld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNiederlassungnrOld))
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_kostenstelle_UpdateAllWniederlassungnrLogic' 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("clsKostenstelle::UpdateAllWniederlassungnrLogic::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 'bankinformationnr.
' /// This method will Update one or more existing rows in the database. It will reset the field 'bankinformationnr' in
' /// all rows which have as value for this field the value as set in property 'iBankinformationnrOld' to
' /// the value as set in property 'iBankinformationnr'.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iBankinformationnr. May be SqlInt32.Null</LI>
' /// <LI>iBankinformationnrOld. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function UpdateAllWbankinformationnrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_kostenstelle_UpdateAllWbankinformationnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibankinformationnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBankinformationnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibankinformationnrOld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBankinformationnrOld))
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_kostenstelle_UpdateAllWbankinformationnrLogic' 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("clsKostenstelle::UpdateAllWbankinformationnrLogic::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>iKostenstellenr</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_kostenstelle_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikostenstellenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKostenstellenr))
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_kostenstelle_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("clsKostenstelle::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>iKostenstellenr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iKostenstellenr</LI>
' /// <LI>sBezeichnung</LI>
' /// <LI>sBeschreibung</LI>
' /// <LI>iKostenstellenummer</LI>
' /// <LI>sDokument_kopfzeile</LI>
' /// <LI>iMarktbereichnr</LI>
' /// <LI>iNiederlassungnr</LI>
' /// <LI>iBankinformationnr</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>bAktiv</LI>
' /// </UL>
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
' /// </remarks>
Public Overrides Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_kostenstelle_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("kostenstelle")
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikostenstellenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKostenstellenr))
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_kostenstelle_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iKostenstellenr = New SqlInt32(CType(dtToReturn.Rows(0)("kostenstellenr"), 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)("kostenstellenummer") Is System.DBNull.Value Then
m_iKostenstellenummer = SqlInt32.Null
Else
m_iKostenstellenummer = New SqlInt32(CType(dtToReturn.Rows(0)("kostenstellenummer"), Integer))
End If
If dtToReturn.Rows(0)("dokument_kopfzeile") Is System.DBNull.Value Then
m_sDokument_kopfzeile = SqlString.Null
Else
m_sDokument_kopfzeile = New SqlString(CType(dtToReturn.Rows(0)("dokument_kopfzeile"), String))
End If
If dtToReturn.Rows(0)("marktbereichnr") Is System.DBNull.Value Then
m_iMarktbereichnr = SqlInt32.Null
Else
m_iMarktbereichnr = New SqlInt32(CType(dtToReturn.Rows(0)("marktbereichnr"), Integer))
End If
If dtToReturn.Rows(0)("niederlassungnr") Is System.DBNull.Value Then
m_iNiederlassungnr = SqlInt32.Null
Else
m_iNiederlassungnr = New SqlInt32(CType(dtToReturn.Rows(0)("niederlassungnr"), Integer))
End If
If dtToReturn.Rows(0)("bankinformationnr") Is System.DBNull.Value Then
m_iBankinformationnr = SqlInt32.Null
Else
m_iBankinformationnr = New SqlInt32(CType(dtToReturn.Rows(0)("bankinformationnr"), Integer))
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)("erstellt_am") Is System.DBNull.Value Then
m_daErstellt_am = SqlDateTime.Null
Else
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
End If
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
m_daMutiert_am = SqlDateTime.Null
Else
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
End If
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
m_iMutierer = SqlInt32.Null
Else
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
End If
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
m_bAktiv = SqlBoolean.Null
Else
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
End If
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsKostenstelle::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_kostenstelle_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("kostenstelle")
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_kostenstelle_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("clsKostenstelle::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 'marktbereichnr'
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iMarktbereichnr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function SelectAllWmarktbereichnrLogic() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_kostenstelle_SelectAllWmarktbereichnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("kostenstelle")
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imarktbereichnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMarktbereichnr))
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_kostenstelle_SelectAllWmarktbereichnrLogic' 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("clsKostenstelle::SelectAllWmarktbereichnrLogic::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 'niederlassungnr'
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iNiederlassungnr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function SelectAllWniederlassungnrLogic() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_kostenstelle_SelectAllWniederlassungnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("kostenstelle")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iniederlassungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNiederlassungnr))
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_kostenstelle_SelectAllWniederlassungnrLogic' 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("clsKostenstelle::SelectAllWniederlassungnrLogic::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 'bankinformationnr'
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iBankinformationnr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function SelectAllWbankinformationnrLogic() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_kostenstelle_SelectAllWbankinformationnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("kostenstelle")
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibankinformationnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBankinformationnr))
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_kostenstelle_SelectAllWbankinformationnrLogic' 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("clsKostenstelle::SelectAllWbankinformationnrLogic::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 [iKostenstellenr]() As SqlInt32
Get
Return m_iKostenstellenr
End Get
Set(ByVal Value As SqlInt32)
Dim iKostenstellenrTmp As SqlInt32 = Value
If iKostenstellenrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iKostenstellenr", "iKostenstellenr can't be NULL")
End If
m_iKostenstellenr = 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 [iKostenstellenummer]() As SqlInt32
Get
Return m_iKostenstellenummer
End Get
Set(ByVal Value As SqlInt32)
m_iKostenstellenummer = Value
End Set
End Property
Public Property [sDokument_kopfzeile]() As SqlString
Get
Return m_sDokument_kopfzeile
End Get
Set(ByVal Value As SqlString)
m_sDokument_kopfzeile = Value
End Set
End Property
Public Property [iMarktbereichnr]() As SqlInt32
Get
Return m_iMarktbereichnr
End Get
Set(ByVal Value As SqlInt32)
m_iMarktbereichnr = Value
End Set
End Property
Public Property [iMarktbereichnrOld]() As SqlInt32
Get
Return m_iMarktbereichnrOld
End Get
Set(ByVal Value As SqlInt32)
m_iMarktbereichnrOld = Value
End Set
End Property
Public Property [iNiederlassungnr]() As SqlInt32
Get
Return m_iNiederlassungnr
End Get
Set(ByVal Value As SqlInt32)
m_iNiederlassungnr = Value
End Set
End Property
Public Property [iNiederlassungnrOld]() As SqlInt32
Get
Return m_iNiederlassungnrOld
End Get
Set(ByVal Value As SqlInt32)
m_iNiederlassungnrOld = Value
End Set
End Property
Public Property [iBankinformationnr]() As SqlInt32
Get
Return m_iBankinformationnr
End Get
Set(ByVal Value As SqlInt32)
m_iBankinformationnr = Value
End Set
End Property
Public Property [iBankinformationnrOld]() As SqlInt32
Get
Return m_iBankinformationnrOld
End Get
Set(ByVal Value As SqlInt32)
m_iBankinformationnrOld = 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 [daErstellt_am]() As SqlDateTime
Get
Return m_daErstellt_am
End Get
Set(ByVal Value As SqlDateTime)
m_daErstellt_am = Value
End Set
End Property
Public Property [daMutiert_am]() As SqlDateTime
Get
Return m_daMutiert_am
End Get
Set(ByVal Value As SqlDateTime)
m_daMutiert_am = Value
End Set
End Property
Public Property [iMutierer]() As SqlInt32
Get
Return m_iMutierer
End Get
Set(ByVal Value As SqlInt32)
m_iMutierer = Value
End Set
End Property
Public Property [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
m_bAktiv = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,869 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'Land'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 6. Mai 2003, 23:34: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 'Land'.
' /// </summary>
Public Class clsLand
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_fNRPAR00, m_fCDADRFO, m_fNRLNG00, m_fNRVRN00, m_fNRLND00, m_fNRSPR00 As SqlDouble
Private m_sCDLNDDM, m_sCDLNDNL, m_sCDLNDGR, m_sCDLNDWP, m_sCDPSP00, m_sCDOECZU, m_sCDLNDSQ, m_sSAREC00, m_sCDLRT00, m_sCDLNDBU, m_sBELND00, m_sSAADRVF, m_sCDLNDAB, m_sCDLND03, m_sCDLND02, m_sSADOMKE, m_sNRLNDSQ, m_sSANATKE, m_sSADOMVF, m_sSANATVF As SqlString
Private m_daDMERF00 As SqlDateTime
#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>fNRSPR00. May be SqlDouble.Null</LI>
' /// <LI>fNRLND00</LI>
' /// <LI>fNRVRN00. May be SqlDouble.Null</LI>
' /// <LI>sCDLND03. May be SqlString.Null</LI>
' /// <LI>sCDLND02. May be SqlString.Null</LI>
' /// <LI>sCDLNDAB. May be SqlString.Null</LI>
' /// <LI>sBELND00. May be SqlString.Null</LI>
' /// <LI>fNRPAR00. May be SqlDouble.Null</LI>
' /// <LI>fCDADRFO. May be SqlDouble.Null</LI>
' /// <LI>sSAADRVF. May be SqlString.Null</LI>
' /// <LI>sSADOMVF. May be SqlString.Null</LI>
' /// <LI>sSANATVF. May be SqlString.Null</LI>
' /// <LI>sSANATKE. May be SqlString.Null</LI>
' /// <LI>sSADOMKE. May be SqlString.Null</LI>
' /// <LI>sNRLNDSQ. May be SqlString.Null</LI>
' /// <LI>sCDLNDBU. May be SqlString.Null</LI>
' /// <LI>sCDLNDGR. May be SqlString.Null</LI>
' /// <LI>sCDLNDWP. May be SqlString.Null</LI>
' /// <LI>sCDLNDDM. May be SqlString.Null</LI>
' /// <LI>sCDLNDNL. May be SqlString.Null</LI>
' /// <LI>sCDPSP00. May be SqlString.Null</LI>
' /// <LI>fNRLNG00. May be SqlDouble.Null</LI>
' /// <LI>sCDLNDSQ. May be SqlString.Null</LI>
' /// <LI>sCDOECZU. May be SqlString.Null</LI>
' /// <LI>sCDLRT00. May be SqlString.Null</LI>
' /// <LI>daDMERF00. May be SqlDateTime.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_Land_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@fNRSPR00", SqlDbType.Float, 8, ParameterDirection.Input, True, 38, 0, "", DataRowVersion.Proposed, m_fNRSPR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@fNRLND00", SqlDbType.Float, 8, ParameterDirection.Input, False, 38, 0, "", DataRowVersion.Proposed, m_fNRLND00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@fNRVRN00", SqlDbType.Float, 8, ParameterDirection.Input, True, 38, 0, "", DataRowVersion.Proposed, m_fNRVRN00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDLND03", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDLND03))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDLND02", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDLND02))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDLNDAB", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDLNDAB))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBELND00", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBELND00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@fNRPAR00", SqlDbType.Float, 8, ParameterDirection.Input, True, 38, 0, "", DataRowVersion.Proposed, m_fNRPAR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@fCDADRFO", SqlDbType.Float, 8, ParameterDirection.Input, True, 38, 0, "", DataRowVersion.Proposed, m_fCDADRFO))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAADRVF", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSAADRVF))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSADOMVF", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSADOMVF))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSANATVF", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSANATVF))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSANATKE", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSANATKE))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSADOMKE", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSADOMKE))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRLNDSQ", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRLNDSQ))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDLNDBU", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDLNDBU))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDLNDGR", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDLNDGR))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDLNDWP", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDLNDWP))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDLNDDM", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDLNDDM))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDLNDNL", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDLNDNL))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDPSP00", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDPSP00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@fNRLNG00", SqlDbType.Float, 8, ParameterDirection.Input, True, 38, 0, "", DataRowVersion.Proposed, m_fNRLNG00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDLNDSQ", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDLNDSQ))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDOECZU", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDOECZU))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDLRT00", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDLRT00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMERF00", SqlDbType.SmallDateTime, 4, ParameterDirection.Input, True, 16, 0, "", DataRowVersion.Proposed, m_daDMERF00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAREC00", SqlDbType.NVarChar, 255, 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_Land_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("clsLand::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>fNRSPR00. May be SqlDouble.Null</LI>
' /// <LI>fNRLND00</LI>
' /// <LI>fNRVRN00. May be SqlDouble.Null</LI>
' /// <LI>sCDLND03. May be SqlString.Null</LI>
' /// <LI>sCDLND02. May be SqlString.Null</LI>
' /// <LI>sCDLNDAB. May be SqlString.Null</LI>
' /// <LI>sBELND00. May be SqlString.Null</LI>
' /// <LI>fNRPAR00. May be SqlDouble.Null</LI>
' /// <LI>fCDADRFO. May be SqlDouble.Null</LI>
' /// <LI>sSAADRVF. May be SqlString.Null</LI>
' /// <LI>sSADOMVF. May be SqlString.Null</LI>
' /// <LI>sSANATVF. May be SqlString.Null</LI>
' /// <LI>sSANATKE. May be SqlString.Null</LI>
' /// <LI>sSADOMKE. May be SqlString.Null</LI>
' /// <LI>sNRLNDSQ. May be SqlString.Null</LI>
' /// <LI>sCDLNDBU. May be SqlString.Null</LI>
' /// <LI>sCDLNDGR. May be SqlString.Null</LI>
' /// <LI>sCDLNDWP. May be SqlString.Null</LI>
' /// <LI>sCDLNDDM. May be SqlString.Null</LI>
' /// <LI>sCDLNDNL. May be SqlString.Null</LI>
' /// <LI>sCDPSP00. May be SqlString.Null</LI>
' /// <LI>fNRLNG00. May be SqlDouble.Null</LI>
' /// <LI>sCDLNDSQ. May be SqlString.Null</LI>
' /// <LI>sCDOECZU. May be SqlString.Null</LI>
' /// <LI>sCDLRT00. May be SqlString.Null</LI>
' /// <LI>daDMERF00. May be SqlDateTime.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_Land_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@fNRSPR00", SqlDbType.Float, 8, ParameterDirection.Input, True, 38, 0, "", DataRowVersion.Proposed, m_fNRSPR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@fNRLND00", SqlDbType.Float, 8, ParameterDirection.Input, False, 38, 0, "", DataRowVersion.Proposed, m_fNRLND00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@fNRVRN00", SqlDbType.Float, 8, ParameterDirection.Input, True, 38, 0, "", DataRowVersion.Proposed, m_fNRVRN00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDLND03", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDLND03))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDLND02", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDLND02))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDLNDAB", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDLNDAB))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBELND00", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBELND00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@fNRPAR00", SqlDbType.Float, 8, ParameterDirection.Input, True, 38, 0, "", DataRowVersion.Proposed, m_fNRPAR00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@fCDADRFO", SqlDbType.Float, 8, ParameterDirection.Input, True, 38, 0, "", DataRowVersion.Proposed, m_fCDADRFO))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAADRVF", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSAADRVF))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSADOMVF", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSADOMVF))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSANATVF", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSANATVF))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSANATKE", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSANATKE))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSADOMKE", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSADOMKE))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRLNDSQ", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRLNDSQ))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDLNDBU", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDLNDBU))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDLNDGR", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDLNDGR))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDLNDWP", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDLNDWP))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDLNDDM", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDLNDDM))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDLNDNL", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDLNDNL))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDPSP00", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDPSP00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@fNRLNG00", SqlDbType.Float, 8, ParameterDirection.Input, True, 38, 0, "", DataRowVersion.Proposed, m_fNRLNG00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDLNDSQ", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDLNDSQ))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDOECZU", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDOECZU))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sCDLRT00", SqlDbType.NVarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCDLRT00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daDMERF00", SqlDbType.SmallDateTime, 4, ParameterDirection.Input, True, 16, 0, "", DataRowVersion.Proposed, m_daDMERF00))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAREC00", SqlDbType.NVarChar, 255, 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_Land_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("clsLand::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>fNRLND00</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_Land_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@fNRLND00", SqlDbType.Float, 8, ParameterDirection.Input, False, 38, 0, "", DataRowVersion.Proposed, m_fNRLND00))
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_Land_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("clsLand::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>fNRLND00</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>fNRSPR00</LI>
' /// <LI>fNRLND00</LI>
' /// <LI>fNRVRN00</LI>
' /// <LI>sCDLND03</LI>
' /// <LI>sCDLND02</LI>
' /// <LI>sCDLNDAB</LI>
' /// <LI>sBELND00</LI>
' /// <LI>fNRPAR00</LI>
' /// <LI>fCDADRFO</LI>
' /// <LI>sSAADRVF</LI>
' /// <LI>sSADOMVF</LI>
' /// <LI>sSANATVF</LI>
' /// <LI>sSANATKE</LI>
' /// <LI>sSADOMKE</LI>
' /// <LI>sNRLNDSQ</LI>
' /// <LI>sCDLNDBU</LI>
' /// <LI>sCDLNDGR</LI>
' /// <LI>sCDLNDWP</LI>
' /// <LI>sCDLNDDM</LI>
' /// <LI>sCDLNDNL</LI>
' /// <LI>sCDPSP00</LI>
' /// <LI>fNRLNG00</LI>
' /// <LI>sCDLNDSQ</LI>
' /// <LI>sCDOECZU</LI>
' /// <LI>sCDLRT00</LI>
' /// <LI>daDMERF00</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_Land_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Land")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@fNRLND00", SqlDbType.Float, 8, ParameterDirection.Input, False, 38, 0, "", DataRowVersion.Proposed, m_fNRLND00))
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_Land_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
If dtToReturn.Rows(0)("NRSPR00") Is System.DBNull.Value Then
m_fNRSPR00 = SqlDouble.Null
Else
m_fNRSPR00 = New SqlDouble(CType(dtToReturn.Rows(0)("NRSPR00"), Double))
End If
m_fNRLND00 = New SqlDouble(CType(dtToReturn.Rows(0)("NRLND00"), Double))
If dtToReturn.Rows(0)("NRVRN00") Is System.DBNull.Value Then
m_fNRVRN00 = SqlDouble.Null
Else
m_fNRVRN00 = New SqlDouble(CType(dtToReturn.Rows(0)("NRVRN00"), Double))
End If
If dtToReturn.Rows(0)("CDLND03") Is System.DBNull.Value Then
m_sCDLND03 = SqlString.Null
Else
m_sCDLND03 = New SqlString(CType(dtToReturn.Rows(0)("CDLND03"), String))
End If
If dtToReturn.Rows(0)("CDLND02") Is System.DBNull.Value Then
m_sCDLND02 = SqlString.Null
Else
m_sCDLND02 = New SqlString(CType(dtToReturn.Rows(0)("CDLND02"), String))
End If
If dtToReturn.Rows(0)("CDLNDAB") Is System.DBNull.Value Then
m_sCDLNDAB = SqlString.Null
Else
m_sCDLNDAB = New SqlString(CType(dtToReturn.Rows(0)("CDLNDAB"), String))
End If
If dtToReturn.Rows(0)("BELND00") Is System.DBNull.Value Then
m_sBELND00 = SqlString.Null
Else
m_sBELND00 = New SqlString(CType(dtToReturn.Rows(0)("BELND00"), String))
End If
If dtToReturn.Rows(0)("NRPAR00") Is System.DBNull.Value Then
m_fNRPAR00 = SqlDouble.Null
Else
m_fNRPAR00 = New SqlDouble(CType(dtToReturn.Rows(0)("NRPAR00"), Double))
End If
If dtToReturn.Rows(0)("CDADRFO") Is System.DBNull.Value Then
m_fCDADRFO = SqlDouble.Null
Else
m_fCDADRFO = New SqlDouble(CType(dtToReturn.Rows(0)("CDADRFO"), Double))
End If
If dtToReturn.Rows(0)("SAADRVF") Is System.DBNull.Value Then
m_sSAADRVF = SqlString.Null
Else
m_sSAADRVF = New SqlString(CType(dtToReturn.Rows(0)("SAADRVF"), String))
End If
If dtToReturn.Rows(0)("SADOMVF") Is System.DBNull.Value Then
m_sSADOMVF = SqlString.Null
Else
m_sSADOMVF = New SqlString(CType(dtToReturn.Rows(0)("SADOMVF"), String))
End If
If dtToReturn.Rows(0)("SANATVF") Is System.DBNull.Value Then
m_sSANATVF = SqlString.Null
Else
m_sSANATVF = New SqlString(CType(dtToReturn.Rows(0)("SANATVF"), String))
End If
If dtToReturn.Rows(0)("SANATKE") Is System.DBNull.Value Then
m_sSANATKE = SqlString.Null
Else
m_sSANATKE = New SqlString(CType(dtToReturn.Rows(0)("SANATKE"), String))
End If
If dtToReturn.Rows(0)("SADOMKE") Is System.DBNull.Value Then
m_sSADOMKE = SqlString.Null
Else
m_sSADOMKE = New SqlString(CType(dtToReturn.Rows(0)("SADOMKE"), String))
End If
If dtToReturn.Rows(0)("NRLNDSQ") Is System.DBNull.Value Then
m_sNRLNDSQ = SqlString.Null
Else
m_sNRLNDSQ = New SqlString(CType(dtToReturn.Rows(0)("NRLNDSQ"), String))
End If
If dtToReturn.Rows(0)("CDLNDBU") Is System.DBNull.Value Then
m_sCDLNDBU = SqlString.Null
Else
m_sCDLNDBU = New SqlString(CType(dtToReturn.Rows(0)("CDLNDBU"), String))
End If
If dtToReturn.Rows(0)("CDLNDGR") Is System.DBNull.Value Then
m_sCDLNDGR = SqlString.Null
Else
m_sCDLNDGR = New SqlString(CType(dtToReturn.Rows(0)("CDLNDGR"), String))
End If
If dtToReturn.Rows(0)("CDLNDWP") Is System.DBNull.Value Then
m_sCDLNDWP = SqlString.Null
Else
m_sCDLNDWP = New SqlString(CType(dtToReturn.Rows(0)("CDLNDWP"), String))
End If
If dtToReturn.Rows(0)("CDLNDDM") Is System.DBNull.Value Then
m_sCDLNDDM = SqlString.Null
Else
m_sCDLNDDM = New SqlString(CType(dtToReturn.Rows(0)("CDLNDDM"), String))
End If
If dtToReturn.Rows(0)("CDLNDNL") Is System.DBNull.Value Then
m_sCDLNDNL = SqlString.Null
Else
m_sCDLNDNL = New SqlString(CType(dtToReturn.Rows(0)("CDLNDNL"), String))
End If
If dtToReturn.Rows(0)("CDPSP00") Is System.DBNull.Value Then
m_sCDPSP00 = SqlString.Null
Else
m_sCDPSP00 = New SqlString(CType(dtToReturn.Rows(0)("CDPSP00"), String))
End If
If dtToReturn.Rows(0)("NRLNG00") Is System.DBNull.Value Then
m_fNRLNG00 = SqlDouble.Null
Else
m_fNRLNG00 = New SqlDouble(CType(dtToReturn.Rows(0)("NRLNG00"), Double))
End If
If dtToReturn.Rows(0)("CDLNDSQ") Is System.DBNull.Value Then
m_sCDLNDSQ = SqlString.Null
Else
m_sCDLNDSQ = New SqlString(CType(dtToReturn.Rows(0)("CDLNDSQ"), String))
End If
If dtToReturn.Rows(0)("CDOECZU") Is System.DBNull.Value Then
m_sCDOECZU = SqlString.Null
Else
m_sCDOECZU = New SqlString(CType(dtToReturn.Rows(0)("CDOECZU"), String))
End If
If dtToReturn.Rows(0)("CDLRT00") Is System.DBNull.Value Then
m_sCDLRT00 = SqlString.Null
Else
m_sCDLRT00 = New SqlString(CType(dtToReturn.Rows(0)("CDLRT00"), String))
End If
If dtToReturn.Rows(0)("DMERF00") Is System.DBNull.Value Then
m_daDMERF00 = SqlDateTime.Null
Else
m_daDMERF00 = New SqlDateTime(CType(dtToReturn.Rows(0)("DMERF00"), Date))
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("clsLand::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_Land_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("Land")
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_Land_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("clsLand::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 [fNRSPR00]() As SqlDouble
Get
Return m_fNRSPR00
End Get
Set(ByVal Value As SqlDouble)
m_fNRSPR00 = Value
End Set
End Property
Public Property [fNRLND00]() As SqlDouble
Get
Return m_fNRLND00
End Get
Set(ByVal Value As SqlDouble)
Dim fNRLND00Tmp As SqlDouble = Value
If fNRLND00Tmp.IsNull Then
Throw New ArgumentOutOfRangeException("fNRLND00", "fNRLND00 can't be NULL")
End If
m_fNRLND00 = Value
End Set
End Property
Public Property [fNRVRN00]() As SqlDouble
Get
Return m_fNRVRN00
End Get
Set(ByVal Value As SqlDouble)
m_fNRVRN00 = Value
End Set
End Property
Public Property [sCDLND03]() As SqlString
Get
Return m_sCDLND03
End Get
Set(ByVal Value As SqlString)
m_sCDLND03 = Value
End Set
End Property
Public Property [sCDLND02]() As SqlString
Get
Return m_sCDLND02
End Get
Set(ByVal Value As SqlString)
m_sCDLND02 = Value
End Set
End Property
Public Property [sCDLNDAB]() As SqlString
Get
Return m_sCDLNDAB
End Get
Set(ByVal Value As SqlString)
m_sCDLNDAB = Value
End Set
End Property
Public Property [sBELND00]() As SqlString
Get
Return m_sBELND00
End Get
Set(ByVal Value As SqlString)
m_sBELND00 = Value
End Set
End Property
Public Property [fNRPAR00]() As SqlDouble
Get
Return m_fNRPAR00
End Get
Set(ByVal Value As SqlDouble)
m_fNRPAR00 = Value
End Set
End Property
Public Property [fCDADRFO]() As SqlDouble
Get
Return m_fCDADRFO
End Get
Set(ByVal Value As SqlDouble)
m_fCDADRFO = Value
End Set
End Property
Public Property [sSAADRVF]() As SqlString
Get
Return m_sSAADRVF
End Get
Set(ByVal Value As SqlString)
m_sSAADRVF = Value
End Set
End Property
Public Property [sSADOMVF]() As SqlString
Get
Return m_sSADOMVF
End Get
Set(ByVal Value As SqlString)
m_sSADOMVF = Value
End Set
End Property
Public Property [sSANATVF]() As SqlString
Get
Return m_sSANATVF
End Get
Set(ByVal Value As SqlString)
m_sSANATVF = Value
End Set
End Property
Public Property [sSANATKE]() As SqlString
Get
Return m_sSANATKE
End Get
Set(ByVal Value As SqlString)
m_sSANATKE = Value
End Set
End Property
Public Property [sSADOMKE]() As SqlString
Get
Return m_sSADOMKE
End Get
Set(ByVal Value As SqlString)
m_sSADOMKE = Value
End Set
End Property
Public Property [sNRLNDSQ]() As SqlString
Get
Return m_sNRLNDSQ
End Get
Set(ByVal Value As SqlString)
m_sNRLNDSQ = Value
End Set
End Property
Public Property [sCDLNDBU]() As SqlString
Get
Return m_sCDLNDBU
End Get
Set(ByVal Value As SqlString)
m_sCDLNDBU = Value
End Set
End Property
Public Property [sCDLNDGR]() As SqlString
Get
Return m_sCDLNDGR
End Get
Set(ByVal Value As SqlString)
m_sCDLNDGR = Value
End Set
End Property
Public Property [sCDLNDWP]() As SqlString
Get
Return m_sCDLNDWP
End Get
Set(ByVal Value As SqlString)
m_sCDLNDWP = Value
End Set
End Property
Public Property [sCDLNDDM]() As SqlString
Get
Return m_sCDLNDDM
End Get
Set(ByVal Value As SqlString)
m_sCDLNDDM = Value
End Set
End Property
Public Property [sCDLNDNL]() As SqlString
Get
Return m_sCDLNDNL
End Get
Set(ByVal Value As SqlString)
m_sCDLNDNL = Value
End Set
End Property
Public Property [sCDPSP00]() As SqlString
Get
Return m_sCDPSP00
End Get
Set(ByVal Value As SqlString)
m_sCDPSP00 = Value
End Set
End Property
Public Property [fNRLNG00]() As SqlDouble
Get
Return m_fNRLNG00
End Get
Set(ByVal Value As SqlDouble)
m_fNRLNG00 = Value
End Set
End Property
Public Property [sCDLNDSQ]() As SqlString
Get
Return m_sCDLNDSQ
End Get
Set(ByVal Value As SqlString)
m_sCDLNDSQ = Value
End Set
End Property
Public Property [sCDOECZU]() As SqlString
Get
Return m_sCDOECZU
End Get
Set(ByVal Value As SqlString)
m_sCDOECZU = Value
End Set
End Property
Public Property [sCDLRT00]() As SqlString
Get
Return m_sCDLRT00
End Get
Set(ByVal Value As SqlString)
m_sCDLRT00 = Value
End Set
End Property
Public Property [daDMERF00]() As SqlDateTime
Get
Return m_daDMERF00
End Get
Set(ByVal Value As SqlDateTime)
m_daDMERF00 = 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

View File

@@ -0,0 +1,490 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'mandant'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Samstag, 7. Dezember 2002, 21:32:49
' // 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 'mandant'.
' /// </summary>
Public Class clsMandant
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iMandantnr, m_iMandantnr1 As SqlInt32
Private m_sBezeichnung, 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>iMandantnr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
' /// <LI>iMandantnr1. 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_mandant_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@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("@imandantnr1", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr1))
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_mandant_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("clsMandant::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>iMandantnr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
' /// <LI>iMandantnr1. 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_mandant_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@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("@imandantnr1", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr1))
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_mandant_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("clsMandant::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>iMandantnr</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_mandant_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
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_mandant_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("clsMandant::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>iMandantnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>sBezeichnung</LI>
' /// <LI>sBeschreibung</LI>
' /// <LI>iMandantnr1</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_mandant_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("mandant")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
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_mandant_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), 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)("mandantnr1") Is System.DBNull.Value Then
m_iMandantnr1 = SqlInt32.Null
Else
m_iMandantnr1 = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr1"), 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("clsMandant::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_mandant_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("mandant")
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_mandant_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("clsMandant::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 [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
Dim iMandantnrTmp As SqlInt32 = Value
If iMandantnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iMandantnr", "iMandantnr can't be NULL")
End If
m_iMandantnr = Value
End Set
End Property
Public Property [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 [iMandantnr1]() As SqlInt32
Get
Return m_iMandantnr1
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr1 = 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

View File

@@ -0,0 +1,470 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'meldungstexte'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Samstag, 7. Dezember 2002, 21:32:49
' // 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 'meldungstexte'.
' /// </summary>
Public Class clsMeldungstexte
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iSprache, m_iMeldungstextnr As SqlInt32
Private m_sInhalt 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>iMeldungstextnr</LI>
' /// <LI>iSprache</LI>
' /// <LI>sInhalt. May be SqlString.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_meldungstexte_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imeldungstextnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMeldungstextnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sinhalt", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sInhalt))
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_meldungstexte_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("clsMeldungstexte::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>iMeldungstextnr</LI>
' /// <LI>iSprache</LI>
' /// <LI>sInhalt. May be SqlString.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_meldungstexte_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imeldungstextnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMeldungstextnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sinhalt", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sInhalt))
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_meldungstexte_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("clsMeldungstexte::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>iMeldungstextnr</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_meldungstexte_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imeldungstextnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMeldungstextnr))
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_meldungstexte_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("clsMeldungstexte::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>iMeldungstextnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iMeldungstextnr</LI>
' /// <LI>iSprache</LI>
' /// <LI>sInhalt</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_meldungstexte_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("meldungstexte")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@imeldungstextnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMeldungstextnr))
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_meldungstexte_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iMeldungstextnr = New SqlInt32(CType(dtToReturn.Rows(0)("meldungstextnr"), Integer))
m_iSprache = New SqlInt32(CType(dtToReturn.Rows(0)("sprache"), Integer))
If dtToReturn.Rows(0)("inhalt") Is System.DBNull.Value Then
m_sInhalt = SqlString.Null
Else
m_sInhalt = New SqlString(CType(dtToReturn.Rows(0)("inhalt"), String))
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("clsMeldungstexte::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_meldungstexte_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("meldungstexte")
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_meldungstexte_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("clsMeldungstexte::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 [iMeldungstextnr]() As SqlInt32
Get
Return m_iMeldungstextnr
End Get
Set(ByVal Value As SqlInt32)
Dim iMeldungstextnrTmp As SqlInt32 = Value
If iMeldungstextnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iMeldungstextnr", "iMeldungstextnr can't be NULL")
End If
m_iMeldungstextnr = Value
End Set
End Property
Public Property [iSprache]() As SqlInt32
Get
Return m_iSprache
End Get
Set(ByVal Value As SqlInt32)
Dim iSpracheTmp As SqlInt32 = Value
If iSpracheTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iSprache", "iSprache can't be NULL")
End If
m_iSprache = Value
End Set
End Property
Public Property [sInhalt]() As SqlString
Get
Return m_sInhalt
End Get
Set(ByVal Value As SqlString)
m_sInhalt = 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

View File

@@ -0,0 +1,910 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'mitarbeiter'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 10. August 2003, 23:09:05
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokadb
' /// <summary>
' /// Purpose: Data Access class for the table 'mitarbeiter'.
' /// </summary>
Public Class clsMitarbeiter
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bMailempfang, m_bEdokaMesasge, m_bShowtip, m_bAktiv, m_bMailDirektVersenden, m_bEdoka_mail, m_bJournalisierung, m_bMailDokumentrueckgang As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iPartnernr, m_iKlassifizierung, m_iMutierer, m_iMandantnr, m_iFunktionnr, m_iMitarbeiternr, m_iFuermandant, m_iSprache As SqlInt32
Private m_sRang, m_sAnrede, m_sKurzzeichen, m_sVorname, m_sName, m_sFax, m_sTelefon, m_sUnterschrift_text, m_sFunktion, m_sTgnummer, m_sEmail As SqlString
#End Region
' /// <summary>
' /// Purpose: Class constructor.
' /// </summary>
Public Sub New()
' // Nothing for now.
End Sub
' /// <summary>
' /// Purpose: Insert method. This method will insert one new row into the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iMitarbeiternr</LI>
' /// <LI>sVorname. May be SqlString.Null</LI>
' /// <LI>sName. May be SqlString.Null</LI>
' /// <LI>sKurzzeichen. May be SqlString.Null</LI>
' /// <LI>sAnrede. May be SqlString.Null</LI>
' /// <LI>sTgnummer. May be SqlString.Null</LI>
' /// <LI>sEmail. May be SqlString.Null</LI>
' /// <LI>sFax. May be SqlString.Null</LI>
' /// <LI>sTelefon. May be SqlString.Null</LI>
' /// <LI>sUnterschrift_text. May be SqlString.Null</LI>
' /// <LI>iFunktionnr. May be SqlInt32.Null</LI>
' /// <LI>iSprache. May be SqlInt32.Null</LI>
' /// <LI>iFuermandant</LI>
' /// <LI>bShowtip</LI>
' /// <LI>iPartnernr</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>bMailempfang. May be SqlBoolean.Null</LI>
' /// <LI>bEdokaMesasge. May be SqlBoolean.Null</LI>
' /// <LI>sFunktion. May be SqlString.Null</LI>
' /// <LI>bMailDirektVersenden. May be SqlBoolean.Null</LI>
' /// <LI>sRang. May be SqlString.Null</LI>
' /// <LI>bMailDokumentrueckgang. May be SqlBoolean.Null</LI>
' /// <LI>iKlassifizierung. May be SqlInt32.Null</LI>
' /// <LI>bEdoka_mail. May be SqlBoolean.Null</LI>
' /// <LI>bJournalisierung. May be SqlBoolean.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_mitarbeiter_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@svorname", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVorname))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sname", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sName))
scmCmdToExecute.Parameters.Add(New SqlParameter("@skurzzeichen", SqlDbType.VarChar, 10, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sKurzzeichen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sanrede", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAnrede))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stgnummer", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTgnummer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@semail", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEmail))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfax", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFax))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stelefon", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTelefon))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sunterschrift_text", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sUnterschrift_text))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifuermandant", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFuermandant))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bshowtip", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bShowtip))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ipartnernr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPartnernr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailempfang", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailempfang))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bEdokaMesasge", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bEdokaMesasge))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfunktion", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFunktion))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailDirektVersenden", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailDirektVersenden))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sRang", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRang))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailDokumentrueckgang", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailDokumentrueckgang))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iklassifizierung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iKlassifizierung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bedoka_mail", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bEdoka_mail))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bjournalisierung", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bJournalisierung))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = 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

View File

@@ -0,0 +1,489 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'mitarbeiter_funktionsgruppe'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 12. Januar 2003, 09:42:27
' // 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_funktionsgruppe'.
' /// </summary>
Public Class clsMitarbeiter_funktionsgruppe
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iMandantnr, m_iMitarbeiternr, m_iFunktionsgruppenr, m_iMitarbeiter_funktionsgruppenr As SqlInt32
#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>iMitarbeiter_funktionsgruppenr</LI>
' /// <LI>iMitarbeiternr. May be SqlInt32.Null</LI>
' /// <LI>iFunktionsgruppenr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// </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_funktionsgruppe_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiter_funktionsgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiter_funktionsgruppenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionsgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgruppenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
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_mitarbeiter_funktionsgruppe_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_funktionsgruppe::Insert::Error occured." + ex.Message, 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>iMitarbeiter_funktionsgruppenr</LI>
' /// <LI>iMitarbeiternr. May be SqlInt32.Null</LI>
' /// <LI>iFunktionsgruppenr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// </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_funktionsgruppe_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiter_funktionsgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiter_funktionsgruppenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionsgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgruppenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
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_mitarbeiter_funktionsgruppe_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_funktionsgruppe::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>iMitarbeiter_funktionsgruppenr</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_funktionsgruppe_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiter_funktionsgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiter_funktionsgruppenr))
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_funktionsgruppe_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_funktionsgruppe::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>iMitarbeiter_funktionsgruppenr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iMitarbeiter_funktionsgruppenr</LI>
' /// <LI>iMitarbeiternr</LI>
' /// <LI>iFunktionsgruppenr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>iMandantnr</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_mitarbeiter_funktionsgruppe_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("mitarbeiter_funktionsgruppe")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@imitarbeiter_funktionsgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiter_funktionsgruppenr))
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_funktionsgruppe_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iMitarbeiter_funktionsgruppenr = New SqlInt32(CType(dtToReturn.Rows(0)("mitarbeiter_funktionsgruppenr"), Integer))
If dtToReturn.Rows(0)("mitarbeiternr") Is System.DBNull.Value Then
m_iMitarbeiternr = SqlInt32.Null
Else
m_iMitarbeiternr = New SqlInt32(CType(dtToReturn.Rows(0)("mitarbeiternr"), Integer))
End If
If dtToReturn.Rows(0)("funktionsgruppenr") Is System.DBNull.Value Then
m_iFunktionsgruppenr = SqlInt32.Null
Else
m_iFunktionsgruppenr = New SqlInt32(CType(dtToReturn.Rows(0)("funktionsgruppenr"), 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)("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)("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("clsMitarbeiter_funktionsgruppe::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_funktionsgruppe_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("mitarbeiter_funktionsgruppe")
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_funktionsgruppe_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_funktionsgruppe::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 [iMitarbeiter_funktionsgruppenr]() As SqlInt32
Get
Return m_iMitarbeiter_funktionsgruppenr
End Get
Set(ByVal Value As SqlInt32)
Dim iMitarbeiter_funktionsgruppenrTmp As SqlInt32 = Value
If iMitarbeiter_funktionsgruppenrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iMitarbeiter_funktionsgruppenr", "iMitarbeiter_funktionsgruppenr can't be NULL")
End If
m_iMitarbeiter_funktionsgruppenr = Value
End Set
End Property
Public Property [iMitarbeiternr]() As SqlInt32
Get
Return m_iMitarbeiternr
End Get
Set(ByVal Value As SqlInt32)
m_iMitarbeiternr = Value
End Set
End Property
Public Property [iFunktionsgruppenr]() As SqlInt32
Get
Return m_iFunktionsgruppenr
End Get
Set(ByVal Value As SqlInt32)
m_iFunktionsgruppenr = 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 [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr = 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

View File

@@ -0,0 +1,753 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'mitarbeiterrolle'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Donnerstag, 2. Januar 2003, 23:16:29
' // 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 'mitarbeiterrolle'.
' /// </summary>
Public Class clsMitarbeiterrolle
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iMitarbeiternr, m_iMitarbeiternrOld, m_iMitarbeiterrollenr, m_iMandantnr, m_iRollenr, m_iRollenrOld As SqlInt32
#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>iMitarbeiterrollenr</LI>
' /// <LI>iMitarbeiternr. May be SqlInt32.Null</LI>
' /// <LI>iRollenr. May be SqlInt32.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_mitarbeiterrolle_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiterrollenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiterrollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
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_mitarbeiterrolle_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("clsMitarbeiterrolle::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>iMitarbeiterrollenr</LI>
' /// <LI>iMitarbeiternr. May be SqlInt32.Null</LI>
' /// <LI>iRollenr. May be SqlInt32.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_mitarbeiterrolle_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiterrollenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiterrollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
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_mitarbeiterrolle_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("clsMitarbeiterrolle::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 'mitarbeiternr.
' /// This method will Update one or more existing rows in the database. It will reset the field 'mitarbeiternr' in
' /// all rows which have as value for this field the value as set in property 'iMitarbeiternrOld' to
' /// the value as set in property 'iMitarbeiternr'.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iMitarbeiternr. May be SqlInt32.Null</LI>
' /// <LI>iMitarbeiternrOld. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function UpdateAllWmitarbeiternrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_mitarbeiterrolle_UpdateAllWmitarbeiternrLogic]"
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("@imitarbeiternrOld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternrOld))
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_mitarbeiterrolle_UpdateAllWmitarbeiternrLogic' 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("clsMitarbeiterrolle::UpdateAllWmitarbeiternrLogic::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 'rollenr.
' /// This method will Update one or more existing rows in the database. It will reset the field 'rollenr' in
' /// all rows which have as value for this field the value as set in property 'iRollenrOld' to
' /// the value as set in property 'iRollenr'.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iRollenr. May be SqlInt32.Null</LI>
' /// <LI>iRollenrOld. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function UpdateAllWrollenrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_mitarbeiterrolle_UpdateAllWrollenrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, false, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@irollenrOld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenrOld))
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_mitarbeiterrolle_UpdateAllWrollenrLogic' 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("clsMitarbeiterrolle::UpdateAllWrollenrLogic::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>iMitarbeiterrollenr</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_mitarbeiterrolle_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiterrollenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiterrollenr))
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_mitarbeiterrolle_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("clsMitarbeiterrolle::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>iMitarbeiterrollenr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iMitarbeiterrollenr</LI>
' /// <LI>iMitarbeiternr</LI>
' /// <LI>iRollenr</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_mitarbeiterrolle_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("mitarbeiterrolle")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@imitarbeiterrollenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiterrollenr))
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_mitarbeiterrolle_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iMitarbeiterrollenr = New SqlInt32(CType(dtToReturn.Rows(0)("mitarbeiterrollenr"), Integer))
If dtToReturn.Rows(0)("mitarbeiternr") Is System.DBNull.Value Then
m_iMitarbeiternr = SqlInt32.Null
Else
m_iMitarbeiternr = New SqlInt32(CType(dtToReturn.Rows(0)("mitarbeiternr"), Integer))
End If
If dtToReturn.Rows(0)("rollenr") Is System.DBNull.Value Then
m_iRollenr = SqlInt32.Null
Else
m_iRollenr = New SqlInt32(CType(dtToReturn.Rows(0)("rollenr"), Integer))
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("clsMitarbeiterrolle::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_mitarbeiterrolle_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("mitarbeiterrolle")
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_mitarbeiterrolle_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("clsMitarbeiterrolle::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 'mitarbeiternr'
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iMitarbeiternr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function SelectAllWmitarbeiternrLogic() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_mitarbeiterrolle_SelectAllWmitarbeiternrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("mitarbeiterrolle")
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, True, 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_mitarbeiterrolle_SelectAllWmitarbeiternrLogic' 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("clsMitarbeiterrolle::SelectAllWmitarbeiternrLogic::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 'rollenr'
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iRollenr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function SelectAllWrollenrLogic() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_mitarbeiterrolle_SelectAllWrollenrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("mitarbeiterrolle")
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
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_mitarbeiterrolle_SelectAllWrollenrLogic' 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("clsMitarbeiterrolle::SelectAllWrollenrLogic::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 [iMitarbeiterrollenr]() As SqlInt32
Get
Return m_iMitarbeiterrollenr
End Get
Set(ByVal Value As SqlInt32)
Dim iMitarbeiterrollenrTmp As SqlInt32 = Value
If iMitarbeiterrollenrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iMitarbeiterrollenr", "iMitarbeiterrollenr can't be NULL")
End If
m_iMitarbeiterrollenr = Value
End Set
End Property
Public Property [iMitarbeiternr]() As SqlInt32
Get
Return m_iMitarbeiternr
End Get
Set(ByVal Value As SqlInt32)
m_iMitarbeiternr = Value
End Set
End Property
Public Property [iMitarbeiternrOld]() As SqlInt32
Get
Return m_iMitarbeiternrOld
End Get
Set(ByVal Value As SqlInt32)
m_iMitarbeiternrOld = Value
End Set
End Property
Public Property [iRollenr]() As SqlInt32
Get
Return m_iRollenr
End Get
Set(ByVal Value As SqlInt32)
m_iRollenr = Value
End Set
End Property
Public Property [iRollenrOld]() As SqlInt32
Get
Return m_iRollenrOld
End Get
Set(ByVal Value As SqlInt32)
m_iRollenrOld = 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

View File

@@ -0,0 +1,469 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'nldokumenttyp'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 14. September 2003, 15:56:27
' // 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 'nldokumenttyp'.
' /// </summary>
Public Class clsNldokumenttyp
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iNiederlassungnr, m_iDokumenttypnr, m_iNldokumenttypnr As SqlInt32
#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>iNldokumenttypnr</LI>
' /// <LI>iNiederlassungnr. May be SqlInt32.Null</LI>
' /// <LI>iDokumenttypnr. 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_nldokumenttyp_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inldokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNldokumenttypnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iniederlassungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNiederlassungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
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_nldokumenttyp_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("clsNldokumenttyp::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>iNldokumenttypnr</LI>
' /// <LI>iNiederlassungnr. May be SqlInt32.Null</LI>
' /// <LI>iDokumenttypnr. 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_nldokumenttyp_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inldokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNldokumenttypnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iniederlassungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNiederlassungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
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_nldokumenttyp_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("clsNldokumenttyp::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>iNldokumenttypnr</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_nldokumenttyp_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inldokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNldokumenttypnr))
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_nldokumenttyp_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("clsNldokumenttyp::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>iNldokumenttypnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iNldokumenttypnr</LI>
' /// <LI>iNiederlassungnr</LI>
' /// <LI>iDokumenttypnr</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_nldokumenttyp_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("nldokumenttyp")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@inldokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNldokumenttypnr))
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_nldokumenttyp_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iNldokumenttypnr = New SqlInt32(CType(dtToReturn.Rows(0)("nldokumenttypnr"), Integer))
If dtToReturn.Rows(0)("niederlassungnr") Is System.DBNull.Value Then
m_iNiederlassungnr = SqlInt32.Null
Else
m_iNiederlassungnr = New SqlInt32(CType(dtToReturn.Rows(0)("niederlassungnr"), Integer))
End If
If dtToReturn.Rows(0)("dokumenttypnr") Is System.DBNull.Value Then
m_iDokumenttypnr = SqlInt32.Null
Else
m_iDokumenttypnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumenttypnr"), Integer))
End If
If dtToReturn.Rows(0)("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("clsNldokumenttyp::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_nldokumenttyp_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("nldokumenttyp")
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_nldokumenttyp_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("clsNldokumenttyp::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 [iNldokumenttypnr]() As SqlInt32
Get
Return m_iNldokumenttypnr
End Get
Set(ByVal Value As SqlInt32)
Dim iNldokumenttypnrTmp As SqlInt32 = Value
If iNldokumenttypnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iNldokumenttypnr", "iNldokumenttypnr can't be NULL")
End If
m_iNldokumenttypnr = Value
End Set
End Property
Public Property [iNiederlassungnr]() As SqlInt32
Get
Return m_iNiederlassungnr
End Get
Set(ByVal Value As SqlInt32)
m_iNiederlassungnr = 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 [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

View File

@@ -0,0 +1,490 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'Objektbezeichnung'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 21. Mai 2003, 21:41:36
' // 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 'Objektbezeichnung'.
' /// </summary>
Public Class clsObjektbezeichnung
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iObjektbezeichnungnr, m_iMandantnr As SqlInt32
Private m_sBezeichnunung, 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>iObjektbezeichnungnr</LI>
' /// <LI>sBezeichnunung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. 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_Objektbezeichnung_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iobjektbezeichnungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iObjektbezeichnungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnunung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnunung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
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_Objektbezeichnung_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("clsObjektbezeichnung::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>iObjektbezeichnungnr</LI>
' /// <LI>sBezeichnunung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. 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_Objektbezeichnung_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iobjektbezeichnungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iObjektbezeichnungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnunung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnunung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
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_Objektbezeichnung_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("clsObjektbezeichnung::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>iObjektbezeichnungnr</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_Objektbezeichnung_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iobjektbezeichnungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iObjektbezeichnungnr))
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_Objektbezeichnung_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("clsObjektbezeichnung::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>iObjektbezeichnungnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iObjektbezeichnungnr</LI>
' /// <LI>sBezeichnunung</LI>
' /// <LI>sBeschreibung</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_Objektbezeichnung_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Objektbezeichnung")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iobjektbezeichnungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iObjektbezeichnungnr))
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_Objektbezeichnung_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iObjektbezeichnungnr = New SqlInt32(CType(dtToReturn.Rows(0)("objektbezeichnungnr"), Integer))
If dtToReturn.Rows(0)("bezeichnunung") Is System.DBNull.Value Then
m_sBezeichnunung = SqlString.Null
Else
m_sBezeichnunung = New SqlString(CType(dtToReturn.Rows(0)("bezeichnunung"), 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)("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("clsObjektbezeichnung::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_Objektbezeichnung_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("Objektbezeichnung")
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_Objektbezeichnung_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("clsObjektbezeichnung::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 [iObjektbezeichnungnr]() As SqlInt32
Get
Return m_iObjektbezeichnungnr
End Get
Set(ByVal Value As SqlInt32)
Dim iObjektbezeichnungnrTmp As SqlInt32 = Value
If iObjektbezeichnungnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iObjektbezeichnungnr", "iObjektbezeichnungnr can't be NULL")
End If
m_iObjektbezeichnungnr = Value
End Set
End Property
Public Property [sBezeichnunung]() As SqlString
Get
Return m_sBezeichnunung
End Get
Set(ByVal Value As SqlString)
m_sBezeichnunung = Value
End Set
End Property
Public Property [sBeschreibung]() As SqlString
Get
Return m_sBeschreibung
End Get
Set(ByVal Value As SqlString)
m_sBeschreibung = Value
End Set
End Property
Public Property [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
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

View 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

View File

@@ -0,0 +1,850 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'office_vorlage'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Donnerstag, 26. Februar 2004, 22:30:42
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokadb
' /// <summary>
' /// Purpose: Data Access class for the table 'office_vorlage'.
' /// </summary>
Public Class clsOffice_vorlage
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bDokument_geschuetzt, m_bIdv_nativ, m_bAbsender_ersteller, m_bAktiv, m_bBchorizontal, m_bKopfzeile_generieren, m_bIdv_vorlage As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iMandantnr, m_iBch, m_iBcw, m_iOffice_vorlagenr, m_iMutierer, m_iAnwendungnr, m_iOwner, m_iKlassifizierung, m_iVorlageid, m_iBcpl, m_iBcpt As SqlInt32
Private m_sPrefix_dokumentname, m_sIdv_id, m_sOffice_vorlage, m_sBezeichnung, m_sBeschreibung, m_sVorlagename As SqlString
#End Region
' /// <summary>
' /// Purpose: Class constructor.
' /// </summary>
Public Sub New()
' // Nothing for now.
End Sub
' /// <summary>
' /// Purpose: Insert method. This method will insert one new row into the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iOffice_vorlagenr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
' /// <LI>iVorlageid. May be SqlInt32.Null</LI>
' /// <LI>sVorlagename. May be SqlString.Null</LI>
' /// <LI>sPrefix_dokumentname. May be SqlString.Null</LI>
' /// <LI>bIdv_vorlage</LI>
' /// <LI>sIdv_id. May be SqlString.Null</LI>
' /// <LI>sOffice_vorlage. May be SqlString.Null</LI>
' /// <LI>bAbsender_ersteller. May be SqlBoolean.Null</LI>
' /// <LI>bIdv_nativ</LI>
' /// <LI>bDokument_geschuetzt. May be SqlBoolean.Null</LI>
' /// <LI>bKopfzeile_generieren</LI>
' /// <LI>iKlassifizierung. May be SqlInt32.Null</LI>
' /// <LI>iBcpt</LI>
' /// <LI>iBcpl. May be SqlInt32.Null</LI>
' /// <LI>iBcw</LI>
' /// <LI>iBch</LI>
' /// <LI>bBchorizontal. May be SqlBoolean.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>iAnwendungnr. May be SqlInt32.Null</LI>
' /// <LI>iOwner. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_office_vorlage_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ioffice_vorlagenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iOffice_vorlagenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ivorlageid", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVorlageid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@svorlagename", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVorlagename))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sprefix_dokumentname", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sPrefix_dokumentname))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bidv_vorlage", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bIdv_vorlage))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sidv_id", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sIdv_id))
scmCmdToExecute.Parameters.Add(New SqlParameter("@soffice_vorlage", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sOffice_vorlage))
scmCmdToExecute.Parameters.Add(New SqlParameter("@babsender_ersteller", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAbsender_ersteller))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bidv_nativ", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bIdv_nativ))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_geschuetzt", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_geschuetzt))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bkopfzeile_generieren", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bKopfzeile_generieren))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iklassifizierung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iKlassifizierung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibcpt", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBcpt))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibcpl", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBcpl))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibcw", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBcw))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibch", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBch))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bbchorizontal", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bBchorizontal))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ianwendungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAnwendungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iowner", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iOwner))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = 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

View File

@@ -0,0 +1,408 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'ort'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 6. Mai 2003, 23:34:54
' // 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 'ort'.
' /// </summary>
Public Class clsOrt
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_iOrtnr As SqlInt32
Private m_sKz, m_sOrt, m_sPlz 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>iOrtnr</LI>
' /// <LI>sPlz. May be SqlString.Null</LI>
' /// <LI>sOrt. May be SqlString.Null</LI>
' /// <LI>sKz. 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_ort_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iortnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iOrtnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@splz", SqlDbType.VarChar, 10, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sPlz))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sort", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sOrt))
scmCmdToExecute.Parameters.Add(New SqlParameter("@skz", SqlDbType.VarChar, 4, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sKz))
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_ort_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("clsOrt::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>iOrtnr</LI>
' /// <LI>sPlz. May be SqlString.Null</LI>
' /// <LI>sOrt. May be SqlString.Null</LI>
' /// <LI>sKz. 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_ort_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iortnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iOrtnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@splz", SqlDbType.VarChar, 10, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sPlz))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sort", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sOrt))
scmCmdToExecute.Parameters.Add(New SqlParameter("@skz", SqlDbType.VarChar, 4, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sKz))
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_ort_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("clsOrt::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>iOrtnr</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_ort_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iortnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iOrtnr))
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_ort_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("clsOrt::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>iOrtnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iOrtnr</LI>
' /// <LI>sPlz</LI>
' /// <LI>sOrt</LI>
' /// <LI>sKz</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_ort_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("ort")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iortnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iOrtnr))
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_ort_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iOrtnr = New SqlInt32(CType(dtToReturn.Rows(0)("ortnr"), Integer))
If dtToReturn.Rows(0)("plz") Is System.DBNull.Value Then
m_sPlz = SqlString.Null
Else
m_sPlz = New SqlString(CType(dtToReturn.Rows(0)("plz"), String))
End If
If dtToReturn.Rows(0)("ort") Is System.DBNull.Value Then
m_sOrt = SqlString.Null
Else
m_sOrt = New SqlString(CType(dtToReturn.Rows(0)("ort"), String))
End If
If dtToReturn.Rows(0)("kz") Is System.DBNull.Value Then
m_sKz = SqlString.Null
Else
m_sKz = New SqlString(CType(dtToReturn.Rows(0)("kz"), 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("clsOrt::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_ort_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("ort")
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_ort_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("clsOrt::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 [iOrtnr]() As SqlInt32
Get
Return m_iOrtnr
End Get
Set(ByVal Value As SqlInt32)
Dim iOrtnrTmp As SqlInt32 = Value
If iOrtnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iOrtnr", "iOrtnr can't be NULL")
End If
m_iOrtnr = Value
End Set
End Property
Public Property [sPlz]() As SqlString
Get
Return m_sPlz
End Get
Set(ByVal Value As SqlString)
m_sPlz = Value
End Set
End Property
Public Property [sOrt]() As SqlString
Get
Return m_sOrt
End Get
Set(ByVal Value As SqlString)
m_sOrt = Value
End Set
End Property
Public Property [sKz]() As SqlString
Get
Return m_sKz
End Get
Set(ByVal Value As SqlString)
m_sKz = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,570 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'ParameterSetList'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Donnerstag, 27. November 2003, 15:14:01
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokaDB
' /// <summary>
' /// Purpose: Data Access class for the table 'ParameterSetList'.
' /// </summary>
Public Class clsParameterSetList
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMandantnr, m_iMutierer, m_iReihenfolge, m_iParameterSetNameID, m_iParameterSetListID, m_iReportReportfeldregelNr As SqlInt32
Private m_sDatenherkunft, m_sParameterNavigationValue, m_sParameterDisplayValue 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>iParameterSetListID</LI>
' /// <LI>iParameterSetNameID. May be SqlInt32.Null</LI>
' /// <LI>iReportReportfeldregelNr</LI>
' /// <LI>sParameterDisplayValue. May be SqlString.Null</LI>
' /// <LI>sDatenherkunft. May be SqlString.Null</LI>
' /// <LI>iReihenfolge. 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>sParameterNavigationValue. May be SqlString.Null</LI>
' /// <LI>iMandantnr. 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_ParameterSetList_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParameterSetListID", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iParameterSetListID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParameterSetNameID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParameterSetNameID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iReportReportfeldregelNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReportReportfeldregelNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sParameterDisplayValue", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sParameterDisplayValue))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdatenherkunft", SqlDbType.VarChar, 2048, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDatenherkunft))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireihenfolge", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReihenfolge))
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("@sParameterNavigationValue", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sParameterNavigationValue))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
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_ParameterSetList_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("clsParameterSetList::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>iParameterSetListID</LI>
' /// <LI>iParameterSetNameID. May be SqlInt32.Null</LI>
' /// <LI>iReportReportfeldregelNr</LI>
' /// <LI>sParameterDisplayValue. May be SqlString.Null</LI>
' /// <LI>sDatenherkunft. May be SqlString.Null</LI>
' /// <LI>iReihenfolge. 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>sParameterNavigationValue. May be SqlString.Null</LI>
' /// <LI>iMandantnr. 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_ParameterSetList_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParameterSetListID", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iParameterSetListID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParameterSetNameID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParameterSetNameID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iReportReportfeldregelNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReportReportfeldregelNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sParameterDisplayValue", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sParameterDisplayValue))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdatenherkunft", SqlDbType.VarChar, 2048, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDatenherkunft))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireihenfolge", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReihenfolge))
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("@sParameterNavigationValue", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sParameterNavigationValue))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
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_ParameterSetList_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("clsParameterSetList::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>iParameterSetListID</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_ParameterSetList_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParameterSetListID", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iParameterSetListID))
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_ParameterSetList_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("clsParameterSetList::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>iParameterSetListID</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iParameterSetListID</LI>
' /// <LI>iParameterSetNameID</LI>
' /// <LI>iReportReportfeldregelNr</LI>
' /// <LI>sParameterDisplayValue</LI>
' /// <LI>sDatenherkunft</LI>
' /// <LI>iReihenfolge</LI>
' /// <LI>bAktiv</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>sParameterNavigationValue</LI>
' /// <LI>iMandantnr</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_ParameterSetList_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("ParameterSetList")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iParameterSetListID", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iParameterSetListID))
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_ParameterSetList_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iParameterSetListID = New SqlInt32(CType(dtToReturn.Rows(0)("ParameterSetListID"), Integer))
If dtToReturn.Rows(0)("ParameterSetNameID") Is System.DBNull.Value Then
m_iParameterSetNameID = SqlInt32.Null
Else
m_iParameterSetNameID = New SqlInt32(CType(dtToReturn.Rows(0)("ParameterSetNameID"), Integer))
End If
m_iReportReportfeldregelNr = New SqlInt32(CType(dtToReturn.Rows(0)("ReportReportfeldregelNr"), Integer))
If dtToReturn.Rows(0)("ParameterDisplayValue") Is System.DBNull.Value Then
m_sParameterDisplayValue = SqlString.Null
Else
m_sParameterDisplayValue = New SqlString(CType(dtToReturn.Rows(0)("ParameterDisplayValue"), String))
End If
If dtToReturn.Rows(0)("datenherkunft") Is System.DBNull.Value Then
m_sDatenherkunft = SqlString.Null
Else
m_sDatenherkunft = New SqlString(CType(dtToReturn.Rows(0)("datenherkunft"), String))
End If
If dtToReturn.Rows(0)("reihenfolge") Is System.DBNull.Value Then
m_iReihenfolge = SqlInt32.Null
Else
m_iReihenfolge = New SqlInt32(CType(dtToReturn.Rows(0)("reihenfolge"), 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)("ParameterNavigationValue") Is System.DBNull.Value Then
m_sParameterNavigationValue = SqlString.Null
Else
m_sParameterNavigationValue = New SqlString(CType(dtToReturn.Rows(0)("ParameterNavigationValue"), 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
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsParameterSetList::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_ParameterSetList_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("ParameterSetList")
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_ParameterSetList_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("clsParameterSetList::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 [iParameterSetListID]() As SqlInt32
Get
Return m_iParameterSetListID
End Get
Set(ByVal Value As SqlInt32)
Dim iParameterSetListIDTmp As SqlInt32 = Value
If iParameterSetListIDTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iParameterSetListID", "iParameterSetListID can't be NULL")
End If
m_iParameterSetListID = Value
End Set
End Property
Public Property [iParameterSetNameID]() As SqlInt32
Get
Return m_iParameterSetNameID
End Get
Set(ByVal Value As SqlInt32)
m_iParameterSetNameID = Value
End Set
End Property
Public Property [iReportReportfeldregelNr]() As SqlInt32
Get
Return m_iReportReportfeldregelNr
End Get
Set(ByVal Value As SqlInt32)
Dim iReportReportfeldregelNrTmp As SqlInt32 = Value
If iReportReportfeldregelNrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iReportReportfeldregelNr", "iReportReportfeldregelNr can't be NULL")
End If
m_iReportReportfeldregelNr = Value
End Set
End Property
Public Property [sParameterDisplayValue]() As SqlString
Get
Return m_sParameterDisplayValue
End Get
Set(ByVal Value As SqlString)
m_sParameterDisplayValue = Value
End Set
End Property
Public Property [sDatenherkunft]() As SqlString
Get
Return m_sDatenherkunft
End Get
Set(ByVal Value As SqlString)
m_sDatenherkunft = Value
End Set
End Property
Public Property [iReihenfolge]() As SqlInt32
Get
Return m_iReihenfolge
End Get
Set(ByVal Value As SqlInt32)
m_iReihenfolge = 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 [sParameterNavigationValue]() As SqlString
Get
Return m_sParameterNavigationValue
End Get
Set(ByVal Value As SqlString)
m_sParameterNavigationValue = 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
#End Region
End Class
End Namespace

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,527 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'PhysischesArchiv'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Freitag, 27. Dezember 2002, 13:23:13
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokadb
' /// <summary>
' /// Purpose: Data Access class for the table 'PhysischesArchiv'.
' /// </summary>
Public Class clsPhysischesArchiv
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_blobMandantnr, m_blobSprache As SqlBinary
Private m_iPhysischesarchivnr, m_iMutierer As SqlInt32
Private m_sBeschreibung, m_sBezeichnung As SqlString
#End Region
' /// <summary>
' /// Purpose: Class constructor.
' /// </summary>
Public Sub New()
' // Nothing for now.
End Sub
' /// <summary>
' /// Purpose: Insert method. This method will insert one new row into the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iPhysischesarchivnr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
' /// <LI>blobSprache. May be SqlBinary.Null</LI>
' /// <LI>blobMandantnr. May be SqlBinary.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>
Public Overrides Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_PhysischesArchiv_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iphysischesarchivnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPhysischesarchivnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
Dim iLength As Integer = 0
If Not m_blobSprache.IsNull Then
iLength = m_blobSprache.Length
End If
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobsprache", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobSprache))
iLength = 0
If Not m_blobMandantnr.IsNull Then
iLength = m_blobMandantnr.Length
End If
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobmandantnr", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobMandantnr))
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_PhysischesArchiv_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("clsPhysischesArchiv::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>iPhysischesarchivnr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
' /// <LI>blobSprache. May be SqlBinary.Null</LI>
' /// <LI>blobMandantnr. May be SqlBinary.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>
Public Overrides Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_PhysischesArchiv_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iphysischesarchivnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPhysischesarchivnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
Dim iLength As Integer = 0
If Not m_blobSprache.IsNull Then
iLength = m_blobSprache.Length
End If
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobsprache", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobSprache))
iLength = 0
If Not m_blobMandantnr.IsNull Then
iLength = m_blobMandantnr.Length
End If
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobmandantnr", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobMandantnr))
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_PhysischesArchiv_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("clsPhysischesArchiv::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>iPhysischesarchivnr</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_PhysischesArchiv_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iphysischesarchivnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPhysischesarchivnr))
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_PhysischesArchiv_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("clsPhysischesArchiv::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>iPhysischesarchivnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iPhysischesarchivnr</LI>
' /// <LI>sBezeichnung</LI>
' /// <LI>sBeschreibung</LI>
' /// <LI>blobSprache</LI>
' /// <LI>blobMandantnr</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>
Public Overrides Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_PhysischesArchiv_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("PhysischesArchiv")
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iphysischesarchivnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPhysischesarchivnr))
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_PhysischesArchiv_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iPhysischesarchivnr = New SqlInt32(CType(dtToReturn.Rows(0)("physischesarchivnr"), 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)("sprache") Is System.DBNull.Value Then
m_blobSprache = SqlBinary.Null
Else
m_blobSprache = New SqlBinary(CType(dtToReturn.Rows(0)("sprache"), Byte()))
End If
If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then
m_blobMandantnr = SqlBinary.Null
Else
m_blobMandantnr = New SqlBinary(CType(dtToReturn.Rows(0)("mandantnr"), 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)("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("clsPhysischesArchiv::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_PhysischesArchiv_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("PhysischesArchiv")
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_PhysischesArchiv_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("clsPhysischesArchiv::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 [iPhysischesarchivnr]() As SqlInt32
Get
Return m_iPhysischesarchivnr
End Get
Set(ByVal Value As SqlInt32)
Dim iPhysischesarchivnrTmp As SqlInt32 = Value
If iPhysischesarchivnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iPhysischesarchivnr", "iPhysischesarchivnr can't be NULL")
End If
m_iPhysischesarchivnr = 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 [blobSprache]() As SqlBinary
Get
Return m_blobSprache
End Get
Set(ByVal Value As SqlBinary)
m_blobSprache = Value
End Set
End Property
Public Property [blobMandantnr]() As SqlBinary
Get
Return m_blobMandantnr
End Get
Set(ByVal Value As SqlBinary)
m_blobMandantnr = 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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,530 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'prozess'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 5. Januar 2003, 19:27:50
' // 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 'prozess'.
' /// </summary>
Public Class clsProzess
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bErstellung, m_bVerwendung, m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iProzessnr, m_iMandantnr As SqlInt32
Private m_sBeschreibung, m_sBezeichnung As SqlString
#End Region
' /// <summary>
' /// Purpose: Class constructor.
' /// </summary>
Public Sub New()
' // Nothing for now.
End Sub
' /// <summary>
' /// Purpose: Insert method. This method will insert one new row into the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iProzessnr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
' /// <LI>bErstellung. May be SqlBoolean.Null</LI>
' /// <LI>bVerwendung. 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>
' /// </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_prozess_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iprozessnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iProzessnr))
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("@berstellung", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bErstellung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bverwendung", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bVerwendung))
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_prozess_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("clsProzess::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>iProzessnr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
' /// <LI>bErstellung. May be SqlBoolean.Null</LI>
' /// <LI>bVerwendung. 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>
' /// </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_prozess_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iprozessnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iProzessnr))
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("@berstellung", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bErstellung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bverwendung", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bVerwendung))
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_prozess_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("clsProzess::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>iProzessnr</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_prozess_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iprozessnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iProzessnr))
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_prozess_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("clsProzess::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>iProzessnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iProzessnr</LI>
' /// <LI>sBezeichnung</LI>
' /// <LI>sBeschreibung</LI>
' /// <LI>bErstellung</LI>
' /// <LI>bVerwendung</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_prozess_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("prozess")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iprozessnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iProzessnr))
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_prozess_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iProzessnr = New SqlInt32(CType(dtToReturn.Rows(0)("prozessnr"), 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)("erstellung") Is System.DBNull.Value Then
m_bErstellung = SqlBoolean.Null
Else
m_bErstellung = New SqlBoolean(CType(dtToReturn.Rows(0)("erstellung"), Boolean))
End If
If dtToReturn.Rows(0)("verwendung") Is System.DBNull.Value Then
m_bVerwendung = SqlBoolean.Null
Else
m_bVerwendung = New SqlBoolean(CType(dtToReturn.Rows(0)("verwendung"), 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
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsProzess::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_prozess_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("prozess")
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_prozess_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("clsProzess::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 [iProzessnr]() As SqlInt32
Get
Return m_iProzessnr
End Get
Set(ByVal Value As SqlInt32)
Dim iProzessnrTmp As SqlInt32 = Value
If iProzessnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iProzessnr", "iProzessnr can't be NULL")
End If
m_iProzessnr = 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 [bErstellung]() As SqlBoolean
Get
Return m_bErstellung
End Get
Set(ByVal Value As SqlBoolean)
m_bErstellung = Value
End Set
End Property
Public Property [bVerwendung]() As SqlBoolean
Get
Return m_bVerwendung
End Get
Set(ByVal Value As SqlBoolean)
m_bVerwendung = 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

View File

@@ -0,0 +1,529 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'report_reportfeldregel'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Montag, 10. November 2003, 11:48:33
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokaDB
' /// <summary>
' /// Purpose: Data Access class for the table 'report_reportfeldregel'.
' /// </summary>
Public Class clsReport_reportfeldregel
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bEingabe_zwingend, m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iReportNr, m_iReportReportfeldregelNr, m_iReportFeldRegelNr, m_iMandantnr, m_iReihenfolge As SqlInt32
#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>iReportReportfeldregelNr</LI>
' /// <LI>iReportNr. May be SqlInt32.Null</LI>
' /// <LI>iReportFeldRegelNr. May be SqlInt32.Null</LI>
' /// <LI>iReihenfolge. May be SqlInt32.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>bEingabe_zwingend. May be SqlBoolean.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_report_reportfeldregel_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iReportReportfeldregelNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReportReportfeldregelNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireportNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReportNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iReportFeldRegelNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReportFeldRegelNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iReihenfolge", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReihenfolge))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
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("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@beingabe_zwingend", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bEingabe_zwingend))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
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_report_reportfeldregel_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("clsReport_reportfeldregel::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>iReportReportfeldregelNr</LI>
' /// <LI>iReportNr. May be SqlInt32.Null</LI>
' /// <LI>iReportFeldRegelNr. May be SqlInt32.Null</LI>
' /// <LI>iReihenfolge. May be SqlInt32.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>bEingabe_zwingend. May be SqlBoolean.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_report_reportfeldregel_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iReportReportfeldregelNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReportReportfeldregelNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireportNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReportNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iReportFeldRegelNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReportFeldRegelNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iReihenfolge", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReihenfolge))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
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("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@beingabe_zwingend", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bEingabe_zwingend))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
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_report_reportfeldregel_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("clsReport_reportfeldregel::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>iReportReportfeldregelNr</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_report_reportfeldregel_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iReportReportfeldregelNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReportReportfeldregelNr))
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_report_reportfeldregel_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("clsReport_reportfeldregel::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>iReportReportfeldregelNr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iReportReportfeldregelNr</LI>
' /// <LI>iReportNr</LI>
' /// <LI>iReportFeldRegelNr</LI>
' /// <LI>iReihenfolge</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>bEingabe_zwingend</LI>
' /// <LI>bAktiv</LI>
' /// </UL>
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
' /// </remarks>
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_report_reportfeldregel_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("report_reportfeldregel")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iReportReportfeldregelNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReportReportfeldregelNr))
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_report_reportfeldregel_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iReportReportfeldregelNr = New SqlInt32(CType(dtToReturn.Rows(0)("ReportReportfeldregelNr"), Integer))
If dtToReturn.Rows(0)("reportNr") Is System.DBNull.Value Then
m_iReportNr = SqlInt32.Null
Else
m_iReportNr = New SqlInt32(CType(dtToReturn.Rows(0)("reportNr"), Integer))
End If
If dtToReturn.Rows(0)("ReportFeldRegelNr") Is System.DBNull.Value Then
m_iReportFeldRegelNr = SqlInt32.Null
Else
m_iReportFeldRegelNr = New SqlInt32(CType(dtToReturn.Rows(0)("ReportFeldRegelNr"), Integer))
End If
If dtToReturn.Rows(0)("Reihenfolge") Is System.DBNull.Value Then
m_iReihenfolge = SqlInt32.Null
Else
m_iReihenfolge = New SqlInt32(CType(dtToReturn.Rows(0)("Reihenfolge"), Integer))
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)("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)("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)("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)("eingabe_zwingend") Is System.DBNull.Value Then
m_bEingabe_zwingend = SqlBoolean.Null
Else
m_bEingabe_zwingend = New SqlBoolean(CType(dtToReturn.Rows(0)("eingabe_zwingend"), Boolean))
End If
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
m_bAktiv = SqlBoolean.Null
Else
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
End If
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsReport_reportfeldregel::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_report_reportfeldregel_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("report_reportfeldregel")
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_report_reportfeldregel_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("clsReport_reportfeldregel::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 [iReportReportfeldregelNr]() As SqlInt32
Get
Return m_iReportReportfeldregelNr
End Get
Set(ByVal Value As SqlInt32)
Dim iReportReportfeldregelNrTmp As SqlInt32 = Value
If iReportReportfeldregelNrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iReportReportfeldregelNr", "iReportReportfeldregelNr can't be NULL")
End If
m_iReportReportfeldregelNr = Value
End Set
End Property
Public Property [iReportNr]() As SqlInt32
Get
Return m_iReportNr
End Get
Set(ByVal Value As SqlInt32)
m_iReportNr = Value
End Set
End Property
Public Property [iReportFeldRegelNr]() As SqlInt32
Get
Return m_iReportFeldRegelNr
End Get
Set(ByVal Value As SqlInt32)
m_iReportFeldRegelNr = Value
End Set
End Property
Public Property [iReihenfolge]() As SqlInt32
Get
Return m_iReihenfolge
End Get
Set(ByVal Value As SqlInt32)
m_iReihenfolge = 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 [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 [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 [iMutierer]() As SqlInt32
Get
Return m_iMutierer
End Get
Set(ByVal Value As SqlInt32)
m_iMutierer = Value
End Set
End Property
Public Property [bEingabe_zwingend]() As SqlBoolean
Get
Return m_bEingabe_zwingend
End Get
Set(ByVal Value As SqlBoolean)
m_bEingabe_zwingend = Value
End Set
End Property
Public Property [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
m_bAktiv = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,794 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'report_reportgruppe'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Donnerstag, 2. Januar 2003, 20:59:45
' // 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 'report_reportgruppe'.
' /// </summary>
Public Class clsReport_reportgruppe
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iReportnr, m_iReportnrOld, m_iMutierer, m_iReport_gruppenr, m_iReport_gruppenrOld, m_iMandantnr, m_iReport_reportgruppenr As SqlInt32
Private m_sBeschreibung, m_sBezeichnung As SqlString
#End Region
' /// <summary>
' /// Purpose: Class constructor.
' /// </summary>
Public Sub New()
' // Nothing for now.
End Sub
' /// <summary>
' /// Purpose: Insert method. This method will insert one new row into the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iReport_reportgruppenr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. 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>
' /// <LI>iReportnr. May be SqlInt32.Null</LI>
' /// <LI>iReport_gruppenr. 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_report_reportgruppe_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireport_reportgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReport_reportgruppenr))
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("@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("@ireportnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReportnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireport_gruppenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReport_gruppenr))
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_report_reportgruppe_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("clsReport_reportgruppe::Insert::Error occured." + ex.Message, 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>iReport_reportgruppenr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. 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>
' /// <LI>iReportnr. May be SqlInt32.Null</LI>
' /// <LI>iReport_gruppenr. 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_report_reportgruppe_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireport_reportgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReport_reportgruppenr))
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("@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("@ireportnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReportnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireport_gruppenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReport_gruppenr))
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_report_reportgruppe_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("clsReport_reportgruppe::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 'reportnr.
' /// This method will Update one or more existing rows in the database. It will reset the field 'reportnr' in
' /// all rows which have as value for this field the value as set in property 'iReportnrOld' to
' /// the value as set in property 'iReportnr'.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iReportnr. May be SqlInt32.Null</LI>
' /// <LI>iReportnrOld. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function UpdateAllWreportnrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_report_reportgruppe_UpdateAllWreportnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireportnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReportnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireportnrOld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReportnrOld))
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_report_reportgruppe_UpdateAllWreportnrLogic' 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("clsReport_reportgruppe::UpdateAllWreportnrLogic::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 'report_gruppenr.
' /// This method will Update one or more existing rows in the database. It will reset the field 'report_gruppenr' in
' /// all rows which have as value for this field the value as set in property 'iReport_gruppenrOld' to
' /// the value as set in property 'iReport_gruppenr'.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iReport_gruppenr. May be SqlInt32.Null</LI>
' /// <LI>iReport_gruppenrOld. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function UpdateAllWreport_gruppenrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_report_reportgruppe_UpdateAllWreport_gruppenrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@ireport_gruppenr", SqlDbType.Int, 4, ParameterDirection.Input, false, 10, 0, "", DataRowVersion.Proposed, m_iReport_gruppenr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@ireport_gruppenrOld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReport_gruppenrOld))
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_report_reportgruppe_UpdateAllWreport_gruppenrLogic' 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("clsReport_reportgruppe::UpdateAllWreport_gruppenrLogic::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>iReport_reportgruppenr</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_report_reportgruppe_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireport_reportgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReport_reportgruppenr))
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_report_reportgruppe_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("clsReport_reportgruppe::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>iReport_reportgruppenr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iReport_reportgruppenr</LI>
' /// <LI>sBezeichnung</LI>
' /// <LI>sBeschreibung</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>iReportnr</LI>
' /// <LI>iReport_gruppenr</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_report_reportgruppe_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("report_reportgruppe")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@ireport_reportgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReport_reportgruppenr))
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_report_reportgruppe_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iReport_reportgruppenr = New SqlInt32(CType(dtToReturn.Rows(0)("report_reportgruppenr"), 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)("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)("reportnr") Is System.DBNull.Value Then
m_iReportnr = SqlInt32.Null
Else
m_iReportnr = New SqlInt32(CType(dtToReturn.Rows(0)("reportnr"), Integer))
End If
If dtToReturn.Rows(0)("report_gruppenr") Is System.DBNull.Value Then
m_iReport_gruppenr = SqlInt32.Null
Else
m_iReport_gruppenr = New SqlInt32(CType(dtToReturn.Rows(0)("report_gruppenr"), 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("clsReport_reportgruppe::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_report_reportgruppe_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("report_reportgruppe")
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_report_reportgruppe_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("clsReport_reportgruppe::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 'reportnr'
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iReportnr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function SelectAllWreportnrLogic() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_report_reportgruppe_SelectAllWreportnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("report_reportgruppe")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@ireportnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReportnr))
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_report_reportgruppe_SelectAllWreportnrLogic' 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("clsReport_reportgruppe::SelectAllWreportnrLogic::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 'report_gruppenr'
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iReport_gruppenr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function SelectAllWreport_gruppenrLogic() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_report_reportgruppe_SelectAllWreport_gruppenrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("report_reportgruppe")
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireport_gruppenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReport_gruppenr))
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_report_reportgruppe_SelectAllWreport_gruppenrLogic' 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("clsReport_reportgruppe::SelectAllWreport_gruppenrLogic::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 [iReport_reportgruppenr]() As SqlInt32
Get
Return m_iReport_reportgruppenr
End Get
Set(ByVal Value As SqlInt32)
Dim iReport_reportgruppenrTmp As SqlInt32 = Value
If iReport_reportgruppenrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iReport_reportgruppenr", "iReport_reportgruppenr can't be NULL")
End If
m_iReport_reportgruppenr = 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 [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 [iReportnr]() As SqlInt32
Get
Return m_iReportnr
End Get
Set(ByVal Value As SqlInt32)
m_iReportnr = Value
End Set
End Property
Public Property [iReportnrOld]() As SqlInt32
Get
Return m_iReportnrOld
End Get
Set(ByVal Value As SqlInt32)
m_iReportnrOld = Value
End Set
End Property
Public Property [iReport_gruppenr]() As SqlInt32
Get
Return m_iReport_gruppenr
End Get
Set(ByVal Value As SqlInt32)
m_iReport_gruppenr = Value
End Set
End Property
Public Property [iReport_gruppenrOld]() As SqlInt32
Get
Return m_iReport_gruppenrOld
End Get
Set(ByVal Value As SqlInt32)
m_iReport_gruppenrOld = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,509 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'reportfeld'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Donnerstag, 2. Januar 2003, 22:42:24
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokadb
' /// <summary>
' /// Purpose: Data Access class for the table 'reportfeld'.
' /// </summary>
Public Class clsReportfeld
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iMandantnr, m_iReportfeldregelnr, m_iReportfeld_nr, m_iReihenfolge, m_iReportnr As SqlInt32
#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>iReportfeld_nr</LI>
' /// <LI>iReportfeldregelnr. May be SqlInt32.Null</LI>
' /// <LI>iReportnr. May be SqlInt32.Null</LI>
' /// <LI>iReihenfolge</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_reportfeld_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireportfeld_nr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReportfeld_nr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireportfeldregelnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReportfeldregelnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireportnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReportnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireihenfolge", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReihenfolge))
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_reportfeld_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("clsReportfeld::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>iReportfeld_nr</LI>
' /// <LI>iReportfeldregelnr. May be SqlInt32.Null</LI>
' /// <LI>iReportnr. May be SqlInt32.Null</LI>
' /// <LI>iReihenfolge</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_reportfeld_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireportfeld_nr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReportfeld_nr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireportfeldregelnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReportfeldregelnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireportnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReportnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireihenfolge", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReihenfolge))
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_reportfeld_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("clsReportfeld::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>iReportfeld_nr</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_reportfeld_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireportfeld_nr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReportfeld_nr))
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_reportfeld_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("clsReportfeld::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>iReportfeld_nr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iReportfeld_nr</LI>
' /// <LI>iReportfeldregelnr</LI>
' /// <LI>iReportnr</LI>
' /// <LI>iReihenfolge</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_reportfeld_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("reportfeld")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@ireportfeld_nr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReportfeld_nr))
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_reportfeld_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iReportfeld_nr = New SqlInt32(CType(dtToReturn.Rows(0)("reportfeld_nr"), Integer))
If dtToReturn.Rows(0)("reportfeldregelnr") Is System.DBNull.Value Then
m_iReportfeldregelnr = SqlInt32.Null
Else
m_iReportfeldregelnr = New SqlInt32(CType(dtToReturn.Rows(0)("reportfeldregelnr"), Integer))
End If
If dtToReturn.Rows(0)("reportnr") Is System.DBNull.Value Then
m_iReportnr = SqlInt32.Null
Else
m_iReportnr = New SqlInt32(CType(dtToReturn.Rows(0)("reportnr"), Integer))
End If
m_iReihenfolge = New SqlInt32(CType(dtToReturn.Rows(0)("reihenfolge"), 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("clsReportfeld::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_reportfeld_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("reportfeld")
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_reportfeld_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("clsReportfeld::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 [iReportfeld_nr]() As SqlInt32
Get
Return m_iReportfeld_nr
End Get
Set(ByVal Value As SqlInt32)
Dim iReportfeld_nrTmp As SqlInt32 = Value
If iReportfeld_nrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iReportfeld_nr", "iReportfeld_nr can't be NULL")
End If
m_iReportfeld_nr = Value
End Set
End Property
Public Property [iReportfeldregelnr]() As SqlInt32
Get
Return m_iReportfeldregelnr
End Get
Set(ByVal Value As SqlInt32)
m_iReportfeldregelnr = Value
End Set
End Property
Public Property [iReportnr]() As SqlInt32
Get
Return m_iReportnr
End Get
Set(ByVal Value As SqlInt32)
m_iReportnr = Value
End Set
End Property
Public Property [iReihenfolge]() As SqlInt32
Get
Return m_iReihenfolge
End Get
Set(ByVal Value As SqlInt32)
Dim iReihenfolgeTmp As SqlInt32 = Value
If iReihenfolgeTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iReihenfolge", "iReihenfolge can't be NULL")
End If
m_iReihenfolge = 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

View File

@@ -0,0 +1,489 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'reportgruppe_report'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 15. Oktober 2003, 16:31:04
' // 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 'reportgruppe_report'.
' /// </summary>
Public Class clsReportgruppe_report
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iMutierer, m_iMandantnr, m_iReportgruppeNr, m_iReportNr, m_iReportgruppeReportNr As SqlInt32
#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>iReportgruppeReportNr</LI>
' /// <LI>iReportgruppeNr. May be SqlInt32.Null</LI>
' /// <LI>iReportNr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>daErstellt_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_reportgruppe_report_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iReportgruppeReportNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReportgruppeReportNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireportgruppeNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReportgruppeNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireportNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReportNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
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("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_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_reportgruppe_report_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("clsReportgruppe_report::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>iReportgruppeReportNr</LI>
' /// <LI>iReportgruppeNr. May be SqlInt32.Null</LI>
' /// <LI>iReportNr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>daErstellt_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_reportgruppe_report_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iReportgruppeReportNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReportgruppeReportNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireportgruppeNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReportgruppeNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireportNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReportNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
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("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_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_reportgruppe_report_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("clsReportgruppe_report::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>iReportgruppeReportNr</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_reportgruppe_report_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iReportgruppeReportNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReportgruppeReportNr))
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_reportgruppe_report_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("clsReportgruppe_report::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>iReportgruppeReportNr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iReportgruppeReportNr</LI>
' /// <LI>iReportgruppeNr</LI>
' /// <LI>iReportNr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>daErstellt_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_reportgruppe_report_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("reportgruppe_report")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iReportgruppeReportNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReportgruppeReportNr))
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_reportgruppe_report_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iReportgruppeReportNr = New SqlInt32(CType(dtToReturn.Rows(0)("ReportgruppeReportNr"), Integer))
If dtToReturn.Rows(0)("reportgruppeNr") Is System.DBNull.Value Then
m_iReportgruppeNr = SqlInt32.Null
Else
m_iReportgruppeNr = New SqlInt32(CType(dtToReturn.Rows(0)("reportgruppeNr"), Integer))
End If
If dtToReturn.Rows(0)("reportNr") Is System.DBNull.Value Then
m_iReportNr = SqlInt32.Null
Else
m_iReportNr = New SqlInt32(CType(dtToReturn.Rows(0)("reportNr"), 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)("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)("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)("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)("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("clsReportgruppe_report::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_reportgruppe_report_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("reportgruppe_report")
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_reportgruppe_report_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("clsReportgruppe_report::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 [iReportgruppeReportNr]() As SqlInt32
Get
Return m_iReportgruppeReportNr
End Get
Set(ByVal Value As SqlInt32)
Dim iReportgruppeReportNrTmp As SqlInt32 = Value
If iReportgruppeReportNrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iReportgruppeReportNr", "iReportgruppeReportNr can't be NULL")
End If
m_iReportgruppeReportNr = Value
End Set
End Property
Public Property [iReportgruppeNr]() As SqlInt32
Get
Return m_iReportgruppeNr
End Get
Set(ByVal Value As SqlInt32)
m_iReportgruppeNr = Value
End Set
End Property
Public Property [iReportNr]() As SqlInt32
Get
Return m_iReportNr
End Get
Set(ByVal Value As SqlInt32)
m_iReportNr = 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 [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr = 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 [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 [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

View File

@@ -0,0 +1,795 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'ReportingSortOrderUser'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Donnerstag, 27. November 2003, 19:03:21
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokadb
' /// <summary>
' /// Purpose: Data Access class for the table 'ReportingSortOrderUser'.
' /// </summary>
Public Class clsReportingSortOrderUser
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAufsteigend, m_bLoeschen, m_bAktiv As SqlBoolean
Private m_daErstellt_Am, m_daMutiert_Am As SqlDateTime
Private m_iMandant_Nr, m_iMutierer, m_iSortOrder, m_iReportingSortOrderID, m_iReportID, m_iMitarbeiternr, m_iID As SqlInt32
Private m_sReportFieldName, m_sDisplayFieldName 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>iID</LI>
' /// <LI>iReportingSortOrderID. May be SqlInt32.Null</LI>
' /// <LI>iReportID</LI>
' /// <LI>sDisplayFieldName. May be SqlString.Null</LI>
' /// <LI>sReportFieldName. May be SqlString.Null</LI>
' /// <LI>bAufsteigend. May be SqlBoolean.Null</LI>
' /// <LI>iMitarbeiternr</LI>
' /// <LI>iSortOrder. 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>bLoeschen. May be SqlBoolean.Null</LI>
' /// <LI>iMandant_Nr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_ReportingSortOrderUser_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iID", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iReportingSortOrderID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReportingSortOrderID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iReportID", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReportID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDisplayFieldName", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDisplayFieldName))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sReportFieldName", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReportFieldName))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAufsteigend", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAufsteigend))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSortOrder", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSortOrder))
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("@bLoeschen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bLoeschen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iMandant_Nr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandant_Nr))
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_ReportingSortOrderUser_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("clsReportingSortOrderUser::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>iID</LI>
' /// <LI>iReportingSortOrderID. May be SqlInt32.Null</LI>
' /// <LI>iReportID</LI>
' /// <LI>sDisplayFieldName. May be SqlString.Null</LI>
' /// <LI>sReportFieldName. May be SqlString.Null</LI>
' /// <LI>bAufsteigend. May be SqlBoolean.Null</LI>
' /// <LI>iMitarbeiternr</LI>
' /// <LI>iSortOrder. 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>bLoeschen. May be SqlBoolean.Null</LI>
' /// <LI>iMandant_Nr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Overrides Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_ReportingSortOrderUser_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iID", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iReportingSortOrderID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReportingSortOrderID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iReportID", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReportID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDisplayFieldName", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDisplayFieldName))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sReportFieldName", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReportFieldName))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAufsteigend", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAufsteigend))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSortOrder", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSortOrder))
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("@bLoeschen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bLoeschen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iMandant_Nr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandant_Nr))
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_ReportingSortOrderUser_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("clsReportingSortOrderUser::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>iID</LI>
' /// <LI>iReportID</LI>
' /// <LI>iMitarbeiternr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Delete() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_ReportingSortOrderUser_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iID", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iReportID", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReportID))
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_ReportingSortOrderUser_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("clsReportingSortOrderUser::Delete::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: Delete method using PK field 'ID'. This method will
' /// delete one or more rows from the database, based on the Primary Key field 'ID'.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iID</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function DeleteWIDLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_ReportingSortOrderUser_DeleteWIDLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iID", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iID))
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_ReportingSortOrderUser_DeleteWIDLogic' 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("clsReportingSortOrderUser::DeleteWIDLogic::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: Delete method using PK field 'ReportID'. This method will
' /// delete one or more rows from the database, based on the Primary Key field 'ReportID'.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iReportID</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function DeleteWReportIDLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_ReportingSortOrderUser_DeleteWReportIDLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iReportID", SqlDbType.Int, 4, ParameterDirection.Input, false, 10, 0, "", DataRowVersion.Proposed, m_iReportID))
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_ReportingSortOrderUser_DeleteWReportIDLogic' 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("clsReportingSortOrderUser::DeleteWReportIDLogic::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: Delete method using PK field 'mitarbeiternr'. This method will
' /// delete one or more rows from the database, based on the Primary Key field 'mitarbeiternr'.
' /// </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 Function DeleteWmitarbeiternrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_ReportingSortOrderUser_DeleteWmitarbeiternrLogic]"
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_ReportingSortOrderUser_DeleteWmitarbeiternrLogic' 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("clsReportingSortOrderUser::DeleteWmitarbeiternrLogic::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>iID</LI>
' /// <LI>iReportID</LI>
' /// <LI>iMitarbeiternr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iID</LI>
' /// <LI>iReportingSortOrderID</LI>
' /// <LI>iReportID</LI>
' /// <LI>sDisplayFieldName</LI>
' /// <LI>sReportFieldName</LI>
' /// <LI>bAufsteigend</LI>
' /// <LI>iMitarbeiternr</LI>
' /// <LI>iSortOrder</LI>
' /// <LI>bAktiv</LI>
' /// <LI>daErstellt_Am</LI>
' /// <LI>daMutiert_Am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>bLoeschen</LI>
' /// <LI>iMandant_Nr</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_ReportingSortOrderUser_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("ReportingSortOrderUser")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iID", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iID))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iReportID", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReportID))
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_ReportingSortOrderUser_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iID = New SqlInt32(CType(dtToReturn.Rows(0)("ID"), Integer))
If dtToReturn.Rows(0)("ReportingSortOrderID") Is System.DBNull.Value Then
m_iReportingSortOrderID = SqlInt32.Null
Else
m_iReportingSortOrderID = New SqlInt32(CType(dtToReturn.Rows(0)("ReportingSortOrderID"), Integer))
End If
m_iReportID = New SqlInt32(CType(dtToReturn.Rows(0)("ReportID"), Integer))
If dtToReturn.Rows(0)("DisplayFieldName") Is System.DBNull.Value Then
m_sDisplayFieldName = SqlString.Null
Else
m_sDisplayFieldName = New SqlString(CType(dtToReturn.Rows(0)("DisplayFieldName"), String))
End If
If dtToReturn.Rows(0)("ReportFieldName") Is System.DBNull.Value Then
m_sReportFieldName = SqlString.Null
Else
m_sReportFieldName = New SqlString(CType(dtToReturn.Rows(0)("ReportFieldName"), String))
End If
If dtToReturn.Rows(0)("Aufsteigend") Is System.DBNull.Value Then
m_bAufsteigend = SqlBoolean.Null
Else
m_bAufsteigend = New SqlBoolean(CType(dtToReturn.Rows(0)("Aufsteigend"), Boolean))
End If
m_iMitarbeiternr = New SqlInt32(CType(dtToReturn.Rows(0)("mitarbeiternr"), Integer))
If dtToReturn.Rows(0)("SortOrder") Is System.DBNull.Value Then
m_iSortOrder = SqlInt32.Null
Else
m_iSortOrder = New SqlInt32(CType(dtToReturn.Rows(0)("SortOrder"), 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)("Loeschen") Is System.DBNull.Value Then
m_bLoeschen = SqlBoolean.Null
Else
m_bLoeschen = New SqlBoolean(CType(dtToReturn.Rows(0)("Loeschen"), Boolean))
End If
If dtToReturn.Rows(0)("Mandant_Nr") Is System.DBNull.Value Then
m_iMandant_Nr = SqlInt32.Null
Else
m_iMandant_Nr = New SqlInt32(CType(dtToReturn.Rows(0)("Mandant_Nr"), 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("clsReportingSortOrderUser::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_ReportingSortOrderUser_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("ReportingSortOrderUser")
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_ReportingSortOrderUser_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("clsReportingSortOrderUser::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 [iID]() As SqlInt32
Get
Return m_iID
End Get
Set(ByVal Value As SqlInt32)
Dim iIDTmp As SqlInt32 = Value
If iIDTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iID", "iID can't be NULL")
End If
m_iID = Value
End Set
End Property
Public Property [iReportingSortOrderID]() As SqlInt32
Get
Return m_iReportingSortOrderID
End Get
Set(ByVal Value As SqlInt32)
m_iReportingSortOrderID = Value
End Set
End Property
Public Property [iReportID]() As SqlInt32
Get
Return m_iReportID
End Get
Set(ByVal Value As SqlInt32)
Dim iReportIDTmp As SqlInt32 = Value
If iReportIDTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iReportID", "iReportID can't be NULL")
End If
m_iReportID = Value
End Set
End Property
Public Property [sDisplayFieldName]() As SqlString
Get
Return m_sDisplayFieldName
End Get
Set(ByVal Value As SqlString)
m_sDisplayFieldName = Value
End Set
End Property
Public Property [sReportFieldName]() As SqlString
Get
Return m_sReportFieldName
End Get
Set(ByVal Value As SqlString)
m_sReportFieldName = Value
End Set
End Property
Public Property [bAufsteigend]() As SqlBoolean
Get
Return m_bAufsteigend
End Get
Set(ByVal Value As SqlBoolean)
m_bAufsteigend = Value
End Set
End Property
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 [iSortOrder]() As SqlInt32
Get
Return m_iSortOrder
End Get
Set(ByVal Value As SqlInt32)
m_iSortOrder = 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 [bLoeschen]() As SqlBoolean
Get
Return m_bLoeschen
End Get
Set(ByVal Value As SqlBoolean)
m_bLoeschen = Value
End Set
End Property
Public Property [iMandant_Nr]() As SqlInt32
Get
Return m_iMandant_Nr
End Get
Set(ByVal Value As SqlInt32)
m_iMandant_Nr = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,689 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'rolle_dokumentart'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Samstag, 31. Mai 2003, 23:59:45
' // 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 'rolle_dokumentart'.
' /// </summary>
Public Class clsRolle_dokumentart
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAnzeigen, m_bAktiv, m_bChiffre_gestattet, m_bErstellen, m_bAbschliessen, m_bLoeschen, m_bBearbeiten, m_bAusschluss, m_bNormal, m_bMitarbeiter_gestattet, m_bVertraulich_gestattet As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iRolledokumentartnr, m_iRollenr, m_iDokumentartnr, m_iMandantnr, m_iMutierer As SqlInt32
#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>iRolledokumentartnr</LI>
' /// <LI>iRollenr. May be SqlInt32.Null</LI>
' /// <LI>iDokumentartnr. May be SqlInt32.Null</LI>
' /// <LI>bAusschluss. May be SqlBoolean.Null</LI>
' /// <LI>bNormal. May be SqlBoolean.Null</LI>
' /// <LI>bVertraulich_gestattet. May be SqlBoolean.Null</LI>
' /// <LI>bMitarbeiter_gestattet. May be SqlBoolean.Null</LI>
' /// <LI>bChiffre_gestattet. May be SqlBoolean.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>bAnzeigen. May be SqlBoolean.Null</LI>
' /// <LI>bErstellen. May be SqlBoolean.Null</LI>
' /// <LI>bBearbeiten. May be SqlBoolean.Null</LI>
' /// <LI>bLoeschen. May be SqlBoolean.Null</LI>
' /// <LI>bAbschliessen. 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_rolle_dokumentart_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irolledokumentartnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolledokumentartnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentartnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentartnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bausschluss", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAusschluss))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bnormal", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bNormal))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bvertraulich_gestattet", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bVertraulich_gestattet))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bmitarbeiter_gestattet", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMitarbeiter_gestattet))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bchiffre_gestattet", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bChiffre_gestattet))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
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("@banzeigen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAnzeigen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@berstellen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bErstellen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bbearbeiten", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bBearbeiten))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bloeschen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bLoeschen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@babschliessen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAbschliessen))
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_rolle_dokumentart_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("clsRolle_dokumentart::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>iRolledokumentartnr</LI>
' /// <LI>iRollenr. May be SqlInt32.Null</LI>
' /// <LI>iDokumentartnr. May be SqlInt32.Null</LI>
' /// <LI>bAusschluss. May be SqlBoolean.Null</LI>
' /// <LI>bNormal. May be SqlBoolean.Null</LI>
' /// <LI>bVertraulich_gestattet. May be SqlBoolean.Null</LI>
' /// <LI>bMitarbeiter_gestattet. May be SqlBoolean.Null</LI>
' /// <LI>bChiffre_gestattet. May be SqlBoolean.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>bAnzeigen. May be SqlBoolean.Null</LI>
' /// <LI>bErstellen. May be SqlBoolean.Null</LI>
' /// <LI>bBearbeiten. May be SqlBoolean.Null</LI>
' /// <LI>bLoeschen. May be SqlBoolean.Null</LI>
' /// <LI>bAbschliessen. 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_rolle_dokumentart_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irolledokumentartnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolledokumentartnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentartnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentartnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bausschluss", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAusschluss))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bnormal", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bNormal))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bvertraulich_gestattet", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bVertraulich_gestattet))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bmitarbeiter_gestattet", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMitarbeiter_gestattet))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bchiffre_gestattet", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bChiffre_gestattet))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
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("@banzeigen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAnzeigen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@berstellen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bErstellen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bbearbeiten", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bBearbeiten))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bloeschen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bLoeschen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@babschliessen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAbschliessen))
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_rolle_dokumentart_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("clsRolle_dokumentart::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>iRolledokumentartnr</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_rolle_dokumentart_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irolledokumentartnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolledokumentartnr))
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_rolle_dokumentart_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("clsRolle_dokumentart::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>iRolledokumentartnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iRolledokumentartnr</LI>
' /// <LI>iRollenr</LI>
' /// <LI>iDokumentartnr</LI>
' /// <LI>bAusschluss</LI>
' /// <LI>bNormal</LI>
' /// <LI>bVertraulich_gestattet</LI>
' /// <LI>bMitarbeiter_gestattet</LI>
' /// <LI>bChiffre_gestattet</LI>
' /// <LI>bAktiv</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>bAnzeigen</LI>
' /// <LI>bErstellen</LI>
' /// <LI>bBearbeiten</LI>
' /// <LI>bLoeschen</LI>
' /// <LI>bAbschliessen</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_rolle_dokumentart_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("rolle_dokumentart")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@irolledokumentartnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolledokumentartnr))
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_rolle_dokumentart_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iRolledokumentartnr = New SqlInt32(CType(dtToReturn.Rows(0)("rolledokumentartnr"), Integer))
If dtToReturn.Rows(0)("rollenr") Is System.DBNull.Value Then
m_iRollenr = SqlInt32.Null
Else
m_iRollenr = New SqlInt32(CType(dtToReturn.Rows(0)("rollenr"), Integer))
End If
If dtToReturn.Rows(0)("dokumentartnr") Is System.DBNull.Value Then
m_iDokumentartnr = SqlInt32.Null
Else
m_iDokumentartnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumentartnr"), Integer))
End If
If dtToReturn.Rows(0)("ausschluss") Is System.DBNull.Value Then
m_bAusschluss = SqlBoolean.Null
Else
m_bAusschluss = New SqlBoolean(CType(dtToReturn.Rows(0)("ausschluss"), Boolean))
End If
If dtToReturn.Rows(0)("normal") Is System.DBNull.Value Then
m_bNormal = SqlBoolean.Null
Else
m_bNormal = New SqlBoolean(CType(dtToReturn.Rows(0)("normal"), Boolean))
End If
If dtToReturn.Rows(0)("vertraulich_gestattet") Is System.DBNull.Value Then
m_bVertraulich_gestattet = SqlBoolean.Null
Else
m_bVertraulich_gestattet = New SqlBoolean(CType(dtToReturn.Rows(0)("vertraulich_gestattet"), Boolean))
End If
If dtToReturn.Rows(0)("mitarbeiter_gestattet") Is System.DBNull.Value Then
m_bMitarbeiter_gestattet = SqlBoolean.Null
Else
m_bMitarbeiter_gestattet = New SqlBoolean(CType(dtToReturn.Rows(0)("mitarbeiter_gestattet"), Boolean))
End If
If dtToReturn.Rows(0)("chiffre_gestattet") Is System.DBNull.Value Then
m_bChiffre_gestattet = SqlBoolean.Null
Else
m_bChiffre_gestattet = New SqlBoolean(CType(dtToReturn.Rows(0)("chiffre_gestattet"), Boolean))
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)("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)("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)("anzeigen") Is System.DBNull.Value Then
m_bAnzeigen = SqlBoolean.Null
Else
m_bAnzeigen = New SqlBoolean(CType(dtToReturn.Rows(0)("anzeigen"), Boolean))
End If
If dtToReturn.Rows(0)("erstellen") Is System.DBNull.Value Then
m_bErstellen = SqlBoolean.Null
Else
m_bErstellen = New SqlBoolean(CType(dtToReturn.Rows(0)("erstellen"), Boolean))
End If
If dtToReturn.Rows(0)("bearbeiten") Is System.DBNull.Value Then
m_bBearbeiten = SqlBoolean.Null
Else
m_bBearbeiten = New SqlBoolean(CType(dtToReturn.Rows(0)("bearbeiten"), Boolean))
End If
If dtToReturn.Rows(0)("loeschen") Is System.DBNull.Value Then
m_bLoeschen = SqlBoolean.Null
Else
m_bLoeschen = New SqlBoolean(CType(dtToReturn.Rows(0)("loeschen"), Boolean))
End If
If dtToReturn.Rows(0)("abschliessen") Is System.DBNull.Value Then
m_bAbschliessen = SqlBoolean.Null
Else
m_bAbschliessen = New SqlBoolean(CType(dtToReturn.Rows(0)("abschliessen"), 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("clsRolle_dokumentart::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_rolle_dokumentart_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("rolle_dokumentart")
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_rolle_dokumentart_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("clsRolle_dokumentart::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 [iRolledokumentartnr]() As SqlInt32
Get
Return m_iRolledokumentartnr
End Get
Set(ByVal Value As SqlInt32)
Dim iRolledokumentartnrTmp As SqlInt32 = Value
If iRolledokumentartnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iRolledokumentartnr", "iRolledokumentartnr can't be NULL")
End If
m_iRolledokumentartnr = Value
End Set
End Property
Public Property [iRollenr]() As SqlInt32
Get
Return m_iRollenr
End Get
Set(ByVal Value As SqlInt32)
m_iRollenr = Value
End Set
End Property
Public Property [iDokumentartnr]() As SqlInt32
Get
Return m_iDokumentartnr
End Get
Set(ByVal Value As SqlInt32)
m_iDokumentartnr = Value
End Set
End Property
Public Property [bAusschluss]() As SqlBoolean
Get
Return m_bAusschluss
End Get
Set(ByVal Value As SqlBoolean)
m_bAusschluss = Value
End Set
End Property
Public Property [bNormal]() As SqlBoolean
Get
Return m_bNormal
End Get
Set(ByVal Value As SqlBoolean)
m_bNormal = Value
End Set
End Property
Public Property [bVertraulich_gestattet]() As SqlBoolean
Get
Return m_bVertraulich_gestattet
End Get
Set(ByVal Value As SqlBoolean)
m_bVertraulich_gestattet = Value
End Set
End Property
Public Property [bMitarbeiter_gestattet]() As SqlBoolean
Get
Return m_bMitarbeiter_gestattet
End Get
Set(ByVal Value As SqlBoolean)
m_bMitarbeiter_gestattet = Value
End Set
End Property
Public Property [bChiffre_gestattet]() As SqlBoolean
Get
Return m_bChiffre_gestattet
End Get
Set(ByVal Value As SqlBoolean)
m_bChiffre_gestattet = 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 [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr = 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 [bAnzeigen]() As SqlBoolean
Get
Return m_bAnzeigen
End Get
Set(ByVal Value As SqlBoolean)
m_bAnzeigen = Value
End Set
End Property
Public Property [bErstellen]() As SqlBoolean
Get
Return m_bErstellen
End Get
Set(ByVal Value As SqlBoolean)
m_bErstellen = Value
End Set
End Property
Public Property [bBearbeiten]() As SqlBoolean
Get
Return m_bBearbeiten
End Get
Set(ByVal Value As SqlBoolean)
m_bBearbeiten = Value
End Set
End Property
Public Property [bLoeschen]() As SqlBoolean
Get
Return m_bLoeschen
End Get
Set(ByVal Value As SqlBoolean)
m_bLoeschen = Value
End Set
End Property
Public Property [bAbschliessen]() As SqlBoolean
Get
Return m_bAbschliessen
End Get
Set(ByVal Value As SqlBoolean)
m_bAbschliessen = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,709 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'rolle_dokumenttyp'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Samstag, 31. Mai 2003, 23:59:48
' // 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 'rolle_dokumenttyp'.
' /// </summary>
Public Class clsRolle_dokumenttyp
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAnzeigen, m_bAktiv, m_bChiffre_gestattet, m_bErstellen, m_bAbschliessen, m_bLoeschen, m_bBearbeiten, m_bMitarbeiter_gestattet, m_bAusschluss, m_bNormal, m_bVertraulich_gestattet As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iDokumenttypnr, m_iRolle_dokumenttyp_nr, m_iRollenr, m_iMandantnr, m_iMutierer, m_iBerechtigungnr As SqlInt32
#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>iRolle_dokumenttyp_nr</LI>
' /// <LI>iRollenr. May be SqlInt32.Null</LI>
' /// <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
' /// <LI>iBerechtigungnr. May be SqlInt32.Null</LI>
' /// <LI>bAusschluss. May be SqlBoolean.Null</LI>
' /// <LI>bNormal. May be SqlBoolean.Null</LI>
' /// <LI>bVertraulich_gestattet. May be SqlBoolean.Null</LI>
' /// <LI>bMitarbeiter_gestattet. May be SqlBoolean.Null</LI>
' /// <LI>bChiffre_gestattet. May be SqlBoolean.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>bAnzeigen. May be SqlBoolean.Null</LI>
' /// <LI>bErstellen. May be SqlBoolean.Null</LI>
' /// <LI>bBearbeiten. May be SqlBoolean.Null</LI>
' /// <LI>bLoeschen. May be SqlBoolean.Null</LI>
' /// <LI>bAbschliessen. 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_rolle_dokumenttyp_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irolle_dokumenttyp_nr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolle_dokumenttyp_nr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iberechtigungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBerechtigungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bausschluss", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAusschluss))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bnormal", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bNormal))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bvertraulich_gestattet", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bVertraulich_gestattet))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bmitarbeiter_gestattet", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMitarbeiter_gestattet))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bchiffre_gestattet", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bChiffre_gestattet))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
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("@banzeigen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAnzeigen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@berstellen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bErstellen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bbearbeiten", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bBearbeiten))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bloeschen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bLoeschen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@babschliessen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAbschliessen))
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_rolle_dokumenttyp_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("clsRolle_dokumenttyp::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>iRolle_dokumenttyp_nr</LI>
' /// <LI>iRollenr. May be SqlInt32.Null</LI>
' /// <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
' /// <LI>iBerechtigungnr. May be SqlInt32.Null</LI>
' /// <LI>bAusschluss. May be SqlBoolean.Null</LI>
' /// <LI>bNormal. May be SqlBoolean.Null</LI>
' /// <LI>bVertraulich_gestattet. May be SqlBoolean.Null</LI>
' /// <LI>bMitarbeiter_gestattet. May be SqlBoolean.Null</LI>
' /// <LI>bChiffre_gestattet. May be SqlBoolean.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>bAnzeigen. May be SqlBoolean.Null</LI>
' /// <LI>bErstellen. May be SqlBoolean.Null</LI>
' /// <LI>bBearbeiten. May be SqlBoolean.Null</LI>
' /// <LI>bLoeschen. May be SqlBoolean.Null</LI>
' /// <LI>bAbschliessen. 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_rolle_dokumenttyp_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irolle_dokumenttyp_nr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolle_dokumenttyp_nr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iberechtigungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBerechtigungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bausschluss", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAusschluss))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bnormal", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bNormal))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bvertraulich_gestattet", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bVertraulich_gestattet))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bmitarbeiter_gestattet", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMitarbeiter_gestattet))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bchiffre_gestattet", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bChiffre_gestattet))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
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("@banzeigen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAnzeigen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@berstellen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bErstellen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bbearbeiten", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bBearbeiten))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bloeschen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bLoeschen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@babschliessen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAbschliessen))
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_rolle_dokumenttyp_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("clsRolle_dokumenttyp::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>iRolle_dokumenttyp_nr</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_rolle_dokumenttyp_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irolle_dokumenttyp_nr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolle_dokumenttyp_nr))
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_rolle_dokumenttyp_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("clsRolle_dokumenttyp::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>iRolle_dokumenttyp_nr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iRolle_dokumenttyp_nr</LI>
' /// <LI>iRollenr</LI>
' /// <LI>iDokumenttypnr</LI>
' /// <LI>iBerechtigungnr</LI>
' /// <LI>bAusschluss</LI>
' /// <LI>bNormal</LI>
' /// <LI>bVertraulich_gestattet</LI>
' /// <LI>bMitarbeiter_gestattet</LI>
' /// <LI>bChiffre_gestattet</LI>
' /// <LI>bAktiv</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>bAnzeigen</LI>
' /// <LI>bErstellen</LI>
' /// <LI>bBearbeiten</LI>
' /// <LI>bLoeschen</LI>
' /// <LI>bAbschliessen</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_rolle_dokumenttyp_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("rolle_dokumenttyp")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@irolle_dokumenttyp_nr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolle_dokumenttyp_nr))
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_rolle_dokumenttyp_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iRolle_dokumenttyp_nr = New SqlInt32(CType(dtToReturn.Rows(0)("rolle_dokumenttyp_nr"), Integer))
If dtToReturn.Rows(0)("rollenr") Is System.DBNull.Value Then
m_iRollenr = SqlInt32.Null
Else
m_iRollenr = New SqlInt32(CType(dtToReturn.Rows(0)("rollenr"), Integer))
End If
If dtToReturn.Rows(0)("dokumenttypnr") Is System.DBNull.Value Then
m_iDokumenttypnr = SqlInt32.Null
Else
m_iDokumenttypnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumenttypnr"), Integer))
End If
If dtToReturn.Rows(0)("berechtigungnr") Is System.DBNull.Value Then
m_iBerechtigungnr = SqlInt32.Null
Else
m_iBerechtigungnr = New SqlInt32(CType(dtToReturn.Rows(0)("berechtigungnr"), Integer))
End If
If dtToReturn.Rows(0)("ausschluss") Is System.DBNull.Value Then
m_bAusschluss = SqlBoolean.Null
Else
m_bAusschluss = New SqlBoolean(CType(dtToReturn.Rows(0)("ausschluss"), Boolean))
End If
If dtToReturn.Rows(0)("normal") Is System.DBNull.Value Then
m_bNormal = SqlBoolean.Null
Else
m_bNormal = New SqlBoolean(CType(dtToReturn.Rows(0)("normal"), Boolean))
End If
If dtToReturn.Rows(0)("vertraulich_gestattet") Is System.DBNull.Value Then
m_bVertraulich_gestattet = SqlBoolean.Null
Else
m_bVertraulich_gestattet = New SqlBoolean(CType(dtToReturn.Rows(0)("vertraulich_gestattet"), Boolean))
End If
If dtToReturn.Rows(0)("mitarbeiter_gestattet") Is System.DBNull.Value Then
m_bMitarbeiter_gestattet = SqlBoolean.Null
Else
m_bMitarbeiter_gestattet = New SqlBoolean(CType(dtToReturn.Rows(0)("mitarbeiter_gestattet"), Boolean))
End If
If dtToReturn.Rows(0)("chiffre_gestattet") Is System.DBNull.Value Then
m_bChiffre_gestattet = SqlBoolean.Null
Else
m_bChiffre_gestattet = New SqlBoolean(CType(dtToReturn.Rows(0)("chiffre_gestattet"), Boolean))
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)("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)("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)("anzeigen") Is System.DBNull.Value Then
m_bAnzeigen = SqlBoolean.Null
Else
m_bAnzeigen = New SqlBoolean(CType(dtToReturn.Rows(0)("anzeigen"), Boolean))
End If
If dtToReturn.Rows(0)("erstellen") Is System.DBNull.Value Then
m_bErstellen = SqlBoolean.Null
Else
m_bErstellen = New SqlBoolean(CType(dtToReturn.Rows(0)("erstellen"), Boolean))
End If
If dtToReturn.Rows(0)("bearbeiten") Is System.DBNull.Value Then
m_bBearbeiten = SqlBoolean.Null
Else
m_bBearbeiten = New SqlBoolean(CType(dtToReturn.Rows(0)("bearbeiten"), Boolean))
End If
If dtToReturn.Rows(0)("loeschen") Is System.DBNull.Value Then
m_bLoeschen = SqlBoolean.Null
Else
m_bLoeschen = New SqlBoolean(CType(dtToReturn.Rows(0)("loeschen"), Boolean))
End If
If dtToReturn.Rows(0)("abschliessen") Is System.DBNull.Value Then
m_bAbschliessen = SqlBoolean.Null
Else
m_bAbschliessen = New SqlBoolean(CType(dtToReturn.Rows(0)("abschliessen"), 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("clsRolle_dokumenttyp::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_rolle_dokumenttyp_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("rolle_dokumenttyp")
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_rolle_dokumenttyp_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("clsRolle_dokumenttyp::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 [iRolle_dokumenttyp_nr]() As SqlInt32
Get
Return m_iRolle_dokumenttyp_nr
End Get
Set(ByVal Value As SqlInt32)
Dim iRolle_dokumenttyp_nrTmp As SqlInt32 = Value
If iRolle_dokumenttyp_nrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iRolle_dokumenttyp_nr", "iRolle_dokumenttyp_nr can't be NULL")
End If
m_iRolle_dokumenttyp_nr = Value
End Set
End Property
Public Property [iRollenr]() As SqlInt32
Get
Return m_iRollenr
End Get
Set(ByVal Value As SqlInt32)
m_iRollenr = 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 [iBerechtigungnr]() As SqlInt32
Get
Return m_iBerechtigungnr
End Get
Set(ByVal Value As SqlInt32)
m_iBerechtigungnr = Value
End Set
End Property
Public Property [bAusschluss]() As SqlBoolean
Get
Return m_bAusschluss
End Get
Set(ByVal Value As SqlBoolean)
m_bAusschluss = Value
End Set
End Property
Public Property [bNormal]() As SqlBoolean
Get
Return m_bNormal
End Get
Set(ByVal Value As SqlBoolean)
m_bNormal = Value
End Set
End Property
Public Property [bVertraulich_gestattet]() As SqlBoolean
Get
Return m_bVertraulich_gestattet
End Get
Set(ByVal Value As SqlBoolean)
m_bVertraulich_gestattet = Value
End Set
End Property
Public Property [bMitarbeiter_gestattet]() As SqlBoolean
Get
Return m_bMitarbeiter_gestattet
End Get
Set(ByVal Value As SqlBoolean)
m_bMitarbeiter_gestattet = Value
End Set
End Property
Public Property [bChiffre_gestattet]() As SqlBoolean
Get
Return m_bChiffre_gestattet
End Get
Set(ByVal Value As SqlBoolean)
m_bChiffre_gestattet = 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 [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr = 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 [bAnzeigen]() As SqlBoolean
Get
Return m_bAnzeigen
End Get
Set(ByVal Value As SqlBoolean)
m_bAnzeigen = Value
End Set
End Property
Public Property [bErstellen]() As SqlBoolean
Get
Return m_bErstellen
End Get
Set(ByVal Value As SqlBoolean)
m_bErstellen = Value
End Set
End Property
Public Property [bBearbeiten]() As SqlBoolean
Get
Return m_bBearbeiten
End Get
Set(ByVal Value As SqlBoolean)
m_bBearbeiten = Value
End Set
End Property
Public Property [bLoeschen]() As SqlBoolean
Get
Return m_bLoeschen
End Get
Set(ByVal Value As SqlBoolean)
m_bLoeschen = Value
End Set
End Property
Public Property [bAbschliessen]() As SqlBoolean
Get
Return m_bAbschliessen
End Get
Set(ByVal Value As SqlBoolean)
m_bAbschliessen = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,489 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'rolle_report_gruppe'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Freitag, 3. Januar 2003, 09:24:11
' // 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 'rolle_report_gruppe'.
' /// </summary>
Public Class clsRolle_report_gruppe
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iRollenr, m_iRolle_report_gruppe_nr, m_iMandantnr, m_iReport_gruppenr As SqlInt32
#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>iRolle_report_gruppe_nr</LI>
' /// <LI>iRollenr. May be SqlInt32.Null</LI>
' /// <LI>iReport_gruppenr. May be SqlInt32.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_rolle_report_gruppe_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irolle_report_gruppe_nr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolle_report_gruppe_nr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireport_gruppenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReport_gruppenr))
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_rolle_report_gruppe_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("clsRolle_report_gruppe::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>iRolle_report_gruppe_nr</LI>
' /// <LI>iRollenr. May be SqlInt32.Null</LI>
' /// <LI>iReport_gruppenr. May be SqlInt32.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_rolle_report_gruppe_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irolle_report_gruppe_nr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolle_report_gruppe_nr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireport_gruppenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReport_gruppenr))
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_rolle_report_gruppe_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("clsRolle_report_gruppe::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>iRolle_report_gruppe_nr</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_rolle_report_gruppe_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irolle_report_gruppe_nr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolle_report_gruppe_nr))
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_rolle_report_gruppe_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("clsRolle_report_gruppe::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>iRolle_report_gruppe_nr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iRolle_report_gruppe_nr</LI>
' /// <LI>iRollenr</LI>
' /// <LI>iReport_gruppenr</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_rolle_report_gruppe_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("rolle_report_gruppe")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@irolle_report_gruppe_nr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolle_report_gruppe_nr))
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_rolle_report_gruppe_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iRolle_report_gruppe_nr = New SqlInt32(CType(dtToReturn.Rows(0)("rolle_report_gruppe_nr"), Integer))
If dtToReturn.Rows(0)("rollenr") Is System.DBNull.Value Then
m_iRollenr = SqlInt32.Null
Else
m_iRollenr = New SqlInt32(CType(dtToReturn.Rows(0)("rollenr"), Integer))
End If
If dtToReturn.Rows(0)("report_gruppenr") Is System.DBNull.Value Then
m_iReport_gruppenr = SqlInt32.Null
Else
m_iReport_gruppenr = New SqlInt32(CType(dtToReturn.Rows(0)("report_gruppenr"), Integer))
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("clsRolle_report_gruppe::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_rolle_report_gruppe_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("rolle_report_gruppe")
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_rolle_report_gruppe_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("clsRolle_report_gruppe::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 [iRolle_report_gruppe_nr]() As SqlInt32
Get
Return m_iRolle_report_gruppe_nr
End Get
Set(ByVal Value As SqlInt32)
Dim iRolle_report_gruppe_nrTmp As SqlInt32 = Value
If iRolle_report_gruppe_nrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iRolle_report_gruppe_nr", "iRolle_report_gruppe_nr can't be NULL")
End If
m_iRolle_report_gruppe_nr = Value
End Set
End Property
Public Property [iRollenr]() As SqlInt32
Get
Return m_iRollenr
End Get
Set(ByVal Value As SqlInt32)
m_iRollenr = Value
End Set
End Property
Public Property [iReport_gruppenr]() As SqlInt32
Get
Return m_iReport_gruppenr
End Get
Set(ByVal Value As SqlInt32)
m_iReport_gruppenr = 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

View File

@@ -0,0 +1,753 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'rolle_sysadminfunktion'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 22. Dezember 2002, 19:31: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 'rolle_sysadminfunktion'.
' /// </summary>
Public Class clsRolle_sysadminfunktion
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iRollenr, m_iRollenrOld, m_iMandant, m_iSysadminfnktnr, m_iSysadminfnktnrOld, m_iRolle_sysadminfnktnr, m_iMutierer As SqlInt32
#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>iRolle_sysadminfnktnr</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>iSysadminfnktnr. May be SqlInt32.Null</LI>
' /// <LI>iRollenr. May be SqlInt32.Null</LI>
' /// <LI>iMandant. 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_rolle_sysadminfunktion_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irolle_sysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolle_sysadminfnktnr))
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("@isysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSysadminfnktnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandant", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandant))
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_rolle_sysadminfunktion_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsRolle_sysadminfunktion::Insert::Error occured." + ex.Message, 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>iRolle_sysadminfnktnr</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>iSysadminfnktnr. May be SqlInt32.Null</LI>
' /// <LI>iRollenr. May be SqlInt32.Null</LI>
' /// <LI>iMandant. 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_rolle_sysadminfunktion_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irolle_sysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolle_sysadminfnktnr))
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("@isysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSysadminfnktnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandant", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandant))
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_rolle_sysadminfunktion_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsRolle_sysadminfunktion::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 'sysadminfnktnr.
' /// This method will Update one or more existing rows in the database. It will reset the field 'sysadminfnktnr' in
' /// all rows which have as value for this field the value as set in property 'iSysadminfnktnrOld' to
' /// the value as set in property 'iSysadminfnktnr'.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iSysadminfnktnr. May be SqlInt32.Null</LI>
' /// <LI>iSysadminfnktnrOld. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function UpdateAllWsysadminfnktnrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_rolle_sysadminfunktion_UpdateAllWsysadminfnktnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@isysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSysadminfnktnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isysadminfnktnrOld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSysadminfnktnrOld))
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_rolle_sysadminfunktion_UpdateAllWsysadminfnktnrLogic' 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("clsRolle_sysadminfunktion::UpdateAllWsysadminfnktnrLogic::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 'rollenr.
' /// This method will Update one or more existing rows in the database. It will reset the field 'rollenr' in
' /// all rows which have as value for this field the value as set in property 'iRollenrOld' to
' /// the value as set in property 'iRollenr'.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iRollenr. May be SqlInt32.Null</LI>
' /// <LI>iRollenrOld. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function UpdateAllWrollenrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_rolle_sysadminfunktion_UpdateAllWrollenrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, false, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@irollenrOld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenrOld))
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_rolle_sysadminfunktion_UpdateAllWrollenrLogic' 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("clsRolle_sysadminfunktion::UpdateAllWrollenrLogic::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>iRolle_sysadminfnktnr</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_rolle_sysadminfunktion_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irolle_sysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolle_sysadminfnktnr))
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_rolle_sysadminfunktion_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsRolle_sysadminfunktion::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>iRolle_sysadminfnktnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iRolle_sysadminfnktnr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>iSysadminfnktnr</LI>
' /// <LI>iRollenr</LI>
' /// <LI>iMandant</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_rolle_sysadminfunktion_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("rolle_sysadminfunktion")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@irolle_sysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolle_sysadminfnktnr))
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_rolle_sysadminfunktion_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iRolle_sysadminfnktnr = New SqlInt32(CType(dtToReturn.Rows(0)("rolle_sysadminfnktnr"), Integer))
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
m_bAktiv = SqlBoolean.Null
Else
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
End If
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
m_daErstellt_am = SqlDateTime.Null
Else
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
End If
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
m_daMutiert_am = SqlDateTime.Null
Else
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
End If
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
m_iMutierer = SqlInt32.Null
Else
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
End If
If dtToReturn.Rows(0)("sysadminfnktnr") Is System.DBNull.Value Then
m_iSysadminfnktnr = SqlInt32.Null
Else
m_iSysadminfnktnr = New SqlInt32(CType(dtToReturn.Rows(0)("sysadminfnktnr"), Integer))
End If
If dtToReturn.Rows(0)("rollenr") Is System.DBNull.Value Then
m_iRollenr = SqlInt32.Null
Else
m_iRollenr = New SqlInt32(CType(dtToReturn.Rows(0)("rollenr"), Integer))
End If
If dtToReturn.Rows(0)("mandant") Is System.DBNull.Value Then
m_iMandant = SqlInt32.Null
Else
m_iMandant = New SqlInt32(CType(dtToReturn.Rows(0)("mandant"), 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("clsRolle_sysadminfunktion::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_rolle_sysadminfunktion_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("rolle_sysadminfunktion")
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
sdaAdapter.Fill(dtToReturn)
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_rolle_sysadminfunktion_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsRolle_sysadminfunktion::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 'sysadminfnktnr'
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iSysadminfnktnr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function SelectAllWsysadminfnktnrLogic() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_rolle_sysadminfunktion_SelectAllWsysadminfnktnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("rolle_sysadminfunktion")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@isysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSysadminfnktnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
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_rolle_sysadminfunktion_SelectAllWsysadminfnktnrLogic' 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("clsRolle_sysadminfunktion::SelectAllWsysadminfnktnrLogic::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 'rollenr'
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iRollenr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function SelectAllWrollenrLogic() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_rolle_sysadminfunktion_SelectAllWrollenrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("rolle_sysadminfunktion")
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
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_rolle_sysadminfunktion_SelectAllWrollenrLogic' 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("clsRolle_sysadminfunktion::SelectAllWrollenrLogic::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 [iRolle_sysadminfnktnr]() As SqlInt32
Get
Return m_iRolle_sysadminfnktnr
End Get
Set(ByVal Value As SqlInt32)
Dim iRolle_sysadminfnktnrTmp As SqlInt32 = Value
If iRolle_sysadminfnktnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iRolle_sysadminfnktnr", "iRolle_sysadminfnktnr can't be NULL")
End If
m_iRolle_sysadminfnktnr = 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 [iSysadminfnktnr]() As SqlInt32
Get
Return m_iSysadminfnktnr
End Get
Set(ByVal Value As SqlInt32)
m_iSysadminfnktnr = Value
End Set
End Property
Public Property [iSysadminfnktnrOld]() As SqlInt32
Get
Return m_iSysadminfnktnrOld
End Get
Set(ByVal Value As SqlInt32)
m_iSysadminfnktnrOld = Value
End Set
End Property
Public Property [iRollenr]() As SqlInt32
Get
Return m_iRollenr
End Get
Set(ByVal Value As SqlInt32)
m_iRollenr = Value
End Set
End Property
Public Property [iRollenrOld]() As SqlInt32
Get
Return m_iRollenrOld
End Get
Set(ByVal Value As SqlInt32)
m_iRollenrOld = Value
End Set
End Property
Public Property [iMandant]() As SqlInt32
Get
Return m_iMandant
End Get
Set(ByVal Value As SqlInt32)
m_iMandant = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,778 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'rolleberechtigung'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 8. Januar 2003, 23:50:02
' // 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 'rolleberechtigung'.
' /// </summary>
Public Class clsRolleberechtigung
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iMandantnr, m_iBerechtigungnr, m_iBerechtigungnrOld, m_iRolleberechtigungnr, m_iRollenr, m_iRollenrOld 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>iRolleberechtigungnr</LI>
' /// <LI>iBerechtigungnr</LI>
' /// <LI>iRollenr. May be SqlInt32.Null</LI>
' /// <LI>sBeschreibung. 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_rolleberechtigung_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irolleberechtigungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolleberechtigungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iberechtigungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBerechtigungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, 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_rolleberechtigung_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("clsRolleberechtigung::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>iRolleberechtigungnr</LI>
' /// <LI>iBerechtigungnr</LI>
' /// <LI>iRollenr. May be SqlInt32.Null</LI>
' /// <LI>sBeschreibung. 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_rolleberechtigung_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irolleberechtigungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolleberechtigungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iberechtigungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBerechtigungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, 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_rolleberechtigung_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("clsRolleberechtigung::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 'berechtigungnr.
' /// This method will Update one or more existing rows in the database. It will reset the field 'berechtigungnr' in
' /// all rows which have as value for this field the value as set in property 'iBerechtigungnrOld' to
' /// the value as set in property 'iBerechtigungnr'.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iBerechtigungnr</LI>
' /// <LI>iBerechtigungnrOld</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function UpdateAllWberechtigungnrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_rolleberechtigung_UpdateAllWberechtigungnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iberechtigungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBerechtigungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iberechtigungnrOld", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBerechtigungnrOld))
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_rolleberechtigung_UpdateAllWberechtigungnrLogic' 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("clsRolleberechtigung::UpdateAllWberechtigungnrLogic::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 'rollenr.
' /// This method will Update one or more existing rows in the database. It will reset the field 'rollenr' in
' /// all rows which have as value for this field the value as set in property 'iRollenrOld' to
' /// the value as set in property 'iRollenr'.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iRollenr. May be SqlInt32.Null</LI>
' /// <LI>iRollenrOld. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function UpdateAllWrollenrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_rolleberechtigung_UpdateAllWrollenrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, false, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@irollenrOld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenrOld))
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_rolleberechtigung_UpdateAllWrollenrLogic' 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("clsRolleberechtigung::UpdateAllWrollenrLogic::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>iRolleberechtigungnr</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_rolleberechtigung_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irolleberechtigungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolleberechtigungnr))
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_rolleberechtigung_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("clsRolleberechtigung::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>iRolleberechtigungnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iRolleberechtigungnr</LI>
' /// <LI>iBerechtigungnr</LI>
' /// <LI>iRollenr</LI>
' /// <LI>sBeschreibung</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_rolleberechtigung_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("rolleberechtigung")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@irolleberechtigungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolleberechtigungnr))
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_rolleberechtigung_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iRolleberechtigungnr = New SqlInt32(CType(dtToReturn.Rows(0)("rolleberechtigungnr"), Integer))
m_iBerechtigungnr = New SqlInt32(CType(dtToReturn.Rows(0)("berechtigungnr"), Integer))
If dtToReturn.Rows(0)("rollenr") Is System.DBNull.Value Then
m_iRollenr = SqlInt32.Null
Else
m_iRollenr = New SqlInt32(CType(dtToReturn.Rows(0)("rollenr"), Integer))
End If
If dtToReturn.Rows(0)("beschreibung") Is System.DBNull.Value Then
m_sBeschreibung = SqlString.Null
Else
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("beschreibung"), String))
End If
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("clsRolleberechtigung::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_rolleberechtigung_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("rolleberechtigung")
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_rolleberechtigung_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("clsRolleberechtigung::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 'berechtigungnr'
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iBerechtigungnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function SelectAllWberechtigungnrLogic() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_rolleberechtigung_SelectAllWberechtigungnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("rolleberechtigung")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iberechtigungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBerechtigungnr))
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_rolleberechtigung_SelectAllWberechtigungnrLogic' 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("clsRolleberechtigung::SelectAllWberechtigungnrLogic::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 'rollenr'
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iRollenr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function SelectAllWrollenrLogic() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_rolleberechtigung_SelectAllWrollenrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("rolleberechtigung")
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
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_rolleberechtigung_SelectAllWrollenrLogic' 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("clsRolleberechtigung::SelectAllWrollenrLogic::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 [iRolleberechtigungnr]() As SqlInt32
Get
Return m_iRolleberechtigungnr
End Get
Set(ByVal Value As SqlInt32)
Dim iRolleberechtigungnrTmp As SqlInt32 = Value
If iRolleberechtigungnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iRolleberechtigungnr", "iRolleberechtigungnr can't be NULL")
End If
m_iRolleberechtigungnr = Value
End Set
End Property
Public Property [iBerechtigungnr]() As SqlInt32
Get
Return m_iBerechtigungnr
End Get
Set(ByVal Value As SqlInt32)
Dim iBerechtigungnrTmp As SqlInt32 = Value
If iBerechtigungnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iBerechtigungnr", "iBerechtigungnr can't be NULL")
End If
m_iBerechtigungnr = Value
End Set
End Property
Public Property [iBerechtigungnrOld]() As SqlInt32
Get
Return m_iBerechtigungnrOld
End Get
Set(ByVal Value As SqlInt32)
Dim iBerechtigungnrOldTmp As SqlInt32 = Value
If iBerechtigungnrOldTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iBerechtigungnrOld", "iBerechtigungnrOld can't be NULL")
End If
m_iBerechtigungnrOld = Value
End Set
End Property
Public Property [iRollenr]() As SqlInt32
Get
Return m_iRollenr
End Get
Set(ByVal Value As SqlInt32)
m_iRollenr = Value
End Set
End Property
Public Property [iRollenrOld]() As SqlInt32
Get
Return m_iRollenrOld
End Get
Set(ByVal Value As SqlInt32)
m_iRollenrOld = Value
End Set
End Property
Public Property [sBeschreibung]() As SqlString
Get
Return m_sBeschreibung
End Get
Set(ByVal Value As SqlString)
m_sBeschreibung = Value
End Set
End Property
Public Property [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
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

View File

@@ -0,0 +1,468 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'Services'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 16. September 2003, 21:47:34
' // 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 'Services'.
' /// </summary>
Public Class clsServices
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_iNreintrag As SqlInt32
Private m_sRequestName, m_sResultsetContent, m_sResultObject, m_sBeschreigung, m_sInhalt, m_sURL As SqlString
#End Region
' /// <summary>
' /// Purpose: Class constructor.
' /// </summary>
Public Sub New()
' // Nothing for now.
End Sub
' /// <summary>
' /// Purpose: Insert method. This method will insert one new row into the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iNreintrag</LI>
' /// <LI>sBeschreigung. May be SqlString.Null</LI>
' /// <LI>sInhalt. May be SqlString.Null</LI>
' /// <LI>sURL. May be SqlString.Null</LI>
' /// <LI>sRequestName. May be SqlString.Null</LI>
' /// <LI>sResultsetContent. May be SqlString.Null</LI>
' /// <LI>sResultObject. 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_Services_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreigung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreigung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sinhalt", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sInhalt))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sURL", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sURL))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sRequestName", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRequestName))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sResultsetContent", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sResultsetContent))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sResultObject", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sResultObject))
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_Services_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("clsServices::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>iNreintrag</LI>
' /// <LI>sBeschreigung. May be SqlString.Null</LI>
' /// <LI>sInhalt. May be SqlString.Null</LI>
' /// <LI>sURL. May be SqlString.Null</LI>
' /// <LI>sRequestName. May be SqlString.Null</LI>
' /// <LI>sResultsetContent. May be SqlString.Null</LI>
' /// <LI>sResultObject. 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_Services_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreigung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreigung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sinhalt", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sInhalt))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sURL", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sURL))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sRequestName", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRequestName))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sResultsetContent", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sResultsetContent))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sResultObject", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sResultObject))
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_Services_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("clsServices::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>iNreintrag</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_Services_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
scmCmdToExecute.Parameters.Add(New SqlParameter("@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_Services_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("clsServices::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>iNreintrag</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iNreintrag</LI>
' /// <LI>sBeschreigung</LI>
' /// <LI>sInhalt</LI>
' /// <LI>sURL</LI>
' /// <LI>sRequestName</LI>
' /// <LI>sResultsetContent</LI>
' /// <LI>sResultObject</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_Services_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Services")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
scmCmdToExecute.Parameters.Add(new SqlParameter("@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_Services_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iNreintrag = New SqlInt32(CType(dtToReturn.Rows(0)("nreintrag"), Integer))
If dtToReturn.Rows(0)("beschreigung") Is System.DBNull.Value Then
m_sBeschreigung = SqlString.Null
Else
m_sBeschreigung = New SqlString(CType(dtToReturn.Rows(0)("beschreigung"), String))
End If
If dtToReturn.Rows(0)("inhalt") Is System.DBNull.Value Then
m_sInhalt = SqlString.Null
Else
m_sInhalt = New SqlString(CType(dtToReturn.Rows(0)("inhalt"), String))
End If
If dtToReturn.Rows(0)("URL") Is System.DBNull.Value Then
m_sURL = SqlString.Null
Else
m_sURL = New SqlString(CType(dtToReturn.Rows(0)("URL"), String))
End If
If dtToReturn.Rows(0)("RequestName") Is System.DBNull.Value Then
m_sRequestName = SqlString.Null
Else
m_sRequestName = New SqlString(CType(dtToReturn.Rows(0)("RequestName"), String))
End If
If dtToReturn.Rows(0)("ResultsetContent") Is System.DBNull.Value Then
m_sResultsetContent = SqlString.Null
Else
m_sResultsetContent = New SqlString(CType(dtToReturn.Rows(0)("ResultsetContent"), String))
End If
If dtToReturn.Rows(0)("ResultObject") Is System.DBNull.Value Then
m_sResultObject = SqlString.Null
Else
m_sResultObject = New SqlString(CType(dtToReturn.Rows(0)("ResultObject"), 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("clsServices::SelectOne::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
' /// <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_Services_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("Services")
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_Services_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("clsServices::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 [iNreintrag]() As SqlInt32
Get
Return m_iNreintrag
End Get
Set(ByVal Value As SqlInt32)
Dim iNreintragTmp As SqlInt32 = Value
If iNreintragTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iNreintrag", "iNreintrag can't be NULL")
End If
m_iNreintrag = Value
End Set
End Property
Public Property [sBeschreigung]() As SqlString
Get
Return m_sBeschreigung
End Get
Set(ByVal Value As SqlString)
m_sBeschreigung = Value
End Set
End Property
Public Property [sInhalt]() As SqlString
Get
Return m_sInhalt
End Get
Set(ByVal Value As SqlString)
m_sInhalt = Value
End Set
End Property
Public Property [sURL]() As SqlString
Get
Return m_sURL
End Get
Set(ByVal Value As SqlString)
m_sURL = Value
End Set
End Property
Public Property [sRequestName]() As SqlString
Get
Return m_sRequestName
End Get
Set(ByVal Value As SqlString)
m_sRequestName = Value
End Set
End Property
Public Property [sResultsetContent]() As SqlString
Get
Return m_sResultsetContent
End Get
Set(ByVal Value As SqlString)
m_sResultsetContent = Value
End Set
End Property
Public Property [sResultObject]() As SqlString
Get
Return m_sResultObject
End Get
Set(ByVal Value As SqlString)
m_sResultObject = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,610 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'spalten'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Montag, 20. Januar 2003, 22:51:23
' // 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 'spalten'.
' /// </summary>
Public Class clsSpalten
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bReadonly, m_bAlsHacken, m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMandantnr, m_iMutierer, m_iReihenfolge, m_iBreite, m_iEintragnr As SqlInt32
Private m_sTabelle, m_sTabellenspalte, m_sTiptext, m_sSpalte 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>iEintragnr</LI>
' /// <LI>sTabelle. May be SqlString.Null</LI>
' /// <LI>sTabellenspalte. May be SqlString.Null</LI>
' /// <LI>sSpalte. May be SqlString.Null</LI>
' /// <LI>bReadonly. May be SqlBoolean.Null</LI>
' /// <LI>bAlsHacken. May be SqlBoolean.Null</LI>
' /// <LI>iBreite. May be SqlInt32.Null</LI>
' /// <LI>iReihenfolge. May be SqlInt32.Null</LI>
' /// <LI>sTiptext. May be SqlString.Null</LI>
' /// <LI>bAktiv</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>iMandantnr. 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_spalten_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ieintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iEintragnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stabelle", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTabelle))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stabellenspalte", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTabellenspalte))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sspalte", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSpalte))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bReadonly", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bReadonly))
scmCmdToExecute.Parameters.Add(New SqlParameter("@balsHacken", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAlsHacken))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iBreite", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBreite))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iReihenfolge", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReihenfolge))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stiptext", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTiptext))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, False, 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("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
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_spalten_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("clsSpalten::Insert::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: Update method. This method will Update one existing row in the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iEintragnr</LI>
' /// <LI>sTabelle. May be SqlString.Null</LI>
' /// <LI>sTabellenspalte. May be SqlString.Null</LI>
' /// <LI>sSpalte. May be SqlString.Null</LI>
' /// <LI>bReadonly. May be SqlBoolean.Null</LI>
' /// <LI>bAlsHacken. May be SqlBoolean.Null</LI>
' /// <LI>iBreite. May be SqlInt32.Null</LI>
' /// <LI>iReihenfolge. May be SqlInt32.Null</LI>
' /// <LI>sTiptext. May be SqlString.Null</LI>
' /// <LI>bAktiv</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>iMandantnr. 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_spalten_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ieintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iEintragnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stabelle", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTabelle))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stabellenspalte", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTabellenspalte))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sspalte", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSpalte))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bReadonly", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bReadonly))
scmCmdToExecute.Parameters.Add(New SqlParameter("@balsHacken", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAlsHacken))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iBreite", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBreite))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iReihenfolge", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReihenfolge))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stiptext", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTiptext))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, False, 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("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
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_spalten_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("clsSpalten::Update::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iEintragnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Overrides Function Delete() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_spalten_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ieintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iEintragnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_spalten_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("clsSpalten::Delete::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iEintragnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iEintragnr</LI>
' /// <LI>sTabelle</LI>
' /// <LI>sTabellenspalte</LI>
' /// <LI>sSpalte</LI>
' /// <LI>bReadonly</LI>
' /// <LI>bAlsHacken</LI>
' /// <LI>iBreite</LI>
' /// <LI>iReihenfolge</LI>
' /// <LI>sTiptext</LI>
' /// <LI>bAktiv</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>iMandantnr</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_spalten_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("spalten")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@ieintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iEintragnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
sdaAdapter.Fill(dtToReturn)
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_spalten_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iEintragnr = New SqlInt32(CType(dtToReturn.Rows(0)("eintragnr"), Integer))
If dtToReturn.Rows(0)("tabelle") Is System.DBNull.Value Then
m_sTabelle = SqlString.Null
Else
m_sTabelle = New SqlString(CType(dtToReturn.Rows(0)("tabelle"), String))
End If
If dtToReturn.Rows(0)("tabellenspalte") Is System.DBNull.Value Then
m_sTabellenspalte = SqlString.Null
Else
m_sTabellenspalte = New SqlString(CType(dtToReturn.Rows(0)("tabellenspalte"), String))
End If
If dtToReturn.Rows(0)("spalte") Is System.DBNull.Value Then
m_sSpalte = SqlString.Null
Else
m_sSpalte = New SqlString(CType(dtToReturn.Rows(0)("spalte"), String))
End If
If dtToReturn.Rows(0)("Readonly") Is System.DBNull.Value Then
m_bReadonly = SqlBoolean.Null
Else
m_bReadonly = New SqlBoolean(CType(dtToReturn.Rows(0)("Readonly"), Boolean))
End If
If dtToReturn.Rows(0)("alsHacken") Is System.DBNull.Value Then
m_bAlsHacken = SqlBoolean.Null
Else
m_bAlsHacken = New SqlBoolean(CType(dtToReturn.Rows(0)("alsHacken"), Boolean))
End If
If dtToReturn.Rows(0)("Breite") Is System.DBNull.Value Then
m_iBreite = SqlInt32.Null
Else
m_iBreite = New SqlInt32(CType(dtToReturn.Rows(0)("Breite"), Integer))
End If
If dtToReturn.Rows(0)("Reihenfolge") Is System.DBNull.Value Then
m_iReihenfolge = SqlInt32.Null
Else
m_iReihenfolge = New SqlInt32(CType(dtToReturn.Rows(0)("Reihenfolge"), Integer))
End If
If dtToReturn.Rows(0)("tiptext") Is System.DBNull.Value Then
m_sTiptext = SqlString.Null
Else
m_sTiptext = New SqlString(CType(dtToReturn.Rows(0)("tiptext"), String))
End If
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
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)("mandantnr") Is System.DBNull.Value Then
m_iMandantnr = SqlInt32.Null
Else
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), 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("clsSpalten::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_spalten_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("spalten")
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_spalten_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("clsSpalten::SelectAll::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
#Region " Class Property Declarations "
Public Property [iEintragnr]() As SqlInt32
Get
Return m_iEintragnr
End Get
Set(ByVal Value As SqlInt32)
Dim iEintragnrTmp As SqlInt32 = Value
If iEintragnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iEintragnr", "iEintragnr can't be NULL")
End If
m_iEintragnr = Value
End Set
End Property
Public Property [sTabelle]() As SqlString
Get
Return m_sTabelle
End Get
Set(ByVal Value As SqlString)
m_sTabelle = Value
End Set
End Property
Public Property [sTabellenspalte]() As SqlString
Get
Return m_sTabellenspalte
End Get
Set(ByVal Value As SqlString)
m_sTabellenspalte = Value
End Set
End Property
Public Property [sSpalte]() As SqlString
Get
Return m_sSpalte
End Get
Set(ByVal Value As SqlString)
m_sSpalte = Value
End Set
End Property
Public Property [bReadonly]() As SqlBoolean
Get
Return m_bReadonly
End Get
Set(ByVal Value As SqlBoolean)
m_bReadonly = Value
End Set
End Property
Public Property [bAlsHacken]() As SqlBoolean
Get
Return m_bAlsHacken
End Get
Set(ByVal Value As SqlBoolean)
m_bAlsHacken = Value
End Set
End Property
Public Property [iBreite]() As SqlInt32
Get
Return m_iBreite
End Get
Set(ByVal Value As SqlInt32)
m_iBreite = Value
End Set
End Property
Public Property [iReihenfolge]() As SqlInt32
Get
Return m_iReihenfolge
End Get
Set(ByVal Value As SqlInt32)
m_iReihenfolge = Value
End Set
End Property
Public Property [sTiptext]() As SqlString
Get
Return m_sTiptext
End Get
Set(ByVal Value As SqlString)
m_sTiptext = Value
End Set
End Property
Public Property [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
Dim bAktivTmp As SqlBoolean = Value
If bAktivTmp.IsNull Then
Throw New ArgumentOutOfRangeException("bAktiv", "bAktiv can't be NULL")
End If
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 [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,629 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'status'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Montag, 30. Dezember 2002, 22:21:13
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokadb
' /// <summary>
' /// Purpose: Data Access class for the table 'status'.
' /// </summary>
Public Class clsStatus
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bDokumentbearbeitung_moeglich, m_bFolgestatus_durch_anderen_verantwortlichen, m_bDokument_ausgangsarchivieren, m_bDokument_bearbeitung_abgeschlossen, m_bAktiv As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iMutierer, m_iMandantnr, m_iStatus_bezeichnungnr, m_iStatustypnr, m_iStatusnr, m_iErledigung_ab, m_iFolgestatus_durch_andere_rolle, m_iReihenfolge As SqlInt32
#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>iStatusnr</LI>
' /// <LI>iStatustypnr. May be SqlInt32.Null</LI>
' /// <LI>iStatus_bezeichnungnr. May be SqlInt32.Null</LI>
' /// <LI>iReihenfolge</LI>
' /// <LI>bFolgestatus_durch_anderen_verantwortlichen</LI>
' /// <LI>iFolgestatus_durch_andere_rolle. May be SqlInt32.Null</LI>
' /// <LI>bDokumentbearbeitung_moeglich</LI>
' /// <LI>iErledigung_ab</LI>
' /// <LI>bDokument_ausgangsarchivieren. May be SqlBoolean.Null</LI>
' /// <LI>bDokument_bearbeitung_abgeschlossen. 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>
' /// </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_status_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatusnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatustypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatustypnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus_bezeichnungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus_bezeichnungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireihenfolge", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReihenfolge))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bfolgestatus_durch_anderen_verantwortlichen", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bFolgestatus_durch_anderen_verantwortlichen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifolgestatus_durch_andere_rolle", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFolgestatus_durch_andere_rolle))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokumentbearbeitung_moeglich", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bDokumentbearbeitung_moeglich))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ierledigung_ab", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iErledigung_ab))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_ausgangsarchivieren", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_ausgangsarchivieren))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_bearbeitung_abgeschlossen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_bearbeitung_abgeschlossen))
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_status_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("clsStatus::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>iStatusnr</LI>
' /// <LI>iStatustypnr. May be SqlInt32.Null</LI>
' /// <LI>iStatus_bezeichnungnr. May be SqlInt32.Null</LI>
' /// <LI>iReihenfolge</LI>
' /// <LI>bFolgestatus_durch_anderen_verantwortlichen</LI>
' /// <LI>iFolgestatus_durch_andere_rolle. May be SqlInt32.Null</LI>
' /// <LI>bDokumentbearbeitung_moeglich</LI>
' /// <LI>iErledigung_ab</LI>
' /// <LI>bDokument_ausgangsarchivieren. May be SqlBoolean.Null</LI>
' /// <LI>bDokument_bearbeitung_abgeschlossen. 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>
' /// </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_status_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatusnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatustypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatustypnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus_bezeichnungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus_bezeichnungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ireihenfolge", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iReihenfolge))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bfolgestatus_durch_anderen_verantwortlichen", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bFolgestatus_durch_anderen_verantwortlichen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifolgestatus_durch_andere_rolle", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFolgestatus_durch_andere_rolle))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokumentbearbeitung_moeglich", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bDokumentbearbeitung_moeglich))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ierledigung_ab", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iErledigung_ab))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_ausgangsarchivieren", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_ausgangsarchivieren))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdokument_bearbeitung_abgeschlossen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDokument_bearbeitung_abgeschlossen))
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_status_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("clsStatus::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>iStatusnr</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_status_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatusnr))
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_status_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("clsStatus::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>iStatusnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iStatusnr</LI>
' /// <LI>iStatustypnr</LI>
' /// <LI>iStatus_bezeichnungnr</LI>
' /// <LI>iReihenfolge</LI>
' /// <LI>bFolgestatus_durch_anderen_verantwortlichen</LI>
' /// <LI>iFolgestatus_durch_andere_rolle</LI>
' /// <LI>bDokumentbearbeitung_moeglich</LI>
' /// <LI>iErledigung_ab</LI>
' /// <LI>bDokument_ausgangsarchivieren</LI>
' /// <LI>bDokument_bearbeitung_abgeschlossen</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_status_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("status")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@istatusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatusnr))
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_status_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iStatusnr = New SqlInt32(CType(dtToReturn.Rows(0)("statusnr"), Integer))
If dtToReturn.Rows(0)("statustypnr") Is System.DBNull.Value Then
m_iStatustypnr = SqlInt32.Null
Else
m_iStatustypnr = New SqlInt32(CType(dtToReturn.Rows(0)("statustypnr"), Integer))
End If
If dtToReturn.Rows(0)("status_bezeichnungnr") Is System.DBNull.Value Then
m_iStatus_bezeichnungnr = SqlInt32.Null
Else
m_iStatus_bezeichnungnr = New SqlInt32(CType(dtToReturn.Rows(0)("status_bezeichnungnr"), Integer))
End If
m_iReihenfolge = New SqlInt32(CType(dtToReturn.Rows(0)("reihenfolge"), Integer))
m_bFolgestatus_durch_anderen_verantwortlichen = New SqlBoolean(CType(dtToReturn.Rows(0)("folgestatus_durch_anderen_verantwortlichen"), Boolean))
If dtToReturn.Rows(0)("folgestatus_durch_andere_rolle") Is System.DBNull.Value Then
m_iFolgestatus_durch_andere_rolle = SqlInt32.Null
Else
m_iFolgestatus_durch_andere_rolle = New SqlInt32(CType(dtToReturn.Rows(0)("folgestatus_durch_andere_rolle"), Integer))
End If
m_bDokumentbearbeitung_moeglich = New SqlBoolean(CType(dtToReturn.Rows(0)("dokumentbearbeitung_moeglich"), Boolean))
m_iErledigung_ab = New SqlInt32(CType(dtToReturn.Rows(0)("erledigung_ab"), Integer))
If dtToReturn.Rows(0)("dokument_ausgangsarchivieren") Is System.DBNull.Value Then
m_bDokument_ausgangsarchivieren = SqlBoolean.Null
Else
m_bDokument_ausgangsarchivieren = New SqlBoolean(CType(dtToReturn.Rows(0)("dokument_ausgangsarchivieren"), Boolean))
End If
If dtToReturn.Rows(0)("dokument_bearbeitung_abgeschlossen") Is System.DBNull.Value Then
m_bDokument_bearbeitung_abgeschlossen = SqlBoolean.Null
Else
m_bDokument_bearbeitung_abgeschlossen = New SqlBoolean(CType(dtToReturn.Rows(0)("dokument_bearbeitung_abgeschlossen"), 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
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsStatus::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_status_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("status")
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_status_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("clsStatus::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 [iStatusnr]() As SqlInt32
Get
Return m_iStatusnr
End Get
Set(ByVal Value As SqlInt32)
Dim iStatusnrTmp As SqlInt32 = Value
If iStatusnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iStatusnr", "iStatusnr can't be NULL")
End If
m_iStatusnr = Value
End Set
End Property
Public Property [iStatustypnr]() As SqlInt32
Get
Return m_iStatustypnr
End Get
Set(ByVal Value As SqlInt32)
m_iStatustypnr = Value
End Set
End Property
Public Property [iStatus_bezeichnungnr]() As SqlInt32
Get
Return m_iStatus_bezeichnungnr
End Get
Set(ByVal Value As SqlInt32)
m_iStatus_bezeichnungnr = Value
End Set
End Property
Public Property [iReihenfolge]() As SqlInt32
Get
Return m_iReihenfolge
End Get
Set(ByVal Value As SqlInt32)
Dim iReihenfolgeTmp As SqlInt32 = Value
If iReihenfolgeTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iReihenfolge", "iReihenfolge can't be NULL")
End If
m_iReihenfolge = Value
End Set
End Property
Public Property [bFolgestatus_durch_anderen_verantwortlichen]() As SqlBoolean
Get
Return m_bFolgestatus_durch_anderen_verantwortlichen
End Get
Set(ByVal Value As SqlBoolean)
Dim bFolgestatus_durch_anderen_verantwortlichenTmp As SqlBoolean = Value
If bFolgestatus_durch_anderen_verantwortlichenTmp.IsNull Then
Throw New ArgumentOutOfRangeException("bFolgestatus_durch_anderen_verantwortlichen", "bFolgestatus_durch_anderen_verantwortlichen can't be NULL")
End If
m_bFolgestatus_durch_anderen_verantwortlichen = Value
End Set
End Property
Public Property [iFolgestatus_durch_andere_rolle]() As SqlInt32
Get
Return m_iFolgestatus_durch_andere_rolle
End Get
Set(ByVal Value As SqlInt32)
m_iFolgestatus_durch_andere_rolle = Value
End Set
End Property
Public Property [bDokumentbearbeitung_moeglich]() As SqlBoolean
Get
Return m_bDokumentbearbeitung_moeglich
End Get
Set(ByVal Value As SqlBoolean)
Dim bDokumentbearbeitung_moeglichTmp As SqlBoolean = Value
If bDokumentbearbeitung_moeglichTmp.IsNull Then
Throw New ArgumentOutOfRangeException("bDokumentbearbeitung_moeglich", "bDokumentbearbeitung_moeglich can't be NULL")
End If
m_bDokumentbearbeitung_moeglich = Value
End Set
End Property
Public Property [iErledigung_ab]() As SqlInt32
Get
Return m_iErledigung_ab
End Get
Set(ByVal Value As SqlInt32)
Dim iErledigung_abTmp As SqlInt32 = Value
If iErledigung_abTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iErledigung_ab", "iErledigung_ab can't be NULL")
End If
m_iErledigung_ab = Value
End Set
End Property
Public Property [bDokument_ausgangsarchivieren]() As SqlBoolean
Get
Return m_bDokument_ausgangsarchivieren
End Get
Set(ByVal Value As SqlBoolean)
m_bDokument_ausgangsarchivieren = Value
End Set
End Property
Public Property [bDokument_bearbeitung_abgeschlossen]() As SqlBoolean
Get
Return m_bDokument_bearbeitung_abgeschlossen
End Get
Set(ByVal Value As SqlBoolean)
m_bDokument_bearbeitung_abgeschlossen = 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

View File

@@ -0,0 +1,510 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'statushistory'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 25. Mai 2003, 21:40:11
' // 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 'statushistory'.
' /// </summary>
Public Class clsStatushistory
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iVerantwortlich, m_iStatushistorynr, m_iMandantnr, m_iStatus As SqlInt32
Private m_sDokumentid 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>iStatushistorynr</LI>
' /// <LI>iStatus</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>sDokumentid. May be SqlString.Null</LI>
' /// <LI>iVerantwortlich. 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_statushistory_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatushistorynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatushistorynr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iverantwortlich", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerantwortlich))
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_statushistory_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("clsStatushistory::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>iStatushistorynr</LI>
' /// <LI>iStatus</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>sDokumentid. May be SqlString.Null</LI>
' /// <LI>iVerantwortlich. 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_statushistory_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatushistorynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatushistorynr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iverantwortlich", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerantwortlich))
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_statushistory_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("clsStatushistory::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>iStatushistorynr</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_statushistory_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatushistorynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatushistorynr))
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_statushistory_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("clsStatushistory::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>iStatushistorynr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iStatushistorynr</LI>
' /// <LI>iStatus</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>sDokumentid</LI>
' /// <LI>iVerantwortlich</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_statushistory_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("statushistory")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@istatushistorynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatushistorynr))
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_statushistory_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iStatushistorynr = New SqlInt32(CType(dtToReturn.Rows(0)("statushistorynr"), Integer))
m_iStatus = New SqlInt32(CType(dtToReturn.Rows(0)("status"), 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)("dokumentid") Is System.DBNull.Value Then
m_sDokumentid = SqlString.Null
Else
m_sDokumentid = New SqlString(CType(dtToReturn.Rows(0)("dokumentid"), String))
End If
If dtToReturn.Rows(0)("verantwortlich") Is System.DBNull.Value Then
m_iVerantwortlich = SqlInt32.Null
Else
m_iVerantwortlich = New SqlInt32(CType(dtToReturn.Rows(0)("verantwortlich"), 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("clsStatushistory::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_statushistory_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("statushistory")
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_statushistory_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("clsStatushistory::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 [iStatushistorynr]() As SqlInt32
Get
Return m_iStatushistorynr
End Get
Set(ByVal Value As SqlInt32)
Dim iStatushistorynrTmp As SqlInt32 = Value
If iStatushistorynrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iStatushistorynr", "iStatushistorynr can't be NULL")
End If
m_iStatushistorynr = Value
End Set
End Property
Public Property [iStatus]() As SqlInt32
Get
Return m_iStatus
End Get
Set(ByVal Value As SqlInt32)
Dim iStatusTmp As SqlInt32 = Value
If iStatusTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iStatus", "iStatus can't be NULL")
End If
m_iStatus = Value
End Set
End Property
Public Property [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr = Value
End Set
End Property
Public Property [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
m_bAktiv = Value
End Set
End Property
Public Property [daErstellt_am]() As SqlDateTime
Get
Return m_daErstellt_am
End Get
Set(ByVal Value As SqlDateTime)
m_daErstellt_am = Value
End Set
End Property
Public Property [daMutiert_am]() As SqlDateTime
Get
Return m_daMutiert_am
End Get
Set(ByVal Value As SqlDateTime)
m_daMutiert_am = Value
End Set
End Property
Public Property [iMutierer]() As SqlInt32
Get
Return m_iMutierer
End Get
Set(ByVal Value As SqlInt32)
m_iMutierer = Value
End Set
End Property
Public Property [sDokumentid]() As SqlString
Get
Return m_sDokumentid
End Get
Set(ByVal Value As SqlString)
m_sDokumentid = Value
End Set
End Property
Public Property [iVerantwortlich]() As SqlInt32
Get
Return m_iVerantwortlich
End Get
Set(ByVal Value As SqlInt32)
m_iVerantwortlich = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,491 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'statustyp'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Montag, 30. Dezember 2002, 21:26:48
' // 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 'statustyp'.
' /// </summary>
Public Class clsStatustyp
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_sMandantnr, m_sBeschreibung As SqlString
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iStatustypnr As SqlInt32
Private m_sBezeichnung As SqlString
#End Region
' /// <summary>
' /// Purpose: Class constructor.
' /// </summary>
Public Sub New()
' // Nothing for now.
End Sub
' /// <summary>
' /// Purpose: Insert method. This method will insert one new row into the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iStatustypnr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
' /// <LI>sMandantnr. May be SqlString.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_statustyp_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatustypnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatustypnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 50, 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("@smandantnr", SqlDbType.Char, 10, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sMandantnr))
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_statustyp_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("clsStatustyp::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>iStatustypnr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
' /// <LI>sMandantnr. May be SqlString.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_statustyp_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatustypnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatustypnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 50, 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("@smandantnr", SqlDbType.Char, 10, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sMandantnr))
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_statustyp_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("clsStatustyp::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>iStatustypnr</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_statustyp_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatustypnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatustypnr))
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_statustyp_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("clsStatustyp::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>iStatustypnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iStatustypnr</LI>
' /// <LI>sBezeichnung</LI>
' /// <LI>sBeschreibung</LI>
' /// <LI>sMandantnr</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_statustyp_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("statustyp")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@istatustypnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatustypnr))
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_statustyp_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iStatustypnr = New SqlInt32(CType(dtToReturn.Rows(0)("statustypnr"), 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)("mandantnr") Is System.DBNull.Value Then
m_sMandantnr = SqlString.Null
Else
m_sMandantnr = New SqlString(CType(dtToReturn.Rows(0)("mandantnr"), String))
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("clsStatustyp::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_statustyp_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("statustyp")
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_statustyp_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("clsStatustyp::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 [iStatustypnr]() As SqlInt32
Get
Return m_iStatustypnr
End Get
Set(ByVal Value As SqlInt32)
Dim iStatustypnrTmp As SqlInt32 = Value
If iStatustypnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iStatustypnr", "iStatustypnr can't be NULL")
End If
m_iStatustypnr = 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 [sMandantnr]() As SqlString
Get
Return m_sMandantnr
End Get
Set(ByVal Value As SqlString)
m_sMandantnr = 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

View File

@@ -0,0 +1,258 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'suchdaten'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Donnerstag, 15. Juli 2004, 01:14:23
' // 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 'suchdaten'.
' /// </summary>
Public Class clsSuchdaten
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_iNodenr, m_iMitarbeiternr, m_iId, m_iSuchprofilnr As SqlInt32
Private m_sOp2, m_sDaten2, m_sDaten1, m_sAndor, m_sOp1 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>iId. May be SqlInt32.Null</LI>
' /// <LI>iSuchprofilnr. May be SqlInt32.Null</LI>
' /// <LI>iNodenr. May be SqlInt32.Null</LI>
' /// <LI>iMitarbeiternr. May be SqlInt32.Null</LI>
' /// <LI>sAndor. May be SqlString.Null</LI>
' /// <LI>sOp1. May be SqlString.Null</LI>
' /// <LI>sDaten1. May be SqlString.Null</LI>
' /// <LI>sOp2. May be SqlString.Null</LI>
' /// <LI>sDaten2. 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_suchdaten_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iid", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iId))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isuchprofilnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSuchprofilnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@inodenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNodenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sandor", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAndor))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sop1", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sOp1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdaten1", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDaten1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sop2", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sOp2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdaten2", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDaten2))
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_suchdaten_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("clsSuchdaten::Insert::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: SelectAll method. This method will Select all rows from the table.
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Overrides Function SelectAll() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_suchdaten_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("suchdaten")
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_suchdaten_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("clsSuchdaten::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 [iId]() As SqlInt32
Get
Return m_iId
End Get
Set(ByVal Value As SqlInt32)
m_iId = Value
End Set
End Property
Public Property [iSuchprofilnr]() As SqlInt32
Get
Return m_iSuchprofilnr
End Get
Set(ByVal Value As SqlInt32)
m_iSuchprofilnr = Value
End Set
End Property
Public Property [iNodenr]() As SqlInt32
Get
Return m_iNodenr
End Get
Set(ByVal Value As SqlInt32)
m_iNodenr = Value
End Set
End Property
Public Property [iMitarbeiternr]() As SqlInt32
Get
Return m_iMitarbeiternr
End Get
Set(ByVal Value As SqlInt32)
m_iMitarbeiternr = Value
End Set
End Property
Public Property [sAndor]() As SqlString
Get
Return m_sAndor
End Get
Set(ByVal Value As SqlString)
m_sAndor = Value
End Set
End Property
Public Property [sOp1]() As SqlString
Get
Return m_sOp1
End Get
Set(ByVal Value As SqlString)
m_sOp1 = Value
End Set
End Property
Public Property [sDaten1]() As SqlString
Get
Return m_sDaten1
End Get
Set(ByVal Value As SqlString)
m_sDaten1 = Value
End Set
End Property
Public Property [sOp2]() As SqlString
Get
Return m_sOp2
End Get
Set(ByVal Value As SqlString)
m_sOp2 = Value
End Set
End Property
Public Property [sDaten2]() As SqlString
Get
Return m_sDaten2
End Get
Set(ByVal Value As SqlString)
m_sDaten2 = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,519 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'Suchprofil'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 22. August 2004, 13:26:02
' // 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 'Suchprofil'.
' /// </summary>
Public Class clsSuchprofil
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_iMitarbeiternr, m_iSuchprofilnr As SqlInt32
Private m_sProfilname 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>sProfilname</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iSuchprofilnr</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Suchprofil_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("@sprofilname", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sProfilname))
scmCmdToExecute.Parameters.Add(new SqlParameter("@isuchprofilnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iSuchprofilnr))
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_iSuchprofilnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@isuchprofilnr").Value, SqlInt32))
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Suchprofil_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("clsSuchprofil::Insert::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>
' /// <LI>sProfilname</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_Suchprofil_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("@sprofilname", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sProfilname))
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_Suchprofil_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("clsSuchprofil::Delete::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: Delete method using PK field 'mitarbeiternr'. This method will
' /// delete one or more rows from the database, based on the Primary Key field 'mitarbeiternr'.
' /// </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 Function DeleteWmitarbeiternrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Suchprofil_DeleteWmitarbeiternrLogic]"
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_Suchprofil_DeleteWmitarbeiternrLogic' 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("clsSuchprofil::DeleteWmitarbeiternrLogic::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: Delete method using PK field 'profilname'. This method will
' /// delete one or more rows from the database, based on the Primary Key field 'profilname'.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>sProfilname</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function DeleteWprofilnameLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Suchprofil_DeleteWprofilnameLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@sprofilname", SqlDbType.VarChar, 50, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, m_sProfilname))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 50, ParameterDirection.Output, True, 0, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Suchprofil_DeleteWprofilnameLogic' 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("clsSuchprofil::DeleteWprofilnameLogic::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>
' /// <LI>sProfilname</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iSuchprofilnr</LI>
' /// <LI>iMitarbeiternr</LI>
' /// <LI>sProfilname</LI>
' /// </UL>
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
' /// </remarks>
Public Overrides Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Suchprofil_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("Suchprofil")
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("@sprofilname", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sProfilname))
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_Suchprofil_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iSuchprofilnr = New SqlInt32(CType(dtToReturn.Rows(0)("suchprofilnr"), Integer))
m_iMitarbeiternr = New SqlInt32(CType(dtToReturn.Rows(0)("mitarbeiternr"), Integer))
m_sProfilname = New SqlString(CType(dtToReturn.Rows(0)("profilname"), String))
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsSuchprofil::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: Select method for a unique field. This method will Select one row from the database, based on the unique field 'suchprofilnr'
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iSuchprofilnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iSuchprofilnr</LI>
' /// <LI>iMitarbeiternr</LI>
' /// <LI>sProfilname</LI>
' /// </UL>
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
' /// </remarks>
Public Function SelectOneWsuchprofilnrLogic() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Suchprofil_SelectOneWsuchprofilnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Suchprofil")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@isuchprofilnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSuchprofilnr))
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_Suchprofil_SelectOneWsuchprofilnrLogic' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iSuchprofilnr = New SqlInt32(CType(dtToReturn.Rows(0)("suchprofilnr"), Integer))
m_iMitarbeiternr = New SqlInt32(CType(dtToReturn.Rows(0)("mitarbeiternr"), Integer))
m_sProfilname = New SqlString(CType(dtToReturn.Rows(0)("profilname"), String))
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsSuchprofil::SelectOneWsuchprofilnrLogic::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_Suchprofil_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("Suchprofil")
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_Suchprofil_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("clsSuchprofil::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 [iSuchprofilnr]() As SqlInt32
Get
Return m_iSuchprofilnr
End Get
Set(ByVal Value As SqlInt32)
Dim iSuchprofilnrTmp As SqlInt32 = Value
If iSuchprofilnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iSuchprofilnr", "iSuchprofilnr can't be NULL")
End If
m_iSuchprofilnr = Value
End Set
End Property
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 [sProfilname]() As SqlString
Get
Return m_sProfilname
End Get
Set(ByVal Value As SqlString)
Dim sProfilnameTmp As SqlString = Value
If sProfilnameTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sProfilname", "sProfilname can't be NULL")
End If
m_sProfilname = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,895 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'sysadminfunktion'
' // Generated by LLBLGen v1.21.2003.712 Final on: Donnerstag, 14. Oktober 2010, 22:33:31
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokadb
''' <summary>
''' Purpose: Data Access class for the table 'sysadminfunktion'.
''' </summary>
Public Class clsSysadminfunktion
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iFheight, m_iFwidth, m_iMandantnr, m_iMutierer, m_iSprache, m_iSort, m_iImageIndex, m_iSysadminfnktnr, m_iParentID, m_iFtop, m_iFleft, m_iImageIndexOpen As SqlInt32
Private m_sKeyFields, m_sDomaintable, m_sBeschreibung, m_sBezeichnung As SqlString
#End Region
''' <summary>
''' Purpose: Class constructor.
''' </summary>
Public Sub New()
' // Nothing for now.
End Sub
''' <summary>
''' Purpose: Insert method. This method will insert one new row into the database.
''' </summary>
''' <returns>True if succeeded, otherwise an Exception is thrown. </returns>
''' <remarks>
''' Properties needed for this method:
''' <UL>
''' <LI>iSysadminfnktnr</LI>
''' <LI>sBezeichnung. May be SqlString.Null</LI>
''' <LI>iParentID. May be SqlInt32.Null</LI>
''' <LI>iSort. May be SqlInt32.Null</LI>
''' <LI>iImageIndex. May be SqlInt32.Null</LI>
''' <LI>iImageIndexOpen. May be SqlInt32.Null</LI>
''' <LI>iFtop. May be SqlInt32.Null</LI>
''' <LI>iFleft. May be SqlInt32.Null</LI>
''' <LI>iFwidth. May be SqlInt32.Null</LI>
''' <LI>iFheight. May be SqlInt32.Null</LI>
''' <LI>sBeschreibung. May be SqlString.Null</LI>
''' <LI>iMandantnr</LI>
''' <LI>iSprache</LI>
''' <LI>bAktiv. May be SqlBoolean.Null</LI>
''' <LI>daErstellt_am. May be SqlDateTime.Null</LI>
''' <LI>daMutiert_am. May be SqlDateTime.Null</LI>
''' <LI>iMutierer. May be SqlInt32.Null</LI>
''' <LI>sDomaintable. May be SqlString.Null</LI>
''' <LI>sKeyFields. May be SqlString.Null</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_sysadminfunktion_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@isysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSysadminfnktnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParentID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSort", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSort))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImageIndex", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageIndex))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImageIndexOpen", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageIndexOpen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iftop", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFtop))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifleft", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFleft))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifwidth", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFwidth))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifheight", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFheight))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDomaintable", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDomaintable))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sKeyFields", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sKeyFields))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_sysadminfunktion_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsSysadminfunktion::Insert::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
''' <summary>
''' Purpose: Update method. This method will Update one existing row in the database.
''' </summary>
''' <returns>True if succeeded, otherwise an Exception is thrown. </returns>
''' <remarks>
''' Properties needed for this method:
''' <UL>
''' <LI>iSysadminfnktnr</LI>
''' <LI>sBezeichnung. May be SqlString.Null</LI>
''' <LI>iParentID. May be SqlInt32.Null</LI>
''' <LI>iSort. May be SqlInt32.Null</LI>
''' <LI>iImageIndex. May be SqlInt32.Null</LI>
''' <LI>iImageIndexOpen. May be SqlInt32.Null</LI>
''' <LI>iFtop. May be SqlInt32.Null</LI>
''' <LI>iFleft. May be SqlInt32.Null</LI>
''' <LI>iFwidth. May be SqlInt32.Null</LI>
''' <LI>iFheight. May be SqlInt32.Null</LI>
''' <LI>sBeschreibung. May be SqlString.Null</LI>
''' <LI>iMandantnr</LI>
''' <LI>iSprache</LI>
''' <LI>bAktiv. May be SqlBoolean.Null</LI>
''' <LI>daErstellt_am. May be SqlDateTime.Null</LI>
''' <LI>daMutiert_am. May be SqlDateTime.Null</LI>
''' <LI>iMutierer. May be SqlInt32.Null</LI>
''' <LI>sDomaintable. May be SqlString.Null</LI>
''' <LI>sKeyFields. May be SqlString.Null</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_sysadminfunktion_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@isysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSysadminfnktnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParentID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSort", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSort))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImageIndex", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageIndex))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImageIndexOpen", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageIndexOpen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iftop", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFtop))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifleft", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFleft))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifwidth", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFwidth))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifheight", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFheight))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDomaintable", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDomaintable))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sKeyFields", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sKeyFields))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_sysadminfunktion_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsSysadminfunktion::Update::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
''' <summary>
''' Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
''' </summary>
''' <returns>True if succeeded, otherwise an Exception is thrown. </returns>
''' <remarks>
''' Properties needed for this method:
''' <UL>
''' <LI>iSysadminfnktnr</LI>
''' <LI>iMandantnr</LI>
''' <LI>iSprache</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
Overrides Public Function Delete() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_sysadminfunktion_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@isysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSysadminfnktnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_sysadminfunktion_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsSysadminfunktion::Delete::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
''' <summary>
''' Purpose: Delete method using PK field 'sysadminfnktnr'. This method will
''' delete one or more rows from the database, based on the Primary Key field 'sysadminfnktnr'.
''' </summary>
''' <returns>True if succeeded, otherwise an Exception is thrown. </returns>
''' <remarks>
''' Properties needed for this method:
''' <UL>
''' <LI>iSysadminfnktnr</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
''' </UL>
''' </remarks>
Public Function DeleteAllWsysadminfnktnrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_sysadminfunktion_DeleteAllWsysadminfnktnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@isysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, false, 10, 0, "", DataRowVersion.Proposed, m_iSysadminfnktnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iSysadminfnktnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@isysadminfnktnr").Value, Integer))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_sysadminfunktion_DeleteAllWsysadminfnktnrLogic' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsSysadminfunktion::DeleteAllWsysadminfnktnrLogic::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
''' <summary>
''' Purpose: Delete method using PK field 'mandantnr'. This method will
''' delete one or more rows from the database, based on the Primary Key field 'mandantnr'.
''' </summary>
''' <returns>True if succeeded, otherwise an Exception is thrown. </returns>
''' <remarks>
''' Properties needed for this method:
''' <UL>
''' <LI>iMandantnr</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
''' </UL>
''' </remarks>
Public Function DeleteAllWmandantnrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_sysadminfunktion_DeleteAllWmandantnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, false, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iMandantnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@imandantnr").Value, Integer))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_sysadminfunktion_DeleteAllWmandantnrLogic' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsSysadminfunktion::DeleteAllWmandantnrLogic::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
''' <summary>
''' Purpose: Delete method using PK field 'sprache'. This method will
''' delete one or more rows from the database, based on the Primary Key field 'sprache'.
''' </summary>
''' <returns>True if succeeded, otherwise an Exception is thrown. </returns>
''' <remarks>
''' Properties needed for this method:
''' <UL>
''' <LI>iSprache</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
''' </UL>
''' </remarks>
Public Function DeleteAllWspracheLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_sysadminfunktion_DeleteAllWspracheLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, false, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iSprache = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@isprache").Value, Integer))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_sysadminfunktion_DeleteAllWspracheLogic' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsSysadminfunktion::DeleteAllWspracheLogic::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
''' <summary>
''' Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
''' </summary>
''' <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
''' <remarks>
''' Properties needed for this method:
''' <UL>
''' <LI>iSysadminfnktnr</LI>
''' <LI>iMandantnr</LI>
''' <LI>iSprache</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
''' <LI>iSysadminfnktnr</LI>
''' <LI>sBezeichnung</LI>
''' <LI>iParentID</LI>
''' <LI>iSort</LI>
''' <LI>iImageIndex</LI>
''' <LI>iImageIndexOpen</LI>
''' <LI>iFtop</LI>
''' <LI>iFleft</LI>
''' <LI>iFwidth</LI>
''' <LI>iFheight</LI>
''' <LI>sBeschreibung</LI>
''' <LI>iMandantnr</LI>
''' <LI>iSprache</LI>
''' <LI>bAktiv</LI>
''' <LI>daErstellt_am</LI>
''' <LI>daMutiert_am</LI>
''' <LI>iMutierer</LI>
''' <LI>sDomaintable</LI>
''' <LI>sKeyFields</LI>
'''</UL>
''' Will fill all properties corresponding with a field in the table with the value of the row selected.
''' </remarks>
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_sysadminfunktion_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("sysadminfunktion")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@isysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSysadminfnktnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
sdaAdapter.Fill(dtToReturn)
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_sysadminfunktion_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iSysadminfnktnr = New SqlInt32(CType(dtToReturn.Rows(0)("sysadminfnktnr"), Integer))
If dtToReturn.Rows(0)("bezeichnung") Is System.DBNull.Value Then
m_sBezeichnung = SqlString.Null
Else
m_sBezeichnung = New SqlString(CType(dtToReturn.Rows(0)("bezeichnung"), String))
End If
If dtToReturn.Rows(0)("ParentID") Is System.DBNull.Value Then
m_iParentID = SqlInt32.Null
Else
m_iParentID = New SqlInt32(CType(dtToReturn.Rows(0)("ParentID"), Integer))
End If
If dtToReturn.Rows(0)("Sort") Is System.DBNull.Value Then
m_iSort = SqlInt32.Null
Else
m_iSort = New SqlInt32(CType(dtToReturn.Rows(0)("Sort"), Integer))
End If
If dtToReturn.Rows(0)("ImageIndex") Is System.DBNull.Value Then
m_iImageIndex = SqlInt32.Null
Else
m_iImageIndex = New SqlInt32(CType(dtToReturn.Rows(0)("ImageIndex"), Integer))
End If
If dtToReturn.Rows(0)("ImageIndexOpen") Is System.DBNull.Value Then
m_iImageIndexOpen = SqlInt32.Null
Else
m_iImageIndexOpen = New SqlInt32(CType(dtToReturn.Rows(0)("ImageIndexOpen"), Integer))
End If
If dtToReturn.Rows(0)("ftop") Is System.DBNull.Value Then
m_iFtop = SqlInt32.Null
Else
m_iFtop = New SqlInt32(CType(dtToReturn.Rows(0)("ftop"), Integer))
End If
If dtToReturn.Rows(0)("fleft") Is System.DBNull.Value Then
m_iFleft = SqlInt32.Null
Else
m_iFleft = New SqlInt32(CType(dtToReturn.Rows(0)("fleft"), Integer))
End If
If dtToReturn.Rows(0)("fwidth") Is System.DBNull.Value Then
m_iFwidth = SqlInt32.Null
Else
m_iFwidth = New SqlInt32(CType(dtToReturn.Rows(0)("fwidth"), Integer))
End If
If dtToReturn.Rows(0)("fheight") Is System.DBNull.Value Then
m_iFheight = SqlInt32.Null
Else
m_iFheight = New SqlInt32(CType(dtToReturn.Rows(0)("fheight"), Integer))
End If
If dtToReturn.Rows(0)("beschreibung") Is System.DBNull.Value Then
m_sBeschreibung = SqlString.Null
Else
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("beschreibung"), String))
End If
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
m_iSprache = New SqlInt32(CType(dtToReturn.Rows(0)("sprache"), Integer))
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
m_bAktiv = SqlBoolean.Null
Else
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
End If
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
m_daErstellt_am = SqlDateTime.Null
Else
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
End If
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
m_daMutiert_am = SqlDateTime.Null
Else
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
End If
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
m_iMutierer = SqlInt32.Null
Else
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
End If
If dtToReturn.Rows(0)("Domaintable") Is System.DBNull.Value Then
m_sDomaintable = SqlString.Null
Else
m_sDomaintable = New SqlString(CType(dtToReturn.Rows(0)("Domaintable"), String))
End If
If dtToReturn.Rows(0)("KeyFields") Is System.DBNull.Value Then
m_sKeyFields = SqlString.Null
Else
m_sKeyFields = New SqlString(CType(dtToReturn.Rows(0)("KeyFields"), String))
End If
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsSysadminfunktion::SelectOne::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
''' <summary>
''' Purpose: SelectAll method. This method will Select all rows from the table.
''' </summary>
''' <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
''' <remarks>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
Overrides Public Function SelectAll() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_sysadminfunktion_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("sysadminfunktion")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
sdaAdapter.Fill(dtToReturn)
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_sysadminfunktion_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsSysadminfunktion::SelectAll::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
#Region " Class Property Declarations "
Public Property [iSysadminfnktnr]() As SqlInt32
Get
Return m_iSysadminfnktnr
End Get
Set(ByVal Value As SqlInt32)
Dim iSysadminfnktnrTmp As SqlInt32 = Value
If iSysadminfnktnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iSysadminfnktnr", "iSysadminfnktnr can't be NULL")
End If
m_iSysadminfnktnr = Value
End Set
End Property
Public Property [sBezeichnung]() As SqlString
Get
Return m_sBezeichnung
End Get
Set(ByVal Value As SqlString)
m_sBezeichnung = Value
End Set
End Property
Public Property [iParentID]() As SqlInt32
Get
Return m_iParentID
End Get
Set(ByVal Value As SqlInt32)
m_iParentID = Value
End Set
End Property
Public Property [iSort]() As SqlInt32
Get
Return m_iSort
End Get
Set(ByVal Value As SqlInt32)
m_iSort = Value
End Set
End Property
Public Property [iImageIndex]() As SqlInt32
Get
Return m_iImageIndex
End Get
Set(ByVal Value As SqlInt32)
m_iImageIndex = Value
End Set
End Property
Public Property [iImageIndexOpen]() As SqlInt32
Get
Return m_iImageIndexOpen
End Get
Set(ByVal Value As SqlInt32)
m_iImageIndexOpen = Value
End Set
End Property
Public Property [iFtop]() As SqlInt32
Get
Return m_iFtop
End Get
Set(ByVal Value As SqlInt32)
m_iFtop = Value
End Set
End Property
Public Property [iFleft]() As SqlInt32
Get
Return m_iFleft
End Get
Set(ByVal Value As SqlInt32)
m_iFleft = Value
End Set
End Property
Public Property [iFwidth]() As SqlInt32
Get
Return m_iFwidth
End Get
Set(ByVal Value As SqlInt32)
m_iFwidth = Value
End Set
End Property
Public Property [iFheight]() As SqlInt32
Get
Return m_iFheight
End Get
Set(ByVal Value As SqlInt32)
m_iFheight = Value
End Set
End Property
Public Property [sBeschreibung]() As SqlString
Get
Return m_sBeschreibung
End Get
Set(ByVal Value As SqlString)
m_sBeschreibung = Value
End Set
End Property
Public Property [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
Dim iMandantnrTmp As SqlInt32 = Value
If iMandantnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iMandantnr", "iMandantnr can't be NULL")
End If
m_iMandantnr = Value
End Set
End Property
Public Property [iSprache]() As SqlInt32
Get
Return m_iSprache
End Get
Set(ByVal Value As SqlInt32)
Dim iSpracheTmp As SqlInt32 = Value
If iSpracheTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iSprache", "iSprache can't be NULL")
End If
m_iSprache = Value
End Set
End Property
Public Property [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
m_bAktiv = Value
End Set
End Property
Public Property [daErstellt_am]() As SqlDateTime
Get
Return m_daErstellt_am
End Get
Set(ByVal Value As SqlDateTime)
m_daErstellt_am = Value
End Set
End Property
Public Property [daMutiert_am]() As SqlDateTime
Get
Return m_daMutiert_am
End Get
Set(ByVal Value As SqlDateTime)
m_daMutiert_am = Value
End Set
End Property
Public Property [iMutierer]() As SqlInt32
Get
Return m_iMutierer
End Get
Set(ByVal Value As SqlInt32)
m_iMutierer = Value
End Set
End Property
Public Property [sDomaintable]() As SqlString
Get
Return m_sDomaintable
End Get
Set(ByVal Value As SqlString)
m_sDomaintable = Value
End Set
End Property
Public Property [sKeyFields]() As SqlString
Get
Return m_sKeyFields
End Get
Set(ByVal Value As SqlString)
m_sKeyFields = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,490 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'team'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 8. Januar 2003, 19:39:43
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokadb
' /// <summary>
' /// Purpose: Data Access class for the table 'team'.
' /// </summary>
Public Class clsTeam
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iTeamnr, m_iKostenstellenr, m_iMandantnr As SqlInt32
Private m_sBezeichnung As SqlString
#End Region
' /// <summary>
' /// Purpose: Class constructor.
' /// </summary>
Public Sub New()
' // Nothing for now.
End Sub
' /// <summary>
' /// Purpose: Insert method. This method will insert one new row into the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iTeamnr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>iKostenstellenr. May be SqlInt32.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_team_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iteamnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iTeamnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikostenstellenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iKostenstellenr))
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_team_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("clsTeam::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>iTeamnr</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>iKostenstellenr. May be SqlInt32.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_team_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iteamnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iTeamnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikostenstellenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iKostenstellenr))
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_team_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("clsTeam::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>iTeamnr</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_team_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iteamnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iTeamnr))
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_team_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("clsTeam::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>iTeamnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iTeamnr</LI>
' /// <LI>sBezeichnung</LI>
' /// <LI>iKostenstellenr</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_team_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("team")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iteamnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iTeamnr))
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_team_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iTeamnr = New SqlInt32(CType(dtToReturn.Rows(0)("teamnr"), 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)("kostenstellenr") Is System.DBNull.Value Then
m_iKostenstellenr = SqlInt32.Null
Else
m_iKostenstellenr = New SqlInt32(CType(dtToReturn.Rows(0)("kostenstellenr"), Integer))
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("clsTeam::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_team_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("team")
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_team_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("clsTeam::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 [iTeamnr]() As SqlInt32
Get
Return m_iTeamnr
End Get
Set(ByVal Value As SqlInt32)
Dim iTeamnrTmp As SqlInt32 = Value
If iTeamnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iTeamnr", "iTeamnr can't be NULL")
End If
m_iTeamnr = 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 [iKostenstellenr]() As SqlInt32
Get
Return m_iKostenstellenr
End Get
Set(ByVal Value As SqlInt32)
m_iKostenstellenr = 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

View File

@@ -0,0 +1,509 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'teammitarbeiter'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 8. Januar 2003, 20:55:32
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokadb
' /// <summary>
' /// Purpose: Data Access class for the table 'teammitarbeiter'.
' /// </summary>
Public Class clsTeammitarbeiter
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iMandantnr, m_iTeamnr, m_iTeammitarbeiternr, m_iAnteil, m_iMitarbeiternr As SqlInt32
#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>iTeammitarbeiternr</LI>
' /// <LI>iTeamnr. May be SqlInt32.Null</LI>
' /// <LI>iMitarbeiternr. May be SqlInt32.Null</LI>
' /// <LI>iAnteil. May be SqlInt32.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_teammitarbeiter_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iteammitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iTeammitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iteamnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iTeamnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ianteil", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAnteil))
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_teammitarbeiter_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("clsTeammitarbeiter::Insert::Error occured." + ex.Message, 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>iTeammitarbeiternr</LI>
' /// <LI>iTeamnr. May be SqlInt32.Null</LI>
' /// <LI>iMitarbeiternr. May be SqlInt32.Null</LI>
' /// <LI>iAnteil. May be SqlInt32.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_teammitarbeiter_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iteammitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iTeammitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iteamnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iTeamnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ianteil", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAnteil))
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_teammitarbeiter_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("clsTeammitarbeiter::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>iTeammitarbeiternr</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_teammitarbeiter_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iteammitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iTeammitarbeiternr))
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_teammitarbeiter_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("clsTeammitarbeiter::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>iTeammitarbeiternr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iTeammitarbeiternr</LI>
' /// <LI>iTeamnr</LI>
' /// <LI>iMitarbeiternr</LI>
' /// <LI>iAnteil</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_teammitarbeiter_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("teammitarbeiter")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iteammitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iTeammitarbeiternr))
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_teammitarbeiter_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iTeammitarbeiternr = New SqlInt32(CType(dtToReturn.Rows(0)("teammitarbeiternr"), Integer))
If dtToReturn.Rows(0)("teamnr") Is System.DBNull.Value Then
m_iTeamnr = SqlInt32.Null
Else
m_iTeamnr = New SqlInt32(CType(dtToReturn.Rows(0)("teamnr"), Integer))
End If
If dtToReturn.Rows(0)("mitarbeiternr") Is System.DBNull.Value Then
m_iMitarbeiternr = SqlInt32.Null
Else
m_iMitarbeiternr = New SqlInt32(CType(dtToReturn.Rows(0)("mitarbeiternr"), Integer))
End If
If dtToReturn.Rows(0)("anteil") Is System.DBNull.Value Then
m_iAnteil = SqlInt32.Null
Else
m_iAnteil = New SqlInt32(CType(dtToReturn.Rows(0)("anteil"), Integer))
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("clsTeammitarbeiter::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_teammitarbeiter_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("teammitarbeiter")
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_teammitarbeiter_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("clsTeammitarbeiter::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 [iTeammitarbeiternr]() As SqlInt32
Get
Return m_iTeammitarbeiternr
End Get
Set(ByVal Value As SqlInt32)
Dim iTeammitarbeiternrTmp As SqlInt32 = Value
If iTeammitarbeiternrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iTeammitarbeiternr", "iTeammitarbeiternr can't be NULL")
End If
m_iTeammitarbeiternr = Value
End Set
End Property
Public Property [iTeamnr]() As SqlInt32
Get
Return m_iTeamnr
End Get
Set(ByVal Value As SqlInt32)
m_iTeamnr = Value
End Set
End Property
Public Property [iMitarbeiternr]() As SqlInt32
Get
Return m_iMitarbeiternr
End Get
Set(ByVal Value As SqlInt32)
m_iMitarbeiternr = Value
End Set
End Property
Public Property [iAnteil]() As SqlInt32
Get
Return m_iAnteil
End Get
Set(ByVal Value As SqlInt32)
m_iAnteil = 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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,643 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'Tempdokumentcoldindexwert'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Samstag, 19. April 2003, 22:33: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 'Tempdokumentcoldindexwert'.
' /// </summary>
Public Class clsTempdokumentcoldindexwert
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iCold_indexfeldnr, m_iCold_indexfeldnrOld, m_iColdindexwertnr, m_iMandantnr As SqlInt32
Private m_sDokumentid, m_sWert 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>sWert. 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>
' /// <LI>sDokumentid. May be SqlString.Null</LI>
' /// <LI>iCold_indexfeldnr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iColdindexwertnr</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Tempdokumentcoldindexwert_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@swert", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sWert))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@icold_indexfeldnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCold_indexfeldnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@icoldindexwertnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iColdindexwertnr))
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_iColdindexwertnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@icoldindexwertnr").Value, SqlInt32))
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Tempdokumentcoldindexwert_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("clsTempdokumentcoldindexwert::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>iColdindexwertnr</LI>
' /// <LI>sWert. 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>
' /// <LI>sDokumentid. May be SqlString.Null</LI>
' /// <LI>iCold_indexfeldnr. 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_Tempdokumentcoldindexwert_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@icoldindexwertnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iColdindexwertnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@swert", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sWert))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@icold_indexfeldnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCold_indexfeldnr))
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_Tempdokumentcoldindexwert_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("clsTempdokumentcoldindexwert::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 'cold_indexfeldnr.
' /// This method will Update one or more existing rows in the database. It will reset the field 'cold_indexfeldnr' in
' /// all rows which have as value for this field the value as set in property 'iCold_indexfeldnrOld' to
' /// the value as set in property 'iCold_indexfeldnr'.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iCold_indexfeldnr. May be SqlInt32.Null</LI>
' /// <LI>iCold_indexfeldnrOld. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function UpdateAllWcold_indexfeldnrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Tempdokumentcoldindexwert_UpdateAllWcold_indexfeldnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@icold_indexfeldnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iCold_indexfeldnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@icold_indexfeldnrOld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCold_indexfeldnrOld))
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_Tempdokumentcoldindexwert_UpdateAllWcold_indexfeldnrLogic' 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("clsTempdokumentcoldindexwert::UpdateAllWcold_indexfeldnrLogic::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>iColdindexwertnr</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_Tempdokumentcoldindexwert_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@icoldindexwertnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iColdindexwertnr))
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_Tempdokumentcoldindexwert_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("clsTempdokumentcoldindexwert::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>iColdindexwertnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iColdindexwertnr</LI>
' /// <LI>sWert</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>sDokumentid</LI>
' /// <LI>iCold_indexfeldnr</LI>
' /// </UL>
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
' /// </remarks>
Public Overrides Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Tempdokumentcoldindexwert_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("Tempdokumentcoldindexwert")
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@icoldindexwertnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iColdindexwertnr))
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_Tempdokumentcoldindexwert_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iColdindexwertnr = New SqlInt32(CType(dtToReturn.Rows(0)("coldindexwertnr"), Integer))
If dtToReturn.Rows(0)("wert") Is System.DBNull.Value Then
m_sWert = SqlString.Null
Else
m_sWert = New SqlString(CType(dtToReturn.Rows(0)("wert"), 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
If dtToReturn.Rows(0)("dokumentid") Is System.DBNull.Value Then
m_sDokumentid = SqlString.Null
Else
m_sDokumentid = New SqlString(CType(dtToReturn.Rows(0)("dokumentid"), String))
End If
If dtToReturn.Rows(0)("cold_indexfeldnr") Is System.DBNull.Value Then
m_iCold_indexfeldnr = SqlInt32.Null
Else
m_iCold_indexfeldnr = New SqlInt32(CType(dtToReturn.Rows(0)("cold_indexfeldnr"), 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("clsTempdokumentcoldindexwert::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_Tempdokumentcoldindexwert_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Tempdokumentcoldindexwert")
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_Tempdokumentcoldindexwert_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("clsTempdokumentcoldindexwert::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 'cold_indexfeldnr'
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iCold_indexfeldnr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function SelectAllWcold_indexfeldnrLogic() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Tempdokumentcoldindexwert_SelectAllWcold_indexfeldnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("Tempdokumentcoldindexwert")
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@icold_indexfeldnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCold_indexfeldnr))
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_Tempdokumentcoldindexwert_SelectAllWcold_indexfeldnrLogic' 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("clsTempdokumentcoldindexwert::SelectAllWcold_indexfeldnrLogic::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 [iColdindexwertnr]() As SqlInt32
Get
Return m_iColdindexwertnr
End Get
Set(ByVal Value As SqlInt32)
Dim iColdindexwertnrTmp As SqlInt32 = Value
If iColdindexwertnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iColdindexwertnr", "iColdindexwertnr can't be NULL")
End If
m_iColdindexwertnr = Value
End Set
End Property
Public Property [sWert]() As SqlString
Get
Return m_sWert
End Get
Set(ByVal Value As SqlString)
m_sWert = Value
End Set
End Property
Public Property [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr = Value
End Set
End Property
Public Property [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
m_bAktiv = Value
End Set
End Property
Public Property [daErstellt_am]() As SqlDateTime
Get
Return m_daErstellt_am
End Get
Set(ByVal Value As SqlDateTime)
m_daErstellt_am = Value
End Set
End Property
Public Property [daMutiert_am]() As SqlDateTime
Get
Return m_daMutiert_am
End Get
Set(ByVal Value As SqlDateTime)
m_daMutiert_am = Value
End Set
End Property
Public Property [iMutierer]() As SqlInt32
Get
Return m_iMutierer
End Get
Set(ByVal Value As SqlInt32)
m_iMutierer = Value
End Set
End Property
Public Property [sDokumentid]() As SqlString
Get
Return m_sDokumentid
End Get
Set(ByVal Value As SqlString)
m_sDokumentid = Value
End Set
End Property
Public Property [iCold_indexfeldnr]() As SqlInt32
Get
Return m_iCold_indexfeldnr
End Get
Set(ByVal Value As SqlInt32)
m_iCold_indexfeldnr = Value
End Set
End Property
Public Property [iCold_indexfeldnrOld]() As SqlInt32
Get
Return m_iCold_indexfeldnrOld
End Get
Set(ByVal Value As SqlInt32)
m_iCold_indexfeldnrOld = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,683 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'Tempdokumentinfo_wert'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Samstag, 19. April 2003, 22:34:06
' // 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 'Tempdokumentinfo_wert'.
' /// </summary>
Public Class clsTempdokumentinfo_wert
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv, m_bAktiv1 As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iMutierer, m_iDokumentinformationnr, m_iDokumentinformationnrOld, m_iVorlagenfeldnr, m_iMandantnr, m_iDokumentinfonr As SqlInt32
Private m_sDokumentid, m_sInhalt 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>sInhalt. May be SqlString.Null</LI>
' /// <LI>bAktiv</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv1. 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>iDokumentinformationnr. May be SqlInt32.Null</LI>
' /// <LI>sDokumentid. May be SqlString.Null</LI>
' /// <LI>iVorlagenfeldnr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iDokumentinfonr</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Tempdokumentinfo_wert_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@sinhalt", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sInhalt))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv1", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv1))
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("@idokumentinformationnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentinformationnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ivorlagenfeldnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVorlagenfeldnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@idokumentinfonr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentinfonr))
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_iDokumentinfonr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@idokumentinfonr").Value, SqlInt32))
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Tempdokumentinfo_wert_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("clsTempdokumentinfo_wert::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>iDokumentinfonr</LI>
' /// <LI>sInhalt. May be SqlString.Null</LI>
' /// <LI>bAktiv</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv1. 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>iDokumentinformationnr. May be SqlInt32.Null</LI>
' /// <LI>sDokumentid. May be SqlString.Null</LI>
' /// <LI>iVorlagenfeldnr. 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_Tempdokumentinfo_wert_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentinfonr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentinfonr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sinhalt", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sInhalt))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv1", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv1))
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("@idokumentinformationnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentinformationnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ivorlagenfeldnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 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_Tempdokumentinfo_wert_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("clsTempdokumentinfo_wert::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 'dokumentinformationnr.
' /// This method will Update one or more existing rows in the database. It will reset the field 'dokumentinformationnr' in
' /// all rows which have as value for this field the value as set in property 'iDokumentinformationnrOld' to
' /// the value as set in property 'iDokumentinformationnr'.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iDokumentinformationnr. May be SqlInt32.Null</LI>
' /// <LI>iDokumentinformationnrOld. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function UpdateAllWdokumentinformationnrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Tempdokumentinfo_wert_UpdateAllWdokumentinformationnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentinformationnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentinformationnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentinformationnrOld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentinformationnrOld))
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_Tempdokumentinfo_wert_UpdateAllWdokumentinformationnrLogic' 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("clsTempdokumentinfo_wert::UpdateAllWdokumentinformationnrLogic::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>iDokumentinfonr</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_Tempdokumentinfo_wert_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentinfonr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentinfonr))
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_Tempdokumentinfo_wert_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("clsTempdokumentinfo_wert::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>iDokumentinfonr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iDokumentinfonr</LI>
' /// <LI>sInhalt</LI>
' /// <LI>bAktiv</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>bAktiv1</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>iDokumentinformationnr</LI>
' /// <LI>sDokumentid</LI>
' /// <LI>iVorlagenfeldnr</LI>
' /// </UL>
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
' /// </remarks>
Public Overrides Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Tempdokumentinfo_wert_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("Tempdokumentinfo_wert")
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentinfonr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentinfonr))
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_Tempdokumentinfo_wert_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iDokumentinfonr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumentinfonr"), Integer))
If dtToReturn.Rows(0)("inhalt") Is System.DBNull.Value Then
m_sInhalt = SqlString.Null
Else
m_sInhalt = New SqlString(CType(dtToReturn.Rows(0)("inhalt"), String))
End If
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
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)("aktiv1") Is System.DBNull.Value Then
m_bAktiv1 = SqlBoolean.Null
Else
m_bAktiv1 = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv1"), 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)("dokumentinformationnr") Is System.DBNull.Value Then
m_iDokumentinformationnr = SqlInt32.Null
Else
m_iDokumentinformationnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumentinformationnr"), Integer))
End If
If dtToReturn.Rows(0)("dokumentid") Is System.DBNull.Value Then
m_sDokumentid = SqlString.Null
Else
m_sDokumentid = New SqlString(CType(dtToReturn.Rows(0)("dokumentid"), String))
End If
If dtToReturn.Rows(0)("vorlagenfeldnr") Is System.DBNull.Value Then
m_iVorlagenfeldnr = SqlInt32.Null
Else
m_iVorlagenfeldnr = New SqlInt32(CType(dtToReturn.Rows(0)("vorlagenfeldnr"), 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("clsTempdokumentinfo_wert::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_Tempdokumentinfo_wert_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Tempdokumentinfo_wert")
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_Tempdokumentinfo_wert_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("clsTempdokumentinfo_wert::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 'dokumentinformationnr'
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iDokumentinformationnr. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Function SelectAllWdokumentinformationnrLogic() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Tempdokumentinfo_wert_SelectAllWdokumentinformationnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("Tempdokumentinfo_wert")
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentinformationnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentinformationnr))
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_Tempdokumentinfo_wert_SelectAllWdokumentinformationnrLogic' 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("clsTempdokumentinfo_wert::SelectAllWdokumentinformationnrLogic::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 [iDokumentinfonr]() As SqlInt32
Get
Return m_iDokumentinfonr
End Get
Set(ByVal Value As SqlInt32)
Dim iDokumentinfonrTmp As SqlInt32 = Value
If iDokumentinfonrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iDokumentinfonr", "iDokumentinfonr can't be NULL")
End If
m_iDokumentinfonr = Value
End Set
End Property
Public Property [sInhalt]() As SqlString
Get
Return m_sInhalt
End Get
Set(ByVal Value As SqlString)
m_sInhalt = Value
End Set
End Property
Public Property [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
Dim bAktivTmp As SqlBoolean = Value
If bAktivTmp.IsNull Then
Throw New ArgumentOutOfRangeException("bAktiv", "bAktiv can't be NULL")
End If
m_bAktiv = 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 [bAktiv1]() As SqlBoolean
Get
Return m_bAktiv1
End Get
Set(ByVal Value As SqlBoolean)
m_bAktiv1 = 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 [iDokumentinformationnr]() As SqlInt32
Get
Return m_iDokumentinformationnr
End Get
Set(ByVal Value As SqlInt32)
m_iDokumentinformationnr = Value
End Set
End Property
Public Property [iDokumentinformationnrOld]() As SqlInt32
Get
Return m_iDokumentinformationnrOld
End Get
Set(ByVal Value As SqlInt32)
m_iDokumentinformationnrOld = Value
End Set
End Property
Public Property [sDokumentid]() As SqlString
Get
Return m_sDokumentid
End Get
Set(ByVal Value As SqlString)
m_sDokumentid = Value
End Set
End Property
Public Property [iVorlagenfeldnr]() As SqlInt32
Get
Return m_iVorlagenfeldnr
End Get
Set(ByVal Value As SqlInt32)
m_iVorlagenfeldnr = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,530 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'Tempdokumentmutation_cold'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Samstag, 19. April 2003, 22:34:09
' // 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 'Tempdokumentmutation_cold'.
' /// </summary>
Public Class clsTempdokumentmutation_cold
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daStatusdatum, m_daErstellt_am, m_daMutationsdatum, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iNreintrag, m_iStatus, m_iMandantnr As SqlInt32
Private m_sDokumentid As SqlString
#End Region
' /// <summary>
' /// Purpose: Class constructor.
' /// </summary>
Public Sub New()
' // Nothing for now.
End Sub
' /// <summary>
' /// Purpose: Insert method. This method will insert one new row into the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iNreintrag</LI>
' /// <LI>daMutationsdatum</LI>
' /// <LI>iStatus</LI>
' /// <LI>daStatusdatum</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>sDokumentid. May be SqlString.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Tempdokumentmutation_cold_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutationsdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daMutationsdatum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dastatusdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daStatusdatum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 20, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = 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_Tempdokumentmutation_cold_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("clsTempdokumentmutation_cold::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>iNreintrag</LI>
' /// <LI>daMutationsdatum</LI>
' /// <LI>iStatus</LI>
' /// <LI>daStatusdatum</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>sDokumentid. May be SqlString.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Tempdokumentmutation_cold_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutationsdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daMutationsdatum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dastatusdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daStatusdatum))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 20, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = 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_Tempdokumentmutation_cold_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("clsTempdokumentmutation_cold::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>iNreintrag</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_Tempdokumentmutation_cold_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
scmCmdToExecute.Parameters.Add(New SqlParameter("@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_Tempdokumentmutation_cold_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("clsTempdokumentmutation_cold::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>iNreintrag</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iNreintrag</LI>
' /// <LI>daMutationsdatum</LI>
' /// <LI>iStatus</LI>
' /// <LI>daStatusdatum</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>sDokumentid</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_Tempdokumentmutation_cold_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Tempdokumentmutation_cold")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
scmCmdToExecute.Parameters.Add(new SqlParameter("@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_Tempdokumentmutation_cold_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iNreintrag = New SqlInt32(CType(dtToReturn.Rows(0)("nreintrag"), Integer))
m_daMutationsdatum = New SqlDateTime(CType(dtToReturn.Rows(0)("mutationsdatum"), Date))
m_iStatus = New SqlInt32(CType(dtToReturn.Rows(0)("status"), Integer))
m_daStatusdatum = New SqlDateTime(CType(dtToReturn.Rows(0)("statusdatum"), Date))
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)("dokumentid") Is System.DBNull.Value Then
m_sDokumentid = SqlString.Null
Else
m_sDokumentid = New SqlString(CType(dtToReturn.Rows(0)("dokumentid"), 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("clsTempdokumentmutation_cold::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_Tempdokumentmutation_cold_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("Tempdokumentmutation_cold")
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_Tempdokumentmutation_cold_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("clsTempdokumentmutation_cold::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 [iNreintrag]() As SqlInt32
Get
Return m_iNreintrag
End Get
Set(ByVal Value As SqlInt32)
Dim iNreintragTmp As SqlInt32 = Value
If iNreintragTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iNreintrag", "iNreintrag can't be NULL")
End If
m_iNreintrag = Value
End Set
End Property
Public Property [daMutationsdatum]() As SqlDateTime
Get
Return m_daMutationsdatum
End Get
Set(ByVal Value As SqlDateTime)
Dim daMutationsdatumTmp As SqlDateTime = Value
If daMutationsdatumTmp.IsNull Then
Throw New ArgumentOutOfRangeException("daMutationsdatum", "daMutationsdatum can't be NULL")
End If
m_daMutationsdatum = Value
End Set
End Property
Public Property [iStatus]() As SqlInt32
Get
Return m_iStatus
End Get
Set(ByVal Value As SqlInt32)
Dim iStatusTmp As SqlInt32 = Value
If iStatusTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iStatus", "iStatus can't be NULL")
End If
m_iStatus = Value
End Set
End Property
Public Property [daStatusdatum]() As SqlDateTime
Get
Return m_daStatusdatum
End Get
Set(ByVal Value As SqlDateTime)
Dim daStatusdatumTmp As SqlDateTime = Value
If daStatusdatumTmp.IsNull Then
Throw New ArgumentOutOfRangeException("daStatusdatum", "daStatusdatum can't be NULL")
End If
m_daStatusdatum = Value
End Set
End Property
Public Property [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr = Value
End Set
End Property
Public Property [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
m_bAktiv = Value
End Set
End Property
Public Property [daErstellt_am]() As SqlDateTime
Get
Return m_daErstellt_am
End Get
Set(ByVal Value As SqlDateTime)
m_daErstellt_am = Value
End Set
End Property
Public Property [daMutiert_am]() As SqlDateTime
Get
Return m_daMutiert_am
End Get
Set(ByVal Value As SqlDateTime)
m_daMutiert_am = Value
End Set
End Property
Public Property [iMutierer]() As SqlInt32
Get
Return m_iMutierer
End Get
Set(ByVal Value As SqlInt32)
m_iMutierer = Value
End Set
End Property
Public Property [sDokumentid]() As SqlString
Get
Return m_sDokumentid
End Get
Set(ByVal Value As SqlString)
m_sDokumentid = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,550 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'Tempdokumentzuordnungen'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Samstag, 19. April 2003, 22:34: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 'Tempdokumentzuordnungen'.
' /// </summary>
Public Class clsTempdokumentzuordnungen
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv, m_bUntergeordnet, m_bZugeordnet As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iMutierer, m_iNreintrag, m_iMandantnr As SqlInt32
Private m_sDokumentid2, m_sDokumentid, m_sDokumentid1 As SqlString
#End Region
' /// <summary>
' /// Purpose: Class constructor.
' /// </summary>
Public Sub New()
' // Nothing for now.
End Sub
' /// <summary>
' /// Purpose: Insert method. This method will insert one new row into the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iNreintrag</LI>
' /// <LI>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>bUntergeordnet</LI>
' /// <LI>bZugeordnet</LI>
' /// <LI>sDokumentid1. May be SqlString.Null</LI>
' /// <LI>sDokumentid. May be SqlString.Null</LI>
' /// <LI>sDokumentid2. 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_Tempdokumentzuordnungen_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
scmCmdToExecute.Parameters.Add(New SqlParameter("@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("@buntergeordnet", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bUntergeordnet))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bzugeordnet", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bZugeordnet))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid1", SqlDbType.VarChar, 20, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid2", SqlDbType.VarChar, 20, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid2))
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_Tempdokumentzuordnungen_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("clsTempdokumentzuordnungen::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>iNreintrag</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>bUntergeordnet</LI>
' /// <LI>bZugeordnet</LI>
' /// <LI>sDokumentid1. May be SqlString.Null</LI>
' /// <LI>sDokumentid. May be SqlString.Null</LI>
' /// <LI>sDokumentid2. 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_Tempdokumentzuordnungen_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
scmCmdToExecute.Parameters.Add(New SqlParameter("@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("@buntergeordnet", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bUntergeordnet))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bzugeordnet", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bZugeordnet))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid1", SqlDbType.VarChar, 20, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid2", SqlDbType.VarChar, 20, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid2))
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_Tempdokumentzuordnungen_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("clsTempdokumentzuordnungen::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>iNreintrag</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_Tempdokumentzuordnungen_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
scmCmdToExecute.Parameters.Add(New SqlParameter("@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_Tempdokumentzuordnungen_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("clsTempdokumentzuordnungen::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>iNreintrag</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iNreintrag</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>bUntergeordnet</LI>
' /// <LI>bZugeordnet</LI>
' /// <LI>sDokumentid1</LI>
' /// <LI>sDokumentid</LI>
' /// <LI>sDokumentid2</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_Tempdokumentzuordnungen_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Tempdokumentzuordnungen")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
scmCmdToExecute.Parameters.Add(new SqlParameter("@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_Tempdokumentzuordnungen_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iNreintrag = New SqlInt32(CType(dtToReturn.Rows(0)("nreintrag"), 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
m_bUntergeordnet = New SqlBoolean(CType(dtToReturn.Rows(0)("untergeordnet"), Boolean))
m_bZugeordnet = New SqlBoolean(CType(dtToReturn.Rows(0)("zugeordnet"), Boolean))
If dtToReturn.Rows(0)("dokumentid1") Is System.DBNull.Value Then
m_sDokumentid1 = SqlString.Null
Else
m_sDokumentid1 = New SqlString(CType(dtToReturn.Rows(0)("dokumentid1"), String))
End If
If dtToReturn.Rows(0)("dokumentid") Is System.DBNull.Value Then
m_sDokumentid = SqlString.Null
Else
m_sDokumentid = New SqlString(CType(dtToReturn.Rows(0)("dokumentid"), String))
End If
If dtToReturn.Rows(0)("dokumentid2") Is System.DBNull.Value Then
m_sDokumentid2 = SqlString.Null
Else
m_sDokumentid2 = New SqlString(CType(dtToReturn.Rows(0)("dokumentid2"), 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("clsTempdokumentzuordnungen::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_Tempdokumentzuordnungen_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("Tempdokumentzuordnungen")
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_Tempdokumentzuordnungen_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("clsTempdokumentzuordnungen::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 [iNreintrag]() As SqlInt32
Get
Return m_iNreintrag
End Get
Set(ByVal Value As SqlInt32)
Dim iNreintragTmp As SqlInt32 = Value
If iNreintragTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iNreintrag", "iNreintrag can't be NULL")
End If
m_iNreintrag = Value
End Set
End Property
Public Property [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 [bUntergeordnet]() As SqlBoolean
Get
Return m_bUntergeordnet
End Get
Set(ByVal Value As SqlBoolean)
Dim bUntergeordnetTmp As SqlBoolean = Value
If bUntergeordnetTmp.IsNull Then
Throw New ArgumentOutOfRangeException("bUntergeordnet", "bUntergeordnet can't be NULL")
End If
m_bUntergeordnet = Value
End Set
End Property
Public Property [bZugeordnet]() As SqlBoolean
Get
Return m_bZugeordnet
End Get
Set(ByVal Value As SqlBoolean)
Dim bZugeordnetTmp As SqlBoolean = Value
If bZugeordnetTmp.IsNull Then
Throw New ArgumentOutOfRangeException("bZugeordnet", "bZugeordnet can't be NULL")
End If
m_bZugeordnet = Value
End Set
End Property
Public Property [sDokumentid1]() As SqlString
Get
Return m_sDokumentid1
End Get
Set(ByVal Value As SqlString)
m_sDokumentid1 = Value
End Set
End Property
Public Property [sDokumentid]() As SqlString
Get
Return m_sDokumentid
End Get
Set(ByVal Value As SqlString)
m_sDokumentid = Value
End Set
End Property
Public Property [sDokumentid2]() As SqlString
Get
Return m_sDokumentid2
End Get
Set(ByVal Value As SqlString)
m_sDokumentid2 = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,511 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'Tempnotizen'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Samstag, 19. April 2003, 22:34:15
' // 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 'Tempnotizen'.
' /// </summary>
Public Class clsTempnotizen
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iMandantnr, m_iNotiznr As SqlInt32
Private m_sDokumentid, m_sNotiz, m_sBetreff 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>sDokumentid. May be SqlString.Null</LI>
' /// <LI>sBetreff. May be SqlString.Null</LI>
' /// <LI>sNotiz. 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>iNotiznr</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Tempnotizen_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbetreff", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBetreff))
scmCmdToExecute.Parameters.Add(New SqlParameter("@snotiz", SqlDbType.VarChar, 2048, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNotiz))
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("@inotiznr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iNotiznr))
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_iNotiznr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@inotiznr").Value, SqlInt32))
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Tempnotizen_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("clsTempnotizen::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>iNotiznr</LI>
' /// <LI>sDokumentid. May be SqlString.Null</LI>
' /// <LI>sBetreff. May be SqlString.Null</LI>
' /// <LI>sNotiz. 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_Tempnotizen_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inotiznr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNotiznr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbetreff", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBetreff))
scmCmdToExecute.Parameters.Add(New SqlParameter("@snotiz", SqlDbType.VarChar, 2048, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNotiz))
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_Tempnotizen_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("clsTempnotizen::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>iNotiznr</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_Tempnotizen_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@inotiznr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNotiznr))
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_Tempnotizen_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("clsTempnotizen::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>iNotiznr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iNotiznr</LI>
' /// <LI>sDokumentid</LI>
' /// <LI>sBetreff</LI>
' /// <LI>sNotiz</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_Tempnotizen_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Tempnotizen")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@inotiznr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNotiznr))
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_Tempnotizen_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iNotiznr = New SqlInt32(CType(dtToReturn.Rows(0)("notiznr"), Integer))
If dtToReturn.Rows(0)("dokumentid") Is System.DBNull.Value Then
m_sDokumentid = SqlString.Null
Else
m_sDokumentid = New SqlString(CType(dtToReturn.Rows(0)("dokumentid"), String))
End If
If dtToReturn.Rows(0)("betreff") Is System.DBNull.Value Then
m_sBetreff = SqlString.Null
Else
m_sBetreff = New SqlString(CType(dtToReturn.Rows(0)("betreff"), String))
End If
If dtToReturn.Rows(0)("notiz") Is System.DBNull.Value Then
m_sNotiz = SqlString.Null
Else
m_sNotiz = New SqlString(CType(dtToReturn.Rows(0)("notiz"), 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("clsTempnotizen::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_Tempnotizen_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("Tempnotizen")
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_Tempnotizen_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("clsTempnotizen::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 [iNotiznr]() As SqlInt32
Get
Return m_iNotiznr
End Get
Set(ByVal Value As SqlInt32)
Dim iNotiznrTmp As SqlInt32 = Value
If iNotiznrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iNotiznr", "iNotiznr can't be NULL")
End If
m_iNotiznr = Value
End Set
End Property
Public Property [sDokumentid]() As SqlString
Get
Return m_sDokumentid
End Get
Set(ByVal Value As SqlString)
m_sDokumentid = Value
End Set
End Property
Public Property [sBetreff]() As SqlString
Get
Return m_sBetreff
End Get
Set(ByVal Value As SqlString)
m_sBetreff = Value
End Set
End Property
Public Property [sNotiz]() As SqlString
Get
Return m_sNotiz
End Get
Set(ByVal Value As SqlString)
m_sNotiz = 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

View File

@@ -0,0 +1,490 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'Tempstatushistory'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Samstag, 19. April 2003, 22:34:17
' // 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 'Tempstatushistory'.
' /// </summary>
Public Class clsTempstatushistory
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iStatus, m_iMutierer, m_iStatushistorynr, m_iMandantnr As SqlInt32
Private m_sDokumentid 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>iStatushistorynr</LI>
' /// <LI>iStatus</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>sDokumentid. May be SqlString.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Tempstatushistory_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatushistorynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatushistorynr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = 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_Tempstatushistory_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("clsTempstatushistory::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>iStatushistorynr</LI>
' /// <LI>iStatus</LI>
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// <LI>sDokumentid. May be SqlString.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Tempstatushistory_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatushistorynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatushistorynr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = 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_Tempstatushistory_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("clsTempstatushistory::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>iStatushistorynr</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_Tempstatushistory_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatushistorynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatushistorynr))
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_Tempstatushistory_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("clsTempstatushistory::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>iStatushistorynr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iStatushistorynr</LI>
' /// <LI>iStatus</LI>
' /// <LI>iMandantnr</LI>
' /// <LI>bAktiv</LI>
' /// <LI>daErstellt_am</LI>
' /// <LI>daMutiert_am</LI>
' /// <LI>iMutierer</LI>
' /// <LI>sDokumentid</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_Tempstatushistory_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Tempstatushistory")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@istatushistorynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatushistorynr))
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_Tempstatushistory_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iStatushistorynr = New SqlInt32(CType(dtToReturn.Rows(0)("statushistorynr"), Integer))
m_iStatus = New SqlInt32(CType(dtToReturn.Rows(0)("status"), 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)("dokumentid") Is System.DBNull.Value Then
m_sDokumentid = SqlString.Null
Else
m_sDokumentid = New SqlString(CType(dtToReturn.Rows(0)("dokumentid"), 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("clsTempstatushistory::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_Tempstatushistory_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("Tempstatushistory")
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_Tempstatushistory_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("clsTempstatushistory::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 [iStatushistorynr]() As SqlInt32
Get
Return m_iStatushistorynr
End Get
Set(ByVal Value As SqlInt32)
Dim iStatushistorynrTmp As SqlInt32 = Value
If iStatushistorynrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iStatushistorynr", "iStatushistorynr can't be NULL")
End If
m_iStatushistorynr = Value
End Set
End Property
Public Property [iStatus]() As SqlInt32
Get
Return m_iStatus
End Get
Set(ByVal Value As SqlInt32)
Dim iStatusTmp As SqlInt32 = Value
If iStatusTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iStatus", "iStatus can't be NULL")
End If
m_iStatus = Value
End Set
End Property
Public Property [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr = Value
End Set
End Property
Public Property [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
m_bAktiv = Value
End Set
End Property
Public Property [daErstellt_am]() As SqlDateTime
Get
Return m_daErstellt_am
End Get
Set(ByVal Value As SqlDateTime)
m_daErstellt_am = Value
End Set
End Property
Public Property [daMutiert_am]() As SqlDateTime
Get
Return m_daMutiert_am
End Get
Set(ByVal Value As SqlDateTime)
m_daMutiert_am = Value
End Set
End Property
Public Property [iMutierer]() As SqlInt32
Get
Return m_iMutierer
End Get
Set(ByVal Value As SqlInt32)
m_iMutierer = Value
End Set
End Property
Public Property [sDokumentid]() As SqlString
Get
Return m_sDokumentid
End Get
Set(ByVal Value As SqlString)
m_sDokumentid = Value
End Set
End Property
#End Region
End Class
End Namespace

File diff suppressed because it is too large Load Diff

View 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

View File

@@ -0,0 +1,469 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'vorlagenfeldbezeichnung'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 11. Februar 2003, 21:16:40
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace edokadb
' /// <summary>
' /// Purpose: Data Access class for the table 'vorlagenfeldbezeichnung'.
' /// </summary>
Public Class clsVorlagenfeldbezeichnung
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iVorlagenfeldbezeichnungnr, m_iVorlagenfeld, m_iSprache As SqlInt32
Private m_sBezeichnung As SqlString
#End Region
' /// <summary>
' /// Purpose: Class constructor.
' /// </summary>
Public Sub New()
' // Nothing for now.
End Sub
' /// <summary>
' /// Purpose: Insert method. This method will insert one new row into the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iVorlagenfeldbezeichnungnr</LI>
' /// <LI>iVorlagenfeld. May be SqlInt32.Null</LI>
' /// <LI>iSprache. May be SqlInt32.Null</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// </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_vorlagenfeldbezeichnung_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ivorlagenfeldbezeichnungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iVorlagenfeldbezeichnungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ivorlagenfeld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVorlagenfeld))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(new SqlParameter("@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_vorlagenfeldbezeichnung_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("clsVorlagenfeldbezeichnung::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>iVorlagenfeldbezeichnungnr</LI>
' /// <LI>iVorlagenfeld. May be SqlInt32.Null</LI>
' /// <LI>iSprache. May be SqlInt32.Null</LI>
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
' /// </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_vorlagenfeldbezeichnung_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ivorlagenfeldbezeichnungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iVorlagenfeldbezeichnungnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ivorlagenfeld", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVorlagenfeld))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
scmCmdToExecute.Parameters.Add(new SqlParameter("@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_vorlagenfeldbezeichnung_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("clsVorlagenfeldbezeichnung::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>iVorlagenfeldbezeichnungnr</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_vorlagenfeldbezeichnung_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ivorlagenfeldbezeichnungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iVorlagenfeldbezeichnungnr))
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_vorlagenfeldbezeichnung_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("clsVorlagenfeldbezeichnung::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>iVorlagenfeldbezeichnungnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iVorlagenfeldbezeichnungnr</LI>
' /// <LI>iVorlagenfeld</LI>
' /// <LI>iSprache</LI>
' /// <LI>sBezeichnung</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_vorlagenfeldbezeichnung_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("vorlagenfeldbezeichnung")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@ivorlagenfeldbezeichnungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iVorlagenfeldbezeichnungnr))
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_vorlagenfeldbezeichnung_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iVorlagenfeldbezeichnungnr = New SqlInt32(CType(dtToReturn.Rows(0)("vorlagenfeldbezeichnungnr"), Integer))
If dtToReturn.Rows(0)("vorlagenfeld") Is System.DBNull.Value Then
m_iVorlagenfeld = SqlInt32.Null
Else
m_iVorlagenfeld = New SqlInt32(CType(dtToReturn.Rows(0)("vorlagenfeld"), 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
If dtToReturn.Rows(0)("bezeichnung") Is System.DBNull.Value Then
m_sBezeichnung = SqlString.Null
Else
m_sBezeichnung = New SqlString(CType(dtToReturn.Rows(0)("bezeichnung"), String))
End If
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
m_daErstellt_am = SqlDateTime.Null
Else
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
End If
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
m_daMutiert_am = SqlDateTime.Null
Else
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
End If
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
m_iMutierer = SqlInt32.Null
Else
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
End If
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsVorlagenfeldbezeichnung::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_vorlagenfeldbezeichnung_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("vorlagenfeldbezeichnung")
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_vorlagenfeldbezeichnung_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("clsVorlagenfeldbezeichnung::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 [iVorlagenfeldbezeichnungnr]() As SqlInt32
Get
Return m_iVorlagenfeldbezeichnungnr
End Get
Set(ByVal Value As SqlInt32)
Dim iVorlagenfeldbezeichnungnrTmp As SqlInt32 = Value
If iVorlagenfeldbezeichnungnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iVorlagenfeldbezeichnungnr", "iVorlagenfeldbezeichnungnr can't be NULL")
End If
m_iVorlagenfeldbezeichnungnr = Value
End Set
End Property
Public Property [iVorlagenfeld]() As SqlInt32
Get
Return m_iVorlagenfeld
End Get
Set(ByVal Value As SqlInt32)
m_iVorlagenfeld = 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 [sBezeichnung]() As SqlString
Get
Return m_sBezeichnung
End Get
Set(ByVal Value As SqlString)
m_sBezeichnung = Value
End Set
End Property
Public Property [daErstellt_am]() As SqlDateTime
Get
Return m_daErstellt_am
End Get
Set(ByVal Value As SqlDateTime)
m_daErstellt_am = Value
End Set
End Property
Public Property [daMutiert_am]() As SqlDateTime
Get
Return m_daMutiert_am
End Get
Set(ByVal Value As SqlDateTime)
m_daMutiert_am = Value
End Set
End Property
Public Property [iMutierer]() As SqlInt32
Get
Return m_iMutierer
End Get
Set(ByVal Value As SqlInt32)
m_iMutierer = Value
End Set
End Property
#End Region
End Class
End Namespace

View 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

View File

@@ -0,0 +1,449 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'WindowPositions'
' // Generated by LLBLGen v1.2.1045.38210 Final on: Montag, 3. Februar 2003, 22:23:16
' // 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 'WindowPositions'.
' /// </summary>
Public Class clsWindowPositions
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_iTopleft, m_iWidth, m_iHeight, m_iEintragnr, m_iMitarbeiternr As SqlInt32
Private m_sWindow 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. May be SqlInt32.Null</LI>
' /// <LI>sWindow. May be SqlString.Null</LI>
' /// <LI>iTopleft. May be SqlInt32.Null</LI>
' /// <LI>iWidth. May be SqlInt32.Null</LI>
' /// <LI>iHeight. May be SqlInt32.Null</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iEintragnr</LI>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_WindowPositions_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, True, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@swindow", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sWindow))
scmCmdToExecute.Parameters.Add(New SqlParameter("@itopleft", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iTopleft))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iwidth", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iWidth))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iheight", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iHeight))
scmCmdToExecute.Parameters.Add(new SqlParameter("@ieintragnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iEintragnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iEintragnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@ieintragnr").Value, SqlInt32))
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_WindowPositions_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("clsWindowPositions::Insert::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: Update method. This method will Update one existing row in the database.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iEintragnr</LI>
' /// <LI>iMitarbeiternr. May be SqlInt32.Null</LI>
' /// <LI>sWindow. May be SqlString.Null</LI>
' /// <LI>iTopleft. May be SqlInt32.Null</LI>
' /// <LI>iWidth. May be SqlInt32.Null</LI>
' /// <LI>iHeight. 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_WindowPositions_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ieintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iEintragnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@swindow", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sWindow))
scmCmdToExecute.Parameters.Add(New SqlParameter("@itopleft", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iTopleft))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iwidth", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iWidth))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iheight", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iHeight))
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_WindowPositions_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("clsWindowPositions::Update::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
' /// </summary>
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iEintragnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// </UL>
' /// </remarks>
Public Overrides Function Delete() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_WindowPositions_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ieintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iEintragnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_WindowPositions_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("clsWindowPositions::Delete::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
' /// <summary>
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
' /// </summary>
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
' /// <remarks>
' /// Properties needed for this method:
' /// <UL>
' /// <LI>iEintragnr</LI>
' /// </UL>
' /// Properties set after a succesful call of this method:
' /// <UL>
' /// <LI>iErrorCode</LI>
' /// <LI>iEintragnr</LI>
' /// <LI>iMitarbeiternr</LI>
' /// <LI>sWindow</LI>
' /// <LI>iTopleft</LI>
' /// <LI>iWidth</LI>
' /// <LI>iHeight</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_WindowPositions_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("WindowPositions")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@ieintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iEintragnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
sdaAdapter.Fill(dtToReturn)
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_WindowPositions_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iEintragnr = New SqlInt32(CType(dtToReturn.Rows(0)("eintragnr"), Integer))
If dtToReturn.Rows(0)("mitarbeiternr") Is System.DBNull.Value Then
m_iMitarbeiternr = SqlInt32.Null
Else
m_iMitarbeiternr = New SqlInt32(CType(dtToReturn.Rows(0)("mitarbeiternr"), Integer))
End If
If dtToReturn.Rows(0)("window") Is System.DBNull.Value Then
m_sWindow = SqlString.Null
Else
m_sWindow = New SqlString(CType(dtToReturn.Rows(0)("window"), String))
End If
If dtToReturn.Rows(0)("topleft") Is System.DBNull.Value Then
m_iTopleft = SqlInt32.Null
Else
m_iTopleft = New SqlInt32(CType(dtToReturn.Rows(0)("topleft"), Integer))
End If
If dtToReturn.Rows(0)("width") Is System.DBNull.Value Then
m_iWidth = SqlInt32.Null
Else
m_iWidth = New SqlInt32(CType(dtToReturn.Rows(0)("width"), Integer))
End If
If dtToReturn.Rows(0)("height") Is System.DBNull.Value Then
m_iHeight = SqlInt32.Null
Else
m_iHeight = New SqlInt32(CType(dtToReturn.Rows(0)("height"), 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("clsWindowPositions::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_WindowPositions_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("WindowPositions")
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_WindowPositions_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("clsWindowPositions::SelectAll::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
#Region " Class Property Declarations "
Public Property [iEintragnr]() As SqlInt32
Get
Return m_iEintragnr
End Get
Set(ByVal Value As SqlInt32)
Dim iEintragnrTmp As SqlInt32 = Value
If iEintragnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iEintragnr", "iEintragnr can't be NULL")
End If
m_iEintragnr = Value
End Set
End Property
Public Property [iMitarbeiternr]() As SqlInt32
Get
Return m_iMitarbeiternr
End Get
Set(ByVal Value As SqlInt32)
m_iMitarbeiternr = Value
End Set
End Property
Public Property [sWindow]() As SqlString
Get
Return m_sWindow
End Get
Set(ByVal Value As SqlString)
m_sWindow = Value
End Set
End Property
Public Property [iTopleft]() As SqlInt32
Get
Return m_iTopleft
End Get
Set(ByVal Value As SqlInt32)
m_iTopleft = Value
End Set
End Property
Public Property [iWidth]() As SqlInt32
Get
Return m_iWidth
End Get
Set(ByVal Value As SqlInt32)
m_iWidth = Value
End Set
End Property
Public Property [iHeight]() As SqlInt32
Get
Return m_iHeight
End Get
Set(ByVal Value As SqlInt32)
m_iHeight = Value
End Set
End Property
#End Region
End Class
End Namespace