Initial commit

This commit is contained in:
2020-10-21 10:44:38 +02:00
commit 039adbbadf
1125 changed files with 854026 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmDatenbankauswahl.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.Demo_Assessmentgenerierung.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.Form1.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmAbout.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmLogin.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmMailInfo.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmMsgBox.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmSplash.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmISI.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmKategorie.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmMassnahmeplan.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmMassnahmeplanDetail.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmMassnahmenuebersicht.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.MassnahmeDetailBearbeitung.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.FrmDefinition_Pruefplan.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmPPlan.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmPruefplan.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmPruefplanDetail.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.FrmFinding.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmFindingHilfe.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmMassnahme.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmPruefschrittUebersicht.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmWeitergabe.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.PruefschrittDetailsBearbeitung.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmDomainEditor.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmDomainEditorExtTables.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmFormSelector.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmSysadminMenu.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmSysadminTableSelector.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.FrmToolTipEditor.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmVerbindungEditor.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmMain.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.Resources.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.FrmUebersicht.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmNeuerVorgabeEintrag.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmVorgabe.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.frmVorgabeDefinition.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssessmentMgmt.vbproj.GenerateResource.Cache
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssessmentMgmt.exe.licenses
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\AssessmentMgmt.exe.config
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\AssessmentMgmt.exe
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\AssessmentMgmt.pdb
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\AssessmentMgmt.xml
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\C1.Data.2.dll
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\C1.Win.C1FlexGrid.2.dll
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\C1.Win.C1TrueDBGrid.2.dll
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\DevComponents.DotNetBar2.dll
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\DropDownControls.dll
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\ThemenDokumente.dll
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\_FRReporting.dll
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\C1.Win.C1Command.2.dll
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\FastReport.dll
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\FastReport.Bars.dll
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\FastReport.Editor.dll
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\C1.Data.2.xml
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\C1.Win.C1FlexGrid.2.xml
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\C1.Win.C1TrueDBGrid.2.xml
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\DevComponents.DotNetBar2.xml
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\DropDownControls.xml
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\ThemenDokumente.pdb
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\ThemenDokumente.xml
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\_FRReporting.pdb
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\_FRReporting.xml
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\bin\Debug\C1.Win.C1Command.2.xml
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssessmentMgmt.exe
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssessmentMgmt.xml
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssessmentMgmt.pdb
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssetMgmt.Demo_Mailgenerierung.resources
E:\Software-Projekte\TKBDiverse\Assessment_Management\SW\AssessmentMgmt\obj\x86\Debug\AssessmentMgmt.vbprojResolveAssemblyReference.cache

View File

