You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
235 lines
7.7 KiB
235 lines
7.7 KiB
' ///////////////////////////////////////////////////////////////////////////
|
|
' // Description: Data Access class for the table 'uvm_data'
|
|
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 27. Juli 2004, 20:30: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 'uvm_data'.
|
|
' /// </summary>
|
|
Public Class clsUvm_data
|
|
Inherits clsDBInteractionBase
|
|
|
|
#Region " Class Member Declarations "
|
|
|
|
Private m_daInserttimestamp As SqlDateTime
|
|
Private m_sDMERS00, m_sDMARC00, m_sNRAUF00, m_sNRDOT00, m_sNRDOC00, m_sNRPAR00 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>sNRDOT00. May be SqlString.Null</LI>
|
|
' /// <LI>sNRDOC00. May be SqlString.Null</LI>
|
|
' /// <LI>sNRPAR00. May be SqlString.Null</LI>
|
|
' /// <LI>sNRAUF00. May be SqlString.Null</LI>
|
|
' /// <LI>sDMERS00. May be SqlString.Null</LI>
|
|
' /// <LI>sDMARC00. May be SqlString.Null</LI>
|
|
' /// <LI>daInserttimestamp. May be SqlDateTime.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_uvm_data_Insert]"
|
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
|
|
|
' // Use base class' connection object
|
|
scmCmdToExecute.Connection = m_scoMainConnection
|
|
|
|
Try
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRDOT00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRDOT00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRDOC00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRDOC00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRPAR00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRPAR00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNRAUF00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNRAUF00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDMERS00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDMERS00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDMARC00", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDMARC00))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@dainserttimestamp", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daInserttimestamp))
|
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
|
|
|
If m_bMainConnectionIsCreatedLocal Then
|
|
' // Open connection.
|
|
m_scoMainConnection.Open()
|
|
Else
|
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
|
End If
|
|
End If
|
|
|
|
' // Execute query.
|
|
scmCmdToExecute.ExecuteNonQuery()
|
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
|
|
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
|
' // Throw error.
|
|
Throw New Exception("Stored Procedure 'pr_uvm_data_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("clsUvm_data::Insert::Error occured.", ex)
|
|
Finally
|
|
If m_bMainConnectionIsCreatedLocal Then
|
|
' // Close connection.
|
|
m_scoMainConnection.Close()
|
|
End If
|
|
scmCmdToExecute.Dispose()
|
|
End Try
|
|
End Function
|
|
|
|
|
|
' /// <summary>
|
|
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
|
' /// </summary>
|
|
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
|
' /// <remarks>
|
|
' /// Properties set after a succesful call of this method:
|
|
' /// <UL>
|
|
' /// <LI>iErrorCode</LI>
|
|
' /// </UL>
|
|
' /// </remarks>
|
|
Overrides Public Function SelectAll() As DataTable
|
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
|
scmCmdToExecute.CommandText = "dbo.[pr_uvm_data_SelectAll]"
|
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
|
Dim dtToReturn As DataTable = new DataTable("uvm_data")
|
|
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
|
|
|
' // Use base class' connection object
|
|
scmCmdToExecute.Connection = m_scoMainConnection
|
|
|
|
Try
|
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
|
|
|
If m_bMainConnectionIsCreatedLocal Then
|
|
' // Open connection.
|
|
m_scoMainConnection.Open()
|
|
Else
|
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
|
End If
|
|
End If
|
|
|
|
' // Execute query.
|
|
sdaAdapter.Fill(dtToReturn)
|
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
|
|
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
|
' // Throw error.
|
|
Throw New Exception("Stored Procedure 'pr_uvm_data_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("clsUvm_data::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 [sNRDOT00]() As SqlString
|
|
Get
|
|
Return m_sNRDOT00
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
m_sNRDOT00 = 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 [sNRPAR00]() As SqlString
|
|
Get
|
|
Return m_sNRPAR00
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
m_sNRPAR00 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [sNRAUF00]() As SqlString
|
|
Get
|
|
Return m_sNRAUF00
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
m_sNRAUF00 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [sDMERS00]() As SqlString
|
|
Get
|
|
Return m_sDMERS00
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
m_sDMERS00 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [sDMARC00]() As SqlString
|
|
Get
|
|
Return m_sDMARC00
|
|
End Get
|
|
Set(ByVal Value As SqlString)
|
|
m_sDMARC00 = Value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property [daInserttimestamp]() As SqlDateTime
|
|
Get
|
|
Return m_daInserttimestamp
|
|
End Get
|
|
Set(ByVal Value As SqlDateTime)
|
|
m_daInserttimestamp = Value
|
|
End Set
|
|
End Property
|
|
|
|
#End Region
|
|
|
|
End Class
|
|
End Namespace
|