Update Version 2.3
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
-- ================================================================================================================
|
||||
-- Stored Procedures generated by LLBLGen v1.21.2003.712 Final on Samstag, 16. Januar 2021, 08:03:58
|
||||
-- Stored Procedures generated by LLBLGen v1.21.2003.712 Final on Montag, 17. Mai 2021, 17:24:52
|
||||
-- For the Low Level Business Logic Layer for the database 'beA_PROD'
|
||||
-- ================================================================================================================
|
||||
SET NOCOUNT ON
|
||||
@@ -8,67 +8,59 @@ USE [beA_PROD]
|
||||
GO
|
||||
|
||||
-- ========================================================================================================
|
||||
-- [Stored Procedures generated for table: Application]
|
||||
-- [Stored Procedures generated for table: MailTexte]
|
||||
GO
|
||||
|
||||
-- //// Insert Stored procedure.
|
||||
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_Application_Insert]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_Application_Insert]
|
||||
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_MailTexte_Insert]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_MailTexte_Insert]
|
||||
GO
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
-- Stored procedure that will insert 1 row in the table 'Application'
|
||||
-- Gets: @iapplikationsnr int
|
||||
-- Gets: @sversion varchar(4)
|
||||
-- Gets: @bshowlogin bit
|
||||
-- Gets: @imandantnr int
|
||||
-- Gets: @baktiv bit
|
||||
-- Stored procedure that will insert 1 row in the table 'MailTexte'
|
||||
-- Gets: @iid int
|
||||
-- Gets: @sBeschreibung varchar(255)
|
||||
-- Gets: @sBetreff varchar(255)
|
||||
-- Gets: @sInhalt varchar(2048)
|
||||
-- Gets: @daerstellt_am datetime
|
||||
-- Gets: @damutiert_am datetime
|
||||
-- Gets: @imutierer int
|
||||
-- Gets: @stmp_filepath varchar(255)
|
||||
-- Gets: @sTag_Externe_MA varchar(255)
|
||||
-- Gets: @baktiv bit
|
||||
-- Returns: @iErrorCode int
|
||||
---------------------------------------------------------------------------------
|
||||
CREATE PROCEDURE [dbo].[pr_Application_Insert]
|
||||
@iapplikationsnr int,
|
||||
@sversion varchar(4),
|
||||
@bshowlogin bit,
|
||||
@imandantnr int,
|
||||
@baktiv bit,
|
||||
CREATE PROCEDURE [dbo].[pr_MailTexte_Insert]
|
||||
@iid int,
|
||||
@sBeschreibung varchar(255),
|
||||
@sBetreff varchar(255),
|
||||
@sInhalt varchar(2048),
|
||||
@daerstellt_am datetime,
|
||||
@damutiert_am datetime,
|
||||
@imutierer int,
|
||||
@stmp_filepath varchar(255),
|
||||
@sTag_Externe_MA varchar(255),
|
||||
@baktiv bit,
|
||||
@iErrorCode int OUTPUT
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
-- INSERT a new row in the table.
|
||||
INSERT [dbo].[Application]
|
||||
INSERT [dbo].[MailTexte]
|
||||
(
|
||||
[applikationsnr],
|
||||
[version],
|
||||
[showlogin],
|
||||
[mandantnr],
|
||||
[aktiv],
|
||||
[id],
|
||||
[Beschreibung],
|
||||
[Betreff],
|
||||
[Inhalt],
|
||||
[erstellt_am],
|
||||
[mutiert_am],
|
||||
[mutierer],
|
||||
[tmp_filepath],
|
||||
[Tag_Externe_MA]
|
||||
[aktiv]
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
@iapplikationsnr,
|
||||
@sversion,
|
||||
@bshowlogin,
|
||||
@imandantnr,
|
||||
@baktiv,
|
||||
@iid,
|
||||
@sBeschreibung,
|
||||
@sBetreff,
|
||||
@sInhalt,
|
||||
@daerstellt_am,
|
||||
@damutiert_am,
|
||||
@imutierer,
|
||||
@stmp_filepath,
|
||||
@sTag_Externe_MA
|
||||
@baktiv
|
||||
)
|
||||
-- Get the Error Code for the statement just executed.
|
||||
SELECT @iErrorCode=@@ERROR
|
||||
@@ -76,147 +68,137 @@ GO
|
||||
|
||||
|
||||
-- //// Update Stored procedure for updating one single row.
|
||||
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_Application_Update]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_Application_Update]
|
||||
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_MailTexte_Update]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_MailTexte_Update]
|
||||
GO
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
-- Stored procedure that will update an existing row in the table 'Application'
|
||||
-- Gets: @iapplikationsnr int
|
||||
-- Gets: @sversion varchar(4)
|
||||
-- Gets: @bshowlogin bit
|
||||
-- Gets: @imandantnr int
|
||||
-- Gets: @baktiv bit
|
||||
-- Stored procedure that will update an existing row in the table 'MailTexte'
|
||||
-- Gets: @iid int
|
||||
-- Gets: @sBeschreibung varchar(255)
|
||||
-- Gets: @sBetreff varchar(255)
|
||||
-- Gets: @sInhalt varchar(2048)
|
||||
-- Gets: @daerstellt_am datetime
|
||||
-- Gets: @damutiert_am datetime
|
||||
-- Gets: @imutierer int
|
||||
-- Gets: @stmp_filepath varchar(255)
|
||||
-- Gets: @sTag_Externe_MA varchar(255)
|
||||
-- Gets: @baktiv bit
|
||||
-- Returns: @iErrorCode int
|
||||
---------------------------------------------------------------------------------
|
||||
CREATE PROCEDURE [dbo].[pr_Application_Update]
|
||||
@iapplikationsnr int,
|
||||
@sversion varchar(4),
|
||||
@bshowlogin bit,
|
||||
@imandantnr int,
|
||||
@baktiv bit,
|
||||
CREATE PROCEDURE [dbo].[pr_MailTexte_Update]
|
||||
@iid int,
|
||||
@sBeschreibung varchar(255),
|
||||
@sBetreff varchar(255),
|
||||
@sInhalt varchar(2048),
|
||||
@daerstellt_am datetime,
|
||||
@damutiert_am datetime,
|
||||
@imutierer int,
|
||||
@stmp_filepath varchar(255),
|
||||
@sTag_Externe_MA varchar(255),
|
||||
@baktiv bit,
|
||||
@iErrorCode int OUTPUT
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
-- UPDATE an existing row in the table.
|
||||
UPDATE [dbo].[Application]
|
||||
UPDATE [dbo].[MailTexte]
|
||||
SET
|
||||
[version] = @sversion,
|
||||
[showlogin] = @bshowlogin,
|
||||
[mandantnr] = @imandantnr,
|
||||
[aktiv] = @baktiv,
|
||||
[Beschreibung] = @sBeschreibung,
|
||||
[Betreff] = @sBetreff,
|
||||
[Inhalt] = @sInhalt,
|
||||
[erstellt_am] = @daerstellt_am,
|
||||
[mutiert_am] = @damutiert_am,
|
||||
[mutierer] = @imutierer,
|
||||
[tmp_filepath] = @stmp_filepath,
|
||||
[Tag_Externe_MA] = @sTag_Externe_MA
|
||||
[aktiv] = @baktiv
|
||||
WHERE
|
||||
[applikationsnr] = @iapplikationsnr
|
||||
[id] = @iid
|
||||
-- Get the Error Code for the statement just executed.
|
||||
SELECT @iErrorCode=@@ERROR
|
||||
GO
|
||||
|
||||
|
||||
-- //// Delete Stored procedure using Primary Key.
|
||||
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_Application_Delete]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_Application_Delete]
|
||||
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_MailTexte_Delete]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_MailTexte_Delete]
|
||||
GO
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
-- Stored procedure that will delete an existing row from the table 'Application'
|
||||
-- Stored procedure that will delete an existing row from the table 'MailTexte'
|
||||
-- using the Primary Key.
|
||||
-- Gets: @iapplikationsnr int
|
||||
-- Gets: @iid int
|
||||
-- Returns: @iErrorCode int
|
||||
---------------------------------------------------------------------------------
|
||||
CREATE PROCEDURE [dbo].[pr_Application_Delete]
|
||||
@iapplikationsnr int,
|
||||
CREATE PROCEDURE [dbo].[pr_MailTexte_Delete]
|
||||
@iid int,
|
||||
@iErrorCode int OUTPUT
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
-- DELETE an existing row from the table.
|
||||
DELETE FROM [dbo].[Application]
|
||||
DELETE FROM [dbo].[MailTexte]
|
||||
WHERE
|
||||
[applikationsnr] = @iapplikationsnr
|
||||
[id] = @iid
|
||||
-- Get the Error Code for the statement just executed.
|
||||
SELECT @iErrorCode=@@ERROR
|
||||
GO
|
||||
|
||||
|
||||
-- //// Select Stored procedure, based on Primary Key.
|
||||
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_Application_SelectOne]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_Application_SelectOne]
|
||||
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_MailTexte_SelectOne]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_MailTexte_SelectOne]
|
||||
GO
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
-- Stored procedure that will select an existing row from the table 'Application'
|
||||
-- Stored procedure that will select an existing row from the table 'MailTexte'
|
||||
-- based on the Primary Key.
|
||||
-- Gets: @iapplikationsnr int
|
||||
-- Gets: @iid int
|
||||
-- Returns: @iErrorCode int
|
||||
---------------------------------------------------------------------------------
|
||||
CREATE PROCEDURE [dbo].[pr_Application_SelectOne]
|
||||
@iapplikationsnr int,
|
||||
CREATE PROCEDURE [dbo].[pr_MailTexte_SelectOne]
|
||||
@iid int,
|
||||
@iErrorCode int OUTPUT
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
-- SELECT an existing row from the table.
|
||||
SELECT
|
||||
[applikationsnr],
|
||||
[version],
|
||||
[showlogin],
|
||||
[mandantnr],
|
||||
[aktiv],
|
||||
[id],
|
||||
[Beschreibung],
|
||||
[Betreff],
|
||||
[Inhalt],
|
||||
[erstellt_am],
|
||||
[mutiert_am],
|
||||
[mutierer],
|
||||
[tmp_filepath],
|
||||
[Tag_Externe_MA]
|
||||
FROM [dbo].[Application]
|
||||
[aktiv]
|
||||
FROM [dbo].[MailTexte]
|
||||
WHERE
|
||||
[applikationsnr] = @iapplikationsnr
|
||||
[id] = @iid
|
||||
-- Get the Error Code for the statement just executed.
|
||||
SELECT @iErrorCode=@@ERROR
|
||||
GO
|
||||
|
||||
|
||||
-- //// Select All Stored procedure.
|
||||
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_Application_SelectAll]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_Application_SelectAll]
|
||||
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pr_MailTexte_SelectAll]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[pr_MailTexte_SelectAll]
|
||||
GO
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
-- Stored procedure that will select all rows from the table 'Application'
|
||||
-- Stored procedure that will select all rows from the table 'MailTexte'
|
||||
-- Returns: @iErrorCode int
|
||||
---------------------------------------------------------------------------------
|
||||
CREATE PROCEDURE [dbo].[pr_Application_SelectAll]
|
||||
CREATE PROCEDURE [dbo].[pr_MailTexte_SelectAll]
|
||||
@iErrorCode int OUTPUT
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
-- SELECT all rows from the table.
|
||||
SELECT
|
||||
[applikationsnr],
|
||||
[version],
|
||||
[showlogin],
|
||||
[mandantnr],
|
||||
[aktiv],
|
||||
[id],
|
||||
[Beschreibung],
|
||||
[Betreff],
|
||||
[Inhalt],
|
||||
[erstellt_am],
|
||||
[mutiert_am],
|
||||
[mutierer],
|
||||
[tmp_filepath],
|
||||
[Tag_Externe_MA]
|
||||
FROM [dbo].[Application]
|
||||
[aktiv]
|
||||
FROM [dbo].[MailTexte]
|
||||
ORDER BY
|
||||
[applikationsnr] ASC
|
||||
[id] ASC
|
||||
-- Get the Error Code for the statement just executed.
|
||||
SELECT @iErrorCode=@@ERROR
|
||||
GO
|
||||
|
||||
|
||||
-- [End of Stored Procedures for table: Application]
|
||||
-- [End of Stored Procedures for table: MailTexte]
|
||||
-- ========================================================================================================
|
||||
GO
|
||||
|
||||
@@ -4,7 +4,7 @@ Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Collections
|
||||
|
||||
Namespace db
|
||||
Namespace DB
|
||||
Public Class clsConnectionProvider
|
||||
Implements IDisposable
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Data.SqlTypes
|
||||
|
||||
Namespace db
|
||||
Namespace DB
|
||||
Public Enum LLBLError
|
||||
AllOk
|
||||
' // Add more here (check the comma's!)
|
||||
|
||||
390
llblgen/clsMailTexte.vb
Normal file
390
llblgen/clsMailTexte.vb
Normal file
@@ -0,0 +1,390 @@
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace DB
|
||||
Public Class clsMailTexte
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bAktiv As SqlBoolean
|
||||
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
|
||||
Private m_iMutierer, m_iId As SqlInt32
|
||||
Private m_sInhalt, m_sBeschreibung, m_sBetreff As SqlString
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_MailTexte_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("@sBeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBetreff", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBetreff))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sInhalt", SqlDbType.VarChar, 2048, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sInhalt))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_MailTexte_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("clsMailTexte::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
Overrides Public Function Update() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_MailTexte_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("@sBeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBetreff", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBetreff))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sInhalt", SqlDbType.VarChar, 2048, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sInhalt))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_MailTexte_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("clsMailTexte::Update::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
Overrides Public Function Delete() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_MailTexte_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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_MailTexte_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("clsMailTexte::Delete::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
Overrides Public Function SelectOne() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_MailTexte_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("MailTexte")
|
||||
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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_MailTexte_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)("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)("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)("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)("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("clsMailTexte::SelectOne::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
Overrides Public Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_MailTexte_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("MailTexte")
|
||||
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_MailTexte_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("clsMailTexte::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 [sBeschreibung]() As SqlString
|
||||
Get
|
||||
Return m_sBeschreibung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBeschreibung = 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 [sInhalt]() As SqlString
|
||||
Get
|
||||
Return m_sInhalt
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sInhalt = 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
|
||||
@@ -3,7 +3,7 @@ Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace DB
|
||||
Namespace db
|
||||
Public Class clsPersonal
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
@@ -12,7 +12,7 @@ Namespace DB
|
||||
Private m_bAktiv As SqlBoolean
|
||||
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
|
||||
Private m_iSequenz, m_iMutierer, m_iPersonalnr, m_iParentID As SqlInt32
|
||||
Private m_sNextControlDate, m_sVerantwTKBMA, m_sTGNummer, m_sName, m_sBezeichnung, m_sBeschreibung As SqlString
|
||||
Private m_sNextControlDate, m_sVerantwTKBMA, m_sEMail, m_sBeschreibung, m_sTGNummer, m_sName, m_sBezeichnung As SqlString
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -44,6 +44,7 @@ Namespace DB
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iMutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sVerantwTKBMA", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVerantwTKBMA))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNextControlDate", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNextControlDate))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sEMail", SqlDbType.VarChar, -1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEMail))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
@@ -100,6 +101,7 @@ Namespace DB
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iMutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sVerantwTKBMA", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVerantwTKBMA))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNextControlDate", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNextControlDate))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sEMail", SqlDbType.VarChar, -1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEMail))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
@@ -272,6 +274,11 @@ Namespace DB
|
||||
Else
|
||||
m_sNextControlDate = New SqlString(CType(dtToReturn.Rows(0)("NextControlDate"), 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
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
@@ -469,6 +476,16 @@ Namespace DB
|
||||
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
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user