@@ -0,0 +1,128 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Demo_Assessmentgenerierung
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Demo_Assessmentgenerierung))
Me.DateTimePicker1 = New System.Windows.Forms.DateTimePicker()
Me.Label1 = New System.Windows.Forms.Label()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.C1Daten = New C1.Win.C1TrueDBGrid.C1TrueDBGrid()
Me.Label2 = New System.Windows.Forms.Label()
Me.Button1 = New System.Windows.Forms.Button()
Me.Panel1.SuspendLayout()
CType(Me.C1Daten, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'DateTimePicker1
'
Me.DateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
Me.DateTimePicker1.Location = New System.Drawing.Point(97, 12)
Me.DateTimePicker1.Name = "DateTimePicker1"
Me.DateTimePicker1.Size = New System.Drawing.Size(103, 20)
Me.DateTimePicker1.TabIndex = 0
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(2, 18)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(89, 13)
Me.Label1.TabIndex = 1
Me.Label1.Text = "Simulationsdatum"
'
'Panel1
'
Me.Panel1.Controls.Add(Me.Button1)
Me.Panel1.Controls.Add(Me.Label2)
Me.Panel1.Controls.Add(Me.DateTimePicker1)
Me.Panel1.Controls.Add(Me.Label1)
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top
Me.Panel1.Location = New System.Drawing.Point(0, 0)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(650, 67)
Me.Panel1.TabIndex = 2
'
'C1Daten
'
Me.C1Daten.AllowUpdate = False
Me.C1Daten.AlternatingRows = True
Me.C1Daten.CellTips = C1.Win.C1TrueDBGrid.CellTipEnum.Floating
Me.C1Daten.Dock = System.Windows.Forms.DockStyle.Fill
Me.C1Daten.FilterBar = True
Me.C1Daten.GroupByCaption = "Drag a column header here to group by that column"
Me.C1Daten.Images.Add(CType(resources.GetObject("C1Daten.Images"), System.Drawing.Image))
Me.C1Daten.Location = New System.Drawing.Point(0, 67)
Me.C1Daten.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3)
Me.C1Daten.Name = "C1Daten"
Me.C1Daten.PreviewInfo.Location = New System.Drawing.Point(0, 0)
Me.C1Daten.PreviewInfo.Size = New System.Drawing.Size(0, 0)
Me.C1Daten.PreviewInfo.ZoomFactor = 75.0R
Me.C1Daten.PrintInfo.PageSettings = CType(resources.GetObject("C1Findings.PrintInfo.PageSettings"), System.Drawing.Printing.PageSettings)
Me.C1Daten.Size = New System.Drawing.Size(650, 198)
Me.C1Daten.TabAction = C1.Win.C1TrueDBGrid.TabActionEnum.ColumnNavigation
Me.C1Daten.TabIndex = 13
Me.C1Daten.Text = "C1TrueDBGrid1"
Me.C1Daten.VisualStyle = C1.Win.C1TrueDBGrid.VisualStyle.Office2010Silver
Me.C1Daten.PropBag = resources.GetString("C1Daten.PropBag")
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(5, 51)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(46, 13)
Me.Label2.TabIndex = 2
Me.Label2.Text = "Resultat"
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(238, 13)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(75, 23)
Me.Button1.TabIndex = 3
Me.Button1.Text = "Start"
Me.Button1.UseVisualStyleBackColor = True
'
'Demo_Assessmentgenerierung
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(650, 265)
Me.Controls.Add(Me.C1Daten)
Me.Controls.Add(Me.Panel1)
Me.Name = "Demo_Assessmentgenerierung"
Me.Text = "Demo_Assessmentgenerierung"
Me.Panel1.ResumeLayout(False)
Me.Panel1.PerformLayout()
CType(Me.C1Daten, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
Friend WithEvents DateTimePicker1 As DateTimePicker
Friend WithEvents Label1 As Label
Friend WithEvents Panel1 As Panel
Friend WithEvents Button1 As Button
Friend WithEvents Label2 As Label
Friend WithEvents C1Daten As C1.Win.C1TrueDBGrid.C1TrueDBGrid
End Class

View File

@@ -0,0 +1,552 @@
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace DB
Public Class clsDokument
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daVersionsdatum, m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_blobDocImage As SqlBinary
Private m_iDokumentNr, m_iSpeichertypNr, m_iMutierer, m_iDokType, m_iDokumenttypNr, m_iKeyValue As SqlInt32
Private m_sVersion, m_sBezeichnung, m_sVersionsNr, m_sOriginalFilename_incl_Path, m_sBeschreibung, m_sFilename 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_Dokument_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iDokumentNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iKeyValue", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iKeyValue))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iDokType", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokType))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iDokumenttypNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypNr))
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, 2048, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sFilename", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFilename))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sOriginalFilename_incl_Path", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sOriginalFilename_incl_Path))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sVersion", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVersion))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sVersionsNr", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVersionsNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daVersionsdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daVersionsdatum))
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("@iSpeichertypNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSpeichertypNr))
Dim iLength As Integer = 0
If Not m_blobDocImage.IsNull Then
iLength = m_blobDocImage.Length
End If
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobDocImage", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobDocImage))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_Dokument_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::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_Dokument_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iDokumentNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iKeyValue", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iKeyValue))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iDokType", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokType))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iDokumenttypNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypNr))
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, 2048, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sFilename", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFilename))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sOriginalFilename_incl_Path", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sOriginalFilename_incl_Path))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sVersion", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVersion))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sVersionsNr", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVersionsNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daVersionsdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daVersionsdatum))
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("@iSpeichertypNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSpeichertypNr))
Dim iLength As Integer = 0
If Not m_blobDocImage.IsNull Then
iLength = m_blobDocImage.Length
End If
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobDocImage", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobDocImage))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_Dokument_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::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_Dokument_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iDokumentNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentNr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_Dokument_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::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_Dokument_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Dokument")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iDokumentNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentNr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iDokumentNr = New SqlInt32(CType(dtToReturn.Rows(0)("DokumentNr"), Integer))
If dtToReturn.Rows(0)("KeyValue") Is System.DBNull.Value Then
m_iKeyValue = SqlInt32.Null
Else
m_iKeyValue = New SqlInt32(CType(dtToReturn.Rows(0)("KeyValue"), Integer))
End If
If dtToReturn.Rows(0)("DokType") Is System.DBNull.Value Then
m_iDokType = SqlInt32.Null
Else
m_iDokType = New SqlInt32(CType(dtToReturn.Rows(0)("DokType"), 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)("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)("Filename") Is System.DBNull.Value Then
m_sFilename = SqlString.Null
Else
m_sFilename = New SqlString(CType(dtToReturn.Rows(0)("Filename"), String))
End If
If dtToReturn.Rows(0)("OriginalFilename_incl_Path") Is System.DBNull.Value Then
m_sOriginalFilename_incl_Path = SqlString.Null
Else
m_sOriginalFilename_incl_Path = New SqlString(CType(dtToReturn.Rows(0)("OriginalFilename_incl_Path"), String))
End If
If dtToReturn.Rows(0)("Version") Is System.DBNull.Value Then
m_sVersion = SqlString.Null
Else
m_sVersion = New SqlString(CType(dtToReturn.Rows(0)("Version"), String))
End If
If dtToReturn.Rows(0)("VersionsNr") Is System.DBNull.Value Then
m_sVersionsNr = SqlString.Null
Else
m_sVersionsNr = New SqlString(CType(dtToReturn.Rows(0)("VersionsNr"), String))
End If
If dtToReturn.Rows(0)("Versionsdatum") Is System.DBNull.Value Then
m_daVersionsdatum = SqlDateTime.Null
Else
m_daVersionsdatum = New SqlDateTime(CType(dtToReturn.Rows(0)("Versionsdatum"), 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)("Mutiert_am") Is System.DBNull.Value Then
m_daMutiert_am = SqlDateTime.Null
Else
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("Mutiert_am"), Date))
End If
If dtToReturn.Rows(0)("Mutierer") Is System.DBNull.Value Then
m_iMutierer = SqlInt32.Null
Else
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("Mutierer"), Integer))
End If
If dtToReturn.Rows(0)("Aktiv") Is System.DBNull.Value Then
m_bAktiv = SqlBoolean.Null
Else
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("Aktiv"), Boolean))
End If
If dtToReturn.Rows(0)("SpeichertypNr") Is System.DBNull.Value Then
m_iSpeichertypNr = SqlInt32.Null
Else
m_iSpeichertypNr = New SqlInt32(CType(dtToReturn.Rows(0)("SpeichertypNr"), Integer))
End If
If dtToReturn.Rows(0)("DocImage") Is System.DBNull.Value Then
m_blobDocImage = SqlBinary.Null
Else
m_blobDocImage = New SqlBinary(CType(dtToReturn.Rows(0)("DocImage"), 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("clsDokument::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_Dokument_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Dokument")
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_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::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 [iDokumentNr]() As SqlInt32
Get
Return m_iDokumentNr
End Get
Set(ByVal Value As SqlInt32)
Dim iDokumentNrTmp As SqlInt32 = Value
If iDokumentNrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iDokumentNr", "iDokumentNr can't be NULL")
End If
m_iDokumentNr = Value
End Set
End Property
Public Property [iKeyValue]() As SqlInt32
Get
Return m_iKeyValue
End Get
Set(ByVal Value As SqlInt32)
m_iKeyValue = Value
End Set
End Property
Public Property [iDokType]() As SqlInt32
Get
Return m_iDokType
End Get
Set(ByVal Value As SqlInt32)
m_iDokType = 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 [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 [sFilename]() As SqlString
Get
Return m_sFilename
End Get
Set(ByVal Value As SqlString)
m_sFilename = Value
End Set
End Property
Public Property [sOriginalFilename_incl_Path]() As SqlString
Get
Return m_sOriginalFilename_incl_Path
End Get
Set(ByVal Value As SqlString)
m_sOriginalFilename_incl_Path = Value
End Set
End Property
Public Property [sVersion]() As SqlString
Get
Return m_sVersion
End Get
Set(ByVal Value As SqlString)
m_sVersion = Value
End Set
End Property
Public Property [sVersionsNr]() As SqlString
Get
Return m_sVersionsNr
End Get
Set(ByVal Value As SqlString)
m_sVersionsNr = Value
End Set
End Property
Public Property [daVersionsdatum]() As SqlDateTime
Get
Return m_daVersionsdatum
End Get
Set(ByVal Value As SqlDateTime)
m_daVersionsdatum = Value
End Set
End Property
Public Property [daErstellt_am]() As SqlDateTime
Get
Return m_daErstellt_am
End Get
Set(ByVal Value As SqlDateTime)
m_daErstellt_am = Value
End Set
End Property
Public Property [daMutiert_am]() As SqlDateTime
Get
Return m_daMutiert_am
End Get
Set(ByVal Value As SqlDateTime)
m_daMutiert_am = Value
End Set
End Property
Public Property [iMutierer]() As SqlInt32
Get
Return m_iMutierer
End Get
Set(ByVal Value As SqlInt32)
m_iMutierer = Value
End Set
End Property
Public Property [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
m_bAktiv = Value
End Set
End Property
Public Property [iSpeichertypNr]() As SqlInt32
Get
Return m_iSpeichertypNr
End Get
Set(ByVal Value As SqlInt32)
m_iSpeichertypNr = Value
End Set
End Property
Public Property [blobDocImage]() As SqlBinary
Get
Return m_blobDocImage
End Get
Set(ByVal Value As SqlBinary)
m_blobDocImage = Value
End Set
End Property
#End Region
End Class
End Namespace