Initial
This commit is contained in:
77
Backup/BusinessFacade/AktuellerBenutzer.vb
Normal file
77
Backup/BusinessFacade/AktuellerBenutzer.vb
Normal file
@@ -0,0 +1,77 @@
|
||||
'''<summary>Diese klasse beinhaltet die Informationen für den aktuell angemeldeten Benutzer</summary>
|
||||
Public Class AktuellerBenutzer
|
||||
|
||||
#Region "Members"
|
||||
Private Shared _mitarbeiter As Mitarbeiter
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Constructors"
|
||||
Public Sub New()
|
||||
'erstelle dummy
|
||||
End Sub
|
||||
|
||||
Public Sub New(ByVal mitarbeiterNr As Integer)
|
||||
ContructorHelper(mitarbeiterNr)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Private Functions"
|
||||
'''<summary>Ermöglicht eine Überladung des Contrustors analog c#</summary>
|
||||
'''<param name="mitarbeiterNr"></param>
|
||||
Private Sub ContructorHelper(ByVal mitarbeiterNr As Integer)
|
||||
Try
|
||||
If _mitarbeiter Is Nothing Then
|
||||
_mitarbeiter = New BusinessFacade.Mitarbeiter(mitarbeiterNr)
|
||||
'_mitarbeiter = New Mitarbeiter(mitarbeiterNr)
|
||||
Else
|
||||
Destroy()
|
||||
_mitarbeiter = New Mitarbeiter(mitarbeiterNr)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.AktuellerBenutzer.ContructorHelper", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Public Functions"
|
||||
'''<summary>Settz die aktuelle Objekt Instanz auf Null (Nothing)</summary>
|
||||
Public Shared Sub Destroy()
|
||||
_mitarbeiter = Nothing
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
Public Shared ReadOnly Property Vorname() As String
|
||||
Get
|
||||
Return _mitarbeiter.Vorname
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared ReadOnly Property Nachname() As String
|
||||
Get
|
||||
Return _mitarbeiter.Nachname
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared ReadOnly Property MitarbeiterNr() As String
|
||||
Get
|
||||
Return _mitarbeiter.MitarbeiterNr
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared ReadOnly Property TGNummer() As String
|
||||
Get
|
||||
Return _mitarbeiter.TGNummer
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared ReadOnly Property Journalisierung() As Boolean
|
||||
Get
|
||||
Return _mitarbeiter.Journalisierung
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
169
Backup/BusinessFacade/Anwendung.vb
Normal file
169
Backup/BusinessFacade/Anwendung.vb
Normal file
@@ -0,0 +1,169 @@
|
||||
'''<summary>Diese klasse beinhaltet die Logik für Anwendungen</summary>
|
||||
Public Class Anwendung
|
||||
|
||||
#Region "Members"
|
||||
Private _anwendungsNr As Integer
|
||||
Private _bezeichnung As String
|
||||
Private _beschreibung As String
|
||||
Private _mandantNr As Integer 'wird nicht gebraucht. kein property implementiert
|
||||
Private _aktiv As Boolean
|
||||
Private _erstelltAm As DateTime
|
||||
Private _mutiertAm As DateTime
|
||||
Private _mutiererId As Integer
|
||||
#End Region
|
||||
|
||||
#Region "Constructors"
|
||||
'''<summary>default konstruktor</summary>
|
||||
Public Sub New()
|
||||
|
||||
End Sub
|
||||
|
||||
'''<summary>lädt eine anwendung aus der db</summary>
|
||||
'''<param name="anwendungsNr"></param>
|
||||
Public Sub New(ByVal anwendungsNr As Integer)
|
||||
|
||||
If anwendungsNr.ToString() <> Config.GetParameterValue("NullReplaceValue") Then
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.Anwendung.GetAnwendung(ds, anwendungsNr)
|
||||
LoadData(ds)
|
||||
Else
|
||||
'erstelle leere instanz
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'''<summary>erstellt eine neue anwendung in der db und lädt diese</summary>
|
||||
'''<param name="bezeichnung"></param>
|
||||
'''<param name="beschreibung"></param>
|
||||
'''<param name="aktiv"></param>
|
||||
Public Sub New(ByVal bezeichnung As String, ByVal beschreibung As String, ByVal aktiv As Boolean, ByVal mutiererId As Integer)
|
||||
_bezeichnung = bezeichnung
|
||||
_beschreibung = beschreibung
|
||||
_aktiv = aktiv
|
||||
Save(mutiererId)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Private Functions"
|
||||
'''<summary>Lädt alle Daten einer Anwendung aus der DB</summary>
|
||||
Private Sub LoadData(ByVal ds As DataSet)
|
||||
Try
|
||||
If Common.Tools.ValidateDS(ds) Then
|
||||
_anwendungsNr = Common.Tools.CToInt32(ds.Tables(0).Rows(0)("anwendungNr"))
|
||||
_bezeichnung = NullHandler.CToString(ds.Tables(0).Rows(0)("bezeichnung"))
|
||||
_beschreibung = NullHandler.CToString(ds.Tables(0).Rows(0)("beschreibung"))
|
||||
_mandantNr = NullHandler.CToInt32(ds.Tables(0).Rows(0)("mandantNr"))
|
||||
_aktiv = Common.Tools.CToBool(ds.Tables(0).Rows(0)("aktiv"))
|
||||
_erstelltAm = NullHandler.CToDateTime(ds.Tables(0).Rows(0)("erstellt_am"))
|
||||
_mutiertAm = NullHandler.CToDateTime(ds.Tables(0).Rows(0)("mutiert_am"))
|
||||
_mutiererId = Common.Tools.CToInt32(ds.Tables(0).Rows(0)("mutierer"))
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Anwendung.Save", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Public Functions"
|
||||
'''<summary>Speichert alle Members in die DB</summary>
|
||||
Public Sub Save(ByVal mutierer As Integer)
|
||||
Try
|
||||
Dim err As Integer
|
||||
Dim key As Integer
|
||||
|
||||
If _anwendungsNr = 0 Then 'create new
|
||||
err = DataAccess.Anwendung.Add(key, _bezeichnung, _beschreibung, _mandantNr, _aktiv, mutierer)
|
||||
If err = 0 Then
|
||||
_anwendungsNr = key
|
||||
End If
|
||||
Else 'save existing
|
||||
err = DataAccess.Anwendung.Update(_anwendungsNr, _bezeichnung, Beschreibung, _mandantNr, _aktiv, mutierer)
|
||||
End If
|
||||
|
||||
If err <> 0 Then
|
||||
Throw New DokumentartException(Meldungstext.GetInhaltById(40000))
|
||||
End If
|
||||
|
||||
'refresh data
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.Anwendung.GetAnwendung(ds, _anwendungsNr)
|
||||
LoadData(ds)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Anwendung.Save", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
'''<summary>Löscht einen Mitarbeiter aus der DB (Setzt in auf inaktiv)</summary>
|
||||
Public Sub Delete(ByVal mutierer As Integer)
|
||||
Try
|
||||
_aktiv = False
|
||||
Save(mutierer)
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Anwendung.Delete", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
Public Property AnwendungsNr() As Integer
|
||||
Get
|
||||
Return _anwendungsNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_anwendungsNr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Bezeichnung() As String
|
||||
Get
|
||||
Return _bezeichnung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_bezeichnung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Beschreibung() As String
|
||||
Get
|
||||
Return _beschreibung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_beschreibung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Aktiv() As Boolean
|
||||
Get
|
||||
Return _aktiv
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_aktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ErstelltAm() As DateTime
|
||||
Get
|
||||
Return _erstelltAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_erstelltAm = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MutiertAm() As DateTime
|
||||
Get
|
||||
Return _mutiertAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_mutiertAm = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MutiererId() As Integer
|
||||
Get
|
||||
Return _mutiererId
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mutiererId = Value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
31
Backup/BusinessFacade/AssemblyInfo.vb
Normal file
31
Backup/BusinessFacade/AssemblyInfo.vb
Normal file
@@ -0,0 +1,31 @@
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' Allgemeine Informationen über eine Assembly werden über die folgende
|
||||
' Attributgruppe gesteuert. Ändern Sie diese Attributwerte, um Informationen,
|
||||
' die mit einer Assembly verknüpft sind, zu bearbeiten.
|
||||
|
||||
' Die Werte der Assemblyattribute überprüfen
|
||||
|
||||
<Assembly: AssemblyTitle("EDOKA.BusinessFacade")>
|
||||
<Assembly: AssemblyDescription("the new part of the EDOKA-BusinessFacade")>
|
||||
<Assembly: AssemblyCompany("TKB")>
|
||||
<Assembly: AssemblyProduct("EDOKA")>
|
||||
<Assembly: AssemblyCopyright("TKB")>
|
||||
<Assembly: AssemblyTrademark("-")>
|
||||
<Assembly: CLSCompliant(True)>
|
||||
|
||||
'Die folgende GUID ist für die ID der Typbibliothek, wenn dieses Projekt in COM angezeigt wird
|
||||
<Assembly: Guid("9C9565CC-65B6-4D09-B324-850699988E7C")>
|
||||
|
||||
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
'
|
||||
' Haupversion
|
||||
' Nebenversion
|
||||
' Buildnummer
|
||||
' Revisionsnummer
|
||||
'
|
||||
' Sie können alle Werte angeben oder auf die standardmäßigen Build- und Revisionsnummern
|
||||
' zurückgreifen, indem Sie '*' wie unten angezeigt verwenden:
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.*")>
|
||||
209
Backup/BusinessFacade/BusinessFacade.vbproj
Normal file
209
Backup/BusinessFacade/BusinessFacade.vbproj
Normal file
@@ -0,0 +1,209 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{1396EF4A-9B94-4DB0-971B-78A2F0E19D55}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>EDOKALib.BusinessFacade</AssemblyName>
|
||||
<AssemblyOriginatorKeyFile>
|
||||
</AssemblyOriginatorKeyFile>
|
||||
<AssemblyOriginatorKeyMode>None</AssemblyOriginatorKeyMode>
|
||||
<DefaultClientScript>JScript</DefaultClientScript>
|
||||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Library</OutputType>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
<RootNamespace>EDOKALib.BusinessFacade</RootNamespace>
|
||||
<StartupObject>EDOKALib.BusinessFacade.%28Keine%29</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<MyType>Windows</MyType>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<OldToolsVersion>2.0</OldToolsVersion>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DocumentationFile>EDOKALib.BusinessFacade.xml</DocumentationFile>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DocumentationFile>EDOKALib.BusinessFacade.xml</DocumentationFile>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<Optimize>true</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
|
||||
<DebugType>none</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'EDOKA_DLLs|AnyCPU' ">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DocumentationFile>EDOKALib.BusinessFacade.xml</DocumentationFile>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="C1.Win.C1TrueDBGrid.2, Version=2.0.20073.61130, Culture=neutral, PublicKeyToken=75ae3fb0e2b1e0da, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\EDOKA\obj\C1.Win.C1TrueDBGrid.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System">
|
||||
<Name>System</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<Name>System.Data</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<Name>System.XML</Name>
|
||||
</Reference>
|
||||
<Reference Include="TKBLib.Errorhandling.v1, Version=1.0.2489.24501, Culture=neutral">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\proj\TKBLib\aktuellDebug\TKBLib.Errorhandling.v1.dll</HintPath>
|
||||
</Reference>
|
||||
<ProjectReference Include="..\Common\Common.vbproj">
|
||||
<Name>Common</Name>
|
||||
<Project>{67E15143-9CF6-4595-8A52-A01A16370E51}</Project>
|
||||
<Package>{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</Package>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\DataAccess\DataAccess.vbproj">
|
||||
<Name>DataAccess</Name>
|
||||
<Project>{6D3A9C4A-7025-4FD6-9BB3-B70874F0527C}</Project>
|
||||
<Package>{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</Package>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Linq" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AktuellerBenutzer.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Anwendung.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="AssemblyInfo.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Config.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Dokument.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Dokumentart.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Dokumenttyp.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Funktionsgruppe.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Klassifizierung.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Meldungstext.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Mitarbeiter.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MitarbeiterFunktionsgruppe.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="NullHandler.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="OfficeVorlage.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Parameter.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Profil.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Spalten.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Team.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="TeamMitarbeiter.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="My Project\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
78
Backup/BusinessFacade/BusinessFacade.vbproj.user
Normal file
78
Backup/BusinessFacade/BusinessFacade.vbproj.user
Normal file
@@ -0,0 +1,78 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<LastOpenVersion>7.10.3077</LastOpenVersion>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ReferencePath>C:\proj\TKBLib\aktuellDebug\</ReferencePath>
|
||||
<CopyProjectDestinationFolder>
|
||||
</CopyProjectDestinationFolder>
|
||||
<CopyProjectUncPath>
|
||||
</CopyProjectUncPath>
|
||||
<CopyProjectOption>0</CopyProjectOption>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
<ProjectTrust>0</ProjectTrust>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<EnableASPDebugging>false</EnableASPDebugging>
|
||||
<EnableASPXDebugging>false</EnableASPXDebugging>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
|
||||
<RemoteDebugEnabled>false</RemoteDebugEnabled>
|
||||
<RemoteDebugMachine>
|
||||
</RemoteDebugMachine>
|
||||
<StartAction>Project</StartAction>
|
||||
<StartArguments>
|
||||
</StartArguments>
|
||||
<StartPage>
|
||||
</StartPage>
|
||||
<StartProgram>
|
||||
</StartProgram>
|
||||
<StartURL>
|
||||
</StartURL>
|
||||
<StartWorkingDirectory>
|
||||
</StartWorkingDirectory>
|
||||
<StartWithIE>true</StartWithIE>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<EnableASPDebugging>false</EnableASPDebugging>
|
||||
<EnableASPXDebugging>false</EnableASPXDebugging>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
|
||||
<RemoteDebugEnabled>false</RemoteDebugEnabled>
|
||||
<RemoteDebugMachine>
|
||||
</RemoteDebugMachine>
|
||||
<StartAction>Project</StartAction>
|
||||
<StartArguments>
|
||||
</StartArguments>
|
||||
<StartPage>
|
||||
</StartPage>
|
||||
<StartProgram>
|
||||
</StartProgram>
|
||||
<StartURL>
|
||||
</StartURL>
|
||||
<StartWorkingDirectory>
|
||||
</StartWorkingDirectory>
|
||||
<StartWithIE>true</StartWithIE>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'EDOKA_DLLs|AnyCPU' ">
|
||||
<EnableASPDebugging>false</EnableASPDebugging>
|
||||
<EnableASPXDebugging>false</EnableASPXDebugging>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
|
||||
<RemoteDebugEnabled>false</RemoteDebugEnabled>
|
||||
<RemoteDebugMachine>
|
||||
</RemoteDebugMachine>
|
||||
<StartAction>Project</StartAction>
|
||||
<StartArguments>
|
||||
</StartArguments>
|
||||
<StartPage>
|
||||
</StartPage>
|
||||
<StartProgram>
|
||||
</StartProgram>
|
||||
<StartURL>
|
||||
</StartURL>
|
||||
<StartWorkingDirectory>
|
||||
</StartWorkingDirectory>
|
||||
<StartWithIE>true</StartWithIE>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
135
Backup/BusinessFacade/Config.vb
Normal file
135
Backup/BusinessFacade/Config.vb
Normal file
@@ -0,0 +1,135 @@
|
||||
|
||||
'''<summary>Verwaltet eine hashtable mit den parametern, damit nicht jedes mal ein dbzugriff erfolgt</summary>
|
||||
Public Class Config
|
||||
|
||||
#Region "Members"
|
||||
Private Shared _parameterList As New Hashtable() 'parameter für alle benutzer (benutzerNr = 0)
|
||||
Private Shared _userList As New Hashtable() 'liste für benutzer
|
||||
#End Region
|
||||
|
||||
#Region "Private Functions"
|
||||
'''<summary>Fügt einen neuen Parameter hinzu</summary>
|
||||
Private Shared Sub Add(ByVal p As Parameter)
|
||||
Try
|
||||
_parameterList.Add(p.Name, p)
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Config.Add", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Fügt einen neuen Parameter hinzu</summary>
|
||||
Private Shared Sub AddUserParam(ByVal p As Parameter)
|
||||
Try
|
||||
Dim h As Hashtable
|
||||
|
||||
h = _userList(p.BenutzerNr)
|
||||
If h Is Nothing Then 'noch keine param für diesen benutzer
|
||||
h = New Hashtable() 'neue param liste für benutzer erstellen
|
||||
h.Add(p.Name, p) 'parameter hinzufügen
|
||||
_userList.Add(p.BenutzerNr, h) 'parameter liste zur benutzerliste hinzufügen
|
||||
Else 'user hat eine liste
|
||||
h.Add(p.Name, p) 'parameter hinzufügen
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Config.AddUserParam", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Public Functions"
|
||||
'''<summary>Gibt den Wert eines Parameters zurück</summary>
|
||||
'''<param name="name">Name des Parameters</param>
|
||||
Public Shared Function GetParameterValue(ByVal name As String) As String
|
||||
Return GetParameter(name).Wert
|
||||
End Function
|
||||
|
||||
'''<summary>Gibt den Wert eines Benuzer spzifischen Parameters zurück</summary>
|
||||
'''<param name="name">Name des Parameters</param>
|
||||
'''<param name="benutzerNr"></param>
|
||||
Public Shared Function GetParameterValue(ByVal name As String, ByVal benutzerNr As Integer) As String
|
||||
If benutzerNr = 0 Then
|
||||
Return GetParameter(name).Wert
|
||||
Else
|
||||
Return GetUserParameter(name, benutzerNr).Wert
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function GetParameter(ByVal name As String) As Parameter
|
||||
Try
|
||||
Dim p As Parameter
|
||||
|
||||
p = _parameterList(name) 'suche nach param
|
||||
|
||||
If Not p Is Nothing Then
|
||||
Return p 'gefunden & return
|
||||
Else
|
||||
'try to load from db
|
||||
p = New Parameter(name, 0)
|
||||
If p.ParameterId <> 0 Then
|
||||
Add(p) 'zur hashtabelle hinzufügen
|
||||
Return p
|
||||
Else
|
||||
Throw New ConfigException("Parameter wurde nicht gefunden!") 'weder in der db noch in der hashtable gefunden
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Config.GetParameter", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Shared Function GetUserParameter(ByVal name As String, ByVal benutzerNr As Integer) As Parameter
|
||||
Try
|
||||
Dim p As Parameter
|
||||
Dim h As Hashtable
|
||||
|
||||
If benutzerNr = 0 Then
|
||||
Return GetParameter(name)
|
||||
End If
|
||||
|
||||
h = _userList(benutzerNr) 'benutzer parameterliste suchen
|
||||
If h Is Nothing Then
|
||||
h = New Hashtable() 'nicht gefunden neuerstellen
|
||||
End If
|
||||
p = h(name) 'nach parameter suchen
|
||||
|
||||
If Not p Is Nothing Then
|
||||
Return p 'parameter gefunden und zurückgeben
|
||||
Else
|
||||
'try to load from db
|
||||
p = New Parameter(name, benutzerNr)
|
||||
If p.ParameterId <> 0 Then
|
||||
AddUserParam(p)
|
||||
Return p
|
||||
Else
|
||||
Throw New ConfigException("Parameter wurde nicht gefunden!") 'weder in der db noch in der hashtable gefunden
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Config.GetParameter(...)", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
'''<summary>Diese Klasse behandelt eine Configuration spezifische Ausnahme</summary>
|
||||
Public Class ConfigException
|
||||
Inherits Exception
|
||||
|
||||
Dim _message As String
|
||||
|
||||
Public Sub New(ByVal message As String)
|
||||
_message = message
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property Message() As String
|
||||
Get
|
||||
Return _message
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
75
Backup/BusinessFacade/Dokument.vb
Normal file
75
Backup/BusinessFacade/Dokument.vb
Normal file
@@ -0,0 +1,75 @@
|
||||
Imports EDOKALib.Common
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für ein Dokument. Da diese Klasse vorständig sehr komplext wäre, ist diese hier NICHT vollständig und wird laufend um die benötigte Funktionalität erweitert</summary>
|
||||
Public Class Dokument
|
||||
|
||||
#Region "Members"
|
||||
|
||||
Private _dokumentId As String
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
Public Shared Function SetStatus()
|
||||
Try
|
||||
If IsNothing(Common.Action.Action) Then
|
||||
'action muss existieren
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EdokaLib.Dokument.SetStatus", "2 Static action object is nothing", TraceLevel.Warning)
|
||||
Throw New DokumentException(2, "Static action object is nothing")
|
||||
End If
|
||||
|
||||
Dim paramName, value As String
|
||||
|
||||
'nötige werte aus action xml lesen
|
||||
paramName = "OrderNr"
|
||||
value = Action.Action.GetParameterByName("fanummer3").Value
|
||||
|
||||
Dim mitarbeiter As New mitarbeiter(Action.Action.CreatorTgNr)
|
||||
|
||||
Dim result As Integer
|
||||
'effektiver status setzen
|
||||
result = DataAccess.Dokument.SetStatus(Action.Action.SourceApplication, paramName, value, mitarbeiter.MitarbeiterNr)
|
||||
|
||||
If result <> 0 Then
|
||||
Throw New DokumentException(1, "No rows have been affected")
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EdokaLib.Dokument.SetStatus", ex.Message & ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
#Region "DokumentException"
|
||||
|
||||
Public Class DokumentException
|
||||
Inherits Exception
|
||||
|
||||
Private _number As Integer
|
||||
Private _description As String
|
||||
|
||||
Public Sub New(ByVal number As Integer, ByVal description As String)
|
||||
_number = number
|
||||
_description = description
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property Message() As String
|
||||
Get
|
||||
Return _description
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Number() As Integer
|
||||
Get
|
||||
Return _number
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
|
||||
#End Region
|
||||
252
Backup/BusinessFacade/Dokumentart.vb
Normal file
252
Backup/BusinessFacade/Dokumentart.vb
Normal file
@@ -0,0 +1,252 @@
|
||||
|
||||
'''<summary>Verwaltung und logik von Dokumentarten</summary>
|
||||
Public Class Dokumentart
|
||||
|
||||
#Region "Members"
|
||||
Private _dokumentartNr As Integer
|
||||
Private _bezeichnung As String
|
||||
Private _parentId As Integer
|
||||
Private _sort As Integer
|
||||
Private _imageIndex As Integer
|
||||
Private _imageIndexOpen As Integer
|
||||
Private _beschreibung As String
|
||||
Private _mandantNr As Integer 'nicht implementiert
|
||||
Private _sprache As Integer 'nicht implementiert
|
||||
Private _aktiv As Boolean
|
||||
Private _erstelltAm As DateTime
|
||||
Private _mutiertAm As DateTime
|
||||
Private _mutiererId As Integer
|
||||
Private _coldApplication As String
|
||||
Private _coldBezeichnung As String
|
||||
#End Region
|
||||
|
||||
#Region "Constructors"
|
||||
Public Sub New()
|
||||
'leere instanz erstellen
|
||||
End Sub
|
||||
|
||||
Public Sub New(ByVal dokumentartNr As Integer)
|
||||
'instanz von db laden
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.Dokumentart.GetDokumentart(ds, dokumentartNr)
|
||||
LoadData(ds)
|
||||
End Sub
|
||||
|
||||
'''<summary>neue dokumentart in db erstellen und laden</summary>
|
||||
|
||||
Public Sub New(ByVal bezeichnung As String, ByVal parentId As Integer, ByVal sort As Integer, _
|
||||
ByVal imageIndex As Integer, ByVal imageIndexOpen As Integer, ByVal beschreibung As String, _
|
||||
ByVal aktiv As Boolean, ByVal coldApplication As String, ByVal coldBezeichnung As String, ByVal mutiererId As Integer)
|
||||
_bezeichnung = bezeichnung
|
||||
_parentId = parentId
|
||||
_sort = sort
|
||||
_imageIndex = imageIndex
|
||||
_imageIndexOpen = imageIndexOpen
|
||||
_beschreibung = beschreibung
|
||||
_aktiv = aktiv
|
||||
_coldApplication = coldApplication
|
||||
_coldBezeichnung = coldBezeichnung
|
||||
Save(mutiererId)
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Private Functions"
|
||||
|
||||
'''<summary>lädt die daten vom ds in die member der klasse</summary>
|
||||
'''<param name="ds"></param>
|
||||
|
||||
Private Sub LoadData(ByRef ds As DataSet)
|
||||
Try
|
||||
If Common.Tools.ValidateDS(ds) Then
|
||||
_dokumentartNr = NullHandler.CToInt32(ds.Tables(0).Rows(0)("dokumentartNr"))
|
||||
_bezeichnung = NullHandler.CToString(ds.Tables(0).Rows(0)("bezeichnung"))
|
||||
_parentId = NullHandler.CToInt32(ds.Tables(0).Rows(0)("parentId"))
|
||||
_sort = NullHandler.CToInt32(ds.Tables(0).Rows(0)("sort"))
|
||||
_imageIndex = NullHandler.CToInt32(ds.Tables(0).Rows(0)("imageIndex"))
|
||||
_imageIndexOpen = NullHandler.CToInt32(ds.Tables(0).Rows(0)("imageIndexOpen"))
|
||||
_beschreibung = NullHandler.CToString(ds.Tables(0).Rows(0)("beschreibung"))
|
||||
_mandantNr = NullHandler.CToInt32(ds.Tables(0).Rows(0)("mandantNr"))
|
||||
_sprache = NullHandler.CToInt32(ds.Tables(0).Rows(0)("sprache"))
|
||||
_aktiv = Common.Tools.CToBool(ds.Tables(0).Rows(0)("aktiv")) 'no null support, wird auf 0 gesetzt
|
||||
_erstelltAm = NullHandler.CToDateTime(ds.Tables(0).Rows(0)("erstellt_am"))
|
||||
_mutiertAm = NullHandler.CToDateTime(ds.Tables(0).Rows(0)("mutiert_am"))
|
||||
_mutiererId = NullHandler.CToInt32(ds.Tables(0).Rows(0)("mutierer"))
|
||||
_coldApplication = NullHandler.CToString(ds.Tables(0).Rows(0)("coldApplication"))
|
||||
_coldBezeichnung = NullHandler.CToString(ds.Tables(0).Rows(0)("coldBezeichnung"))
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Dokumentart.LoadData", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Public Functions"
|
||||
'''<summary>speichert eine dokumentart (insert und update)</summary>
|
||||
|
||||
Public Function Save(ByVal mutierer As Integer)
|
||||
Try
|
||||
Dim err As Integer
|
||||
|
||||
If _dokumentartNr = 0 Then 'create new
|
||||
err = DataAccess.Dokumentart.Add(_dokumentartNr, _bezeichnung, _parentId, _sort, _imageIndex, _
|
||||
_imageIndexOpen, _beschreibung, _mandantNr, _sprache, _aktiv, mutierer, _coldApplication, _
|
||||
_coldBezeichnung)
|
||||
|
||||
Else 'save existing
|
||||
err = DataAccess.Dokumentart.Update(_dokumentartNr, _bezeichnung, _parentId, _sort, _imageIndex, _
|
||||
_imageIndexOpen, _beschreibung, _mandantNr, _sprache, _aktiv, mutierer, _coldApplication, _
|
||||
_coldBezeichnung)
|
||||
End If
|
||||
|
||||
If err <> 0 Then
|
||||
Throw New DokumentartException(Meldungstext.GetInhaltById(40000))
|
||||
End If
|
||||
|
||||
'refresh data
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.Dokumentart.GetDokumentart(ds, _dokumentartNr)
|
||||
LoadData(ds)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Dokumentart.Save", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
Public Function Delete(ByVal mutierer As Integer)
|
||||
Try
|
||||
_aktiv = False
|
||||
Save(mutierer)
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKA", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
Public ReadOnly Property DokumentartNr() As Integer
|
||||
Get
|
||||
Return _dokumentartNr
|
||||
End Get
|
||||
End Property
|
||||
Public Property Bezeichnung() As String
|
||||
Get
|
||||
Return _bezeichnung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_bezeichnung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ParentId() As Integer
|
||||
Get
|
||||
Return ParentId
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
ParentId = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Sort() As Integer
|
||||
Get
|
||||
Return _sort
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_sort = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ImageIndex() As Integer
|
||||
Get
|
||||
Return _imageIndex
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_imageIndex = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ImageIndexOpen() As Integer
|
||||
Get
|
||||
Return _imageIndexOpen
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_imageIndexOpen = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Beschreibung() As String
|
||||
Get
|
||||
Return _beschreibung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_beschreibung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Aktiv() As Boolean
|
||||
Get
|
||||
Return _aktiv
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_aktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ErstelltAm() As DateTime
|
||||
Get
|
||||
Return _erstelltAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_erstelltAm = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MutiertAm() As DateTime
|
||||
Get
|
||||
Return _mutiertAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_mutiertAm = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MutiererId() As Integer
|
||||
Get
|
||||
Return _mutiererId
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mutiererId = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ColdApplication() As String
|
||||
Get
|
||||
Return _coldApplication
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_coldApplication = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ColdBezeichnung() As String
|
||||
Get
|
||||
Return _coldBezeichnung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_coldBezeichnung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
'''<summary>Diese Klasse behandelt eine DokumentArt spezifische Ausnahme</summary>
|
||||
Public Class DokumentartException
|
||||
Inherits Exception
|
||||
|
||||
Dim _message As String
|
||||
|
||||
Public Sub New(ByVal message As String)
|
||||
_message = message
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property Message() As String
|
||||
Get
|
||||
Return _message
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
727
Backup/BusinessFacade/Dokumenttyp.vb
Normal file
727
Backup/BusinessFacade/Dokumenttyp.vb
Normal file
@@ -0,0 +1,727 @@
|
||||
Imports EDOKALib.Common
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für die Dokumenttypen</summary>
|
||||
Public Class Dokumenttyp
|
||||
|
||||
#Region "Members"
|
||||
Private _dokumentTypNr As Integer
|
||||
Private _bezeichnung As String
|
||||
Private _beschreibung As String
|
||||
Private _zuVercolden As Boolean
|
||||
Private _isZuRetournieren As Boolean
|
||||
Private _isEingangErsetztAusgang As Boolean
|
||||
Private _isWirdImportiert As Boolean
|
||||
Private _anzahlTage As Integer
|
||||
Private _dBearbeitungsZeit As Integer
|
||||
Private _tageMutation As Integer
|
||||
Private _isPartnerSaldierungStatusAlt As Boolean
|
||||
Private _isWirdNichtGeloescht As Boolean
|
||||
Private _isVertraulichesDokument As Boolean
|
||||
Private _isUnterschriftLinks As Boolean
|
||||
Private _isUnterschriftRechts As Boolean
|
||||
Private _monateBisZurArchivierung As Integer
|
||||
Private _aufbewahrungsFristElektronisch As Integer
|
||||
Private _aufbewahrungsFristPhysisch As Integer
|
||||
Private _mandantNr As Integer 'wird nicht in den properties implemnetiert
|
||||
Private _isAktiv As Boolean
|
||||
Private _erstelltAm As DateTime
|
||||
Private _mutiertAm As DateTime
|
||||
Private _mutierer As Integer
|
||||
Private _officeVorlageNr As Integer
|
||||
Private _dokumentArtKundendossier As Integer
|
||||
Private _dokumentArtNeuerstellung As Integer
|
||||
Private _dokumentArtRetournierung As Integer
|
||||
Private _dokumentArtColdAusgang As Integer
|
||||
Private _dokumentArtColdEingang As Integer
|
||||
Private _dokumentArtHost As Integer
|
||||
Private _dokumentArtWeitere As Integer
|
||||
Private _dokumentArtNativ As Integer
|
||||
Private _prozessNr As Integer
|
||||
Private _prozessNr1 As Integer
|
||||
Private _isAmsDokument As Boolean
|
||||
Private _isHostDokument As Boolean
|
||||
Private _hostDokumenttyp As String
|
||||
Private _coldFolder As Integer
|
||||
Private _physischesArchiv As Integer
|
||||
Private _dokumentStatus As Integer
|
||||
Private _isDokumentWirdErstellt As Boolean
|
||||
Private _isDokumentWirdRetourniert As Boolean
|
||||
Private _isColdErsetzen As Boolean
|
||||
Private _isEmailVersand As Boolean
|
||||
Private _isFunktionenZuweisen As Boolean
|
||||
Private _dokumentStatusBarcode As Integer
|
||||
Private _isNurNative As Boolean
|
||||
Private _owner As Integer
|
||||
Private _isVertrag As Boolean
|
||||
Private _objektbezeichnungNr As Integer
|
||||
Private _isBedingtRetournierBar As Boolean
|
||||
Private _doktypBedingteRetournierung As Integer
|
||||
Private _tageBisVernichtungbedingteRetournierung As Integer
|
||||
Private _isAnzeigeZurDokumenterstellung As Boolean
|
||||
Private _isKundenDokument As Boolean
|
||||
Private _isSb As Boolean
|
||||
Private _isSbImport As Boolean
|
||||
Private _isSbEditUser As Boolean
|
||||
Private _isSbNur As Boolean
|
||||
Private _isBezeichnungMut As Boolean
|
||||
Private _isFarbigArchiviert As Boolean
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Constructors"
|
||||
'''<summary>default konstruktor</summary>
|
||||
|
||||
Public Sub New()
|
||||
|
||||
End Sub
|
||||
|
||||
'''<summary>lädt den dokumenttyp mit der entsprechenden dokumenttypnr</summary>
|
||||
'''<param name="dokumentTypNr"></param>
|
||||
|
||||
Public Sub New(ByVal dokumentTypNr As Integer)
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.Dokumenttyp.GetDokumenttyp(ds, dokumentTypNr)
|
||||
LoadData(ds)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Private Functions"
|
||||
|
||||
'''<summary>lädt die daten aus dem dataset in die members der klasse</summary>
|
||||
'''<param name="ds"></param>
|
||||
|
||||
Private Sub LoadData(ByRef ds As DataSet)
|
||||
Try
|
||||
If Common.Tools.ValidateDS(ds) Then
|
||||
_dokumentTypNr = Tools.CToInt32(ds.Tables(0).Rows(0)("dokumentTypNr"))
|
||||
_bezeichnung = NullHandler.CToString(ds.Tables(0).Rows(0)("bezeichnung"))
|
||||
_beschreibung = NullHandler.CToString(ds.Tables(0).Rows(0)("beschreibung"))
|
||||
_zuVercolden = Tools.CToBool(ds.Tables(0).Rows(0)("zu_vercolden"))
|
||||
_isZuRetournieren = Tools.CToBool(ds.Tables(0).Rows(0)("zu_retournieren"))
|
||||
_isEingangErsetztAusgang = Tools.CToBool(ds.Tables(0).Rows(0)("eingang_ersetzt_ausgang"))
|
||||
_isWirdImportiert = Tools.CToBool(ds.Tables(0).Rows(0)("wird_importiert"))
|
||||
_anzahlTage = Tools.CToInt32(ds.Tables(0).Rows(0)("anzahl_tage"))
|
||||
_dBearbeitungsZeit = Tools.CToInt32(ds.Tables(0).Rows(0)("dbearbeitungszeit"))
|
||||
_tageMutation = Tools.CToInt32(ds.Tables(0).Rows(0)("tage_mutation"))
|
||||
_isPartnerSaldierungStatusAlt = Tools.CToBool(ds.Tables(0).Rows(0)("partnersaldierung_statusalt"))
|
||||
_isWirdNichtGeloescht = Tools.CToBool(ds.Tables(0).Rows(0)("wird_nicht_geloescht"))
|
||||
_isVertraulichesDokument = Tools.CToBool(ds.Tables(0).Rows(0)("vertrauliches_dokument"))
|
||||
_isUnterschriftLinks = Tools.CToBool(ds.Tables(0).Rows(0)("unterschrift_links"))
|
||||
_isUnterschriftRechts = Tools.CToBool(ds.Tables(0).Rows(0)("unterschrift_rechts"))
|
||||
_monateBisZurArchivierung = Tools.CToInt32(ds.Tables(0).Rows(0)("monate_bis_zur_archivierung"))
|
||||
_aufbewahrungsFristElektronisch = Tools.CToInt32(ds.Tables(0).Rows(0)("aufbewahrungsfrist_elektronisch"))
|
||||
_aufbewahrungsFristPhysisch = Tools.CToInt32(ds.Tables(0).Rows(0)("aufbewahrungsfrist_physisch"))
|
||||
_mandantNr = NullHandler.CToInt32(ds.Tables(0).Rows(0)("mandantnr"))
|
||||
_isAktiv = Tools.CToBool(ds.Tables(0).Rows(0)("aktiv"))
|
||||
_erstelltAm = NullHandler.CToDateTime(ds.Tables(0).Rows(0)("erstellt_am"))
|
||||
_mutiertAm = NullHandler.CToDateTime(ds.Tables(0).Rows(0)("mutiert_am"))
|
||||
_mutierer = NullHandler.CToInt32(ds.Tables(0).Rows(0)("mutierer"))
|
||||
_officeVorlageNr = NullHandler.CToInt32(ds.Tables(0).Rows(0)("office_vorlagenr"))
|
||||
_dokumentArtKundendossier = NullHandler.CToInt32(ds.Tables(0).Rows(0)("dokumentart_kundendossier"))
|
||||
_dokumentArtNeuerstellung = NullHandler.CToInt32(ds.Tables(0).Rows(0)("dokumentart_neuerstellung"))
|
||||
_dokumentArtRetournierung = NullHandler.CToInt32(ds.Tables(0).Rows(0)("dokumentart_retournierung"))
|
||||
_dokumentArtColdAusgang = Tools.CToInt32(ds.Tables(0).Rows(0)("dokumentart_coldausgang"))
|
||||
_dokumentArtColdEingang = Tools.CToInt32(ds.Tables(0).Rows(0)("dokumentart_coldeingang"))
|
||||
_dokumentArtHost = NullHandler.CToInt32(ds.Tables(0).Rows(0)("dokumentart_host"))
|
||||
_dokumentArtWeitere = NullHandler.CToInt32(ds.Tables(0).Rows(0)("dokumentart_weitere"))
|
||||
_dokumentArtNativ = NullHandler.CToInt32(ds.Tables(0).Rows(0)("dokumentart_nativ"))
|
||||
_prozessNr = NullHandler.CToInt32(ds.Tables(0).Rows(0)("prozessnr"))
|
||||
_prozessNr1 = NullHandler.CToInt32(ds.Tables(0).Rows(0)("prozessnr1"))
|
||||
_isAmsDokument = Tools.CToBool(ds.Tables(0).Rows(0)("amsdokument"))
|
||||
_isHostDokument = Tools.CToBool(ds.Tables(0).Rows(0)("hostdokument"))
|
||||
_hostDokumenttyp = NullHandler.CToString(ds.Tables(0).Rows(0)("hostdokumenttyp"))
|
||||
_coldFolder = NullHandler.CToInt32(ds.Tables(0).Rows(0)("cold_folder"))
|
||||
_physischesArchiv = NullHandler.CToInt32(ds.Tables(0).Rows(0)("physisches_archiv"))
|
||||
_dokumentStatus = NullHandler.CToInt32(ds.Tables(0).Rows(0)("dokumentstatus"))
|
||||
_isDokumentWirdErstellt = Tools.CToBool(ds.Tables(0).Rows(0)("Dokument_wird_erstellt"))
|
||||
_isDokumentWirdRetourniert = Tools.CToBool(ds.Tables(0).Rows(0)("Dokument_wird_retourniert"))
|
||||
_isColdErsetzen = Tools.CToBool(ds.Tables(0).Rows(0)("cold_ersetzen"))
|
||||
_isEmailVersand = Tools.CToBool(ds.Tables(0).Rows(0)("email_versand"))
|
||||
_isFunktionenZuweisen = Tools.CToBool(ds.Tables(0).Rows(0)("funktionen_zuweisen"))
|
||||
_dokumentStatusBarcode = NullHandler.CToInt32(ds.Tables(0).Rows(0)("dokumentstatus_barcode"))
|
||||
_isNurNative = Tools.CToBool(ds.Tables(0).Rows(0)("nurnative"))
|
||||
_owner = NullHandler.CToInt32(ds.Tables(0).Rows(0)("Owner"))
|
||||
_isVertrag = Tools.CToBool(ds.Tables(0).Rows(0)("vertrag"))
|
||||
_objektbezeichnungNr = NullHandler.CToInt32(ds.Tables(0).Rows(0)("objektbezeichnungnr"))
|
||||
_isBedingtRetournierBar = Tools.CToBool(ds.Tables(0).Rows(0)("bedingtretournierbar"))
|
||||
_doktypBedingteRetournierung = NullHandler.CToInt32(ds.Tables(0).Rows(0)("doktypbedingteretournierung"))
|
||||
_tageBisVernichtungbedingteRetournierung = NullHandler.CToInt32(ds.Tables(0).Rows(0)("tagebisvernichtungbedingteretournierung"))
|
||||
_isAnzeigeZurDokumenterstellung = Tools.CToBool(ds.Tables(0).Rows(0)("AnzeigeZurDokumenterstellung"))
|
||||
_isKundenDokument = Tools.CToBool(ds.Tables(0).Rows(0)("KundenDokument"))
|
||||
_isSb = Tools.CToBool(ds.Tables(0).Rows(0)("sb"))
|
||||
_isSbImport = Tools.CToBool(ds.Tables(0).Rows(0)("sbimport"))
|
||||
_isSbEditUser = Tools.CToBool(ds.Tables(0).Rows(0)("sbedituser"))
|
||||
_isSbNur = Tools.CToBool(ds.Tables(0).Rows(0)("sbnur"))
|
||||
_isBezeichnungMut = Tools.CToBool(ds.Tables(0).Rows(0)("bezeichnungmut"))
|
||||
_isFarbigArchiviert = Tools.CToBool(ds.Tables(0).Rows(0)("istFarbigArchiviert"))
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.DokumentTyp.LoadData", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Public Functions"
|
||||
|
||||
'''<summary>speichert einen dokumenttyp(update und insert)</summary>
|
||||
|
||||
Public Function Save(ByVal mutierer As Integer)
|
||||
Try
|
||||
Dim err As Integer
|
||||
If _dokumentTypNr = 0 Then 'create new
|
||||
err = DataAccess.Dokumenttyp.Add(_dokumentTypNr, _bezeichnung, _beschreibung, _zuVercolden, _isZuRetournieren, _
|
||||
_isEingangErsetztAusgang, _isWirdImportiert, _anzahlTage, _dBearbeitungsZeit, _tageMutation, _
|
||||
_isPartnerSaldierungStatusAlt, _isWirdNichtGeloescht, _isVertraulichesDokument, _isUnterschriftLinks, _
|
||||
_isUnterschriftRechts, _monateBisZurArchivierung, _aufbewahrungsFristElektronisch, _
|
||||
_aufbewahrungsFristPhysisch, _mandantNr, _isAktiv, _erstelltAm, _mutiertAm, mutierer, _
|
||||
_officeVorlageNr, _dokumentArtKundendossier, _dokumentArtNeuerstellung, _dokumentArtRetournierung, _
|
||||
_dokumentArtColdAusgang, _dokumentArtColdEingang, _dokumentArtHost, _dokumentArtWeitere, _
|
||||
_dokumentArtNativ, _prozessNr, _prozessNr1, _isAmsDokument, _isHostDokument, _hostDokumenttyp, _
|
||||
_coldFolder, _physischesArchiv, _dokumentStatus, _isDokumentWirdErstellt, _isDokumentWirdRetourniert, _
|
||||
_isColdErsetzen, _isEmailVersand, _isFunktionenZuweisen, _dokumentStatusBarcode, _isNurNative, _
|
||||
_owner, _isVertrag, _objektbezeichnungNr, _isBedingtRetournierBar, _doktypBedingteRetournierung, _
|
||||
_tageBisVernichtungbedingteRetournierung, _isAnzeigeZurDokumenterstellung, _isKundenDokument, _
|
||||
_isSb, _isSbImport, _isSbEditUser, _isSbNur, _isBezeichnungMut, _isFarbigArchiviert)
|
||||
|
||||
Else 'save existing
|
||||
err = DataAccess.Dokumenttyp.Update(_dokumentTypNr, _bezeichnung, _beschreibung, _zuVercolden, _isZuRetournieren, _
|
||||
_isEingangErsetztAusgang, _isWirdImportiert, _anzahlTage, _dBearbeitungsZeit, _tageMutation, _
|
||||
_isPartnerSaldierungStatusAlt, _isWirdNichtGeloescht, _isVertraulichesDokument, _isUnterschriftLinks, _
|
||||
_isUnterschriftRechts, _monateBisZurArchivierung, _aufbewahrungsFristElektronisch, _
|
||||
_aufbewahrungsFristPhysisch, _mandantNr, _isAktiv, _erstelltAm, _mutiertAm, mutierer, _
|
||||
_officeVorlageNr, _dokumentArtKundendossier, _dokumentArtNeuerstellung, _dokumentArtRetournierung, _
|
||||
_dokumentArtColdAusgang, _dokumentArtColdEingang, _dokumentArtHost, _dokumentArtWeitere, _
|
||||
_dokumentArtNativ, _prozessNr, _prozessNr1, _isAmsDokument, _isHostDokument, _hostDokumenttyp, _
|
||||
_coldFolder, _physischesArchiv, _dokumentStatus, _isDokumentWirdErstellt, _isDokumentWirdRetourniert, _
|
||||
_isColdErsetzen, _isEmailVersand, _isFunktionenZuweisen, _dokumentStatusBarcode, _isNurNative, _
|
||||
_owner, _isVertrag, _objektbezeichnungNr, _isBedingtRetournierBar, _doktypBedingteRetournierung, _
|
||||
_tageBisVernichtungbedingteRetournierung, _isAnzeigeZurDokumenterstellung, _isKundenDokument, _
|
||||
_isSb, _isSbImport, _isSbEditUser, _isSbNur, _isBezeichnungMut, _isFarbigArchiviert)
|
||||
End If
|
||||
|
||||
If err <> 0 Then
|
||||
Throw New DokumentartException(Meldungstext.GetInhaltById(40000))
|
||||
End If
|
||||
|
||||
'refresh data
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.Dokumentart.GetDokumentart(ds, _dokumentTypNr)
|
||||
LoadData(ds)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Dokumentart.Save", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Delete(ByVal mutierer As Integer)
|
||||
Try
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Dokumenttyp.Delete", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Shared Function IsMitarbeiterBerechtigt(ByVal dokumentTypNr As Integer, ByVal nrPar00 As Integer, ByVal mitarbeiterNr As Integer) As Boolean
|
||||
'If Globals.EDOKAStellvertreterPruefung = False And Globals.EDOKAFremdanwendungStellvertreter = 0 Then
|
||||
'Globals.EDOKAFremdanwendungStellvertreter = Globals.MitarbeiterNr
|
||||
'End If
|
||||
Try
|
||||
Return DataAccess.Dokumenttyp.IsMitarbeiterBerechtigt(dokumentTypNr, nrPar00, mitarbeiterNr)
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EdokaLib.Dokumenttyp.IsMitarbeiterBerechtigt", ex.Message & ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Properties"
|
||||
Public ReadOnly Property DokumentTypNr() As Integer
|
||||
Get
|
||||
Return _dokumentTypNr
|
||||
End Get
|
||||
End Property
|
||||
Public Property Bezeichnung() As String
|
||||
Get
|
||||
Return _bezeichnung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_bezeichnung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Beschreibung() As String
|
||||
Get
|
||||
Return _beschreibung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_beschreibung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ZuVercolden() As Boolean
|
||||
Get
|
||||
Return _zuVercolden
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_zuVercolden = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsZuRetournieren() As Boolean
|
||||
Get
|
||||
Return _isZuRetournieren
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isZuRetournieren = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsEingangErsetztAusgang() As Boolean
|
||||
Get
|
||||
Return _isEingangErsetztAusgang
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isEingangErsetztAusgang = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsWirdImportiert() As Boolean
|
||||
Get
|
||||
Return _isWirdImportiert
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isWirdImportiert = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property AnzahlTage() As Integer
|
||||
Get
|
||||
Return _anzahlTage
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_anzahlTage = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DBearbeitungsZeit() As Integer
|
||||
Get
|
||||
Return _dBearbeitungsZeit
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_dBearbeitungsZeit = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property TageMutation() As Integer
|
||||
Get
|
||||
Return _tageMutation
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_tageMutation = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsPartnerSaldierungStatusAlt() As Boolean
|
||||
Get
|
||||
Return _isPartnerSaldierungStatusAlt
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isPartnerSaldierungStatusAlt = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsWirdNichtGeloescht() As Boolean
|
||||
Get
|
||||
Return _isWirdNichtGeloescht
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isWirdNichtGeloescht = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsVertraulichesDokument() As Boolean
|
||||
Get
|
||||
Return _isVertraulichesDokument
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isVertraulichesDokument = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsUnterschriftLinks() As Boolean
|
||||
Get
|
||||
Return _isUnterschriftLinks
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isUnterschriftLinks = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsUnterschriftRechts() As Boolean
|
||||
Get
|
||||
Return _isUnterschriftRechts
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isUnterschriftRechts = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MonateBisZurArchivierung() As Integer
|
||||
Get
|
||||
Return _monateBisZurArchivierung
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_monateBisZurArchivierung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property AufbewahrungsFristElektronisch() As Integer
|
||||
Get
|
||||
Return _aufbewahrungsFristElektronisch
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_aufbewahrungsFristElektronisch = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property AufbewahrungsFristPhysisch() As Integer
|
||||
Get
|
||||
Return _aufbewahrungsFristPhysisch
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_aufbewahrungsFristPhysisch = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsAktiv() As Boolean
|
||||
Get
|
||||
Return _isAktiv
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ErstelltAm() As DateTime
|
||||
Get
|
||||
Return _erstelltAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_erstelltAm = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MutiertAm() As DateTime
|
||||
Get
|
||||
Return _mutiertAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_mutiertAm = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Mutierer() As Integer
|
||||
Get
|
||||
Return _mutierer
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mutierer = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property OfficeVorlageNr() As Integer
|
||||
Get
|
||||
Return _officeVorlageNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_officeVorlageNr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DokumentArtKundendossier() As Integer
|
||||
Get
|
||||
Return _dokumentArtKundendossier
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_dokumentArtKundendossier = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DokumentArtNeuerstellung() As Integer
|
||||
Get
|
||||
Return _dokumentArtNeuerstellung
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_dokumentArtNeuerstellung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DokumentArtRetournierung() As Integer
|
||||
Get
|
||||
Return _dokumentArtRetournierung
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_dokumentArtRetournierung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DokumentArtColdAusgang() As Integer
|
||||
Get
|
||||
Return _dokumentArtColdAusgang
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_dokumentArtColdAusgang = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DokumentArtColdEingang() As Integer
|
||||
Get
|
||||
Return _dokumentArtColdEingang
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_dokumentArtColdEingang = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DokumentArtHost() As Integer
|
||||
Get
|
||||
Return _dokumentArtHost
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_dokumentArtHost = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DokumentArtWeitere() As Integer
|
||||
Get
|
||||
Return _dokumentArtWeitere
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_dokumentArtWeitere = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DokumentArtNativ() As Integer
|
||||
Get
|
||||
Return _dokumentArtNativ
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_dokumentArtNativ = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ProzessNr() As Integer
|
||||
Get
|
||||
Return _prozessNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_prozessNr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ProzessNr1() As Integer
|
||||
Get
|
||||
Return _prozessNr1
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_prozessNr1 = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsAmsDokument() As Boolean
|
||||
Get
|
||||
Return _isAmsDokument
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isAmsDokument = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsHostDokument() As Boolean
|
||||
Get
|
||||
Return _isHostDokument
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isHostDokument = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property HostDokumenttyp() As String
|
||||
Get
|
||||
Return _hostDokumenttyp
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_hostDokumenttyp = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ColdFolder() As Integer
|
||||
Get
|
||||
Return _coldFolder
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_coldFolder = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property PhysischesArchiv() As Integer
|
||||
Get
|
||||
Return _physischesArchiv
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_physischesArchiv = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DokumentStatus() As Integer
|
||||
Get
|
||||
Return _dokumentStatus
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_dokumentStatus = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsDokumentWirdErstellt() As Boolean
|
||||
Get
|
||||
Return _isDokumentWirdErstellt
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isDokumentWirdErstellt = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsDokumentWirdRetourniert() As Boolean
|
||||
Get
|
||||
Return _isDokumentWirdRetourniert
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isDokumentWirdRetourniert = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsColdErsetzen() As Boolean
|
||||
Get
|
||||
Return _isColdErsetzen
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isColdErsetzen = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsEmailVersand() As Boolean
|
||||
Get
|
||||
Return _isEmailVersand
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isEmailVersand = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsFunktionenZuweisen() As Boolean
|
||||
Get
|
||||
Return _isFunktionenZuweisen
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isFunktionenZuweisen = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DokumentStatusBarcode() As Integer
|
||||
Get
|
||||
Return _dokumentStatusBarcode
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_dokumentStatusBarcode = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsNurNative() As Boolean
|
||||
Get
|
||||
Return _isNurNative
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isNurNative = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Owner() As Integer
|
||||
Get
|
||||
Return _owner
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_owner = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsVertrag() As Boolean
|
||||
Get
|
||||
Return _isVertrag
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isVertrag = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ObjektbezeichnungNr() As Integer
|
||||
Get
|
||||
Return _objektbezeichnungNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_objektbezeichnungNr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsBedingtRetournierBar() As Boolean
|
||||
Get
|
||||
Return _isBedingtRetournierBar
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isBedingtRetournierBar = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DoktypBedingteRetournierung() As Integer
|
||||
Get
|
||||
Return _doktypBedingteRetournierung
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_doktypBedingteRetournierung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property TageBisVernichtungbedingteRetournierung() As Integer
|
||||
Get
|
||||
Return _tageBisVernichtungbedingteRetournierung
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_tageBisVernichtungbedingteRetournierung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsAnzeigeZurDokumenterstellung() As Boolean
|
||||
Get
|
||||
Return _isAnzeigeZurDokumenterstellung
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isAnzeigeZurDokumenterstellung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsKundenDokument() As Boolean
|
||||
Get
|
||||
Return _isKundenDokument
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isKundenDokument = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsSb() As Boolean
|
||||
Get
|
||||
Return _isSb
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isSb = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsSbImport() As Boolean
|
||||
Get
|
||||
Return _isSbImport
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isSbImport = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsSbEditUser() As Boolean
|
||||
Get
|
||||
Return _isSbEditUser
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isSbEditUser = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsSbNur() As Boolean
|
||||
Get
|
||||
Return _isSbNur
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isSbNur = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsBezeichnungMut() As Boolean
|
||||
Get
|
||||
Return _isBezeichnungMut
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isBezeichnungMut = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsFarbigArchiviert() As Boolean
|
||||
Get
|
||||
Return _isFarbigArchiviert
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isFarbigArchiviert = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
48
Backup/BusinessFacade/Funktionsgruppe.vb
Normal file
48
Backup/BusinessFacade/Funktionsgruppe.vb
Normal file
@@ -0,0 +1,48 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für die Funktionsgruppe</summary>
|
||||
Public Class Funktionsgruppe
|
||||
|
||||
#Region "Members"
|
||||
|
||||
Private _funktionsGruppeNr As Integer
|
||||
Private _bezeichnung As String
|
||||
Private _beschreibung As String
|
||||
Private _zugehoerigkeit As String
|
||||
Private _mandantNr As Integer
|
||||
Private _isAktiv As Boolean
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Constructor"
|
||||
|
||||
Public Sub New()
|
||||
End Sub
|
||||
|
||||
'Public Sub New(ByVal funktionsGruppeId As Integer)
|
||||
' Try
|
||||
|
||||
' Catch ex As Exception
|
||||
' Throw ex
|
||||
' End Try
|
||||
'End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Funktionsgruppen zurück</summary>
|
||||
'''<param name="ds">Das DataSet welches gefüllt werden soll</param>
|
||||
|
||||
Public Overloads Shared Sub GetListe(ByRef ds As DataSet)
|
||||
Try
|
||||
DataAccess.Funktionsgruppe.GetListe(ds)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
164
Backup/BusinessFacade/Klassifizierung.vb
Normal file
164
Backup/BusinessFacade/Klassifizierung.vb
Normal file
@@ -0,0 +1,164 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Imports EDOKALib.Common
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für die Klassifizierung</summary>
|
||||
Public Class Klassifizierung
|
||||
|
||||
#Region "Members"
|
||||
|
||||
Dim _klassenId As Integer
|
||||
Dim _bezeichnung As String
|
||||
Dim _beschreibung As String
|
||||
Dim _isAktiv As Boolean
|
||||
Dim _mandantNr As Integer
|
||||
Dim _erstellerMitarbeiterNr As Integer
|
||||
Dim _erstelltAm As DateTime
|
||||
Dim _mutiererMitarbeiterNr As Integer
|
||||
Dim _mutiertAm As DateTime
|
||||
Dim _isTeamZwingend As Boolean
|
||||
Dim _isFunktionsgruppeZwingend As Boolean
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Constructor"
|
||||
|
||||
'''<summary>Erstellt eine neue Instanz für einen neuen Mitarbeiter</summary>
|
||||
Public Sub New()
|
||||
Try
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Erstellt eine neue Instanz für eine bestehende Klassifizierung</summary>
|
||||
'''<param name="klassifizierungNr"></param>
|
||||
Public Sub New(ByVal klassifizierungNr As Integer)
|
||||
Try
|
||||
Dim ds As New DataSet()
|
||||
|
||||
DataAccess.Klassifizierung.GetById(klassifizierungNr, ds)
|
||||
|
||||
If ds.Tables.Count > 0 Then
|
||||
If ds.Tables(0).Rows.Count > 0 Then
|
||||
_klassenId = Common.Tools.CToInt32(ds.Tables(0).Rows(0)("klassenid"))
|
||||
_bezeichnung = Common.Tools.CToString(ds.Tables(0).Rows(0)("bezeichnung"))
|
||||
_beschreibung = Common.Tools.CToString(ds.Tables(0).Rows(0)("beschreibung"))
|
||||
_isAktiv = Common.Tools.CToBool(ds.Tables(0).Rows(0)("aktiv"))
|
||||
_mandantNr = Common.Tools.CToInt32(ds.Tables(0).Rows(0)("mandantnr"))
|
||||
_erstellerMitarbeiterNr = Common.Tools.CToInt32(ds.Tables(0).Rows(0)("ersteller"))
|
||||
_erstelltAm = Common.Tools.CToDateTime(ds.Tables(0).Rows(0)("erstellt_am"))
|
||||
_mutiertAm = Common.Tools.CToDateTime(ds.Tables(0).Rows(0)("mutiert_am"))
|
||||
_mutiererMitarbeiterNr = Common.Tools.CToInt32(ds.Tables(0).Rows(0)("mutierer"))
|
||||
_isTeamZwingend = Common.Tools.CToBool(ds.Tables(0).Rows(0)("zwingendTeam"))
|
||||
_isFunktionsgruppeZwingend = Common.Tools.CToBool(ds.Tables(0).Rows(0)("zwingendFunktion"))
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Klassifizierungen zurück</summary>
|
||||
'''<param name="ds">Das DataSet welches gefüllt werden soll</param>
|
||||
Public Overloads Shared Sub GetListe(ByRef ds As DataSet)
|
||||
Try
|
||||
DataAccess.Klassifizierung.GetListe(ds)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
|
||||
Public ReadOnly Property KlassenId() As Integer
|
||||
Get
|
||||
Return _klassenId
|
||||
End Get
|
||||
End Property
|
||||
Public Property Bezeichnung() As String
|
||||
Get
|
||||
Return _bezeichnung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_bezeichnung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Beschreibung() As String
|
||||
Get
|
||||
Return _beschreibung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_beschreibung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsAktiv() As Boolean
|
||||
Get
|
||||
Return _isAktiv
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MandantNr() As Integer
|
||||
Get
|
||||
Return _mandantNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mandantNr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public ReadOnly Property ErstellerMitarbeiterNr() As Integer
|
||||
Get
|
||||
Return _erstellerMitarbeiterNr
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ErstelltAm() As DateTime
|
||||
Get
|
||||
Return _erstelltAm
|
||||
End Get
|
||||
End Property
|
||||
Public Property MutiererMitarbeiterNr() As Integer
|
||||
Get
|
||||
Return _mutiererMitarbeiterNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mutiererMitarbeiterNr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MutiertAm() As DateTime
|
||||
Get
|
||||
Return _mutiertAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_mutiertAm = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsTeamZwingend() As Boolean
|
||||
Get
|
||||
Return _isTeamZwingend
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isTeamZwingend = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsFunktionsgruppeZwingend() As Boolean
|
||||
Get
|
||||
Return _isFunktionsgruppeZwingend
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isFunktionsgruppeZwingend = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
184
Backup/BusinessFacade/Meldungstext.vb
Normal file
184
Backup/BusinessFacade/Meldungstext.vb
Normal file
@@ -0,0 +1,184 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für die Meldungstext</summary>
|
||||
Public Class Meldungstext
|
||||
|
||||
#Region "Members"
|
||||
Private Shared _meldungstexte As New Hashtable()
|
||||
|
||||
Private _meldungsTextNr As Integer
|
||||
Private _spracheNr As Integer
|
||||
Private _inhalt As String
|
||||
Private _beschreibungs As String
|
||||
Private _isAktiv As Boolean
|
||||
Private _erstelltAm As DateTime
|
||||
Private _mutiertAm As DateTime
|
||||
Private _mutiertMitarbeiterNr As Integer
|
||||
Private _mandantNr As Integer
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Constructor"
|
||||
|
||||
'''<summary>Erstellt eine neue Instanz für einen bestehenen Meldungstext</summary>
|
||||
'''<param name="meldungsTextNr"></param>
|
||||
|
||||
Public Sub New(ByVal meldungsTextNr As Integer)
|
||||
Try
|
||||
|
||||
Select Case LoadDataFromCache(meldungsTextNr)
|
||||
Case 0
|
||||
'found in cache
|
||||
Case 1
|
||||
'caching is disabled
|
||||
LoadData(meldungsTextNr) 'from db
|
||||
Case 2
|
||||
'not found in cache
|
||||
LoadData(meldungsTextNr) 'from db
|
||||
_meldungstexte.Add(meldungsTextNr, Me) 'hinzufügen da nicht vorhanden
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Private methods"
|
||||
Private Sub LoadData(ByVal meldungsTextNr As Integer)
|
||||
Try
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.Meldungstext.GetById(meldungsTextNr, ds)
|
||||
If Common.Tools.ValidateDS(ds) Then
|
||||
_meldungsTextNr = Convert.ToInt32(ds.Tables(0).Rows(0)("meldungstextnr"))
|
||||
_spracheNr = Convert.ToInt32(ds.Tables(0).Rows(0)("Sprache"))
|
||||
_inhalt = ds.Tables(0).Rows(0)("inhalt")
|
||||
_beschreibungs = ds.Tables(0).Rows(0)("beschreibung")
|
||||
_isAktiv = Convert.ToBoolean(ds.Tables(0).Rows(0)("aktiv"))
|
||||
_erstelltAm = Convert.ToDateTime(ds.Tables(0).Rows(0)("erstellt_am"))
|
||||
_mutiertAm = Convert.ToDateTime(ds.Tables(0).Rows(0)("mutiert_am"))
|
||||
_mutiertMitarbeiterNr = Convert.ToInt32(ds.Tables(0).Rows(0)("mutierer"))
|
||||
_mandantNr = Convert.ToInt32(ds.Tables(0).Rows(0)("mandantnr"))
|
||||
End If
|
||||
|
||||
If _meldungsTextNr = 0 Then 'meldung nicht gefunden in db
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Meldungstext.New", "Achtung Meldungstext wurde nicht gefunden! MeldungstextNr: " & CStr(meldungsTextNr), TraceLevel.Warning)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.Meldungstext.LoadData", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Function LoadDataFromCache(ByVal meldungsTextNr As Integer) As Integer
|
||||
Try
|
||||
Dim source As Meldungstext
|
||||
|
||||
If Config.GetParameterValue("CacheMeldungstexte") = 1 Then 'cache is enabled
|
||||
source = _meldungstexte.Item(meldungsTextNr)
|
||||
If Not source Is Nothing Then
|
||||
_meldungsTextNr = source.MeldungsTextNr
|
||||
_spracheNr = source.SpracheNr
|
||||
_inhalt = source.Inhalt
|
||||
_beschreibungs = source.Beschreibung
|
||||
_isAktiv = source.IsAktiv
|
||||
_erstelltAm = source.ErstelltAm
|
||||
_mutiertAm = source.MutiertAm
|
||||
_mutiertMitarbeiterNr = source.MutiertMitarbeiterNr
|
||||
_mandantNr = source.MandantNr
|
||||
Return 0
|
||||
Else
|
||||
Return 2 'not found
|
||||
End If
|
||||
End If
|
||||
Return 1 'caching is disabled
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.Meldungstext.LoadDataFromCache", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gibt den Inhalt einer Melungs zurück</summary>
|
||||
'''<param name="meldungsTextNr"></param>
|
||||
|
||||
Public Overloads Shared Function GetInhaltById(ByVal meldungsTextNr As Integer) As String
|
||||
Try
|
||||
|
||||
Dim meldung As New Meldungstext(meldungsTextNr)
|
||||
|
||||
If meldung.MeldungsTextNr = 0 Then
|
||||
Return "Der MeldungsText mit der Id " + meldungsTextNr.ToString() + " wurde nicht gefunden."
|
||||
Else
|
||||
Return meldung.Inhalt
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
|
||||
Public ReadOnly Property MeldungsTextNr() As Integer
|
||||
Get
|
||||
Return _meldungsTextNr
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property SpracheNr() As String
|
||||
Get
|
||||
Return _spracheNr
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Inhalt() As String
|
||||
Get
|
||||
Return _inhalt
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Beschreibung() As String
|
||||
Get
|
||||
Return _beschreibungs
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property IsAktiv() As Boolean
|
||||
Get
|
||||
Return _isAktiv
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ErstelltAm() As DateTime
|
||||
Get
|
||||
Return _erstelltAm
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MutiertAm() As DateTime
|
||||
Get
|
||||
Return _mutiertAm
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MutiertMitarbeiterNr() As Integer
|
||||
Get
|
||||
Return _mutiertMitarbeiterNr
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MandantNr() As Integer
|
||||
Get
|
||||
Return _mandantNr
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
630
Backup/BusinessFacade/Mitarbeiter.vb
Normal file
630
Backup/BusinessFacade/Mitarbeiter.vb
Normal file
@@ -0,0 +1,630 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Imports EDOKALib.Common
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für die Mitarbeiter</summary>
|
||||
Public Class Mitarbeiter
|
||||
|
||||
#Region "Members"
|
||||
|
||||
Private _mitarbeiterNr As Integer = 0
|
||||
Private _vorname As String
|
||||
Private _nachname As String
|
||||
Private _kurzZeichen As String
|
||||
Private _anrede As String
|
||||
Private _tgNummer As String
|
||||
Private _email As String
|
||||
Private _fax As String
|
||||
Private _telefon As String
|
||||
Private _unterschriftText As String
|
||||
Private _spracheNr As Integer
|
||||
Private _fuerMandantNr As Integer 'arbeitet für diesen mandant
|
||||
Private _showTipp As Boolean 'display tipp bim startup
|
||||
Private _partnerNr As Integer
|
||||
Private _mandantNr As Integer 'zugehörigkeit des mitarbeiter
|
||||
Private _isAktiv As Boolean
|
||||
Private _erstelltAm As DateTime
|
||||
Private _mutiertAm As DateTime
|
||||
Private _mutiererMitarbeiterNr As Integer
|
||||
Private _isMailEmpfang As Boolean 'meldung via email
|
||||
Private _isEdokaMessage As Boolean 'DANGER: feld in db heisst "EdokaMesasge"
|
||||
Private _funktion As String
|
||||
Private _isMailDirektVersenden As Boolean
|
||||
Private _rang As String
|
||||
Private _isMailDokumentRueckgang As Boolean
|
||||
Private _klassifizierungNr As Integer
|
||||
Private _isEdokaMail As Boolean 'meldung via edoka empfangen
|
||||
Private _isJournalisierung As Boolean
|
||||
Private _isGebMeldung As Boolean
|
||||
Private _mail1 As String
|
||||
|
||||
Private _funktionsgruppen As BusinessFacade.Funktionsgruppe()
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Constructor"
|
||||
|
||||
'''<summary>Erstellt eine neue Instanz für einen neuen Mitarbeiter</summary>
|
||||
|
||||
Public Sub New()
|
||||
Try
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
'''<summary>Erstellt eine neue Instanz für einen bestehenden Mitarbeiter</summary>
|
||||
'''<param name="mitarbeiterNr"></param>
|
||||
|
||||
Public Sub New(ByVal mitarbeiterNr As Integer)
|
||||
Try
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.Mitarbeiter.GetById(mitarbeiterNr, ds)
|
||||
LoadData(ds)
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Erstellt eine neue Instanz für einen bestehenen Mitarbeiter</summary>
|
||||
'''<param name="tgNummer"></param>
|
||||
|
||||
Public Sub New(ByVal tgNummer As String)
|
||||
Try
|
||||
Dim ds As New DataSet()
|
||||
|
||||
DataAccess.Mitarbeiter.GetByTgNummer(tgNummer, ds)
|
||||
LoadData(ds)
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Mitarbeitern zurück</summary>
|
||||
'''<param name="dsMitarbeiter">Das DataSet welches gefüllt werden soll</param>
|
||||
|
||||
Public Overloads Shared Sub GetListe(ByRef dsMitarbeiter As DataSet)
|
||||
Try
|
||||
DataAccess.Mitarbeiter.GetListe(0, 0, dsMitarbeiter)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Mitarbeitern zurück</summary>
|
||||
'''<param name="teamNr">Nur Mitarbeiter von diesem Team</param>
|
||||
'''<param name="dsMitarbeiter">Das DataSet welches gefüllt werden soll</param>
|
||||
|
||||
Public Overloads Shared Sub GetListeByTeamNr(ByVal teamNr As Integer, ByRef dsMitarbeiter As DataSet)
|
||||
Try
|
||||
DataAccess.Mitarbeiter.GetListe(teamNr, 0, dsMitarbeiter)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Mitarbeitern zurück</summary>
|
||||
'''<param name="funktionsGruppeNr">Nur Mitarbeiter von dieser Funktionsgruppe</param>
|
||||
'''<param name="dsMitarbeiter">Das DataSet welches gefüllt werden soll</param>
|
||||
|
||||
Public Overloads Shared Sub GetListeByFunktionsGruppeNr(ByVal funktionsGruppeNr As Integer, ByRef dsMitarbeiter As DataSet)
|
||||
Try
|
||||
DataAccess.Mitarbeiter.GetListe(0, funktionsGruppeNr, dsMitarbeiter)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Erstellt ein neues Standard Profil für den angegebenen Mitarbeiter</summary>
|
||||
'''<param name="mutiererMitarbeiterNr">Die datenbank Nummer des Mutierers (ID)</param>
|
||||
|
||||
Public Function CreateNewStandardProfil(ByVal mutiererMitarbeiterNr As Integer)
|
||||
Try
|
||||
DataAccess.Mitarbeiter.CreateNewStandardProfil(_mitarbeiterNr, mutiererMitarbeiterNr)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'''<summary>Speichert die Änderungen an einem Mitarbeiter</summary>
|
||||
'''<param name="mutiererMitarbeiterNr"></param>
|
||||
Public Function Save(ByVal mutiererMitarbeiterNr As Integer)
|
||||
Try
|
||||
Save(Nothing, Nothing, mutiererMitarbeiterNr)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'''<summary>Speichert die Änderungen an einem Mitarbeiter inklusive Funktionsgruppen- und Team-Zuordnungen</summary>
|
||||
'''<param name="dsMaTeams"></param>
|
||||
'''<param name="dsMaFunktionsGruppen"></param>
|
||||
'''<param name="mutiererMitarbeiterNr"></param>
|
||||
Public Function Save(ByVal dsMaTeams As DataSet, ByVal dsMaFunktionsGruppen As DataSet, ByVal mutiererMitarbeiterNr As Integer)
|
||||
Try
|
||||
'daten des mitarbeiters speichern
|
||||
If _mitarbeiterNr <= 0 Then
|
||||
'neuer mitarbeiter
|
||||
_mitarbeiterNr = DataAccess.Mitarbeiter.Insert(_vorname, _nachname, _kurzZeichen, _anrede, _tgNummer, _
|
||||
_email, _fax, _telefon, _unterschriftText, _spracheNr, _fuerMandantNr, _showTipp, _partnerNr, _mandantNr, _
|
||||
_isAktiv, _isMailEmpfang, _isEdokaMessage, _funktion, _isMailDirektVersenden, _rang, _isMailDokumentRueckgang, _
|
||||
_klassifizierungNr, _isEdokaMail, _isJournalisierung, _isGebMeldung, _mail1, mutiererMitarbeiterNr)
|
||||
Else
|
||||
'besthender mitarbeiter
|
||||
DataAccess.Mitarbeiter.Update(_mitarbeiterNr, _vorname, _nachname, _kurzZeichen, _anrede, _tgNummer, _
|
||||
_email, _fax, _telefon, _unterschriftText, _spracheNr, _fuerMandantNr, _showTipp, _partnerNr, _mandantNr, _
|
||||
_isAktiv, _isMailEmpfang, _isEdokaMessage, _funktion, _isMailDirektVersenden, _rang, _isMailDokumentRueckgang, _
|
||||
_klassifizierungNr, _isEdokaMail, _isJournalisierung, _isGebMeldung, _mail1, mutiererMitarbeiterNr)
|
||||
End If
|
||||
|
||||
'je nach klassifizierung müssen min ein team, bzw funktionsgruppe ausgewählt werden
|
||||
Dim klassifizierung As New klassifizierung(_klassifizierungNr)
|
||||
|
||||
'checks auf ds == null finden in GetRowCountAfterSave() statt
|
||||
If klassifizierung.IsTeamZwingend Then
|
||||
If Not GetRowCountAfterSave(dsMaTeams) > 0 Then
|
||||
Throw New MitarbeiterException(String.Format(BusinessFacade.Meldungstext.GetInhaltById(310), klassifizierung.Bezeichnung))
|
||||
Return 1
|
||||
End If
|
||||
Else
|
||||
'wenn nicht zwingend darf keine zuordnung enthalten sein.
|
||||
If GetRowCountAfterSave(dsMaTeams) > 0 Then
|
||||
Throw New MitarbeiterException(String.Format(BusinessFacade.Meldungstext.GetInhaltById(317), klassifizierung.Bezeichnung))
|
||||
Return 1
|
||||
End If
|
||||
End If
|
||||
If klassifizierung.IsFunktionsgruppeZwingend Then
|
||||
If Not GetRowCountAfterSave(dsMaFunktionsGruppen) > 0 Then
|
||||
Throw New MitarbeiterException(String.Format(BusinessFacade.Meldungstext.GetInhaltById(311), klassifizierung.Bezeichnung))
|
||||
Return 1
|
||||
End If
|
||||
Else
|
||||
'wenn nicht zwingend darf keine zuordnung enthalten sein.
|
||||
If GetRowCountAfterSave(dsMaFunktionsGruppen) > 0 Then
|
||||
Throw New MitarbeiterException(String.Format(BusinessFacade.Meldungstext.GetInhaltById(318), klassifizierung.Bezeichnung))
|
||||
Return 1
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not IsNothing(dsMaTeams) Then
|
||||
'zuordnungen speichern
|
||||
Dim row As DataRow
|
||||
Dim teamMitarbeiter As BusinessFacade.TeamMitarbeiter
|
||||
For Each row In dsMaTeams.Tables(0).Rows
|
||||
Select Case row.RowState
|
||||
Case DataRowState.Added
|
||||
'neue zuordnung erstellen
|
||||
teamMitarbeiter = New BusinessFacade.TeamMitarbeiter()
|
||||
teamMitarbeiter.Anteil = Tools.CToInt32(row("anteil"))
|
||||
teamMitarbeiter.IsAktiv = row("aktiv")
|
||||
teamMitarbeiter.MandantNr = row("mandantnr")
|
||||
teamMitarbeiter.MitarbeiterNr = _mitarbeiterNr
|
||||
teamMitarbeiter.Team = New BusinessFacade.Team(Tools.CToInt32(row("teamnr")))
|
||||
|
||||
teamMitarbeiter.Save(mutiererMitarbeiterNr)
|
||||
|
||||
Case DataRowState.Modified
|
||||
'bestehende speichern
|
||||
teamMitarbeiter = New BusinessFacade.TeamMitarbeiter(Tools.CToInt32(row("teammitarbeiternr")))
|
||||
teamMitarbeiter.Anteil = row("anteil")
|
||||
teamMitarbeiter.IsAktiv = row("aktiv")
|
||||
|
||||
teamMitarbeiter.Save(mutiererMitarbeiterNr)
|
||||
|
||||
'Case DataRowState.Deleted
|
||||
'bestehende löschen -> kb310370
|
||||
'BusinessFacade.TeamMitarbeiter.Delete(Tools.CToInt32(row("teammitarbeiternr", DataRowVersion.Original)), mutiererMitarbeiterNr)
|
||||
|
||||
End Select
|
||||
Next
|
||||
End If
|
||||
|
||||
If Not IsNothing(dsMaFunktionsGruppen) Then
|
||||
'zuordnungen speichern
|
||||
Dim row As DataRow
|
||||
For Each row In dsMaFunktionsGruppen.Tables(0).Rows
|
||||
Select Case row.RowState
|
||||
Case DataRowState.Added
|
||||
If Common.Tools.CToBool(row("aktiv")) Then
|
||||
'neue verbindung herstellen
|
||||
BusinessFacade.MitarbeiterFunktionsgruppe.Insert(Tools.CToInt32(row("mitarbeiternr")), Tools.CToInt32(row("funktionsgruppenr")), mutiererMitarbeiterNr)
|
||||
End If
|
||||
|
||||
Case DataRowState.Modified
|
||||
BusinessFacade.MitarbeiterFunktionsgruppe.SetAktiv(Tools.CToInt32(row("mitarbeiter_funktionsgruppenr")), Common.Tools.CToBool(row("aktiv")), mutiererMitarbeiterNr)
|
||||
|
||||
'Case DataRowState.Deleted
|
||||
'bestehende löschen -> kb310370
|
||||
'BusinessFacade.MitarbeiterFunktionsgruppe.Delete(Tools.CToInt32(row("mitarbeiter_funktionsgruppenr", DataRowVersion.Original)), mutiererMitarbeiterNr)
|
||||
|
||||
End Select
|
||||
Next
|
||||
End If
|
||||
|
||||
'members refreshen
|
||||
Dim dsRefresh As New DataSet()
|
||||
DataAccess.Mitarbeiter.GetById(_mitarbeiterNr, dsRefresh)
|
||||
LoadData(dsRefresh)
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Private methods"
|
||||
|
||||
'''<summary>lädt die daten in die klassen member</summary>
|
||||
'''<param name="ds"></param>
|
||||
|
||||
Private Sub LoadData(ByVal ds As DataSet)
|
||||
Try
|
||||
If Not Common.Tools.ValidateDS(ds) Then
|
||||
Return
|
||||
End If
|
||||
|
||||
_mitarbeiterNr = Tools.CToInt32(ds.Tables(0).Rows(0)("mitarbeiterNr"))
|
||||
_vorname = Tools.CToString(ds.Tables(0).Rows(0)("vorname"))
|
||||
_nachname = Tools.CToString(ds.Tables(0).Rows(0)("name"))
|
||||
_kurzZeichen = Tools.CToString(ds.Tables(0).Rows(0)("kurzzeichen"))
|
||||
_anrede = Tools.CToString(ds.Tables(0).Rows(0)("anrede"))
|
||||
_tgNummer = Tools.CToString(ds.Tables(0).Rows(0)("tgnummer"))
|
||||
_email = Tools.CToString(ds.Tables(0).Rows(0)("email"))
|
||||
_fax = Tools.CToString(ds.Tables(0).Rows(0)("fax"))
|
||||
_telefon = Tools.CToString(ds.Tables(0).Rows(0)("telefon"))
|
||||
_unterschriftText = Tools.CToString(ds.Tables(0).Rows(0)("unterschrift_text"))
|
||||
_spracheNr = Tools.CToInt32(ds.Tables(0).Rows(0)("sprache"))
|
||||
_fuerMandantNr = Tools.CToInt32(ds.Tables(0).Rows(0)("fuermandant"))
|
||||
_showTipp = Common.Tools.CToBool(ds.Tables(0).Rows(0)("showtip"))
|
||||
_partnerNr = Tools.CToInt32(ds.Tables(0).Rows(0)("partnernr"))
|
||||
_mandantNr = Tools.CToInt32(ds.Tables(0).Rows(0)("mandantnr"))
|
||||
_isAktiv = Common.Tools.CToBool(ds.Tables(0).Rows(0)("aktiv"))
|
||||
_erstelltAm = Tools.CToDateTime(ds.Tables(0).Rows(0)("erstellt_am"))
|
||||
_mutiertAm = Tools.CToDateTime(ds.Tables(0).Rows(0)("mutiert_am"))
|
||||
_mutiererMitarbeiterNr = Tools.CToInt32(ds.Tables(0).Rows(0)("mutierer"))
|
||||
_isMailEmpfang = Common.Tools.CToBool(ds.Tables(0).Rows(0)("mailempfang"))
|
||||
_isEdokaMessage = Common.Tools.CToBool(ds.Tables(0).Rows(0)("EdokaMesasge"))
|
||||
_funktion = Tools.CToString(ds.Tables(0).Rows(0)("funktion"))
|
||||
_isMailDirektVersenden = Common.Tools.CToBool(ds.Tables(0).Rows(0)("MailDirektVersenden"))
|
||||
_rang = Tools.CToString(ds.Tables(0).Rows(0)("Rang"))
|
||||
_isMailDokumentRueckgang = Common.Tools.CToBool(ds.Tables(0).Rows(0)("MailDokumentrueckgang"))
|
||||
_klassifizierungNr = Tools.CToInt32(ds.Tables(0).Rows(0)("klassifizierung"))
|
||||
_isEdokaMail = Common.Tools.CToBool(ds.Tables(0).Rows(0)("edoka_mail"))
|
||||
_isJournalisierung = Common.Tools.CToBool(ds.Tables(0).Rows(0)("journalisierung"))
|
||||
_isGebMeldung = Common.Tools.CToBool(ds.Tables(0).Rows(0)("GebMeldung"))
|
||||
_mail1 = Tools.CToString(ds.Tables(0).Rows(0)("Mail_1"))
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Parameter.LoadData", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Gibt die Anzahl der Rows zurück, welche sie nach dem Speichern haben werden</summary>
|
||||
'''<param name="ds2Validate">Das zu überprüfende DataSet</param>
|
||||
'''<returns>Der neue rowCount</returns>
|
||||
Private Function GetRowCountAfterSave(ByVal ds2Validate As DataSet) As Integer
|
||||
Try
|
||||
'validierung nicht möglich, es werden keines row mehr da sein nach dem speichern
|
||||
If IsNothing(ds2Validate) Then
|
||||
Return 0
|
||||
End If
|
||||
|
||||
Dim row As DataRow
|
||||
Dim newRowCount As Integer = 0
|
||||
|
||||
'neue rows zählen
|
||||
For Each row In ds2Validate.Tables(0).Rows
|
||||
If Convert.ToBoolean(row("aktiv")) And _
|
||||
(row.RowState = DataRowState.Added Or _
|
||||
row.RowState = DataRowState.Modified Or _
|
||||
row.RowState = DataRowState.Unchanged) Then
|
||||
|
||||
newRowCount = newRowCount + 1
|
||||
End If
|
||||
Next
|
||||
|
||||
Return newRowCount
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
|
||||
Public ReadOnly Property MitarbeiterNr() As Integer
|
||||
Get
|
||||
Return _mitarbeiterNr
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property Vorname() As String
|
||||
Get
|
||||
Return _vorname
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_vorname = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Nachname() As String
|
||||
Get
|
||||
Return _nachname
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_nachname = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property AnzeigeName() As String
|
||||
Get
|
||||
Return _nachname + " " + _vorname
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property KurzZeichen() As String
|
||||
Get
|
||||
Return _kurzZeichen
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_kurzZeichen = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Anrede() As String
|
||||
Get
|
||||
Return _anrede
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_anrede = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property TGNummer() As String
|
||||
Get
|
||||
Return _tgNummer
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_tgNummer = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property EMail() As String
|
||||
Get
|
||||
Return _email
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_email = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Fax() As String
|
||||
Get
|
||||
Return _fax
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_fax = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Telefon() As String
|
||||
Get
|
||||
Return _telefon
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_telefon = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property UnterschritText() As String
|
||||
Get
|
||||
Return _unterschriftText
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_unterschriftText = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property SpracheNr() As Integer
|
||||
Get
|
||||
Return _spracheNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_spracheNr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property FuerMandantNr() As Integer
|
||||
Get
|
||||
Return _fuerMandantNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_fuerMandantNr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property ShowTipp() As Boolean
|
||||
Get
|
||||
Return _showTipp
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_showTipp = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property PartnerNr() As Integer
|
||||
Get
|
||||
Return _partnerNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_partnerNr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property MandantNr() As Integer
|
||||
Get
|
||||
Return _mandantNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mandantNr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property IsAktiv() As Boolean
|
||||
Get
|
||||
Return _isAktiv
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ErstelltAm() As DateTime
|
||||
Get
|
||||
Return _erstelltAm
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MutiertAm() As DateTime
|
||||
Get
|
||||
Return _mutiertAm
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MutiererMitarbeiterNr() As Integer
|
||||
Get
|
||||
Return _mutiererMitarbeiterNr
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property IsMailEmpfang() As Boolean
|
||||
Get
|
||||
Return _isMailEmpfang
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isMailEmpfang = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property IsEdokaMessage() As Boolean
|
||||
Get
|
||||
Return _isEdokaMessage
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isEdokaMessage = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Funktion() As String
|
||||
Get
|
||||
Return _funktion
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_funktion = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property IsMailDirektVersenden() As Boolean
|
||||
Get
|
||||
Return _isMailDirektVersenden
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isMailDirektVersenden = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Rang() As String
|
||||
Get
|
||||
Return _rang
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_rang = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property IsMailDokumentRueckgang() As Boolean
|
||||
Get
|
||||
Return _isMailDokumentRueckgang
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isMailDokumentRueckgang = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property KlassifizierungNr() As Integer
|
||||
Get
|
||||
Return _klassifizierungNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_klassifizierungNr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property IsEdokaMail() As Boolean
|
||||
Get
|
||||
Return _isEdokaMail
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isEdokaMail = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Journalisierung() As Boolean
|
||||
Get
|
||||
Return _isJournalisierung
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isJournalisierung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property IsGebMeldung() As Boolean
|
||||
Get
|
||||
Return _isGebMeldung
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isGebMeldung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Mail1() As String
|
||||
Get
|
||||
Return _mail1
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_mail1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
'''<summary>Diese Klasse behandelt eine Mitarbeiter spezifische Ausnahme</summary>
|
||||
Public Class MitarbeiterException
|
||||
Inherits Exception
|
||||
|
||||
Dim _message As String
|
||||
|
||||
Public Sub New(ByVal message As String)
|
||||
_message = message
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property Message() As String
|
||||
Get
|
||||
Return _message
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
56
Backup/BusinessFacade/MitarbeiterFunktionsgruppe.vb
Normal file
56
Backup/BusinessFacade/MitarbeiterFunktionsgruppe.vb
Normal file
@@ -0,0 +1,56 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Imports EDOKALib.Common
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für die Mitarbeiter-Funktionsgruppen Zuweisung</summary>
|
||||
Public Class MitarbeiterFunktionsgruppe
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Löscht eine Team-Mitarbeiter Zuordnung aus der Datenbank</summary>
|
||||
'''<param name="mitarbeiterFunktionsGruppeNr">Zu löschende Verbindung</param>
|
||||
'''<param name="mutiererMitarbeiterNr">Die Id des Benutzers, welcher die Änderungen vornimmt</param>
|
||||
Public Overloads Shared Function Delete(ByVal mitarbeiterFunktionsGruppeNr As Integer, ByVal mutiererMitarbeiterNr As Integer)
|
||||
Try
|
||||
DataAccess.MitarbeiterFunktionsgruppe.Delete(mitarbeiterFunktionsGruppeNr, mutiererMitarbeiterNr)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'''<summary>Speichert die Daten der aktuellen Instanz in die Datenbank</summary>
|
||||
'''<param name="mutiererMitarbeiterNr">Die Id des Benutzers, welcher die Änderungen vornimmt</param>
|
||||
|
||||
Public Overloads Shared Function Insert(ByVal mitarbeiterNr As Integer, ByVal funktionsGruppeNr As Integer, ByVal mutiererMitarbeiterNr As Integer)
|
||||
Try
|
||||
'neuer eintrag
|
||||
DataAccess.MitarbeiterFunktionsgruppe.Insert(mitarbeiterNr, funktionsGruppeNr, mutiererMitarbeiterNr)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Funktionsgrupppen denen ein Mitarbeiter zugewiesen ist zurück</summary>
|
||||
'''<param name="ds">Das DataSet welches gefüllt werden soll</param>
|
||||
Public Overloads Shared Sub GetListeByMitarbeiterNr(ByVal mitarbeiterNr As Integer, ByRef ds As DataSet)
|
||||
Try
|
||||
DataAccess.MitarbeiterFunktionsgruppe.GetListeByMitarbeiterNr(mitarbeiterNr, ds)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Funktionsgrupppen denen ein Mitarbeiter zugewiesen ist zurück</summary>
|
||||
|
||||
Public Overloads Shared Sub SetAktiv(ByVal mitarbeiterFunktionsGruppeNr As Integer, ByVal isAktiv As Boolean, ByVal mutiererMitarbeiterNr As Integer)
|
||||
Try
|
||||
DataAccess.MitarbeiterFunktionsgruppe.SetAktiv(mitarbeiterFunktionsGruppeNr, isAktiv, mutiererMitarbeiterNr)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
98
Backup/BusinessFacade/NullHandler.vb
Normal file
98
Backup/BusinessFacade/NullHandler.vb
Normal file
@@ -0,0 +1,98 @@
|
||||
'''<summary>diese klasse ersetzt null values durch den parameter 'NullReplaceValue' von der parameter tabelle</summary>
|
||||
'''Achtung! dies funktioniert nicht mit allen daten typen! zur zeit ist der replace wert = -5648945
|
||||
'''dies heisst, dass sämtliche unsigned, binary, Datums und boolean-Datentypen nicht unterstützt werden.
|
||||
'''gut nachdenken befor neue datentypen hier eingetragen werden!
|
||||
Public Class NullHandler
|
||||
Public Shared _nullReplacerInt As Integer
|
||||
Public Shared _nullReplacerStr As String
|
||||
|
||||
|
||||
Shared Sub New()
|
||||
_nullReplacerInt = Integer.Parse(Config.GetParameterValue("NullReplaceValue"))
|
||||
_nullReplacerStr = Config.GetParameterValue("NullReplaceValue")
|
||||
End Sub
|
||||
|
||||
Public Shared Function CToInt16(ByVal o As Object) As Int16
|
||||
If o Is System.DBNull.Value Then
|
||||
Return CShort(_nullReplacerInt)
|
||||
Else
|
||||
If TypeOf o Is Int16 Then
|
||||
Return CShort(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function CToInt32(ByVal o As Object) As Int32
|
||||
If o Is System.DBNull.Value Then
|
||||
Return _nullReplacerInt
|
||||
Else
|
||||
If TypeOf o Is Int32 Then
|
||||
Return CInt(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function CToInt64(ByVal o As Object) As Int64
|
||||
If o Is System.DBNull.Value Then
|
||||
Return CLng(_nullReplacerInt)
|
||||
Else
|
||||
If TypeOf o Is Int64 Then
|
||||
Return CLng(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function CToSingle(ByVal o As Object) As Single
|
||||
If o Is System.DBNull.Value Then
|
||||
Return CSng(_nullReplacerInt)
|
||||
Else
|
||||
If TypeOf o Is Single Then
|
||||
Return CSng(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function CToDouble(ByVal o As Object) As Double
|
||||
If o Is System.DBNull.Value Then
|
||||
Return CDbl(_nullReplacerInt)
|
||||
Else
|
||||
If TypeOf o Is Double Then
|
||||
Return CDbl(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function CToDecimal(ByVal o As Object) As Decimal
|
||||
If o Is System.DBNull.Value Then
|
||||
Return CDec(_nullReplacerInt)
|
||||
Else
|
||||
If TypeOf o Is Decimal Then
|
||||
Return CDec(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function CToString(ByVal o As Object) As String
|
||||
If o Is System.DBNull.Value Then
|
||||
Return _nullReplacerStr
|
||||
Else
|
||||
If TypeOf o Is String Then
|
||||
Return CStr(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
'''<summary>spezialfall wird auf DateTime.MinValue gesetzt</summary>
|
||||
'''<param name="o"></param>
|
||||
|
||||
Public Shared Function CToDateTime(ByVal o As Object) As DateTime
|
||||
If o Is System.DBNull.Value Then
|
||||
Return DateTime.MinValue
|
||||
Else
|
||||
If TypeOf o Is DateTime Then
|
||||
Return CDate(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
End Class
|
||||
380
Backup/BusinessFacade/OfficeVorlage.vb
Normal file
380
Backup/BusinessFacade/OfficeVorlage.vb
Normal file
@@ -0,0 +1,380 @@
|
||||
Imports EDOKALib.Common
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für die Office Vorlage</summary>
|
||||
Public Class OfficeVorlage
|
||||
|
||||
#Region "Members"
|
||||
|
||||
Private _officeVorlageNr As Integer
|
||||
Private _bezeichnung As String
|
||||
Private _beschreibung As String
|
||||
Private _vorlageId As Integer
|
||||
Private _vorlageName As String
|
||||
Private _prefixDokumentName As String
|
||||
Private _isIdvVorlage As Boolean
|
||||
Private _idvId As String
|
||||
Private _officeVorlage As String
|
||||
Private _isAbsenderErsteller As Boolean 'nicht implementiert -> property not visible
|
||||
Private _isIdvNativ As Boolean
|
||||
Private _isDokumentGeschuetzt As Boolean 'nicht implementiert -> property not visible
|
||||
Private _isKopfzeileGenerieren As Boolean
|
||||
Private _klassifizierung As Boolean 'nicht implementiert -> property not visible
|
||||
Private _barcode As BarcodeTyp
|
||||
Private _mandantNr As Integer
|
||||
Private _isAktiv As Boolean
|
||||
Private _erstelltAm As DateTime
|
||||
Private _mutiertAm As DateTime
|
||||
Private _mutiererMitarbeiterNr As Integer
|
||||
Private _anwendung As Anwendung
|
||||
Private _ownerMitarbeiterNr As Integer
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Constructor"
|
||||
|
||||
Public Sub New()
|
||||
End Sub
|
||||
|
||||
'''<summary>Neue Instanz für bestehende OfficeVorlage erstellen</summary>
|
||||
'''<param name="officeVorlageNr"></param>
|
||||
Public Sub New(ByVal officeVorlageNr As Integer)
|
||||
Try
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.OfficeVorlage.GetByNr(ds, officeVorlageNr)
|
||||
LoadData(ds)
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.OfficeVorlage.New", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Structs"
|
||||
|
||||
Public Structure BarcodeTyp
|
||||
|
||||
Private _top As Integer
|
||||
Private _left As Integer
|
||||
Private _width As Integer
|
||||
Private _height As Integer
|
||||
Private _isHorizontal As Boolean
|
||||
|
||||
Public Sub New(ByVal top As Integer, ByVal left As Integer, ByVal width As Integer, ByVal height As Integer, ByVal isHorizontal As Boolean)
|
||||
Try
|
||||
_top = top
|
||||
_left = left
|
||||
_width = width
|
||||
_height = height
|
||||
_isHorizontal = isHorizontal
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.OfficeVorlage.Barcode", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property Top()
|
||||
Get
|
||||
Return _top
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property Left()
|
||||
Get
|
||||
Return _left
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property Height()
|
||||
Get
|
||||
Return _height
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property Width()
|
||||
Get
|
||||
Return _width
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property IsHorizontal()
|
||||
Get
|
||||
Return _isHorizontal
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Structure
|
||||
#End Region
|
||||
|
||||
#Region "Private Functions"
|
||||
|
||||
|
||||
'''<summary>lädt die daten in die klassen member</summary>
|
||||
'''<param name="ds"></param>
|
||||
Private Sub LoadData(ByVal ds As DataSet)
|
||||
Try
|
||||
If Not Common.Tools.ValidateDS(ds) Then
|
||||
Return
|
||||
End If
|
||||
|
||||
_officeVorlageNr = Tools.CToInt32(ds.Tables(0).Rows(0)("offfice_vorlagenr"))
|
||||
_bezeichnung = NullHandler.CToString(ds.Tables(0).Rows(0)("bezeichnung"))
|
||||
_beschreibung = NullHandler.CToString(ds.Tables(0).Rows(0)("beschreibung"))
|
||||
_vorlageId = NullHandler.CToInt32(ds.Tables(0).Rows(0)("vorlageid"))
|
||||
_vorlageName = NullHandler.CToString(ds.Tables(0).Rows(0)("vorlagename"))
|
||||
_prefixDokumentName = NullHandler.CToString(ds.Tables(0).Rows(0)("prefix_dokumentname"))
|
||||
_isIdvVorlage = Tools.CToBool(ds.Tables(0).Rows(0)("idv_vorlage"))
|
||||
_idvId = NullHandler.CToString(ds.Tables(0).Rows(0)("idv_id"))
|
||||
_officeVorlage = NullHandler.CToString(ds.Tables(0).Rows(0)("office_vorlage"))
|
||||
_isAbsenderErsteller = Tools.CToBool(ds.Tables(0).Rows(0)("absender_ersteller"))
|
||||
_isIdvNativ = Tools.CToBool(ds.Tables(0).Rows(0)("idv_nativ"))
|
||||
_isDokumentGeschuetzt = Tools.CToBool(ds.Tables(0).Rows(0)("dokument_geschuetzt"))
|
||||
_isKopfzeileGenerieren = Tools.CToBool(ds.Tables(0).Rows(0)("kopfzeile_generieren"))
|
||||
_klassifizierung = NullHandler.CToInt32(ds.Tables(0).Rows(0)("klassifizierung"))
|
||||
|
||||
_barcode = New BarcodeTyp(Tools.CToInt32(ds.Tables(0).Rows(0)("bcpt")), _
|
||||
NullHandler.CToInt32(ds.Tables(0).Rows(0)("bcpl")), _
|
||||
Tools.CToInt32(ds.Tables(0).Rows(0)("bcw")), _
|
||||
Tools.CToInt32(ds.Tables(0).Rows(0)("bch")), _
|
||||
NullHandler.CToInt32(ds.Tables(0).Rows(0)("bhorizontal")))
|
||||
|
||||
_mandantNr = NullHandler.CToInt32(ds.Tables(0).Rows(0)("mandantnr"))
|
||||
_isAktiv = Tools.CToBool(ds.Tables(0).Rows(0)("aktiv"))
|
||||
_erstelltAm = NullHandler.CToDateTime(ds.Tables(0).Rows(0)("erstellt_am"))
|
||||
_mutiertAm = NullHandler.CToDateTime(ds.Tables(0).Rows(0)("mutiert_am"))
|
||||
_mutiererMitarbeiterNr = NullHandler.CToInt32(ds.Tables(0).Rows(0)("mutierer"))
|
||||
|
||||
_anwendung = New Anwendung(NullHandler.CToInt32(ds.Tables(0).Rows(0)("anwendungnr")))
|
||||
_ownerMitarbeiterNr = NullHandler.CToInt32(ds.Tables(0).Rows(0)("owner"))
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.OfficeVorlage.ConstructorHelper", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Public Functions"
|
||||
Public Function Save(ByVal mutierer As Integer)
|
||||
Try
|
||||
Dim err As Integer
|
||||
Dim key As Integer
|
||||
If _officeVorlageNr = 0 Then 'create new
|
||||
err = DataAccess.OfficeVorlage.Add(key, _bezeichnung, _beschreibung, _vorlageId, _vorlageName, _
|
||||
_prefixDokumentName, _isIdvVorlage, _idvId, _officeVorlage, _isAbsenderErsteller, _isIdvNativ, _
|
||||
_isDokumentGeschuetzt, _isKopfzeileGenerieren, _klassifizierung, _barcode.Top, _barcode.Left, _
|
||||
_barcode.Width, _barcode.Height, _barcode.IsHorizontal, _mandantNr, _isAktiv, _erstelltAm, _
|
||||
_mutiertAm, _mutiererMitarbeiterNr, _anwendung.AnwendungsNr, _ownerMitarbeiterNr)
|
||||
|
||||
|
||||
|
||||
If err = 0 Then
|
||||
_officeVorlageNr = key
|
||||
End If
|
||||
Else 'save existing
|
||||
|
||||
End If
|
||||
|
||||
If err <> 0 Then
|
||||
Throw New DokumentartException(Meldungstext.GetInhaltById(40000))
|
||||
End If
|
||||
|
||||
'refresh data
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.OfficeVorlage.GetByNr(ds, OfficeVorlageNr)
|
||||
LoadData(ds)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.OfficeVorlage.Save", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Delete(ByVal mutierer As Integer)
|
||||
Try
|
||||
_isAktiv = False
|
||||
Save(mutierer)
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.OfficeVorlage.Delete", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
|
||||
Public Property OfficeVorlageNr() As Integer
|
||||
Get
|
||||
Return _officeVorlageNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_officeVorlageNr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Bezeichnung() As String
|
||||
Get
|
||||
Return _bezeichnung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_bezeichnung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Beschreibung() As String
|
||||
Get
|
||||
Return _beschreibung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_beschreibung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property VorlageId() As Integer
|
||||
Get
|
||||
Return _vorlageId
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_vorlageId = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property VorlageName() As String
|
||||
Get
|
||||
Return _vorlageName
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_vorlageName = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property PrefixDokumentName() As String
|
||||
Get
|
||||
Return _prefixDokumentName
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_prefixDokumentName = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsIdvVorlage() As Boolean
|
||||
Get
|
||||
Return _isIdvVorlage
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isIdvVorlage = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IdvId() As String
|
||||
Get
|
||||
Return _idvId
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_idvId = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property OfficeVorlage() As String
|
||||
Get
|
||||
Return _officeVorlage
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_officeVorlage = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsIdvNativ() As Boolean
|
||||
Get
|
||||
Return _isIdvNativ
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isIdvNativ = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsKopfzeileGenerieren() As Boolean
|
||||
Get
|
||||
Return _isKopfzeileGenerieren
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isKopfzeileGenerieren = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property BarcodeMember() As BarcodeTyp
|
||||
Get
|
||||
Return _barcode
|
||||
End Get
|
||||
Set(ByVal Value As BarcodeTyp)
|
||||
_barcode = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MandantNr() As Integer
|
||||
Get
|
||||
Return _mandantNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mandantNr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsAktiv() As Boolean
|
||||
Get
|
||||
Return _isAktiv
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ErstelltAm() As DateTime
|
||||
Get
|
||||
Return _erstelltAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_erstelltAm = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MutiertAm() As DateTime
|
||||
Get
|
||||
Return _mutiertAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_mutiertAm = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MutiererMitarbeiterNr() As Integer
|
||||
Get
|
||||
Return _mutiererMitarbeiterNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mutiererMitarbeiterNr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Anwendung() As Anwendung
|
||||
Get
|
||||
Return _anwendung
|
||||
End Get
|
||||
Set(ByVal Value As Anwendung)
|
||||
_anwendung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property OwnerMitarbeiterNr() As Integer
|
||||
Get
|
||||
Return _ownerMitarbeiterNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_ownerMitarbeiterNr = Value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
#Region "OfficeVorlageException"
|
||||
|
||||
'''<summary>Diese Klasse behandelt eine OfficeVorlage spezifische Ausnahme</summary>
|
||||
Public Class OfficeVorlageException
|
||||
Inherits Exception
|
||||
|
||||
Dim _message As String
|
||||
|
||||
Public Sub New(ByVal message As String)
|
||||
_message = message
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property Message() As String
|
||||
Get
|
||||
Return _message
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
|
||||
#End Region
|
||||
180
Backup/BusinessFacade/Parameter.vb
Normal file
180
Backup/BusinessFacade/Parameter.vb
Normal file
@@ -0,0 +1,180 @@
|
||||
|
||||
'''<summary>Applikations Parameter (verwaltet Programmeinstellungen für einzelne oder alle Benutzer in einer sql-tabelle)</summary>
|
||||
'''um auf die parameter abzufragen bitte die klasse BF.Config verwenden. diese klasse cached die parameter.
|
||||
Public Class Parameter
|
||||
|
||||
#Region "Member"
|
||||
Private _parameterId As Integer
|
||||
Private _benutzerNr As Integer
|
||||
Private _name As String
|
||||
Private _wert As String = ""
|
||||
Private _datentyp As Datentyp
|
||||
Private _beschreibung As String
|
||||
Private _aktiv As Boolean
|
||||
Private _mutiererId As Integer
|
||||
Private _mutiertAm As DateTime
|
||||
#End Region
|
||||
|
||||
#Region "Enums"
|
||||
Public Enum Datentyp
|
||||
[Integer] = 1
|
||||
[String] = 2
|
||||
[Boolean] = 3
|
||||
End Enum
|
||||
#End Region
|
||||
|
||||
#Region "Constructors"
|
||||
|
||||
Public Sub New()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
'''<summary>load the parameter for all users (benutzerNr=0)</summary>
|
||||
'''<param name="parameterName">parameterName</param>
|
||||
|
||||
Public Sub New(ByVal parameterName As String)
|
||||
ConstructorHelper(parameterName, 0)
|
||||
End Sub
|
||||
|
||||
|
||||
'''<summary>lädt einen parameter für einen bestimmten benutzer oder für alle</summary>
|
||||
'''<param name="parameterName">parameterName</param>
|
||||
'''<param name="benutzerNr">BenutzerNr oder 0 = gültig für alle benutzer</param>
|
||||
|
||||
Public Sub New(ByVal parameterName As String, ByVal benutzerNr As Integer)
|
||||
ConstructorHelper(parameterName, benutzerNr)
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Private Functions"
|
||||
|
||||
'''<summary>workaround für fehlendes konstruktor überladen</summary>
|
||||
'''<param name="parameterName"></param>
|
||||
'''<param name="benutzerNr"></param>
|
||||
|
||||
Private Sub ConstructorHelper(ByVal parameterName As String, ByVal benutzerNr As Integer)
|
||||
Try
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.Parameter.GetParameter(ds, benutzerNr, parameterName)
|
||||
LoadData(ds)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Parameter.ConstructorHelper", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
'''<summary>lädt die daten in die klassen member</summary>
|
||||
'''<param name="ds"></param>
|
||||
|
||||
Private Sub LoadData(ByVal ds As DataSet)
|
||||
Try
|
||||
If Not Common.Tools.ValidateDS(ds) Then
|
||||
Return
|
||||
End If
|
||||
|
||||
_parameterId = ds.Tables(0).Rows(0).Item("ParameterId")
|
||||
_benutzerNr = ds.Tables(0).Rows(0).Item("BenutzerNr")
|
||||
_name = ds.Tables(0).Rows(0).Item("Name")
|
||||
_wert = ds.Tables(0).Rows(0).Item("Wert")
|
||||
_datentyp = CType(ds.Tables(0).Rows(0).Item("Datentyp"), Datentyp)
|
||||
_beschreibung = ds.Tables(0).Rows(0).Item("Beschreibung")
|
||||
_aktiv = ds.Tables(0).Rows(0).Item("Aktiv")
|
||||
_mutiererId = ds.Tables(0).Rows(0).Item("MutiererId")
|
||||
_mutiertAm = ds.Tables(0).Rows(0).Item("MutiertAm")
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Parameter.LoadData", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
Public Property ParameterId() As Integer
|
||||
Get
|
||||
Return _parameterId
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_parameterId = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property BenutzerNr() As Integer
|
||||
Get
|
||||
Return _benutzerNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_benutzerNr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Name() As String
|
||||
Get
|
||||
Return _name
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_name = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Wert() As String
|
||||
Get
|
||||
Return _wert
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_wert = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Typ() As Datentyp
|
||||
Get
|
||||
Return _datentyp
|
||||
End Get
|
||||
Set(ByVal Value As Datentyp)
|
||||
_datentyp = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Beschreibung() As String
|
||||
Get
|
||||
Return _beschreibung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_beschreibung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Aktiv() As Boolean
|
||||
Get
|
||||
Return _aktiv
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_aktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property MutiererId() As Integer
|
||||
Get
|
||||
Return _mutiererId
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mutiererId = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property MutiertAm() As DateTime
|
||||
Get
|
||||
Return _mutiertAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_mutiertAm = Value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
83
Backup/BusinessFacade/Profil.vb
Normal file
83
Backup/BusinessFacade/Profil.vb
Normal file
@@ -0,0 +1,83 @@
|
||||
Imports EDOKALib.Common
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für die Profile</summary>
|
||||
Public Class Profil
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gib eine DataTable mit allen profilen eines Benutzers zurück</summary>
|
||||
'''<param name="mitarbeiterNr"></param>
|
||||
'''<param name="dt"></param>
|
||||
|
||||
Public Shared Function GetListeByMitarbeiterNr(ByVal mitarbeiterNr As Integer, ByRef dt As DataTable)
|
||||
Try
|
||||
Dim ds As New DataSet()
|
||||
|
||||
DataAccess.Profil.GetListeByMitarbeiterNr(mitarbeiterNr, ds)
|
||||
|
||||
If ds.Tables.Count = 0 Then
|
||||
'no datatable -> no data
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EdokaLib.Profil.GetListeByMitarbeiterNr", "Der Mitarbeiter mit der Nr " & mitarbeiterNr & " hat keine Profile", TraceLevel.Info)
|
||||
Throw New ProfilException(1, "Der Mitarbeiter mit der Nr " & mitarbeiterNr & " hat keine Profile")
|
||||
End If
|
||||
|
||||
dt = ds.Tables(0)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EdokaLib.Profil.GetListeByMitarbeiterNr", ex.Message & ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'''<summary>Gibt die Id(Nr) des standard Profils eines Benutzers zurück</summary>
|
||||
'''<param name="mitarbeiterNr"></param>
|
||||
|
||||
Public Shared Function GetStandardProfilNr(ByVal mitarbeiterNr As Integer) As Integer
|
||||
Try
|
||||
Dim dt As New DataTable()
|
||||
Dim i As Integer
|
||||
|
||||
GetListeByMitarbeiterNr(mitarbeiterNr, dt)
|
||||
|
||||
For i = 0 To dt.Rows.Count - 1
|
||||
If dt.Rows(i).Item("standard") = True Then
|
||||
Return dt.Rows(i).Item("profilnr")
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EdokaLib.Profil.GetStandardProfilNr", ex.Message & ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
#Region "ProfilException"
|
||||
|
||||
Public Class ProfilException
|
||||
Inherits Exception
|
||||
|
||||
Private _number As Integer
|
||||
Private _description As String
|
||||
|
||||
Public Sub New(ByVal number As Integer, ByVal description As String)
|
||||
_number = number
|
||||
_description = description
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property Message() As String
|
||||
Get
|
||||
Return _description
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Number() As Integer
|
||||
Get
|
||||
Return _number
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
|
||||
#End Region
|
||||
58
Backup/BusinessFacade/Spalten.vb
Normal file
58
Backup/BusinessFacade/Spalten.vb
Normal file
@@ -0,0 +1,58 @@
|
||||
Imports System.Data
|
||||
|
||||
Imports EDOKALib.Common
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für die Spalten Definitionen</summary>
|
||||
Public Class Spalten
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Füllt ein C1TrueDbGrid mit allen in der Datenbank definierten Spalten</summary>
|
||||
'''<param name="tableName">Name der Tabelle, von welcher die Spalten zurück gegeben werden sollen</param>
|
||||
|
||||
Public Overloads Shared Sub FillGridColumns(ByVal tableName As String, ByRef grid As C1.Win.C1TrueDBGrid.C1TrueDBGrid)
|
||||
Try
|
||||
Dim dsSpalten As New DataSet()
|
||||
DataAccess.Spalten.GetListe(tableName, dsSpalten)
|
||||
|
||||
If dsSpalten.Tables.Count > 0 Then
|
||||
If dsSpalten.Tables(0).Rows.Count > 0 Then
|
||||
|
||||
'bestehende löschen
|
||||
grid.Columns.Clear()
|
||||
|
||||
Dim row As DataRow
|
||||
|
||||
grid.Splits(0).DisplayColumns.Clear()
|
||||
|
||||
Dim index As Integer = 0
|
||||
Dim column As C1.Win.C1TrueDBGrid.C1DisplayColumn
|
||||
|
||||
'alle spalten in grid erstellen
|
||||
For Each row In dsSpalten.Tables(0).Rows
|
||||
index = grid.Columns.Add(New C1.Win.C1TrueDBGrid.C1DataColumn())
|
||||
|
||||
grid.Columns(index).Caption = Tools.CToString(row("spalte"))
|
||||
grid.Columns(index).DataField = Tools.CToString(row("tabellenspalte"))
|
||||
|
||||
'feld mit checkbox anzeigen
|
||||
If Common.Tools.CToBool(row("alsHacken")) Then
|
||||
grid.Columns(index).ValueItems().Presentation = C1.Win.C1TrueDBGrid.PresentationEnum.CheckBox
|
||||
End If
|
||||
|
||||
grid.Splits(0).DisplayColumns(index).Width = Common.Tools.CToInt32(row("Breite"))
|
||||
grid.Splits(0).DisplayColumns(index).Visible = True
|
||||
|
||||
index += 1
|
||||
Next
|
||||
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
135
Backup/BusinessFacade/Team.vb
Normal file
135
Backup/BusinessFacade/Team.vb
Normal file
@@ -0,0 +1,135 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Imports EDOKALib.Common
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für die Teams</summary>
|
||||
Public Class Team
|
||||
|
||||
#Region "Members"
|
||||
|
||||
Private _teamNr As Integer
|
||||
Private _bezeichnung As String
|
||||
Private _kostenstellenNr As Integer
|
||||
Private _mandantNr As Integer
|
||||
Private _isAktiv As Boolean
|
||||
Private _erstelltAm As DateTime
|
||||
Private _mutiertAm As DateTime
|
||||
Private _mutiererMitarbeiter As BusinessFacade.Mitarbeiter
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Constructor"
|
||||
|
||||
'''<summary>Erstellt eine neue Instanz für ein bestehendes Team</summary>
|
||||
'''<param name="teamNr"></param>
|
||||
|
||||
Public Sub New(ByVal teamNr As Integer)
|
||||
Try
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.Team.GetById(teamNr, ds)
|
||||
|
||||
If ds.Tables.Count > 0 Then
|
||||
If ds.Tables(0).Rows.Count > 0 Then
|
||||
_teamNr = teamNr
|
||||
_bezeichnung = Tools.CToString(ds.Tables(0).Rows(0)("bezeichnung"))
|
||||
_kostenstellenNr = Tools.CToInt32(ds.Tables(0).Rows(0)("kostenstellenr"))
|
||||
_mandantNr = Tools.CToInt32(ds.Tables(0).Rows(0)("mandantnr"))
|
||||
_isAktiv = Common.Tools.CToBool(ds.Tables(0).Rows(0)("aktiv"))
|
||||
_erstelltAm = Tools.CToDateTime(ds.Tables(0).Rows(0)("erstellt_am"))
|
||||
_mutiertAm = Tools.CToDateTime(ds.Tables(0).Rows(0)("mutiert_am"))
|
||||
_mutiererMitarbeiter = New BusinessFacade.Mitarbeiter(Tools.CToInt32(ds.Tables(0).Rows(0)("mutierer")))
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Teams zurück</summary>
|
||||
'''<param name="ds">Das DataSet welches gefüllt werden soll</param>
|
||||
|
||||
Public Overloads Shared Sub GetListe(ByRef ds As DataSet)
|
||||
Try
|
||||
DataAccess.Team.GetListe(ds)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Teams denen ein Mitarbeiter zugewiesen ist zurück</summary>
|
||||
'''<param name="ds">Das DataSet welches gefüllt werden soll</param>
|
||||
|
||||
Public Overloads Shared Sub GetListeByMitarbeiterNr(ByVal mitarbeiterNr As Integer, ByRef ds As DataSet)
|
||||
Try
|
||||
DataAccess.Team.GetListeByMitarbeiterNr(mitarbeiterNr, ds)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
Public ReadOnly Property TeamNr() As Integer
|
||||
Get
|
||||
Return _teamNr
|
||||
End Get
|
||||
End Property
|
||||
Public Property Bezeichnung() As String
|
||||
Get
|
||||
Return _bezeichnung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_bezeichnung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property KostenstellenNr() As Integer
|
||||
Get
|
||||
Return _kostenstellenNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_kostenstellenNr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MandantNr() As Integer
|
||||
Get
|
||||
Return _mandantNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mandantNr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsAktiv() As Boolean
|
||||
Get
|
||||
Return _isAktiv
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ErstelltAm() As DateTime
|
||||
Get
|
||||
Return _erstelltAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_erstelltAm = Value
|
||||
End Set
|
||||
End Property
|
||||
Public ReadOnly Property MutiertAm() As DateTime
|
||||
Get
|
||||
Return _mutiertAm
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property MutiererMitarbeiter() As BusinessFacade.Mitarbeiter
|
||||
Get
|
||||
Return _mutiererMitarbeiter
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
171
Backup/BusinessFacade/TeamMitarbeiter.vb
Normal file
171
Backup/BusinessFacade/TeamMitarbeiter.vb
Normal file
@@ -0,0 +1,171 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Imports EDOKALib.Common
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für die Team-Mitarbeiter Zuordnung</summary>
|
||||
Public Class TeamMitarbeiter
|
||||
|
||||
#Region "Members"
|
||||
|
||||
Private _teamMitarbeiterNr As Integer = -1
|
||||
Private _team As BusinessFacade.Team
|
||||
Private _mitarbeiterNr As Integer
|
||||
Private _anteil As Integer
|
||||
Private _mandantNr As Integer
|
||||
Private _isAktiv As Boolean
|
||||
Private _erstelltAm As DateTime
|
||||
Private _mutiertAm As DateTime
|
||||
Private _mutiererMitarbeiter As BusinessFacade.Mitarbeiter
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Constructor"
|
||||
|
||||
Public Sub New()
|
||||
End Sub
|
||||
|
||||
Public Sub New(ByVal teamMitarbeiterNr As Integer)
|
||||
Try
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.TeamMitarbeiter.GetById(teamMitarbeiterNr, ds)
|
||||
|
||||
If ds.Tables.Count > 0 Then
|
||||
If ds.Tables(0).Rows.Count > 0 Then
|
||||
_teamMitarbeiterNr = teamMitarbeiterNr
|
||||
_team = New BusinessFacade.Team(Tools.CToInt32(ds.Tables(0).Rows(0)("teamNr")))
|
||||
_mitarbeiterNr = Tools.CToInt32(ds.Tables(0).Rows(0)("mitarbeiternr"))
|
||||
_anteil = Tools.CToInt32(ds.Tables(0).Rows(0)("anteil"))
|
||||
_mandantNr = Tools.CToInt32(ds.Tables(0).Rows(0)("mandantnr"))
|
||||
_isAktiv = Common.Tools.CToBool(ds.Tables(0).Rows(0)("aktiv"))
|
||||
_erstelltAm = Tools.CToDateTime(ds.Tables(0).Rows(0)("erstellt_am"))
|
||||
_mutiertAm = Tools.CToDateTime(ds.Tables(0).Rows(0)("mutiert_am"))
|
||||
_mutiererMitarbeiter = New BusinessFacade.Mitarbeiter(Tools.CToInt32(ds.Tables(0).Rows(0)("mutierer")))
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Teams für einen Mitarbeitern zurück</summary>
|
||||
'''<param name="ds">Das DataSet welches gefüllt werden soll</param>
|
||||
Public Overloads Shared Sub GetListe(ByVal mitarbeiterNr As Integer, ByRef ds As DataSet)
|
||||
Try
|
||||
DataAccess.TeamMitarbeiter.GetListByMitarbeiterNr(mitarbeiterNr, ds)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Löscht eine Team-Mitarbeiter Zuordnung aus der Datenbank</summary>
|
||||
'''<param name="teamMitarbeiterNr">Zu löschende Verbindung</param>
|
||||
'''<param name="mutiererMitarbeiterNr">Die Id des Benutzers, welcher die Änderungen vornimmt</param>
|
||||
Public Overloads Shared Function Delete(ByVal teamMitarbeiterNr As Integer, ByVal mutiererMitarbeiterNr As Integer)
|
||||
Try
|
||||
DataAccess.TeamMitarbeiter.Delete(teamMitarbeiterNr, mutiererMitarbeiterNr)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'''<summary>Speichert die Daten der aktuellen Instanz in die Datenbank</summary>
|
||||
'''<param name="mutiererMitarbeiterNr">Die Id des Benutzers, welcher die Änderungen vornimmt</param>
|
||||
|
||||
Public Function Save(ByVal mutiererMitarbeiterNr As Integer)
|
||||
Try
|
||||
If _teamMitarbeiterNr < 0 Then
|
||||
'neuer eintrag
|
||||
DataAccess.TeamMitarbeiter.Insert(_team.TeamNr, _mitarbeiterNr, _anteil, _mandantNr, _isAktiv, mutiererMitarbeiterNr)
|
||||
Else
|
||||
'bestehender eintrag
|
||||
DataAccess.TeamMitarbeiter.Update(_teamMitarbeiterNr, _team.TeamNr, _mitarbeiterNr, _anteil, _mandantNr, _isAktiv, mutiererMitarbeiterNr)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
|
||||
Public ReadOnly Property TeamMitarbeiterNr() As Integer
|
||||
Get
|
||||
Return _teamMitarbeiterNr
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property Team() As BusinessFacade.Team
|
||||
Get
|
||||
Return _team
|
||||
End Get
|
||||
Set(ByVal Value As BusinessFacade.Team)
|
||||
_team = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property MitarbeiterNr() As Integer
|
||||
Get
|
||||
Return _mitarbeiterNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mitarbeiterNr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Anteil() As Integer
|
||||
Get
|
||||
Return _anteil
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_anteil = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property MandantNr() As Integer
|
||||
Get
|
||||
Return _mandantNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mandantNr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property IsAktiv() As Boolean
|
||||
Get
|
||||
Return _isAktiv
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ErstelltAm() As DateTime
|
||||
Get
|
||||
Return _erstelltAm
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property MutiertAm() As DateTime
|
||||
Get
|
||||
Return _mutiertAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_mutiertAm = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MutiererMitarbeiter() As BusinessFacade.Mitarbeiter
|
||||
Get
|
||||
Return _mutiererMitarbeiter
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
269
Backup/Common/Action.vb
Normal file
269
Backup/Common/Action.vb
Normal file
@@ -0,0 +1,269 @@
|
||||
Imports System.IO
|
||||
Imports System.Xml
|
||||
Imports System.Xml.Schema
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Public Class Action
|
||||
|
||||
#Region "Members"
|
||||
|
||||
Private Shared _actionSingleton As Action
|
||||
|
||||
Private _actionType As ActionType
|
||||
Private _creatorTgNr As String
|
||||
Private _sourceApplication As String
|
||||
Private _parameters As Parameter()
|
||||
Private _validationSuccess As Boolean
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Lädt externes Xml file für automatisierte Aktionen</summary>
|
||||
'''<param name="xmlImportFile">Das Xml File mit den entsprechenden Parametern</param>
|
||||
Public Sub Load(ByVal xmlImportFile As FileInfo)
|
||||
Try
|
||||
'Validate source
|
||||
'If Not IsValid(xmlImportFile) Then
|
||||
' 'xml file is invalid
|
||||
' Throw New ActionException(1, "Specified file " & xmlImportFile.FullName & " hasn't got a valid strucure which is specified by his schema")
|
||||
'End If
|
||||
Dim doc As New XmlDocument()
|
||||
doc.Load(xmlImportFile.FullName)
|
||||
|
||||
'read header elements
|
||||
_actionType = CType(doc.SelectSingleNode("action/actionId").InnerText, ActionType)
|
||||
_creatorTgNr = doc.SelectSingleNode("action/creatorTg").InnerText
|
||||
_sourceApplication = doc.SelectSingleNode("action/sourceApplication").InnerText
|
||||
|
||||
Dim RootNode As XmlElement = doc.DocumentElement
|
||||
Dim nodeList As XmlNodeList = RootNode.ChildNodes
|
||||
If nodeList.Count > 0 Then
|
||||
'set correct array size
|
||||
ReDim _parameters(nodeList.Count - 1)
|
||||
|
||||
Dim value As String
|
||||
Dim name As String
|
||||
Dim parameterCounter As Integer = 0
|
||||
|
||||
Dim i As Integer
|
||||
|
||||
For i = 0 To nodeList.Count - 1
|
||||
value = nodeList.Item(i).InnerText
|
||||
name = nodeList.Item(i).LocalName
|
||||
'append new parameter
|
||||
_parameters(parameterCounter) = New Parameter(name, value)
|
||||
|
||||
parameterCounter = parameterCounter + 1
|
||||
Next
|
||||
End If
|
||||
'Rel 4.02
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EdokaLib.Common.Action.Load", ex.Message & ex.StackTrace, TraceLevel.Error)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Returns a parameter identified by his name</summary>
|
||||
'''<param name="paramName"></param>
|
||||
'''<returns></returns>
|
||||
Public Function GetParameterByName(ByVal paramName As String) As Parameter
|
||||
Try
|
||||
Dim param As Parameter
|
||||
For Each param In _parameters
|
||||
If param.Name = paramName Then
|
||||
Return param
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EdokaLib.Common.Action.GetParameterByName", ex.Message & ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'''<summary>Zerstört die statische Instanz</summary>
|
||||
Public Sub Destroy()
|
||||
Try
|
||||
_actionSingleton = Nothing
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EdokaLib.Common.Action.Destroy", ex.Message & ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Private methods/subs"
|
||||
|
||||
'''<summary>Überprüft ob das Xml file dem angegebenen Schema entspricht</summary>
|
||||
'''<param name="xmlImportFile"></param>
|
||||
'''<returns></returns>
|
||||
Private Function IsValid(ByVal xmlImportFile As FileInfo) As Boolean
|
||||
Dim reader As New XmlTextReader(xmlImportFile.FullName)
|
||||
'We pass the xmltextreader into the xmlvalidatingreader
|
||||
'This will validate the xml doc with the schema file
|
||||
'NOTE the xml file it self points to the schema file
|
||||
|
||||
Dim validator As New XmlValidatingReader(reader)
|
||||
Try
|
||||
'First we create the xmltextreader
|
||||
|
||||
|
||||
' Set the validation event handler
|
||||
'AddHandler validator.ValidationEventHandler, _
|
||||
'AddressOf ValidationCallback
|
||||
_validationSuccess = True 'make sure to reset the success var
|
||||
|
||||
' Read XML data
|
||||
While (validator.Read)
|
||||
End While
|
||||
'Close the reader.
|
||||
validator.Close()
|
||||
|
||||
reader.Close()
|
||||
|
||||
'The validationeventhandler is the only thing that would
|
||||
'set m_Success to false
|
||||
Return _validationSuccess
|
||||
Catch ex As Exception
|
||||
validator.Close()
|
||||
reader.Close()
|
||||
|
||||
_validationSuccess = False
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EdokaLib.Common.Action.IsValid", ex.Message & ex.StackTrace, TraceLevel.Warning)
|
||||
_validationSuccess = False
|
||||
Return _validationSuccess
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Sub ValidationCallback(ByVal sender As Object, ByVal args As ValidationEventArgs)
|
||||
Try
|
||||
'Display the validation error. This is only called on error
|
||||
_validationSuccess = False 'Validation failed
|
||||
Debug.Write("Validation error: " + args.Message + Environment.NewLine)
|
||||
Throw New ActionException(1, "Fehler bei der Validierung")
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
|
||||
Public Shared ReadOnly Property Action() As Action
|
||||
Get
|
||||
If IsNothing(_actionSingleton) Then
|
||||
_actionSingleton = New Action()
|
||||
End If
|
||||
|
||||
Return _actionSingleton
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property valtionOK() As Boolean
|
||||
Get
|
||||
Return _validationSuccess
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ActionType() As ActionType
|
||||
Get
|
||||
Return _actionType
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property CreatorTgNr() As String
|
||||
Get
|
||||
Return _creatorTgNr
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property SourceApplication() As String
|
||||
Get
|
||||
Return _sourceApplication
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property Parameters() As Parameter()
|
||||
Get
|
||||
Return _parameters
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
#Region "ActionException"
|
||||
|
||||
Public Class ActionException
|
||||
Inherits Exception
|
||||
|
||||
Private _number As Integer
|
||||
Private _description As String
|
||||
|
||||
Public Sub New(ByVal number As Integer, ByVal description As String)
|
||||
_number = number
|
||||
_description = description
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property Message() As String
|
||||
Get
|
||||
Return _description
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Number() As Integer
|
||||
Get
|
||||
Return _number
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
|
||||
#End Region
|
||||
|
||||
'''<summary>Struct für einzelne Parameter</summary>
|
||||
Public Structure Parameter
|
||||
|
||||
|
||||
Private _value As String
|
||||
Private _name As String
|
||||
|
||||
|
||||
Public Sub New(ByVal name As String, ByVal value As String)
|
||||
Try
|
||||
_value = value
|
||||
_name = name
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EdokaLib.Common.Parameter.New", ex.Message & ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Public ReadOnly Property Value() As String
|
||||
Get
|
||||
Return _value
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property Name() As String
|
||||
Get
|
||||
Return _name
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Structure
|
||||
|
||||
Public Enum ActionType
|
||||
AnzeigePartnerdossier = 1
|
||||
DokumentAnzeige = 2
|
||||
DokumentErstellung = 3
|
||||
DokumentBearbeitung = 4
|
||||
Statusmutation = 5
|
||||
HostDokumentAnzeige = 6
|
||||
UVMDokumentanzeige = 7
|
||||
ZVDokumentanzeige = 8
|
||||
End Enum
|
||||
31
Backup/Common/AssemblyInfo.vb
Normal file
31
Backup/Common/AssemblyInfo.vb
Normal file
@@ -0,0 +1,31 @@
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' Allgemeine Informationen über eine Assembly werden über die folgende
|
||||
' Attributgruppe gesteuert. Ändern Sie diese Attributwerte, um Informationen,
|
||||
' die mit einer Assembly verknüpft sind, zu bearbeiten.
|
||||
|
||||
' Die Werte der Assemblyattribute überprüfen
|
||||
|
||||
<Assembly: AssemblyTitle("EDOKA.Common")>
|
||||
<Assembly: AssemblyDescription("Common classes of EDOKA")>
|
||||
<Assembly: AssemblyCompany("TKB")>
|
||||
<Assembly: AssemblyProduct("EDOKA")>
|
||||
<Assembly: AssemblyCopyright("TKB")>
|
||||
<Assembly: AssemblyTrademark("-")>
|
||||
<Assembly: CLSCompliant(True)>
|
||||
|
||||
'Die folgende GUID ist für die ID der Typbibliothek, wenn dieses Projekt in COM angezeigt wird
|
||||
<Assembly: Guid("F2EA4A43-02E3-4E62-8131-D928B2663D09")>
|
||||
|
||||
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
'
|
||||
' Haupversion
|
||||
' Nebenversion
|
||||
' Buildnummer
|
||||
' Revisionsnummer
|
||||
'
|
||||
' Sie können alle Werte angeben oder auf die standardmäßigen Build- und Revisionsnummern
|
||||
' zurückgreifen, indem Sie '*' wie unten angezeigt verwenden:
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.*")>
|
||||
198
Backup/Common/Common.vbproj
Normal file
198
Backup/Common/Common.vbproj
Normal file
@@ -0,0 +1,198 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{67E15143-9CF6-4595-8A52-A01A16370E51}</ProjectGuid>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>EDOKALib.Common</AssemblyName>
|
||||
<AssemblyOriginatorKeyFile>
|
||||
</AssemblyOriginatorKeyFile>
|
||||
<AssemblyOriginatorKeyMode>None</AssemblyOriginatorKeyMode>
|
||||
<DefaultClientScript>JScript</DefaultClientScript>
|
||||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Library</OutputType>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
<RootNamespace>EDOKALib.Common</RootNamespace>
|
||||
<StartupObject>EDOKALib.Common.%28Keine%29</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<MyType>Windows</MyType>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<OldToolsVersion>2.0</OldToolsVersion>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DocumentationFile>EDOKALib.Common.xml</DocumentationFile>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DocumentationFile>EDOKALib.Common.xml</DocumentationFile>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<Optimize>true</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
|
||||
<DebugType>none</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'EDOKA_DLLs|AnyCPU' ">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DocumentationFile>EDOKALib.Common.xml</DocumentationFile>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System">
|
||||
<Name>System</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<Name>System.Data</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<Name>System.XML</Name>
|
||||
</Reference>
|
||||
<Reference Include="TKBLib.Errorhandling.v1">
|
||||
<Name>TKBLib.Errorhandling.v1</Name>
|
||||
<HintPath>..\..\TKBLib\aktuellDebug\TKBLib.Errorhandling.v1.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Linq" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Action.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="AssemblyInfo.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Consts.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Crypto.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Datenbank.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Tools.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="My Project\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
92
Backup/Common/Common.vbproj.user
Normal file
92
Backup/Common/Common.vbproj.user
Normal file
@@ -0,0 +1,92 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<LastOpenVersion>7.10.3077</LastOpenVersion>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ReferencePath>C:\proj\TKBLib\aktuellDebug\</ReferencePath>
|
||||
<CopyProjectDestinationFolder>
|
||||
</CopyProjectDestinationFolder>
|
||||
<CopyProjectUncPath>
|
||||
</CopyProjectUncPath>
|
||||
<CopyProjectOption>0</CopyProjectOption>
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
<ProjectTrust>0</ProjectTrust>
|
||||
<PublishUrlHistory>
|
||||
</PublishUrlHistory>
|
||||
<InstallUrlHistory>
|
||||
</InstallUrlHistory>
|
||||
<SupportUrlHistory>
|
||||
</SupportUrlHistory>
|
||||
<UpdateUrlHistory>
|
||||
</UpdateUrlHistory>
|
||||
<BootstrapperUrlHistory>
|
||||
</BootstrapperUrlHistory>
|
||||
<ErrorReportUrlHistory>
|
||||
</ErrorReportUrlHistory>
|
||||
<FallbackCulture>de-DE</FallbackCulture>
|
||||
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<EnableASPDebugging>false</EnableASPDebugging>
|
||||
<EnableASPXDebugging>false</EnableASPXDebugging>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
|
||||
<RemoteDebugEnabled>false</RemoteDebugEnabled>
|
||||
<RemoteDebugMachine>
|
||||
</RemoteDebugMachine>
|
||||
<StartAction>Project</StartAction>
|
||||
<StartArguments>
|
||||
</StartArguments>
|
||||
<StartPage>
|
||||
</StartPage>
|
||||
<StartProgram>
|
||||
</StartProgram>
|
||||
<StartURL>
|
||||
</StartURL>
|
||||
<StartWorkingDirectory>
|
||||
</StartWorkingDirectory>
|
||||
<StartWithIE>true</StartWithIE>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<EnableASPDebugging>false</EnableASPDebugging>
|
||||
<EnableASPXDebugging>false</EnableASPXDebugging>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
|
||||
<RemoteDebugEnabled>false</RemoteDebugEnabled>
|
||||
<RemoteDebugMachine>
|
||||
</RemoteDebugMachine>
|
||||
<StartAction>Project</StartAction>
|
||||
<StartArguments>
|
||||
</StartArguments>
|
||||
<StartPage>
|
||||
</StartPage>
|
||||
<StartProgram>
|
||||
</StartProgram>
|
||||
<StartURL>
|
||||
</StartURL>
|
||||
<StartWorkingDirectory>
|
||||
</StartWorkingDirectory>
|
||||
<StartWithIE>true</StartWithIE>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'EDOKA_DLLs|AnyCPU' ">
|
||||
<EnableASPDebugging>false</EnableASPDebugging>
|
||||
<EnableASPXDebugging>false</EnableASPXDebugging>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
|
||||
<RemoteDebugEnabled>false</RemoteDebugEnabled>
|
||||
<RemoteDebugMachine>
|
||||
</RemoteDebugMachine>
|
||||
<StartAction>Project</StartAction>
|
||||
<StartArguments>
|
||||
</StartArguments>
|
||||
<StartPage>
|
||||
</StartPage>
|
||||
<StartProgram>
|
||||
</StartProgram>
|
||||
<StartURL>
|
||||
</StartURL>
|
||||
<StartWorkingDirectory>
|
||||
</StartWorkingDirectory>
|
||||
<StartWithIE>true</StartWithIE>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
10
Backup/Common/Consts.vb
Normal file
10
Backup/Common/Consts.vb
Normal file
@@ -0,0 +1,10 @@
|
||||
'''<summary>Diese klasse beinhaltet Konstanten welche im der gesamten EDOKAApp verwendet werden</summary>
|
||||
Public Class Consts
|
||||
|
||||
Public Shared ReadOnly WARNUNG As String = "Warnung"
|
||||
Public Shared ReadOnly FEHLER As String = "Fehler"
|
||||
Public Shared ReadOnly INFO As String = "Information"
|
||||
|
||||
Public Shared ReadOnly ACTION_FILE_EXTENSION As String = "edk"
|
||||
|
||||
End Class
|
||||
50
Backup/Common/Crypto.vb
Normal file
50
Backup/Common/Crypto.vb
Normal file
@@ -0,0 +1,50 @@
|
||||
'''<summary>Diese klasse beinhaltet Methoden welche für den Kryptografischen Teil im EDOKA verwendet werden</summary>
|
||||
Public Class Crypto
|
||||
|
||||
Const CRYPTO_PASSWORD As String = "HutterundMueller"
|
||||
|
||||
'''<summary>Verschlüsselt einen Text mit dem angegebenen Passwort</summary>
|
||||
'''<param name="strText">Zu verschlüsselnder Text</param>
|
||||
'''<includesource>yes</includesource>
|
||||
Public Shared Function EncryptText(ByVal strText As String)
|
||||
Dim i As Integer, c As Integer
|
||||
Dim strBuff As String
|
||||
Dim strPwd As String = CRYPTO_PASSWORD
|
||||
|
||||
strPwd = UCase$(strPwd)
|
||||
If Len(strPwd) Then
|
||||
For i = 1 To Len(strText)
|
||||
c = Asc(Mid$(strText, i, 1))
|
||||
c = c + Asc(Mid$(strPwd, (i Mod Len(strPwd)) + 1, 1))
|
||||
strBuff = strBuff & Chr(c And &HFF)
|
||||
Next i
|
||||
Else
|
||||
strBuff = strText
|
||||
End If
|
||||
EncryptText = strBuff
|
||||
End Function
|
||||
|
||||
'''<summary>Entschlüsselt einen Text</summary>
|
||||
'''<param name="strText">Zu verschlüsselnder Text</param>
|
||||
'''<includesource>yes</includesource>
|
||||
Public Shared Function DecryptText(ByVal strText As String)
|
||||
Dim i As Integer, c As Integer
|
||||
Dim strBuff As String
|
||||
Dim strPwd As String = CRYPTO_PASSWORD
|
||||
|
||||
strPwd = UCase$(strPwd)
|
||||
If Len(strPwd) Then
|
||||
For i = 1 To Len(strText)
|
||||
c = Asc(Mid$(strText, i, 1))
|
||||
c = c - Asc(Mid$(strPwd, (i Mod Len(strPwd)) + 1, 1))
|
||||
strBuff = strBuff & Chr(c And &HFF)
|
||||
Next i
|
||||
Else
|
||||
strBuff = strText
|
||||
End If
|
||||
DecryptText = strBuff
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
'End Namespace
|
||||
29
Backup/Common/Datenbank.vb
Normal file
29
Backup/Common/Datenbank.vb
Normal file
@@ -0,0 +1,29 @@
|
||||
Imports System.IO
|
||||
|
||||
'''<summary>Diese klasse beinhaltet Methoden welche für den Datenbank Zugriff im DataAccess verwendet werden</summary>
|
||||
Public Class Datenbank
|
||||
|
||||
'''<summary>Liest aus dem Connection String file edokaconn.cfg aus</summary>
|
||||
'''<returns>Den entschlüsseleten DSN string</returns>
|
||||
Overloads Shared Function GetDSN() As String
|
||||
Try
|
||||
Dim file As System.IO.File
|
||||
Dim reader As System.IO.StreamReader
|
||||
Dim connectionString As String
|
||||
|
||||
reader = file.OpenText(AppDomain.CurrentDomain.BaseDirectory + "edokaconn.cfg")
|
||||
|
||||
connectionString = reader.ReadLine
|
||||
connectionString = Crypto.DecryptText(connectionString)
|
||||
connectionString = Left(connectionString, Len(connectionString) - 1)
|
||||
|
||||
reader.Close()
|
||||
|
||||
GetDSN = connectionString
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
End Class
|
||||
131
Backup/Common/Tools.vb
Normal file
131
Backup/Common/Tools.vb
Normal file
@@ -0,0 +1,131 @@
|
||||
'''<summary>Diese klasse beinhaltet Methoden, welche im gesamten Edoka über alle Layers verwendet werden</summary>
|
||||
Public Class Tools
|
||||
|
||||
Public Shared Function CToInt16(ByVal o As Object) As Int16
|
||||
If o Is System.DBNull.Value Then
|
||||
Return 0
|
||||
Else
|
||||
If TypeOf o Is Int16 Then
|
||||
Return CShort(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function CToInt32(ByVal o As Object) As Int32
|
||||
If o Is System.DBNull.Value Then
|
||||
Return 0
|
||||
Else
|
||||
If TypeOf o Is Int32 Then
|
||||
Return CInt(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function CToInt64(ByVal o As Object) As Int64
|
||||
If o Is System.DBNull.Value Then
|
||||
Return 0
|
||||
Else
|
||||
If TypeOf o Is Int64 Then
|
||||
Return CLng(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Function CToSingle(ByVal o As Object) As Single
|
||||
If o Is System.DBNull.Value Then
|
||||
Return 0
|
||||
Else
|
||||
If TypeOf o Is Single Then
|
||||
Return CSng(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function CToDouble(ByVal o As Object) As Double
|
||||
If o Is System.DBNull.Value Then
|
||||
Return 0
|
||||
Else
|
||||
If TypeOf o Is Double Then
|
||||
Return CDbl(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function CToDecimal(ByVal o As Object) As Decimal
|
||||
If o Is System.DBNull.Value Then
|
||||
Return 0
|
||||
Else
|
||||
If TypeOf o Is Decimal Then
|
||||
Return CDec(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function CToByte(ByVal o As Object) As Byte
|
||||
If o Is System.DBNull.Value Then
|
||||
Return New Byte()
|
||||
Else
|
||||
If TypeOf o Is Byte Then
|
||||
Return CByte(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function CToByteArr(ByVal o As Object) As Byte()
|
||||
If o Is System.DBNull.Value Then
|
||||
Return New Byte() {}
|
||||
Else
|
||||
If TypeOf o Is Byte() Then
|
||||
Return CType(o, Byte())
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function CToString(ByVal o As Object) As String
|
||||
If o Is System.DBNull.Value Then
|
||||
Return ""
|
||||
Else
|
||||
If TypeOf o Is String Then
|
||||
Return CStr(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function CToBool(ByVal o As Object) As Boolean
|
||||
If o Is System.DBNull.Value Then
|
||||
Return False
|
||||
Else
|
||||
If TypeOf o Is Boolean Then
|
||||
Return CBool(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function CToDateTime(ByVal o As Object) As DateTime
|
||||
If o Is System.DBNull.Value Then
|
||||
Return DateTime.MinValue
|
||||
Else
|
||||
If TypeOf o Is DateTime Then
|
||||
Return CDate(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
'''<summary>Überprüft TableCount und RowCount eines DataSet</summary>
|
||||
'''<param name="ds"></param>
|
||||
'''<returns>True wenn table- und rowcount > 0</returns>
|
||||
Public Shared Function ValidateDS(ByVal ds As DataSet) As Boolean
|
||||
Try
|
||||
If ds.Tables.Count > 0 Then
|
||||
If ds.Tables(0).Rows.Count > 0 Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.Common.Tools.ValidateDS", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
End Class
|
||||
193
Backup/DataAccess/Anwendung.vb
Normal file
193
Backup/DataAccess/Anwendung.vb
Normal file
@@ -0,0 +1,193 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
'''<summary>DataAccess Klasse von der Tabelle Anwendung</summary>
|
||||
Public Class Anwendung
|
||||
'''<summary>gibt eine anwendung zurück</summary>
|
||||
'''<param name="ds">für datenrückgabe</param>
|
||||
'''<param name="anwendungsNr"></param>
|
||||
Public Shared Sub GetAnwendung(ByRef ds As DataSet, ByVal anwendungsNr As Integer)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_GetAnwendung"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@DokumentartNr", anwendungsNr))
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(ds, "Anwendung")
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.Dokumentart.GetAnwendung", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
da.Dispose()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>gibt eine liste aller anwendungen zurück</summary>
|
||||
'''<param name="ds">für datenrückgabe</param>
|
||||
'''<param name="aktiv">1 nur aktive; 0 nur inaktive; -1 alle</param>
|
||||
Public Shared Sub List(ByRef ds As DataSet, ByVal aktiv As Integer)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_ListAnwendung"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
If aktiv <> -1 Then
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Aktiv", aktiv))
|
||||
End If
|
||||
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(ds, "Anwendungen")
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.Anwendung.List", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
da.Dispose()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
'''<summary>erstellt eine anwendung</summary>
|
||||
'''<param name="anwendungNr"></param>
|
||||
'''<param name="bezeichnung"></param>
|
||||
'''<param name="beschreibung"></param>
|
||||
'''<param name="mandantnr"></param>
|
||||
'''<param name="aktiv"></param>
|
||||
'''<param name="mutierer"></param>
|
||||
'''<returns>error</returns>
|
||||
Public Shared Function Add(ByRef anwendungNr As Integer, ByVal bezeichnung As String, _
|
||||
ByVal beschreibung As String, ByVal mandantnr As Integer, ByVal aktiv As Boolean, _
|
||||
ByVal mutierer As Integer) As Integer
|
||||
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_InsAnwendung"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@bezeichnung", NullHandler.CToSqlString(bezeichnung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@beschreibung", NullHandler.CToSqlString(beschreibung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@mandantnr", NullHandler.CToSqlInt(mandantnr)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Aktiv", aktiv))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@mutierer", mutierer))
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@AnwendungNr", 0))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Return", DBNull.Value))
|
||||
sqlCmd.Parameters("@AnwendungNr").Direction = ParameterDirection.Output
|
||||
sqlCmd.Parameters("@Return").Direction = ParameterDirection.ReturnValue
|
||||
|
||||
sqlConn.Open()
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
If CInt(sqlCmd.Parameters("@Return").Value) = 0 Then
|
||||
anwendungnr = CInt(sqlCmd.Parameters("@AnwendungNr").Value)
|
||||
End If
|
||||
|
||||
Return CInt(sqlCmd.Parameters("@Return").Value)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.Anwendung.Add", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
'''<summary>Löscht eine bestehende anwendung</summary>
|
||||
'''<param name="anwendungNr"></param>
|
||||
'''<returns>error</returns>
|
||||
Public Shared Function Delete(ByVal anwendungNr As Integer) As Integer
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_DelAnwendung"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@@anwendungnr", anwendungNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Return", DBNull.Value))
|
||||
sqlCmd.Parameters("@Return").Direction = ParameterDirection.ReturnValue
|
||||
|
||||
sqlConn.Open()
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
Return CInt(sqlCmd.Parameters("@Return").Value)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.Anwendung.Delete", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
'''<summary>aktualisiert eine anwendung</summary>
|
||||
'''<param name="anwendungNr">kritetrium (wird nicht aktualisiert)</param>
|
||||
'''<param name="bezeichnung"></param>
|
||||
'''<param name="beschreibung"></param>
|
||||
'''<param name="mandantnr"></param>
|
||||
'''<param name="aktiv"></param>
|
||||
'''<param name="mutierer"></param>
|
||||
'''<returns>error</returns>
|
||||
Public Shared Function Update(ByVal anwendungNr As Integer, ByVal bezeichnung As String, _
|
||||
ByVal beschreibung As String, ByVal mandantnr As Integer, ByVal aktiv As Boolean, _
|
||||
ByVal mutierer As Integer) As Integer
|
||||
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_SetAnwendung"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@AnwendungNr", anwendungNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@bezeichnung", NullHandler.CToSqlString(bezeichnung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@beschreibung", NullHandler.CToSqlString(beschreibung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@mandantnr", NullHandler.CToSqlInt(mandantnr)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Aktiv", aktiv))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@mutierer", mutierer))
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Return", DBNull.Value))
|
||||
sqlCmd.Parameters("@Return").Direction = ParameterDirection.ReturnValue
|
||||
|
||||
sqlConn.Open()
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
Return CInt(sqlCmd.Parameters("@Return").Value)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.Anwendung.Update", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
End Class
|
||||
31
Backup/DataAccess/AssemblyInfo.vb
Normal file
31
Backup/DataAccess/AssemblyInfo.vb
Normal file
@@ -0,0 +1,31 @@
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' Allgemeine Informationen über eine Assembly werden über die folgende
|
||||
' Attributgruppe gesteuert. Ändern Sie diese Attributwerte, um Informationen,
|
||||
' die mit einer Assembly verknüpft sind, zu bearbeiten.
|
||||
|
||||
' Die Werte der Assemblyattribute überprüfen
|
||||
|
||||
<Assembly: AssemblyTitle("")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("")>
|
||||
<Assembly: AssemblyCopyright("")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: CLSCompliant(True)>
|
||||
|
||||
'Die folgende GUID ist für die ID der Typbibliothek, wenn dieses Projekt in COM angezeigt wird
|
||||
<Assembly: Guid("8274B598-13D0-4738-9B6A-3BD24F105C9D")>
|
||||
|
||||
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
'
|
||||
' Haupversion
|
||||
' Nebenversion
|
||||
' Buildnummer
|
||||
' Revisionsnummer
|
||||
'
|
||||
' Sie können alle Werte angeben oder auf die standardmäßigen Build- und Revisionsnummern
|
||||
' zurückgreifen, indem Sie '*' wie unten angezeigt verwenden:
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.*")>
|
||||
25
Backup/DataAccess/Config.vb
Normal file
25
Backup/DataAccess/Config.vb
Normal file
@@ -0,0 +1,25 @@
|
||||
Public Class Config
|
||||
Private Shared _nullReplacer As Integer
|
||||
Private Shared _firstTime As Boolean = True
|
||||
|
||||
Public Shared ReadOnly Property NullReplacer() As Integer
|
||||
Get
|
||||
Try
|
||||
If _firstTime Then 'load from db
|
||||
Dim ds As New DataSet()
|
||||
Parameter.GetParameter(ds, 0, "NullReplaceValue")
|
||||
If ds.Tables.Count > 0 Then
|
||||
If ds.Tables(0).Rows.Count > 0 Then
|
||||
_nullReplacer = CInt(ds.Tables(0).Rows(0)("Wert"))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Return _nullReplacer
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.Config.NullReplacer", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
197
Backup/DataAccess/DataAccess.vbproj
Normal file
197
Backup/DataAccess/DataAccess.vbproj
Normal file
@@ -0,0 +1,197 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{6D3A9C4A-7025-4FD6-9BB3-B70874F0527C}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>EDOKALib.DataAccess</AssemblyName>
|
||||
<AssemblyOriginatorKeyFile>
|
||||
</AssemblyOriginatorKeyFile>
|
||||
<AssemblyOriginatorKeyMode>None</AssemblyOriginatorKeyMode>
|
||||
<DefaultClientScript>JScript</DefaultClientScript>
|
||||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Library</OutputType>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
<RootNamespace>EDOKALib.DataAccess</RootNamespace>
|
||||
<StartupObject>EDOKALib.DataAccess.%28Keine%29</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<MyType>Windows</MyType>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<OldToolsVersion>2.0</OldToolsVersion>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DocumentationFile>EDOKALib.DataAccess.xml</DocumentationFile>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DocumentationFile>EDOKALib.DataAccess.xml</DocumentationFile>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<Optimize>true</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
|
||||
<DebugType>none</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'EDOKA_DLLs|AnyCPU' ">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DocumentationFile>EDOKALib.DataAccess.xml</DocumentationFile>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System">
|
||||
<Name>System</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<Name>System.Data</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<Name>System.XML</Name>
|
||||
</Reference>
|
||||
<Reference Include="TKBLib.Errorhandling.v1">
|
||||
<Name>TKBLib.Errorhandling.v1</Name>
|
||||
<HintPath>..\..\..\proj\TKBLib\aktuellDebug\TKBLib.Errorhandling.v1.dll</HintPath>
|
||||
</Reference>
|
||||
<ProjectReference Include="..\Common\Common.vbproj">
|
||||
<Name>Common</Name>
|
||||
<Project>{67E15143-9CF6-4595-8A52-A01A16370E51}</Project>
|
||||
<Package>{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</Package>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Linq" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Anwendung.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="AssemblyInfo.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Config.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Dokument.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Dokumentart.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Dokumenttyp.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Funktionsgruppe.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Klassifizierung.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Meldungstext.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Mitarbeiter.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MitarbeiterFunktionsgruppe.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="NullHandler.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="OfficeVorlage.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Parameter.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Profil.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Spalten.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Team.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="TeamMitarbeiter.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="My Project\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
78
Backup/DataAccess/DataAccess.vbproj.user
Normal file
78
Backup/DataAccess/DataAccess.vbproj.user
Normal file
@@ -0,0 +1,78 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<LastOpenVersion>7.10.3077</LastOpenVersion>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ReferencePath>C:\proj\TKBLib\aktuellDebug\</ReferencePath>
|
||||
<CopyProjectDestinationFolder>
|
||||
</CopyProjectDestinationFolder>
|
||||
<CopyProjectUncPath>
|
||||
</CopyProjectUncPath>
|
||||
<CopyProjectOption>0</CopyProjectOption>
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
<ProjectTrust>0</ProjectTrust>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<EnableASPDebugging>false</EnableASPDebugging>
|
||||
<EnableASPXDebugging>false</EnableASPXDebugging>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
|
||||
<RemoteDebugEnabled>false</RemoteDebugEnabled>
|
||||
<RemoteDebugMachine>
|
||||
</RemoteDebugMachine>
|
||||
<StartAction>Project</StartAction>
|
||||
<StartArguments>
|
||||
</StartArguments>
|
||||
<StartPage>
|
||||
</StartPage>
|
||||
<StartProgram>
|
||||
</StartProgram>
|
||||
<StartURL>
|
||||
</StartURL>
|
||||
<StartWorkingDirectory>
|
||||
</StartWorkingDirectory>
|
||||
<StartWithIE>false</StartWithIE>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<EnableASPDebugging>false</EnableASPDebugging>
|
||||
<EnableASPXDebugging>false</EnableASPXDebugging>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
|
||||
<RemoteDebugEnabled>false</RemoteDebugEnabled>
|
||||
<RemoteDebugMachine>
|
||||
</RemoteDebugMachine>
|
||||
<StartAction>Project</StartAction>
|
||||
<StartArguments>
|
||||
</StartArguments>
|
||||
<StartPage>
|
||||
</StartPage>
|
||||
<StartProgram>
|
||||
</StartProgram>
|
||||
<StartURL>
|
||||
</StartURL>
|
||||
<StartWorkingDirectory>
|
||||
</StartWorkingDirectory>
|
||||
<StartWithIE>false</StartWithIE>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'EDOKA_DLLs|AnyCPU' ">
|
||||
<EnableASPDebugging>false</EnableASPDebugging>
|
||||
<EnableASPXDebugging>false</EnableASPXDebugging>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
|
||||
<RemoteDebugEnabled>false</RemoteDebugEnabled>
|
||||
<RemoteDebugMachine>
|
||||
</RemoteDebugMachine>
|
||||
<StartAction>Project</StartAction>
|
||||
<StartArguments>
|
||||
</StartArguments>
|
||||
<StartPage>
|
||||
</StartPage>
|
||||
<StartProgram>
|
||||
</StartProgram>
|
||||
<StartURL>
|
||||
</StartURL>
|
||||
<StartWorkingDirectory>
|
||||
</StartWorkingDirectory>
|
||||
<StartWithIE>true</StartWithIE>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
51
Backup/DataAccess/Dokument.vb
Normal file
51
Backup/DataAccess/Dokument.vb
Normal file
@@ -0,0 +1,51 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
'''<summary>Datenzugriff auf Dokumente</summary>
|
||||
Public Class Dokument
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Setz den Status eines Dokuments</summary>
|
||||
|
||||
Overloads Shared Function SetStatus(ByVal sourceApplication As String, ByVal parameterName As String, ByVal value As String, ByVal mutiererMitarbeiterNr As Integer) As Integer
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_SetDokumentStatus"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@SourceApplication", sourceApplication))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@ParameterName", parameterName))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Value", value))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MutiererMitarbeiterNr", mutiererMitarbeiterNr))
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
If sqlCmd.ExecuteNonQuery() = 0 Then
|
||||
'no rows have been affected
|
||||
Return 1
|
||||
Else
|
||||
'all right
|
||||
Return 0
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
223
Backup/DataAccess/Dokumentart.vb
Normal file
223
Backup/DataAccess/Dokumentart.vb
Normal file
@@ -0,0 +1,223 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
|
||||
'''<summary>Datenzugriff auf Tabelle dokumentart</summary>
|
||||
Public Class Dokumentart
|
||||
'''<summary>gibt eine dokumentart zurück</summary>
|
||||
'''<param name="ds">für datenrückgabe</param>
|
||||
'''<param name="dokumentartNr"></param>
|
||||
|
||||
Public Shared Sub GetDokumentart(ByRef ds As DataSet, ByVal dokumentartNr As Integer)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_GetDokumentart"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@DokumentartNr", dokumentartNr))
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(ds, "Dokumentart")
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.Dokumentart.GetDokumentart", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
da.Dispose()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>gibt eine liste aller dokumentarten zurück</summary>
|
||||
'''<param name="ds">für datenrückgabe</param>
|
||||
'''<param name="aktiv">1 nur aktive; 0 nur inaktive; -1 alle</param>
|
||||
|
||||
Public Shared Sub List(ByRef ds As DataSet, ByVal aktiv As Integer)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_ListDokumentart"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
If aktiv <> -1 Then
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Aktiv", aktiv))
|
||||
End If
|
||||
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(ds, "Dokumentarten")
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.Dokumentart.List", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
da.Dispose()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
'''<summary>erstellt eine neue dokumentart</summary>
|
||||
'''<param name="dokumentartNr">gibt den neuen primarykey zurück</param>
|
||||
'''<param name="bezeichnung"></param>
|
||||
'''<param name="parentId"></param>
|
||||
'''<param name="sort"></param>
|
||||
'''<param name="imageIndex"></param>
|
||||
'''<param name="imageIndexOpen"></param>
|
||||
'''<param name="beschreibung"></param>
|
||||
'''<param name="mandantNr"></param>
|
||||
'''<param name="sprache"></param>
|
||||
'''<param name="aktiv"></param>
|
||||
'''<param name="mutierer"></param>
|
||||
'''<param name="coldApplication"></param>
|
||||
'''<param name="coldBezeichnung"></param>
|
||||
'''<returns>error</returns>
|
||||
Public Shared Function Add(ByRef dokumentartNr As Integer, ByVal bezeichnung As String, ByVal parentId As Integer, ByVal sort As Integer, _
|
||||
ByVal imageIndex As Integer, ByVal imageIndexOpen As Integer, ByVal beschreibung As String, ByVal mandantNr As Integer, ByVal sprache As Integer, _
|
||||
ByVal aktiv As Boolean, ByVal mutierer As Integer, ByVal coldApplication As String, ByVal coldBezeichnung As String) As Integer
|
||||
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_InsDokumentart"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Bezeichnung", NullHandler.CToSqlString(bezeichnung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@ParentId", NullHandler.CToSqlInt(parentId)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Sort", NullHandler.CToSqlInt(sort)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@ImageIndex", NullHandler.CToSqlInt(imageIndex)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@ImageIndexOpen", NullHandler.CToSqlInt(imageIndexOpen)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Beschreibung", NullHandler.CToSqlString(beschreibung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MandantNr", mandantNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Sprache", sprache))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Aktiv", aktiv))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Mutierer", NullHandler.CToSqlInt(mutierer)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@ColdApplication", NullHandler.CToSqlString(coldApplication)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@ColdBezeichnung", NullHandler.CToSqlString(coldBezeichnung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@DokumentartNr", 0))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Return", DBNull.Value))
|
||||
sqlCmd.Parameters("@DokumentartNr").Direction = ParameterDirection.Output
|
||||
sqlCmd.Parameters("@Return").Direction = ParameterDirection.ReturnValue
|
||||
|
||||
sqlConn.Open()
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
If CInt(sqlCmd.Parameters("@Return").Value) = 0 Then
|
||||
dokumentartNr = CInt(sqlCmd.Parameters("@DokumentartNr").Value)
|
||||
End If
|
||||
|
||||
Return CInt(sqlCmd.Parameters("@Return").Value)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.Dokumentart.Add", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
'''<summary>Löscht eine bestehende dokumentenArt</summary>
|
||||
'''<param name="dokumentartNr"></param>
|
||||
'''<returns>error</returns>
|
||||
Public Shared Function Delete(ByVal dokumentartNr As Integer) As Integer
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_DelDokumentart"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@DokumentartNr", dokumentartNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Return", DBNull.Value))
|
||||
sqlCmd.Parameters("@Return").Direction = ParameterDirection.ReturnValue
|
||||
|
||||
sqlConn.Open()
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
Return CInt(sqlCmd.Parameters("@Return").Value)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.Dokumentart.Delete", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
'''<summary>updatet eine dokumentenart</summary>
|
||||
'''<param name="dokumentartNr">criterium (keine aktualisierung für diesen param)</param>
|
||||
'''<param name="bezeichnung"></param>
|
||||
'''<param name="parentId"></param>
|
||||
'''<param name="sort"></param>
|
||||
'''<param name="imageIndex"></param>
|
||||
'''<param name="imageIndexOpen"></param>
|
||||
'''<param name="beschreibung"></param>
|
||||
'''<param name="mandantNr"></param>
|
||||
'''<param name="sprache"></param>
|
||||
'''<param name="aktiv"></param>
|
||||
'''<param name="mutierer"></param>
|
||||
'''<param name="coldApplication"></param>
|
||||
'''<param name="coldBezeichnung"></param>
|
||||
'''<returns>error</returns>
|
||||
Public Shared Function Update(ByVal dokumentartNr As Integer, ByVal bezeichnung As String, ByVal parentId As Integer, ByVal sort As Integer, _
|
||||
ByVal imageIndex As Integer, ByVal imageIndexOpen As Integer, ByVal beschreibung As String, ByVal mandantNr As Integer, ByVal sprache As Integer, _
|
||||
ByVal aktiv As Boolean, ByVal mutierer As Integer, ByVal coldApplication As String, ByVal coldBezeichnung As String) As Integer
|
||||
|
||||
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_SetDokumentart"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@DokumentartNr", dokumentartNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Bezeichnung", NullHandler.CToSqlString(bezeichnung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@ParentId", NullHandler.CToSqlInt(parentId)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Sort", NullHandler.CToSqlInt(sort)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@ImageIndex", NullHandler.CToSqlInt(imageIndex)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@ImageIndexOpen", NullHandler.CToSqlInt(imageIndexOpen)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Beschreibung", NullHandler.CToSqlString(beschreibung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MandantNr", mandantNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Sprache", sprache))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Aktiv", aktiv))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Mutierer", NullHandler.CToSqlInt(mutierer)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@ColdApplication", NullHandler.CToSqlString(coldApplication)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@ColdBezeichnung", NullHandler.CToSqlString(coldBezeichnung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Return", DBNull.Value))
|
||||
sqlCmd.Parameters("@Return").Direction = ParameterDirection.ReturnValue
|
||||
|
||||
sqlConn.Open()
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
Return CInt(sqlCmd.Parameters("@Return").Value)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.Dokumentart.Update", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
End Class
|
||||
492
Backup/DataAccess/Dokumenttyp.vb
Normal file
492
Backup/DataAccess/Dokumenttyp.vb
Normal file
@@ -0,0 +1,492 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
|
||||
'''<summary>Datenzugriff auf Tabelle dokumenttyp</summary>
|
||||
Public Class Dokumenttyp
|
||||
|
||||
|
||||
'''<summary>gibt einen dokumenttyp zurück</summary>
|
||||
'''<param name="ds">für datenrückgabe</param>
|
||||
'''<param name="DokumenttypNr"></param>
|
||||
|
||||
Public Shared Sub GetDokumenttyp(ByRef ds As DataSet, ByVal DokumenttypNr As Integer)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_GetDokumenttyp"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@DokumenttypNr", DokumenttypNr))
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(ds, "Dokumenttyp")
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.Dokumenttyp.GetDokumenttyp", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
da.Dispose()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>gibt eine liste aller Dokumenttypen zurück</summary>
|
||||
'''<param name="ds">für datenrückgabe</param>
|
||||
'''<param name="aktiv">1 nur aktive; 0 nur inaktive; -1 alle</param>
|
||||
|
||||
Public Shared Sub List(ByRef ds As DataSet, ByVal aktiv As Integer)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_ListDokumenttyp"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
If aktiv <> -1 Then
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Aktiv", aktiv))
|
||||
End If
|
||||
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(ds, "Dokumenttypen")
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.Dokumenttyp.List", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
da.Dispose()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Überprüft ob eim Mitarbeiter berechtigt ist ein Dokument aus DokTyp zu erstellen</summary>
|
||||
'''<param name="dokumentTypNr">DokumentTyp von zu erstellendem Dokument</param>
|
||||
'''<param name="nrPar00">Partner Nummer</param>
|
||||
'''<param name="mitarbeiterNr">Mitarbeiter welcher Dokument erstellen will</param>
|
||||
'''<returns>True wenn Mitarbeiter berechtigt ist</returns>
|
||||
Public Shared Function IsMitarbeiterBerechtigt(ByVal dokumentTypNr As Integer, ByVal nrPar00 As Integer, ByVal mitarbeiterNr As Integer)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_HasEmployeePermissionToCreateDocument"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@mitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, mitarbeiterNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, dokumentTypNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@berechtigt", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, 0))
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
If Convert.ToBoolean(sqlCmd.Parameters("@berechtigt").Value) Then
|
||||
'hat permission
|
||||
Return True
|
||||
Else
|
||||
'keine permission
|
||||
Return False
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
sqlCmd.Dispose()
|
||||
sqlConn.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'''<summary>erstellt einen datentyp</summary>
|
||||
'''<param name="DokumenttypNr">return neuer primary key</param>
|
||||
'''<param name="bezeichnung"></param>
|
||||
'''<param name="beschreibung"></param>
|
||||
'''<param name="zu_vercolden"></param>
|
||||
'''<param name="zu_retournieren"></param>
|
||||
'''<param name="eingang_ersetzt_ausgang"></param>
|
||||
'''<param name="wird_importiert"></param>
|
||||
'''<param name="anzahl_tage"></param>
|
||||
'''<param name="dbearbeitungszeit"></param>
|
||||
'''<param name="tage_mutation"></param>
|
||||
'''<param name="partnersaldierung_statusalt"></param>
|
||||
'''<param name="wird_nicht_geloescht"></param>
|
||||
'''<param name="vertrauliches_dokument"></param>
|
||||
'''<param name="unterschrift_links"></param>
|
||||
'''<param name="unterschrift_rechts"></param>
|
||||
'''<param name="monate_bis_zur_archivierung"></param>
|
||||
'''<param name="aufbewahrungsfrist_elektronisch"></param>
|
||||
'''<param name="aufbewahrungsfrist_physisch"></param>
|
||||
'''<param name="mandantnr"></param>
|
||||
'''<param name="aktiv"></param>
|
||||
'''<param name="erstellt_am"></param>
|
||||
'''<param name="mutiert_am"></param>
|
||||
'''<param name="mutierer"></param>
|
||||
'''<param name="office_vorlagenr"></param>
|
||||
'''<param name="dokumentart_kundendossier"></param>
|
||||
'''<param name="dokumentart_neuerstellung"></param>
|
||||
'''<param name="dokumentart_retournierung"></param>
|
||||
'''<param name="dokumentart_coldausgang"></param>
|
||||
'''<param name="dokumentart_coldeingang"></param>
|
||||
'''<param name="dokumentart_host"></param>
|
||||
'''<param name="dokumentart_weitere"></param>
|
||||
'''<param name="dokumentart_nativ"></param>
|
||||
'''<param name="prozessnr"></param>
|
||||
'''<param name="prozessnr1"></param>
|
||||
'''<param name="amsdokument"></param>
|
||||
'''<param name="hostdokument"></param>
|
||||
'''<param name="hostdokumenttyp"></param>
|
||||
'''<param name="cold_folder"></param>
|
||||
'''<param name="physisches_archiv"></param>
|
||||
'''<param name="dokumentstatus"></param>
|
||||
'''<param name="Dokument_wird_erstellt"></param>
|
||||
'''<param name="Dokument_wird_retourniert"></param>
|
||||
'''<param name="cold_ersetzen"></param>
|
||||
'''<param name="email_versand"></param>
|
||||
'''<param name="funktionen_zuweisen"></param>
|
||||
'''<param name="dokumentstatus_barcode"></param>
|
||||
'''<param name="nurnative"></param>
|
||||
'''<param name="Owner"></param>
|
||||
'''<param name="vertrag"></param>
|
||||
'''<param name="objektbezeichnungnr"></param>
|
||||
'''<param name="bedingtretournierbar"></param>
|
||||
'''<param name="doktypbedingteretournierung"></param>
|
||||
'''<param name="tagebisvernichtungbedingteretournierung"></param>
|
||||
'''<param name="AnzeigeZurDokumenterstellung"></param>
|
||||
'''<param name="KundenDokument"></param>
|
||||
'''<param name="sb"></param>
|
||||
'''<param name="sbimport"></param>
|
||||
'''<param name="sbedituser"></param>
|
||||
'''<param name="sbnur"></param>
|
||||
'''<param name="bezeichnungmut"></param>
|
||||
'''<param name="istFarbigArchiviert"></param>
|
||||
'''<returns>error</returns>
|
||||
Public Shared Function Add(ByRef DokumenttypNr As Integer, ByVal bezeichnung As String, ByVal beschreibung As String, _
|
||||
ByVal zu_vercolden As Boolean, ByVal zu_retournieren As Boolean, ByVal eingang_ersetzt_ausgang As Boolean, _
|
||||
ByVal wird_importiert As Boolean, ByVal anzahl_tage As Integer, ByVal dbearbeitungszeit As Integer, _
|
||||
ByVal tage_mutation As Integer, ByVal partnersaldierung_statusalt As Boolean, ByVal wird_nicht_geloescht As Boolean, _
|
||||
ByVal vertrauliches_dokument As Boolean, ByVal unterschrift_links As Boolean, ByVal unterschrift_rechts As Boolean, _
|
||||
ByVal monate_bis_zur_archivierung As Integer, ByVal aufbewahrungsfrist_elektronisch As Integer, _
|
||||
ByVal aufbewahrungsfrist_physisch As Integer, ByVal mandantnr As Integer, ByVal aktiv As Boolean, _
|
||||
ByVal erstellt_am As DateTime, ByVal mutiert_am As DateTime, ByVal mutierer As Integer, _
|
||||
ByVal office_vorlagenr As Integer, ByVal dokumentart_kundendossier As Integer, ByVal dokumentart_neuerstellung As Integer, _
|
||||
ByVal dokumentart_retournierung As Integer, ByVal dokumentart_coldausgang As Integer, _
|
||||
ByVal dokumentart_coldeingang As Integer, ByVal dokumentart_host As Integer, ByVal dokumentart_weitere As Integer, _
|
||||
ByVal dokumentart_nativ As Integer, ByVal prozessnr As Integer, ByVal prozessnr1 As Integer, _
|
||||
ByVal amsdokument As Boolean, ByVal hostdokument As Boolean, ByVal hostdokumenttyp As String, _
|
||||
ByVal cold_folder As Integer, ByVal physisches_archiv As Integer, ByVal dokumentstatus As Integer, _
|
||||
ByVal Dokument_wird_erstellt As Boolean, ByVal Dokument_wird_retourniert As Boolean, ByVal cold_ersetzen As Boolean, _
|
||||
ByVal email_versand As Boolean, ByVal funktionen_zuweisen As Boolean, ByVal dokumentstatus_barcode As Integer, _
|
||||
ByVal nurnative As Boolean, ByVal Owner As Integer, ByVal vertrag As Boolean, ByVal objektbezeichnungnr As Integer, _
|
||||
ByVal bedingtretournierbar As Boolean, ByVal doktypbedingteretournierung As Integer, _
|
||||
ByVal tagebisvernichtungbedingteretournierung As Integer, ByVal AnzeigeZurDokumenterstellung As Boolean, _
|
||||
ByVal KundenDokument As Boolean, ByVal sb As Boolean, ByVal sbimport As Boolean, ByVal sbedituser As Boolean, _
|
||||
ByVal sbnur As Boolean, ByVal bezeichnungmut As Boolean, ByVal istFarbigArchiviert As Boolean) As Integer
|
||||
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_InsDokumenttyp"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@bezeichnung", NullHandler.CToSqlString(bezeichnung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@beschreibung", NullHandler.CToSqlString(beschreibung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@zu_vercolden", zu_vercolden))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@zu_retournieren", zu_retournieren))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@eingang_ersetzt_ausgang", eingang_ersetzt_ausgang))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@wird_importiert", wird_importiert))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@anzahl_tage", anzahl_tage))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dbearbeitungszeit", dbearbeitungszeit))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@tage_mutation", tage_mutation))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@partnersaldierung_statusalt", partnersaldierung_statusalt))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@wird_nicht_geloescht", wird_nicht_geloescht))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@vertrauliches_dokument", vertrauliches_dokument))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@unterschrift_links", unterschrift_links))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@unterschrift_rechts", unterschrift_rechts))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@monate_bis_zur_archivierung", monate_bis_zur_archivierung))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@aufbewahrungsfrist_elektronisch", aufbewahrungsfrist_elektronisch))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@aufbewahrungsfrist_physisch", aufbewahrungsfrist_physisch))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@mandantnr", NullHandler.CToSqlInt(mandantnr)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@aktiv", aktiv))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@erstellt_am", NullHandler.CToSqlDateTime(erstellt_am)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@mutiert_am", NullHandler.CToSqlDateTime(mutiert_am)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@mutierer", NullHandler.CToSqlInt(mutierer)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@office_vorlagenr", NullHandler.CToSqlInt(office_vorlagenr)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokumentart_kundendossier", NullHandler.CToSqlInt(dokumentart_kundendossier)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokumentart_neuerstellung", NullHandler.CToSqlInt(dokumentart_neuerstellung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokumentart_retournierung", NullHandler.CToSqlInt(dokumentart_retournierung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokumentart_coldausgang", dokumentart_coldausgang))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokumentart_coldeingang", dokumentart_coldeingang))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokumentart_host", NullHandler.CToSqlInt(dokumentart_host)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokumentart_weitere", NullHandler.CToSqlInt(dokumentart_weitere)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokumentart_nativ", NullHandler.CToSqlInt(dokumentart_nativ)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@prozessnr", NullHandler.CToSqlInt(prozessnr)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@prozessnr1", NullHandler.CToSqlInt(prozessnr1)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@amsdokument", amsdokument))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@hostdokument", hostdokument))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@hostdokumenttyp", NullHandler.CToSqlString(hostdokumenttyp)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@cold_folder", NullHandler.CToSqlInt(cold_folder)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@physisches_archiv", NullHandler.CToSqlInt(physisches_archiv)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokumentstatus", NullHandler.CToSqlInt(dokumentstatus)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Dokument_wird_erstellt", Dokument_wird_erstellt))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Dokument_wird_retourniert", Dokument_wird_retourniert))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@cold_ersetzen", cold_ersetzen))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@email_versand", email_versand))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@funktionen_zuweisen", funktionen_zuweisen))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokumentstatus_barcode", NullHandler.CToSqlInt(dokumentstatus_barcode)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@nurnative", nurnative))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Owner", NullHandler.CToSqlInt(Owner)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@vertrag", vertrag))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@objektbezeichnungnr", NullHandler.CToSqlInt(objektbezeichnungnr)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@bedingtretournierbar", bedingtretournierbar))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@doktypbedingteretournierung", NullHandler.CToSqlInt(doktypbedingteretournierung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@tagebisvernichtungbedingteretournierung", NullHandler.CToSqlInt(tagebisvernichtungbedingteretournierung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@AnzeigeZurDokumenterstellung", AnzeigeZurDokumenterstellung))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@KundenDokument", KundenDokument))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@sb", sb))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@sbimport", sbimport))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@sbedituser", sbedituser))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@sbnur", sbnur))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@bezeichnungmut", bezeichnungmut))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@istFarbigArchiviert", istFarbigArchiviert))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@DokumenttypNr", 0))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Return", DBNull.Value))
|
||||
sqlCmd.Parameters("@DokumenttypNr").Direction = ParameterDirection.Output
|
||||
sqlCmd.Parameters("@Return").Direction = ParameterDirection.ReturnValue
|
||||
|
||||
sqlConn.Open()
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
If CInt(sqlCmd.Parameters("@Return").Value) = 0 Then
|
||||
DokumenttypNr = CInt(sqlCmd.Parameters("@DokumenttypNr").Value)
|
||||
End If
|
||||
|
||||
Return CInt(sqlCmd.Parameters("@Return").Value)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.Dokumenttyp.Add", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
'''<summary>Löscht ein bestehender dokumententyp</summary>
|
||||
'''<param name="DokumenttypNr"></param>
|
||||
'''<returns>error</returns>
|
||||
Public Shared Function Delete(ByVal DokumenttypNr As Integer) As Integer
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_DelDokumenttyp"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@DokumenttypNr", DokumenttypNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Return", DBNull.Value))
|
||||
sqlCmd.Parameters("@Return").Direction = ParameterDirection.ReturnValue
|
||||
|
||||
sqlConn.Open()
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
Return CInt(sqlCmd.Parameters("@Return").Value)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.Dokumenttyp.Delete", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
'''<summary>aktualisiert einen datentyp</summary>
|
||||
'''<param name="DokumenttypNr">kriterium (kein update auf diesem feld)</param>
|
||||
'''<param name="bezeichnung"></param>
|
||||
'''<param name="beschreibung"></param>
|
||||
'''<param name="zu_vercolden"></param>
|
||||
'''<param name="zu_retournieren"></param>
|
||||
'''<param name="eingang_ersetzt_ausgang"></param>
|
||||
'''<param name="wird_importiert"></param>
|
||||
'''<param name="anzahl_tage"></param>
|
||||
'''<param name="dbearbeitungszeit"></param>
|
||||
'''<param name="tage_mutation"></param>
|
||||
'''<param name="partnersaldierung_statusalt"></param>
|
||||
'''<param name="wird_nicht_geloescht"></param>
|
||||
'''<param name="vertrauliches_dokument"></param>
|
||||
'''<param name="unterschrift_links"></param>
|
||||
'''<param name="unterschrift_rechts"></param>
|
||||
'''<param name="monate_bis_zur_archivierung"></param>
|
||||
'''<param name="aufbewahrungsfrist_elektronisch"></param>
|
||||
'''<param name="aufbewahrungsfrist_physisch"></param>
|
||||
'''<param name="mandantnr"></param>
|
||||
'''<param name="aktiv"></param>
|
||||
'''<param name="erstellt_am"></param>
|
||||
'''<param name="mutiert_am"></param>
|
||||
'''<param name="mutierer"></param>
|
||||
'''<param name="office_vorlagenr"></param>
|
||||
'''<param name="dokumentart_kundendossier"></param>
|
||||
'''<param name="dokumentart_neuerstellung"></param>
|
||||
'''<param name="dokumentart_retournierung"></param>
|
||||
'''<param name="dokumentart_coldausgang"></param>
|
||||
'''<param name="dokumentart_coldeingang"></param>
|
||||
'''<param name="dokumentart_host"></param>
|
||||
'''<param name="dokumentart_weitere"></param>
|
||||
'''<param name="dokumentart_nativ"></param>
|
||||
'''<param name="prozessnr"></param>
|
||||
'''<param name="prozessnr1"></param>
|
||||
'''<param name="amsdokument"></param>
|
||||
'''<param name="hostdokument"></param>
|
||||
'''<param name="hostdokumenttyp"></param>
|
||||
'''<param name="cold_folder"></param>
|
||||
'''<param name="physisches_archiv"></param>
|
||||
'''<param name="dokumentstatus"></param>
|
||||
'''<param name="Dokument_wird_erstellt"></param>
|
||||
'''<param name="Dokument_wird_retourniert"></param>
|
||||
'''<param name="cold_ersetzen"></param>
|
||||
'''<param name="email_versand"></param>
|
||||
'''<param name="funktionen_zuweisen"></param>
|
||||
'''<param name="dokumentstatus_barcode"></param>
|
||||
'''<param name="nurnative"></param>
|
||||
'''<param name="Owner"></param>
|
||||
'''<param name="vertrag"></param>
|
||||
'''<param name="objektbezeichnungnr"></param>
|
||||
'''<param name="bedingtretournierbar"></param>
|
||||
'''<param name="doktypbedingteretournierung"></param>
|
||||
'''<param name="tagebisvernichtungbedingteretournierung"></param>
|
||||
'''<param name="AnzeigeZurDokumenterstellung"></param>
|
||||
'''<param name="KundenDokument"></param>
|
||||
'''<param name="sb"></param>
|
||||
'''<param name="sbimport"></param>
|
||||
'''<param name="sbedituser"></param>
|
||||
'''<param name="sbnur"></param>
|
||||
'''<param name="bezeichnungmut"></param>
|
||||
'''<param name="istFarbigArchiviert"></param>
|
||||
'''<returns>error</returns>
|
||||
Public Shared Function Update(ByVal DokumenttypNr As Integer, ByVal bezeichnung As String, ByVal beschreibung As String, _
|
||||
ByVal zu_vercolden As Boolean, ByVal zu_retournieren As Boolean, ByVal eingang_ersetzt_ausgang As Boolean, _
|
||||
ByVal wird_importiert As Boolean, ByVal anzahl_tage As Integer, ByVal dbearbeitungszeit As Integer, _
|
||||
ByVal tage_mutation As Integer, ByVal partnersaldierung_statusalt As Boolean, ByVal wird_nicht_geloescht As Boolean, _
|
||||
ByVal vertrauliches_dokument As Boolean, ByVal unterschrift_links As Boolean, ByVal unterschrift_rechts As Boolean, _
|
||||
ByVal monate_bis_zur_archivierung As Integer, ByVal aufbewahrungsfrist_elektronisch As Integer, _
|
||||
ByVal aufbewahrungsfrist_physisch As Integer, ByVal mandantnr As Integer, ByVal aktiv As Boolean, _
|
||||
ByVal erstellt_am As DateTime, ByVal mutiert_am As DateTime, ByVal mutierer As Integer, _
|
||||
ByVal office_vorlagenr As Integer, ByVal dokumentart_kundendossier As Integer, ByVal dokumentart_neuerstellung As Integer, _
|
||||
ByVal dokumentart_retournierung As Integer, ByVal dokumentart_coldausgang As Integer, _
|
||||
ByVal dokumentart_coldeingang As Integer, ByVal dokumentart_host As Integer, ByVal dokumentart_weitere As Integer, _
|
||||
ByVal dokumentart_nativ As Integer, ByVal prozessnr As Integer, ByVal prozessnr1 As Integer, _
|
||||
ByVal amsdokument As Boolean, ByVal hostdokument As Boolean, ByVal hostdokumenttyp As String, _
|
||||
ByVal cold_folder As Integer, ByVal physisches_archiv As Integer, ByVal dokumentstatus As Integer, _
|
||||
ByVal Dokument_wird_erstellt As Boolean, ByVal Dokument_wird_retourniert As Boolean, ByVal cold_ersetzen As Boolean, _
|
||||
ByVal email_versand As Boolean, ByVal funktionen_zuweisen As Boolean, ByVal dokumentstatus_barcode As Integer, _
|
||||
ByVal nurnative As Boolean, ByVal Owner As Integer, ByVal vertrag As Boolean, ByVal objektbezeichnungnr As Integer, _
|
||||
ByVal bedingtretournierbar As Boolean, ByVal doktypbedingteretournierung As Integer, _
|
||||
ByVal tagebisvernichtungbedingteretournierung As Integer, ByVal AnzeigeZurDokumenterstellung As Boolean, _
|
||||
ByVal KundenDokument As Boolean, ByVal sb As Boolean, ByVal sbimport As Boolean, ByVal sbedituser As Boolean, _
|
||||
ByVal sbnur As Boolean, ByVal bezeichnungmut As Boolean, ByVal istFarbigArchiviert As Boolean) As Integer
|
||||
|
||||
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_SetParameter"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@DokumenttypNr", DokumenttypNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@bezeichnung", NullHandler.CToSqlString(bezeichnung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@beschreibung", NullHandler.CToSqlString(beschreibung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@zu_vercolden", zu_vercolden))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@zu_retournieren", zu_retournieren))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@eingang_ersetzt_ausgang", eingang_ersetzt_ausgang))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@wird_importiert", wird_importiert))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@anzahl_tage", anzahl_tage))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dbearbeitungszeit", dbearbeitungszeit))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@tage_mutation", tage_mutation))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@partnersaldierung_statusalt", partnersaldierung_statusalt))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@wird_nicht_geloescht", wird_nicht_geloescht))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@vertrauliches_dokument", vertrauliches_dokument))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@unterschrift_links", unterschrift_links))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@unterschrift_rechts", unterschrift_rechts))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@monate_bis_zur_archivierung", monate_bis_zur_archivierung))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@aufbewahrungsfrist_elektronisch", aufbewahrungsfrist_elektronisch))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@aufbewahrungsfrist_physisch", aufbewahrungsfrist_physisch))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@mandantnr", NullHandler.CToSqlInt(mandantnr)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@aktiv", aktiv))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@erstellt_am", NullHandler.CToSqlDateTime(erstellt_am)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@mutiert_am", NullHandler.CToSqlDateTime(mutiert_am)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@mutierer", NullHandler.CToSqlInt(mutierer)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@office_vorlagenr", NullHandler.CToSqlInt(office_vorlagenr)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokumentart_kundendossier", NullHandler.CToSqlInt(dokumentart_kundendossier)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokumentart_neuerstellung", NullHandler.CToSqlInt(dokumentart_neuerstellung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokumentart_retournierung", NullHandler.CToSqlInt(dokumentart_retournierung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokumentart_coldausgang", dokumentart_coldausgang))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokumentart_coldeingang", dokumentart_coldeingang))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokumentart_host", NullHandler.CToSqlInt(dokumentart_host)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokumentart_weitere", NullHandler.CToSqlInt(dokumentart_weitere)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokumentart_nativ", NullHandler.CToSqlInt(dokumentart_nativ)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@prozessnr", NullHandler.CToSqlInt(prozessnr)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@prozessnr1", NullHandler.CToSqlInt(prozessnr1)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@amsdokument", amsdokument))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@hostdokument", hostdokument))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@hostdokumenttyp", NullHandler.CToSqlString(hostdokumenttyp)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@cold_folder", NullHandler.CToSqlInt(cold_folder)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@physisches_archiv", NullHandler.CToSqlInt(physisches_archiv)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokumentstatus", NullHandler.CToSqlInt(dokumentstatus)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Dokument_wird_erstellt", Dokument_wird_erstellt))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Dokument_wird_retourniert", Dokument_wird_retourniert))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@cold_ersetzen", cold_ersetzen))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@email_versand", email_versand))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@funktionen_zuweisen", funktionen_zuweisen))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokumentstatus_barcode", NullHandler.CToSqlInt(dokumentstatus_barcode)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@nurnative", nurnative))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Owner", NullHandler.CToSqlInt(Owner)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@vertrag", vertrag))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@objektbezeichnungnr", NullHandler.CToSqlInt(objektbezeichnungnr)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@bedingtretournierbar", bedingtretournierbar))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@doktypbedingteretournierung", NullHandler.CToSqlInt(doktypbedingteretournierung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@tagebisvernichtungbedingteretournierung", NullHandler.CToSqlInt(tagebisvernichtungbedingteretournierung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@AnzeigeZurDokumenterstellung", AnzeigeZurDokumenterstellung))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@KundenDokument", KundenDokument))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@sb", sb))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@sbimport", sbimport))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@sbedituser", sbedituser))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@sbnur", sbnur))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@bezeichnungmut", bezeichnungmut))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@istFarbigArchiviert", istFarbigArchiviert))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Return", DBNull.Value))
|
||||
sqlCmd.Parameters("@Return").Direction = ParameterDirection.ReturnValue
|
||||
|
||||
sqlConn.Open()
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
Return CInt(sqlCmd.Parameters("@Return").Value)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.Dokumenttyp.Update", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
46
Backup/DataAccess/Funktionsgruppe.vb
Normal file
46
Backup/DataAccess/Funktionsgruppe.vb
Normal file
@@ -0,0 +1,46 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
'''<summary>Datenzugriff auf Tabelle Funktionsgruppe</summary>
|
||||
Public Class Funktionsgruppe
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Funktionsgrupppen zurück</summary>
|
||||
'''<param name="ds">Das DataSet welches gefüllt werden soll</param>
|
||||
|
||||
Overloads Shared Sub GetListe(ByRef ds As DataSet)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_ListFunktionsgruppen"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(ds, "FunktionsgruppenListe")
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
If da Is Nothing Then
|
||||
da.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
84
Backup/DataAccess/Klassifizierung.vb
Normal file
84
Backup/DataAccess/Klassifizierung.vb
Normal file
@@ -0,0 +1,84 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
'''<summary>Datenzugriff auf Tabelle Klassifizierung</summary>
|
||||
Public Class Klassifizierung
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Funktionsgrupppen zurück</summary>
|
||||
'''<param name="ds">Das DataSet welches gefüllt werden soll</param>
|
||||
|
||||
Overloads Shared Sub GetListe(ByRef ds As DataSet)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_ListKlassifizierung"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(ds, "KlassifizierungListe")
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
If da Is Nothing Then
|
||||
da.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Gibt alle Details zur einer Klassifizierung zurück</summary>
|
||||
'''<param name="klassifizierungNr">Die Datenbank Nummer der Klassifizierung (ID)</param>
|
||||
'''<param name="ds">Das zu füllende DataSet</param>
|
||||
|
||||
Overloads Shared Sub GetById(ByVal klassifizierungNr As Integer, ByRef ds As DataSet)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_GetKlassifizierungById"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@KlassifizierungNr", klassifizierungNr))
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(ds, "Klassifizierung")
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
If da Is Nothing Then
|
||||
da.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
48
Backup/DataAccess/Meldungstext.vb
Normal file
48
Backup/DataAccess/Meldungstext.vb
Normal file
@@ -0,0 +1,48 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
'''<summary>Datenzugriff auf Tabelle Meldungstext</summary>
|
||||
Public Class Meldungstext
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Spalten in einem DataSet zurück</summary>
|
||||
'''<param name="tableName">Name der Tabelle, von welcher die Spalten zurück gegeben werden sollen</param>
|
||||
|
||||
Public Overloads Shared Sub GetById(ByVal meldungsTextNr As Integer, ByRef dsMeldungstext As DataSet)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_GetMeldungstextById"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MeldungstextNr", meldungsTextNr))
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(dsMeldungstext, "Meldungstext")
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
If da Is Nothing Then
|
||||
da.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
322
Backup/DataAccess/Mitarbeiter.vb
Normal file
322
Backup/DataAccess/Mitarbeiter.vb
Normal file
@@ -0,0 +1,322 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
'''<summary>Datenzugriff auf Tabelle Mitarbeiter</summary>
|
||||
Public Class Mitarbeiter
|
||||
|
||||
#Region "Constructor"
|
||||
|
||||
Public Sub New(ByVal mitarbeiterId As Integer)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Mitarbeitern zurück</summary>
|
||||
'''<param name="teamNr">Nur Mitarbeiter von diesem Team</param>
|
||||
'''<param name="funktionsGruppeNr">Nur Mitarbeiter von dieser Funktionsgruppe</param>
|
||||
'''<param name="dsMitarbeiter">Das DataSet welches gefüllt werden soll</param>
|
||||
|
||||
Overloads Shared Sub GetListe(ByVal teamNr As Integer, ByVal funktionsGruppeNr As Integer, ByRef dsMitarbeiter As DataSet)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_ListMitarbeiter"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
If teamNr = 0 Then
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@TeamNr", DBNull.Value))
|
||||
Else
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@TeamNr", teamNr))
|
||||
End If
|
||||
|
||||
If funktionsGruppeNr = 0 Then
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@FunktionsGruppeNr", DBNull.Value))
|
||||
Else
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@FunktionsGruppeNr", funktionsGruppeNr))
|
||||
End If
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(dsMitarbeiter, "MitarbeiterListe")
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
If da Is Nothing Then
|
||||
da.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Gibt alle Details zur einem Mitarbeiter zurück</summary>
|
||||
'''<param name="mitarbeiterNr">Die datenbank Nummer des Mitarbeiters (ID)</param>
|
||||
'''<param name="dsMitarbeiter">Das zu füllende DataSet</param>
|
||||
|
||||
Overloads Shared Sub GetById(ByVal mitarbeiterNr As Integer, ByRef dsMitarbeiter As DataSet)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_GetMitarbeiterById"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MitarbeiterNr", mitarbeiterNr))
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(dsMitarbeiter, "Mitarbeiter")
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
If da Is Nothing Then
|
||||
da.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Gibt alle Details zur einem Mitarbeiter zurück</summary>
|
||||
'''<param name="tgNummer">Die NT TG Nummer des Mitarbeiters (NTG, NtAccount)</param>
|
||||
'''<param name="dsMitarbeiter">Das zu füllende DataSet</param>
|
||||
|
||||
Overloads Shared Sub GetByTgNummer(ByVal tgNummer As String, ByRef dsMitarbeiter As DataSet)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_GetMitarbeiterByTgNummer"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@TgNummer", tgNummer))
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(dsMitarbeiter, "Mitarbeiter")
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
If da Is Nothing Then
|
||||
da.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Erstellt ein neues Standard Profil für den angegebenen Mitarbeiter</summary>
|
||||
'''<param name="mitarbeiterNr">Die datenbank Nummer des Mitarbeiters (ID)</param>
|
||||
'''<param name="mutiererMitarbeiterNr">Die datenbank Nummer des Mutierers (ID)</param>
|
||||
|
||||
Overloads Shared Sub CreateNewStandardProfil(ByVal mitarbeiterNr As Integer, ByVal mutiererMitarbeiterNr As Integer)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_InsMitarbeiterProfil"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MitarbeiterNr", mitarbeiterNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MutiererMitarbeiterNr", mutiererMitarbeiterNr))
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Gibt alle Details zur einem Mitarbeiter zurück</summary>
|
||||
Overloads Shared Function Insert(ByVal vorname As String, ByVal name As String, ByVal kurzzeichen As String, ByVal anrede As String, _
|
||||
ByVal tgNummer As String, ByVal eMail As String, ByVal fax As String, ByVal telefon As String, _
|
||||
ByVal unterschriftText As String, ByVal spracheNr As Integer, ByVal fuerMandant As Integer, _
|
||||
ByVal showTipp As Boolean, ByVal partnerNr As Integer, ByVal mandantNr As Integer, _
|
||||
ByVal isAktiv As Boolean, ByVal mailEmpfang As Boolean, ByVal edokaMessage As Boolean, _
|
||||
ByVal funktion As String, ByVal mailDirektVersenden As Boolean, ByVal rang As String, _
|
||||
ByVal mailDokumentrueckgang As Boolean, ByVal klassifizierungNr As Integer, _
|
||||
ByVal edokaMail As Boolean, ByVal journalisierung As Boolean, ByVal getMeldung As Boolean, _
|
||||
ByVal mail1 As String, ByVal mutiererMitarbeiterNr As Integer) As Integer
|
||||
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_InsertMitarbeiter"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Vorname", vorname))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Name", name))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@KurzZeichen", kurzzeichen))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Anrede", anrede))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@TgNummer", tgNummer))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@eMail", eMail))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Fax", fax))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Telefon", telefon))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@UnterschriftText", unterschriftText))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@SpracheNr", spracheNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@FuerMandantNr", fuerMandant))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@ShowTipp", showTipp))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@PartnerNr", partnerNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MandantNr", mandantNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Aktiv", isAktiv))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MutiererMitarbeiterNr", mutiererMitarbeiterNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MailEmpfang", mailEmpfang))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@EdokaMessage", edokaMessage))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Funktion", funktion))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MailDirektVersenden", mailDirektVersenden))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Rang", rang))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MailDokumentRueckgang", mailDokumentrueckgang))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@KlassifizierungNr", klassifizierungNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@EdokaMail", edokaMail))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Journalisierung", journalisierung))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@GebMeldung", getMeldung))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Mail1", mail1))
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MitarbeiterNr", -1))
|
||||
sqlCmd.Parameters("@MitarbeiterNr").Direction = ParameterDirection.InputOutput
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Return", SqlDbType.Int))
|
||||
sqlCmd.Parameters("@Return").Direction = ParameterDirection.ReturnValue
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
If sqlCmd.ExecuteNonQuery() = 0 Then
|
||||
Return -1
|
||||
Else
|
||||
If Convert.ToInt32(sqlCmd.Parameters("@Return").Value) <> 0 Then
|
||||
Throw New Exception("DA.Mitarbeiter.Insert(): Return value was " + sqlCmd.Parameters("@Return").Value)
|
||||
Else
|
||||
Return Convert.ToInt32(sqlCmd.Parameters("@MitarbeiterNr").Value)
|
||||
End If
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'''<summary>Aktualisiert alle Details von einem Mitarbeiter</summary>
|
||||
Overloads Shared Function Update(ByVal mitarbeiterNr As Integer, ByVal vorname As String, ByVal name As String, ByVal kurzzeichen As String, ByVal anrede As String, _
|
||||
ByVal tgNummer As String, ByVal eMail As String, ByVal fax As String, ByVal telefon As String, _
|
||||
ByVal unterschriftText As String, ByVal spracheNr As Integer, ByVal fuerMandant As Integer, _
|
||||
ByVal showTipp As Boolean, ByVal partnerNr As Integer, ByVal mandantNr As Integer, _
|
||||
ByVal isAktiv As Boolean, ByVal mailEmpfang As Boolean, ByVal edokaMessage As Boolean, _
|
||||
ByVal funktion As String, ByVal mailDirektVersenden As Boolean, ByVal rang As String, _
|
||||
ByVal mailDokumentrueckgang As Boolean, ByVal klassifizierungNr As Integer, _
|
||||
ByVal edokaMail As Boolean, ByVal journalisierung As Boolean, ByVal getMeldung As Boolean, _
|
||||
ByVal mail1 As String, ByVal mutiererMitarbeiterNr As Integer)
|
||||
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_UpdateMitarbeiter"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MitarbeiterNr", mitarbeiterNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Vorname", vorname))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Name", name))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@KurzZeichen", kurzzeichen))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Anrede", anrede))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@TgNummer", tgNummer))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@eMail", eMail))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Fax", fax))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Telefon", telefon))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@UnterschriftText", unterschriftText))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@SpracheNr", spracheNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@FuerMandantNr", fuerMandant))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@ShowTipp", showTipp))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@PartnerNr", partnerNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MandantNr", mandantNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Aktiv", isAktiv))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MutiererMitarbeiterNr", mutiererMitarbeiterNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MailEmpfang", mailEmpfang))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@EdokaMessage", edokaMessage))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Funktion", funktion))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MailDirektVersenden", mailDirektVersenden))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Rang", rang))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MailDokumentRueckgang", mailDokumentrueckgang))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@KlassifizierungNr", klassifizierungNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@EdokaMail", edokaMail))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Journalisierung", journalisierung))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@GebMeldung", getMeldung))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Mail1", mail1))
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
154
Backup/DataAccess/MitarbeiterFunktionsgruppe.vb
Normal file
154
Backup/DataAccess/MitarbeiterFunktionsgruppe.vb
Normal file
@@ -0,0 +1,154 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
'''<summary>Datenzugriff auf Tabelle mitarbeiter_funktionsgruppe</summary>
|
||||
Public Class MitarbeiterFunktionsgruppe
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Funktionsgrupppen denen ein Mitarbeiter zugewiesen ist zurück</summary>
|
||||
'''<param name="ds">Das DataSet welches gefüllt werden soll</param>
|
||||
|
||||
Overloads Shared Sub GetListeByMitarbeiterNr(ByVal mitarbeiterNr As Integer, ByRef ds As DataSet)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_GetMitarbeiterFunktionsgruppen"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MitarbeiterNr", mitarbeiterNr))
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(ds, "FunktionsgruppenListe")
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
If da Is Nothing Then
|
||||
da.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Fügt einen Mitarbeiter zu einer Funktionsgruppe hinzu</summary>
|
||||
'''<param name="mitarbeiterNr">Mitarbeiter ID welche hinzugefügt werden soll</param>
|
||||
'''<param name="funktionsGruppeNr">Ziel-Funktionsgruppe</param>
|
||||
'''<param name="mutiererMitarbeiterNr">Mitarbeiter welcher die Änderung vornimmt</param>
|
||||
|
||||
Public Overloads Shared Sub Insert(ByVal mitarbeiterNr As Integer, ByVal funktionsGruppeNr As Integer, ByVal mutiererMitarbeiterNr As Integer)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_InsertMitarbeiterFunktionsGruppe"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MitarbeiterNr", mitarbeiterNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@FunktionsGruppeNr", funktionsGruppeNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MutiererMANr", mutiererMitarbeiterNr))
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Fügt einen Mitarbeiter zu einer Funktionsgruppe hinzu</summary>
|
||||
'''<param name="mitarbeiterNr">Mitarbeiter ID welche hinzugefügt werden soll</param>
|
||||
'''<param name="funktionsGruppeNr">Ziel-Funktionsgruppe</param>
|
||||
'''<param name="mutiererMitarbeiterNr">Mitarbeiter welcher die Änderung vornimmt</param>
|
||||
|
||||
Public Overloads Shared Function Delete(ByVal mitarbeiter_funktionsGruppeNr As Integer, ByVal mutiererMitarbeiterNr As Integer)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_DeleteMitarbeiterFunktionsGruppe"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Mitarbeiter_FunktionsGruppeNr", mitarbeiter_funktionsGruppeNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MutiererMANr", mutiererMitarbeiterNr))
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'''<summary>Set den Aktiv Status einer Mitarbeiter Funktionsgruppen Zuordnung</summary>
|
||||
'''<param name="mitarbeiterFunktionsgruppeNr">Das DataSet welches gefüllt werden soll</param>
|
||||
'''<param name="isAktiv">Das DataSet welches gefüllt werden soll</param>
|
||||
|
||||
Overloads Shared Sub SetAktiv(ByVal mitarbeiterFunktionsgruppeNr As Integer, ByVal isAktiv As Boolean, ByVal mutiererMitarbeiterNr As Integer)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_SetMitarbeiterFunktionsgruppen"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MitarbeiterFunktionsgruppeNr", mitarbeiterFunktionsgruppeNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@IsAktiv", isAktiv))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MutiererMitarbeiterNr", mutiererMitarbeiterNr))
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
23
Backup/DataAccess/NullHandler.vb
Normal file
23
Backup/DataAccess/NullHandler.vb
Normal file
@@ -0,0 +1,23 @@
|
||||
Public Class NullHandler
|
||||
Public Shared Function CToSqlInt(ByVal value As Integer) As SqlTypes.SqlInt32
|
||||
If value = Config.NullReplacer Then
|
||||
Return SqlTypes.SqlInt32.Null
|
||||
Else
|
||||
Return SqlTypes.SqlInt32.Parse(value.ToString())
|
||||
End If
|
||||
End Function
|
||||
Public Shared Function CToSqlString(ByVal value As String) As SqlTypes.SqlString
|
||||
If value = Config.NullReplacer.ToString() Then
|
||||
Return SqlTypes.SqlString.Null
|
||||
Else
|
||||
Return New SqlTypes.SqlString(value)
|
||||
End If
|
||||
End Function
|
||||
Public Shared Function CToSqlDateTime(ByVal value As DateTime) As SqlTypes.SqlDateTime
|
||||
If value = DateTime.MinValue Then
|
||||
Return SqlTypes.SqlDateTime.Null
|
||||
Else
|
||||
Return New SqlTypes.SqlDateTime(value)
|
||||
End If
|
||||
End Function
|
||||
End Class
|
||||
275
Backup/DataAccess/OfficeVorlage.vb
Normal file
275
Backup/DataAccess/OfficeVorlage.vb
Normal file
@@ -0,0 +1,275 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
|
||||
'''<summary>Datenzugriff auf Tabelle office_vorlage</summary>
|
||||
Public Class OfficeVorlage
|
||||
|
||||
Public Shared Sub GetByNr(ByRef ds As DataSet, ByVal officeVorlageNr As Integer)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_GetOfficeVorlageByNr"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@OfficeVorlageNr", officeVorlageNr))
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(ds, "OfficeVorlage")
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.OfficeVorlage.GetOfficeVorlageByNr", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
da.Dispose()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>gibt eine liste aller office vorlagen zurück</summary>
|
||||
'''<param name="ds">für datenrückgabe</param>
|
||||
'''<param name="aktiv">1 nur aktive; 0 nur inaktive; -1 alle</param>
|
||||
|
||||
Public Shared Sub List(ByRef ds As DataSet, ByVal aktiv As Integer)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_ListOfficeVorlage"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Aktiv", aktiv))
|
||||
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(ds, "OfficeVorlagen")
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.OfficeVorlage.List", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
da.Dispose()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
'''<summary>Fügt eine neue OffiecVorlage in die DB ein</summary>
|
||||
'''<param name="officeVorlageNr"></param>
|
||||
'''<param name="bezeichnung"></param>
|
||||
'''<param name="beschreibung"></param>
|
||||
'''<param name="vorlageId"></param>
|
||||
'''<param name="vorlageName"></param>
|
||||
'''<param name="prefixDokumentName"></param>
|
||||
'''<param name="idvVorlage"></param>
|
||||
'''<param name="idvId"></param>
|
||||
'''<param name="officeVorlage"></param>
|
||||
'''<param name="absenderErsteller"></param>
|
||||
'''<param name="idvNativ"></param>
|
||||
'''<param name="dokumentGeschuetzt"></param>
|
||||
'''<param name="kopfzeileGenerieren"></param>
|
||||
'''<param name="klassifizierung"></param>
|
||||
'''<param name="bcpt"></param>
|
||||
'''<param name="bcpl"></param>
|
||||
'''<param name="bcw"></param>
|
||||
'''<param name="bch"></param>
|
||||
'''<param name="bchorizontal"></param>
|
||||
'''<param name="mandantNr"></param>
|
||||
'''<param name="aktiv"></param>
|
||||
'''<param name="erstelltAm"></param>
|
||||
'''<param name="mutiertAm"></param>
|
||||
'''<param name="anwendungNr"></param>
|
||||
'''<param name="owner"></param>
|
||||
'''<returns>error</returns>
|
||||
Public Shared Function Add(ByRef officeVorlageNr As Integer, ByVal bezeichnung As String, ByVal beschreibung As String, _
|
||||
ByVal vorlageId As Integer, ByVal vorlageName As String, ByVal prefixDokumentName As String, ByVal idvVorlage As Boolean, ByVal idvId As String, _
|
||||
ByVal officeVorlage As String, ByVal absenderErsteller As Boolean, ByVal idvNativ As Boolean, ByVal dokumentGeschuetzt As Boolean, _
|
||||
ByVal kopfzeileGenerieren As Boolean, ByVal klassifizierung As Integer, ByVal bcpt As Integer, ByVal bcpl As Integer, ByVal bcw As Integer, _
|
||||
ByVal bch As Integer, ByVal bchorizontal As Boolean, ByVal mandantNr As Integer, ByVal aktiv As Boolean, ByVal erstelltAm As DateTime, _
|
||||
ByVal mutiertAm As DateTime, ByVal mutierer As Integer, ByVal anwendungNr As Integer, ByVal owner As Integer) As Integer
|
||||
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_InsOfficeVorlage"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@bezeichnung", NullHandler.CToSqlString(bezeichnung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@beschreibung", NullHandler.CToSqlString(beschreibung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@vorlageid", NullHandler.CToSqlInt(vorlageId)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@vorlagename", NullHandler.CToSqlString(vorlageName)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@prefix_dokumentname", NullHandler.CToSqlString(prefixDokumentName)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@idv_vorlage", idvVorlage))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@idv_id", NullHandler.CToSqlString(idvId)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Office_Vorlage", NullHandler.CToSqlString(officeVorlage)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@absender_ersteller", NullHandler.CToSqlString(absenderErsteller)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@idv_nativ", idvNativ))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokument_geschuetzt", dokumentGeschuetzt))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@kopfzeile_generieren", kopfzeileGenerieren))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@klassifizierung", NullHandler.CToSqlInt(klassifizierung)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@bcpt", bcpt))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@bcpl", NullHandler.CToSqlInt(bcpl)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@bcw", bcw))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@bch", bch))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@bchorizontal", bchorizontal))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@mandantnr", NullHandler.CToSqlInt(mandantNr)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@aktiv", aktiv))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@erstellt_am", NullHandler.CToSqlDateTime(erstelltAm)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@mutiert_am", NullHandler.CToSqlDateTime(mutiertAm)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@mutierer", NullHandler.CToSqlInt(mutierer)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@anwendungnr", NullHandler.CToSqlInt(anwendungNr)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@OWNER", NullHandler.CToSqlInt(owner)))
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@OfficeVorlageNr", DBNull.Value))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Return", DBNull.Value))
|
||||
sqlCmd.Parameters("@OfficeVorlageNr").Direction = ParameterDirection.Output
|
||||
sqlCmd.Parameters("@Return").Direction = ParameterDirection.ReturnValue
|
||||
|
||||
sqlConn.Open()
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
If CInt(sqlCmd.Parameters("@Return").Value) <> 0 Then
|
||||
officeVorlageNr = CInt(sqlCmd.Parameters("@OfficeVorlageNr").Value)
|
||||
End If
|
||||
|
||||
Return CInt(sqlCmd.Parameters("@Return").Value)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.OfficeVorlage.Add", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
'''<summary>Löscht eine bestehende officeVorlage</summary>
|
||||
'''<param name="officeVorlageNr"></param>
|
||||
'''<returns>error</returns>
|
||||
Public Shared Function Delete(ByVal officeVorlageNr As Integer) As Integer
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_DelOfficeVorlage"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@OfficeVorlageNr", officeVorlageNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Return", DBNull.Value))
|
||||
sqlCmd.Parameters("@Return").Direction = ParameterDirection.ReturnValue
|
||||
|
||||
sqlConn.Open()
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
Return CInt(sqlCmd.Parameters("@Return").Value)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.OfficeVorlage.Delete", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'''<summary>Aktualisiert eine OfficeVorlage in der Datenbank</summary>
|
||||
'''<param name="officeVorlageNr"></param>
|
||||
'''<param name="bezeichnung"></param>
|
||||
'''<param name="beschreibung"></param>
|
||||
'''<param name="vorlageId"></param>
|
||||
'''<param name="vorlageName"></param>
|
||||
'''<param name="prefixDokumentName"></param>
|
||||
'''<param name="idvVorlage"></param>
|
||||
'''<param name="idvId"></param>
|
||||
'''<param name="officeVorlage"></param>
|
||||
'''<param name="absenderErsteller"></param>
|
||||
'''<param name="idvNativ"></param>
|
||||
'''<param name="dokumentGeschuetzt"></param>
|
||||
'''<param name="kopfzeileGenerieren"></param>
|
||||
'''<param name="klassifizierung"></param>
|
||||
'''<param name="bcpt"></param>
|
||||
'''<param name="bcpl"></param>
|
||||
'''<param name="bcw"></param>
|
||||
'''<param name="bch"></param>
|
||||
'''<param name="bchorizontal"></param>
|
||||
'''<param name="mandantNr"></param>
|
||||
'''<param name="aktiv"></param>
|
||||
'''<param name="erstelltAm"></param>
|
||||
'''<param name="mutiertAm"></param>
|
||||
'''<param name="mutierer"></param>
|
||||
'''<param name="anwendungNr"></param>
|
||||
'''<param name="owner"></param>
|
||||
|
||||
Public Shared Function Update(ByVal officeVorlageNr As Integer, ByVal bezeichnung As String, ByVal beschreibung As String, _
|
||||
ByVal vorlageId As Integer, ByVal vorlageName As String, ByVal prefixDokumentName As String, ByVal idvVorlage As Boolean, ByVal idvId As String, _
|
||||
ByVal officeVorlage As String, ByVal absenderErsteller As Boolean, ByVal idvNativ As Boolean, ByVal dokumentGeschuetzt As Boolean, _
|
||||
ByVal kopfzeileGenerieren As Boolean, ByVal klassifizierung As Integer, ByVal bcpt As Integer, ByVal bcpl As Integer, ByVal bcw As Integer, _
|
||||
ByVal bch As Integer, ByVal bchorizontal As Boolean, ByVal mandantNr As Integer, ByVal aktiv As Boolean, ByVal erstelltAm As DateTime, _
|
||||
ByVal mutiertAm As DateTime, ByVal mutierer As Integer, ByVal anwendungNr As Integer, ByVal owner As Integer) As Integer
|
||||
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_SetOfficeVorlage"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@bezeichnung", bezeichnung))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@beschreibung", beschreibung))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@vorlageid", vorlageId))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@vorlagename", vorlageName))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@prefix_dokumentname", prefixDokumentName))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@idv_vorlage", idvVorlage))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@idv_id", idvId))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Office_Vorlage", NullHandler.CToSqlString(officeVorlage)))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@absender_ersteller", absenderErsteller))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@idv_nativ", idvNativ))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@dokument_geschuetzt", dokumentGeschuetzt))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@kopfzeile_generieren", kopfzeileGenerieren))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@klassifizierung", klassifizierung))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@bcpt", bcpt))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@bcpl", bcpl))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@bcw", bcw))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@bch", bch))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@bchorizontal", bchorizontal))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@mandantnr", mandantNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@aktiv", aktiv))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@erstellt_am", erstelltAm))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@mutiert_am", mutiertAm))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@mutierer", mutierer))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@anwendungnr", anwendungNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@OWNER", owner))
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Return", DBNull.Value))
|
||||
sqlCmd.Parameters("@Return").Direction = ParameterDirection.ReturnValue
|
||||
|
||||
sqlConn.Open()
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
Return CInt(sqlCmd.Parameters("@Return").Value)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.OfficeVorlage.Update", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
End Class
|
||||
206
Backup/DataAccess/Parameter.vb
Normal file
206
Backup/DataAccess/Parameter.vb
Normal file
@@ -0,0 +1,206 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
|
||||
'''<summary>Datenzugriff auf die Tabelle Parameter</summary>
|
||||
Public Class Parameter
|
||||
|
||||
'''<summary>gibt einen einzelnen paramter zurück</summary>
|
||||
'''<param name="ds">speicher für datenrückgabe</param>
|
||||
'''<param name="benutzerNr"></param>
|
||||
'''<param name="name"></param>
|
||||
|
||||
Public Shared Sub GetParameter(ByRef ds As DataSet, ByVal benutzerNr As Integer, ByVal name As String)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_GetParameter"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@BenutzerNr", benutzerNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Name", name))
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(ds, "Parameter")
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.Parameter.GetParameter", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
da.Dispose()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
'''<summary>gibt eine liste aller paramter zurück</summary>
|
||||
'''<param name="ds">speicher für datenrückgabe</param>
|
||||
'''<param name="aktiv">1 nur aktive; 0 nur inaktive; -1 alle</param>
|
||||
|
||||
Public Shared Sub List(ByRef ds As DataSet, ByVal aktiv As Integer)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_ListParameter"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
If aktiv <> -1 Then
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Aktiv", aktiv))
|
||||
End If
|
||||
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(ds, "Parameters")
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.Parameter.List", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
da.Dispose()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
'''<summary>erstellt einen neuen parameter</summary>
|
||||
'''<param name="parameterId">gibt den neuen primary key zurück</param>
|
||||
'''<param name="benutzerNr"></param>
|
||||
'''<param name="name"></param>
|
||||
'''<param name="wert"></param>
|
||||
'''<param name="datentyp"></param>
|
||||
'''<param name="beschreibung"></param>
|
||||
'''<param name="aktiv"></param>
|
||||
'''<param name="mutiererId"></param>
|
||||
'''<returns>error</returns>
|
||||
Public Shared Function Add(ByRef parameterId As Integer, ByVal benutzerNr As Integer, ByVal name As String, ByVal wert As String, _
|
||||
ByVal datentyp As Integer, ByVal beschreibung As String, ByVal aktiv As Boolean, ByVal mutiererId As Integer) As Integer
|
||||
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_InsParameter"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@BenutzerNr", benutzerNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Name", name))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Wert", wert))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Datentyp", datentyp))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Beschreibung", beschreibung))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Aktiv", aktiv))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MutiererId", mutiererId))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@ParameterId", 0))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Return", DBNull.Value))
|
||||
sqlCmd.Parameters("@ParameterId").Direction = ParameterDirection.Output
|
||||
sqlCmd.Parameters("@Return").Direction = ParameterDirection.ReturnValue
|
||||
|
||||
sqlConn.Open()
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
If CInt(sqlCmd.Parameters("@Return").Value) <> 0 Then
|
||||
parameterId = CInt(sqlCmd.Parameters("@ParameterId").Value)
|
||||
End If
|
||||
|
||||
Return CInt(sqlCmd.Parameters("@Return").Value)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.Parameter.Add", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
'''<summary>löscht einen parameter</summary>
|
||||
'''<param name="benutzerNr"></param>
|
||||
'''<param name="name"></param>
|
||||
'''<returns>error</returns>
|
||||
Public Shared Function Delete(ByVal benutzerNr As Integer, ByVal name As String) As Integer
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_DelParameter"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@BenutzerNr", benutzerNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Name", name))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Return", DBNull.Value))
|
||||
sqlCmd.Parameters("@Return").Direction = ParameterDirection.ReturnValue
|
||||
|
||||
sqlConn.Open()
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
Return CInt(sqlCmd.Parameters("@Return").Value)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.Parameter.Delete", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
'''<summary>aktualisiert einen paramter</summary>
|
||||
'''<param name="benutzerNr">criterium (keine aktualisierung)</param>
|
||||
'''<param name="name">criterium (keine aktualisierung)</param>
|
||||
'''<param name="wert"></param>
|
||||
'''<param name="datentyp"></param>
|
||||
'''<param name="beschreibung"></param>
|
||||
'''<param name="aktiv"></param>
|
||||
'''<param name="mutiererId"></param>
|
||||
'''<returns>error</returns>
|
||||
Public Shared Function Update(ByVal benutzerNr As Integer, ByVal name As String, ByVal wert As String, ByVal datentyp As Integer, _
|
||||
ByVal beschreibung As String, ByVal aktiv As Boolean, ByVal mutiererId As Integer) As Integer
|
||||
|
||||
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
sqlCmd.CommandText = "sp_SetParameter"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@BenutzerNr", benutzerNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Name", name))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Wert", wert))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Datentyp", datentyp))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Beschreibung", beschreibung))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Aktiv", aktiv))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MutiererId", mutiererId))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Return", DBNull.Value))
|
||||
sqlCmd.Parameters("@Return").Direction = ParameterDirection.ReturnValue
|
||||
|
||||
sqlConn.Open()
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
Return CInt(sqlCmd.Parameters("@Return").Value)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.Parameter.Update", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
Finally
|
||||
sqlConn.Dispose()
|
||||
sqlCmd.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
End Class
|
||||
49
Backup/DataAccess/Profil.vb
Normal file
49
Backup/DataAccess/Profil.vb
Normal file
@@ -0,0 +1,49 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
'''<summary>Datenzugriff auf Profile</summary>
|
||||
Public Class Profil
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Profilen für einen Mitarbeitern zurück</summary>
|
||||
'''<param name="mitarbeiterNr">Profile von diesem Mitarbeiter</param>
|
||||
'''<param name="ds"></param>
|
||||
Overloads Shared Sub GetListeByMitarbeiterNr(ByVal mitarbeiterNr As Integer, ByRef ds As DataSet)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "dbo.pv_profil_select"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@mitarbeiternr", mitarbeiterNr))
|
||||
'DANGER: mandantNr is hardcoded here
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@mandantnr", 1))
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(ds, "ProfilListe")
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
If da Is Nothing Then
|
||||
da.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
End Class
|
||||
48
Backup/DataAccess/Spalten.vb
Normal file
48
Backup/DataAccess/Spalten.vb
Normal file
@@ -0,0 +1,48 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
'''<summary>Datenzugriff auf Tabelle spalten</summary>
|
||||
Public Class Spalten
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Spalten in einem DataSet zurück</summary>
|
||||
'''<param name="tableName">Name der Tabelle, von welcher die Spalten zurück gegeben werden sollen</param>
|
||||
|
||||
Public Overloads Shared Sub GetListe(ByVal tableName As String, ByRef dsSpalten As DataSet)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_GetSpalten"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@TableName", tableName))
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(dsSpalten, "SpaltenListe")
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
If da Is Nothing Then
|
||||
da.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
121
Backup/DataAccess/Team.vb
Normal file
121
Backup/DataAccess/Team.vb
Normal file
@@ -0,0 +1,121 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
'''<summary>Datenzugriff auf Tabelle team</summary>
|
||||
Public Class Team
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Teams zurück</summary>
|
||||
'''<param name="ds">Das DataSet welches gefüllt werden soll</param>
|
||||
|
||||
Overloads Shared Sub GetListe(ByRef ds As DataSet)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_ListTeams"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(ds, "TeamListe")
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
If da Is Nothing Then
|
||||
da.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Teams denen ein Mitarbeiter zugewiesen ist zurück</summary>
|
||||
'''<param name="ds">Das DataSet welches gefüllt werden soll</param>
|
||||
|
||||
Overloads Shared Sub GetListeByMitarbeiterNr(ByVal mitarbeiterNr As Integer, ByRef ds As DataSet)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_GetTeamsByMitarbeiterNr"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MitarbeiterNr", mitarbeiterNr))
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(ds, "FunktionsgruppenListe")
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
If da Is Nothing Then
|
||||
da.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Gibt alle Details zur einem TeamMitarbeiter Verhältnis zurück</summary>
|
||||
'''<param name="teamNr">Die datenbank Nummer des TeamMitarbeiters (ID)</param>
|
||||
'''<param name="ds">Das zu füllende DataSet</param>
|
||||
|
||||
Overloads Shared Sub GetById(ByVal teamNr As Integer, ByRef ds As DataSet)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_GetTeamById"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@TeamNr", teamNr))
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(ds, "Team")
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
If da Is Nothing Then
|
||||
da.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
204
Backup/DataAccess/TeamMitarbeiter.vb
Normal file
204
Backup/DataAccess/TeamMitarbeiter.vb
Normal file
@@ -0,0 +1,204 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
'''<summary>Datenzugriff auf Tabelle team_mitarbeiter</summary>
|
||||
Public Class TeamMitarbeiter
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen TeamMitarbeitern zurück</summary>
|
||||
'''<param name="ds">Das DataSet welches gefüllt werden soll</param>
|
||||
|
||||
Overloads Shared Sub GetListByMitarbeiterNr(ByVal mitarbeiterNr As Integer, ByRef ds As DataSet)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_GetTeamsByMitarbeiterNr"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MitarbeiterNr", mitarbeiterNr))
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(ds, "TeamMitarbeiter")
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
If da Is Nothing Then
|
||||
da.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Gibt alle Details zur einem TeamMitarbeiter Verhältnis zurück</summary>
|
||||
'''<param name="mitarbeiterTeamNr">Die datenbank Nummer des TeamMitarbeiters (ID)</param>
|
||||
'''<param name="ds">Das zu füllende DataSet</param>
|
||||
|
||||
Overloads Shared Sub GetById(ByVal mitarbeiterTeamNr As Integer, ByRef ds As DataSet)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
Dim da As New SqlDataAdapter()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_GetTeamMitarbeiterById"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@TeamMitarbeiterNr", mitarbeiterTeamNr))
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
da.SelectCommand = sqlCmd
|
||||
da.Fill(ds, "TeamMitarbeiter")
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
If da Is Nothing Then
|
||||
da.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Löscht eine Team-Mitarbeiter Zuordnung aus der Datenbank</summary>
|
||||
'''<param name="teamMitarbeiterNr">Zu löschende Verbindung</param>
|
||||
'''<param name="mutiererMitarbeiterNr">Die Id des Benutzers, welcher die Änderungen vornimmt</param>
|
||||
Public Overloads Shared Function Delete(ByVal teamMitarbeiterNr As Integer, ByVal mutiererMitarbeiterNr As Integer)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_DeleteTeamMitarbeiter"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@TeamMitarbeiterNr", teamMitarbeiterNr))
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'''<summary>Aktualisiert eine bestehede Team-Mitarbeiter Zuordnung</summary>
|
||||
'''<param name="teamMitarbeiterNr"></param>
|
||||
'''<param name="teamNr"></param>
|
||||
'''<param name="mitarbeiterNr"></param>
|
||||
'''<param name="anteil"></param>
|
||||
'''<param name="mandantNr"></param>
|
||||
'''<param name="isAktiv"></param>
|
||||
'''<param name="mutiererMitarbeiterNr"></param>
|
||||
|
||||
Overloads Shared Sub Update(ByVal teamMitarbeiterNr As Integer, ByVal teamNr As Integer, ByVal mitarbeiterNr As Integer, ByVal anteil As Integer, ByVal mandantNr As Integer, ByVal isAktiv As Boolean, ByVal mutiererMitarbeiterNr As Integer)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_UpdateTeamMitarbeiter"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@TeamMitarbeiterNr", teamMitarbeiterNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@TeamNr", teamNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MitarbeiterNr", mitarbeiterNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Anteil", anteil))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MandantNr", mandantNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@aktiv", isAktiv))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MutiererMitarbeiterNr", mutiererMitarbeiterNr))
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Fügt eine neue Team-Mitarbeiter Verbindung in die Datenbank ein</summary>
|
||||
'''<param name="teamNr"></param>
|
||||
'''<param name="mitarbeiterNr"></param>
|
||||
'''<param name="anteil"></param>
|
||||
'''<param name="mandantNr"></param>
|
||||
'''<param name="isAktiv"></param>
|
||||
'''<param name="mutiererMitarbeiterNr"></param>
|
||||
|
||||
Overloads Shared Sub Insert(ByVal teamNr As Integer, ByVal mitarbeiterNr As Integer, ByVal anteil As Integer, ByVal mandantNr As Integer, ByVal isAktiv As Boolean, ByVal mutiererMitarbeiterNr As Integer)
|
||||
Dim sqlConn As New SqlConnection()
|
||||
Dim sqlCmd As New SqlCommand()
|
||||
|
||||
Try
|
||||
sqlCmd.CommandText = "sp_InsertTeamMitarbeiter"
|
||||
sqlCmd.CommandType = CommandType.StoredProcedure
|
||||
sqlCmd.Connection = sqlConn
|
||||
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@TeamNr", teamNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MitarbeiterNr", mitarbeiterNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@Anteil", anteil))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MandantNr", mandantNr))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@aktiv", isAktiv))
|
||||
sqlCmd.Parameters.Add(New SqlParameter("@MutiererMitarbeiterNr", mutiererMitarbeiterNr))
|
||||
|
||||
sqlConn.ConnectionString = Common.Datenbank.GetDSN()
|
||||
|
||||
sqlConn.Open()
|
||||
|
||||
sqlCmd.ExecuteNonQuery()
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Finally
|
||||
If sqlCmd Is Nothing Then
|
||||
sqlCmd.Dispose()
|
||||
End If
|
||||
If sqlConn Is Nothing Then
|
||||
sqlConn.Dispose()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
31
Backup/EDOKA/AssemblyInfo.vb
Normal file
31
Backup/EDOKA/AssemblyInfo.vb
Normal file
@@ -0,0 +1,31 @@
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' Allgemeine Informationen über eine Assembly werden über die folgende
|
||||
' Attributgruppe gesteuert. Ändern Sie diese Attributwerte, um Informationen,
|
||||
' die mit einer Assembly verknüpft sind, zu bearbeiten.
|
||||
|
||||
' Die Werte der Assemblyattribute überprüfen
|
||||
|
||||
<Assembly: AssemblyTitle("")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("")>
|
||||
<Assembly: AssemblyCopyright("")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: CLSCompliant(True)>
|
||||
|
||||
'Die folgende GUID ist für die ID der Typbibliothek, wenn dieses Projekt in COM angezeigt wird
|
||||
<Assembly: Guid("B6877713-48BE-4F59-B35A-F523A4D271E6")>
|
||||
|
||||
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
'
|
||||
' Haupversion
|
||||
' Nebenversion
|
||||
' Buildnummer
|
||||
' Revisionsnummer
|
||||
'
|
||||
' Sie können alle Werte angeben oder auf die standardmäßigen Build- und Revisionsnummern
|
||||
' zurückgreifen, indem Sie '*' wie unten angezeigt verwenden:
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.*")>
|
||||
56
Backup/EDOKA/Changelog.txt.txt
Normal file
56
Backup/EDOKA/Changelog.txt.txt
Normal file
@@ -0,0 +1,56 @@
|
||||
FrmStatusWechsel: Meldung 21 auf 50100 gewechselt
|
||||
FrmDokumentInfoEdit: Abhängig vom Parameter im Dokumenttyp, kann die Bezeichnung des Dokumentes geändert werden
|
||||
|
||||
Serienbrief:
|
||||
- Dokumentvorschau: Anzeige des generierten Dokumentes direkt mit Word / nicht über Viewer
|
||||
|
||||
|
||||
Trefferliste
|
||||
- Contextmenu1: Neue Eintrag "Filter beibehalten"
|
||||
- Wird dieser Menueintrag aktiviert, werden die aktuellen Filtereinstellungen gespeichert und für den Auftrag der Trefferliste
|
||||
wieder verwendet. Soll der Filter entfernt werden, muss der Menueintrag deaktiviert und die Trefferliste aktualisiert werden.
|
||||
|
||||
Mail bei Dokumentbearbeitung
|
||||
- Prüfung bei Dokument-Speicherung nach der Bearbeitung, ob der letzte History-Eintrag einer der Status betrifft, wenn ja, dann Mail-Versand
|
||||
- Neue Sysadmin-Funktion für die Verwaltung Doktyp, Status, Mail-Adresse
|
||||
- DB-Anpassungen:
|
||||
- Neue Tabelle: DokEditMail
|
||||
- Neue Stored Procedures: sp_get_stammdaten, PV_DokEdit_Mail..., PR_DokEditMail...,
|
||||
|
||||
Berechtigungsgenerierung Inaktive Funktionen:
|
||||
- sp_dokumentberechtigung_GenerateTable_GetData, sp_dokumentberechtigung_GenerateTable_GetData2 angepasst: Berücksichtigung der aktiven "Rollen"
|
||||
|
||||
Meldung Periodische Auslieferung - Falscher Partner
|
||||
- Anpassung sp_edex_bl_messages - Insert der Message, @dokid auf '' ersetzen. Somit kann in der Meldung das Partnerdossier nicht mehr geöffnet werden.
|
||||
|
||||
BL-Meldungsversand - vertauschte Meldungen
|
||||
- Meldungen in der sp sp_edex_bl_messages umtauschen (Fehlendes Scannin / fehlende Ausgangsarchivierung)
|
||||
|
||||
Banklagerndverarbeitung - Prüfung BL-Kunde im Client
|
||||
- sp_edex_sb_check_partner
|
||||
- sp_edex_sb_check_partner_create_table
|
||||
|
||||
Dokumenttyp:
|
||||
- Tabelle Dokumenttyp - neues Attribut: intern bit Default 0
|
||||
- Initialisierung mit false update dokumenttyp set intern=0
|
||||
- Anpassungen pr_dokumenttyp...
|
||||
|
||||
Serienbrief:
|
||||
- Tabelle edex_serienbrief - neues Attribut: Bldossier int Default 0
|
||||
|
||||
Spalten:
|
||||
- Spalten für DokEditMail, Aushaendigung, BLPeriode
|
||||
|
||||
- Meldungstexte
|
||||
50100 Beachten Sie bitte, dass die Versandinstruktion nicht versandfähig ist.
|
||||
50101 Sollen die Dokumente für die Banklagernd-Kunden im elektronischen Banklagernd-Dossier abgelegt werden?
|
||||
50102 Aufgrund der Statusselektion muss der Dokumentverantwortliche gewechselt werden.
|
||||
|
||||
Dokumentsuche:
|
||||
Einfüguen Operator Zwischen bei Datumswerten HOST-Dokumente
|
||||
Einfügen neuer Knoten (160) - Suche nach Kundenbereuer
|
||||
Erweiterung SP_Suche_Ausführung (Node 160)
|
||||
|
||||
|
||||
|
||||
|
||||
289
Backup/EDOKA/DB/DB_Allgemein/clsConnectionProvider.vb
Normal file
289
Backup/EDOKA/DB/DB_Allgemein/clsConnectionProvider.vb
Normal file
@@ -0,0 +1,289 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Connection Provider class for Database connection sharing
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 26. November 2002, 22:32:48
|
||||
' // This class implements IDisposable.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Configuration
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Collections
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: provides a SqlConnection object which can be shared among data-access tier objects
|
||||
' /// to provide a way to do ADO.NET transaction coding without the hassling with SqlConnection objects
|
||||
' /// on a high level.
|
||||
' /// </summary>
|
||||
Public Class clsConnectionProvider
|
||||
Implements IDisposable
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_scoDBConnection As SqlConnection
|
||||
Private m_bIsTransactionPending, m_bIsDisposed As Boolean
|
||||
Private m_stCurrentTransaction As SqlTransaction
|
||||
Private m_alSavePoints As ArrayList
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Public Sub New()
|
||||
' // Init the class
|
||||
InitClass()
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the IDispose' method Dispose.
|
||||
' /// </summary>
|
||||
Overloads Public Sub Dispose() Implements IDisposable.Dispose
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the Dispose functionality.
|
||||
' /// </summary>
|
||||
Overridable Overloads Protected Sub Dispose(ByVal bIsDisposing As Boolean)
|
||||
' // Check to see if Dispose has already been called.
|
||||
If Not m_bIsDisposed Then
|
||||
If bIsDisposing Then
|
||||
' // Dispose managed resources.
|
||||
If Not (m_stCurrentTransaction Is Nothing) Then
|
||||
m_stCurrentTransaction.Dispose()
|
||||
m_stCurrentTransaction = Nothing
|
||||
End If
|
||||
If Not (m_scoDBConnection Is Nothing) Then
|
||||
' // closing the connection will abort (rollback) any pending transactions
|
||||
m_scoDBConnection.Close()
|
||||
m_scoDBConnection.Dispose()
|
||||
m_scoDBConnection = Nothing
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
m_bIsDisposed = True
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Initializes class members.
|
||||
' /// </summary>
|
||||
Private Sub InitClass()
|
||||
' // Create all the objects and initialize other members.
|
||||
m_scoDBConnection = new SqlConnection()
|
||||
m_bIsDisposed = False
|
||||
m_stCurrentTransaction = Nothing
|
||||
m_bIsTransactionPending = False
|
||||
m_alSavePoints = new ArrayList()
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Opens the connection object.
|
||||
' /// </summary>
|
||||
' /// <returns>True, if succeeded, otherwise an Exception exception is thrown.</returns>
|
||||
Public Function OpenConnection() As Boolean
|
||||
Try
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) > 0 Then
|
||||
' // It's already open.
|
||||
Throw New Exception("OpenConnection::Connection is already open.")
|
||||
End If
|
||||
m_scoDBConnection.Open()
|
||||
m_bIsTransactionPending = False
|
||||
m_alSavePoints.Clear()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Starts a new ADO.NET transaction using the open connection object of this class.
|
||||
' /// </summary>
|
||||
' /// <param name="sTransactionName">Name of the transaction to start</param>
|
||||
' /// <returns>True, if transaction is started correctly, otherwise an Exception exception is thrown</returns>
|
||||
Public Function BeginTransaction(sTransactionName As String) As Boolean
|
||||
Try
|
||||
If m_bIsTransactionPending Then
|
||||
' // no nested transactions allowed.
|
||||
Throw New Exception("BeginTransaction::Already transaction pending. Nesting not allowed")
|
||||
End If
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // no open connection
|
||||
Throw New Exception("BeginTransaction::Connection is not open.")
|
||||
End If
|
||||
' // begin the transaction and store the transaction object.
|
||||
m_stCurrentTransaction = m_scoDBConnection.BeginTransaction(IsolationLevel.ReadCommitted, sTransactionName)
|
||||
m_bIsTransactionPending = True
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Commits a pending transaction on the open connection object of this class.
|
||||
' /// </summary>
|
||||
' /// <returns>True, if commit was succesful, or an Exception exception is thrown</returns>
|
||||
Public Function CommitTransaction() As Boolean
|
||||
Try
|
||||
If Not m_bIsTransactionPending Then
|
||||
' // no transaction pending
|
||||
Throw New Exception("CommitTransaction::No transaction pending.")
|
||||
End If
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // no open connection
|
||||
Throw New Exception("CommitTransaction::Connection is not open.")
|
||||
End if
|
||||
' // commit the transaction
|
||||
m_stCurrentTransaction.Commit()
|
||||
m_bIsTransactionPending = False
|
||||
m_stCurrentTransaction.Dispose()
|
||||
m_stCurrentTransaction = Nothing
|
||||
m_alSavePoints.Clear()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Rolls back a pending transaction on the open connection object of this class,
|
||||
' /// or rolls back to the savepoint with the given name. Savepoints are created with SaveTransaction().
|
||||
' /// </summary>
|
||||
' /// <param name="sTransactionToRollback">Name of transaction to roll back. Can be name of savepoint</param>
|
||||
' /// <returns>True, if rollback was succesful, or an Exception exception is thrown</returns>
|
||||
Public Function RollbackTransaction(sTransactionToRollback As String) As Boolean
|
||||
Try
|
||||
If Not m_bIsTransactionPending Then
|
||||
' // no transaction pending
|
||||
Throw New Exception("RollbackTransaction::No transaction pending.")
|
||||
End If
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // no open connection
|
||||
Throw New Exception("RollbackTransaction::Connection is not open.")
|
||||
End If
|
||||
' // rollback the transaction
|
||||
m_stCurrentTransaction.Rollback(sTransactionToRollback)
|
||||
' // if this wasn't a savepoint, we've rolled back the complete transaction, so we
|
||||
' // can clean it up.
|
||||
If Not m_alSavePoints.Contains(sTransactionToRollback) Then
|
||||
' // it's not a savepoint
|
||||
m_bIsTransactionPending = False
|
||||
m_stCurrentTransaction.Dispose()
|
||||
m_stCurrentTransaction = Nothing
|
||||
m_alSavePoints.Clear()
|
||||
End If
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Saves a pending transaction on the open connection object of this class to a 'savepoint'
|
||||
' /// with the given name.
|
||||
' /// When a rollback is issued, the caller can rollback to this savepoint or roll back the complete transaction.
|
||||
' /// </summary>
|
||||
' /// <param name="sSavePointName">Name of the savepoint to store the current transaction under.</param>
|
||||
' /// <returns>True, if save was succesful, or an Exception exception is thrown</returns>
|
||||
Public Function SaveTransaction(sSavePointName As String) As Boolean
|
||||
Try
|
||||
If Not m_bIsTransactionPending Then
|
||||
' // no transaction pending
|
||||
Throw New Exception("SaveTransaction::No transaction pending.")
|
||||
End If
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // no open connection
|
||||
Throw New Exception("SaveTransaction::Connection is not open.")
|
||||
End If
|
||||
' // save the transaction
|
||||
m_stCurrentTransaction.Save(sSavePointName)
|
||||
' // Store the savepoint in the list.
|
||||
m_alSavePoints.Add(sSavePointName)
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Closes the open connection. Depending on bCommitPendingTransactions, a pending
|
||||
' /// transaction is commited, or aborted.
|
||||
' /// </summary>
|
||||
' /// <param name="bCommitPendingTransaction">Flag for what to do when a transaction is still pending. True
|
||||
' /// will commit the current transaction, False will abort (rollback) the complete current transaction.</param>
|
||||
' /// <returns>True, if close was succesful, False if connection was already closed, or an Exception exception is thrown when
|
||||
' /// an error occurs</returns>
|
||||
Public Function CloseConnection(bCommitPendingTransaction As Boolean) As Boolean
|
||||
Try
|
||||
If (m_scoDBConnection.State And ConnectionState.Open) = 0 Then
|
||||
' // No open connection
|
||||
Return False
|
||||
End If
|
||||
If m_bIsTransactionPending Then
|
||||
If bCommitPendingTransaction Then
|
||||
' // Commit the pending transaction
|
||||
m_stCurrentTransaction.Commit()
|
||||
Else
|
||||
' // Rollback the pending transaction
|
||||
m_stCurrentTransaction.Rollback()
|
||||
End If
|
||||
m_bIsTransactionPending = False
|
||||
m_stCurrentTransaction.Dispose()
|
||||
m_stCurrentTransaction = Nothing
|
||||
m_alSavePoints.Clear()
|
||||
End If
|
||||
' // close the connection
|
||||
m_scoDBConnection.Close()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // bubble exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public ReadOnly Property stCurrentTransaction() As SqlTransaction
|
||||
Get
|
||||
Return m_stCurrentTransaction
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Public ReadOnly Property bIsTransactionPending() As Boolean
|
||||
Get
|
||||
Return m_bIsTransactionPending
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Public ReadOnly Property scoDBConnection() As SqlConnection
|
||||
Get
|
||||
Return m_scoDBConnection
|
||||
End Get
|
||||
End Property
|
||||
Public WriteOnly Property sConnectionString() As String
|
||||
Set (ByVal Value As String)
|
||||
m_scoDBConnection.ConnectionString = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
202
Backup/EDOKA/DB/DB_Allgemein/clsDBInteractionBase.vb
Normal file
202
Backup/EDOKA/DB/DB_Allgemein/clsDBInteractionBase.vb
Normal file
@@ -0,0 +1,202 @@
|
||||
' //////////////////////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Base class for Database Interaction.
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 26. November 2002, 22:32:48
|
||||
' // Because this class implements IDisposable, derived classes shouldn't do so.
|
||||
' //////////////////////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Configuration
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Data.SqlTypes
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Error Enums used by this LLBL library.
|
||||
' /// </summary>
|
||||
Public Enum LLBLError
|
||||
AllOk
|
||||
' // Add more here (check the comma's!)
|
||||
End Enum
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: General interface of the API generated. Contains only common methods of all classes.
|
||||
' /// </summary>
|
||||
Public Interface ICommonDBAccess
|
||||
Function Insert() As Boolean
|
||||
Function Update() As Boolean
|
||||
Function Delete() As Boolean
|
||||
Function SelectOne() As DataTable
|
||||
Function SelectAll() As DataTable
|
||||
End Interface
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Abstract base class for Database Interaction classes.
|
||||
' /// </summary>
|
||||
Public MustInherit Class clsDBInteractionBase
|
||||
Implements IDisposable
|
||||
Implements ICommonDBAccess
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Protected m_scoMainConnection As SqlConnection
|
||||
Protected m_iErrorCode As SqlInt32
|
||||
Protected m_bMainConnectionIsCreatedLocal As Boolean
|
||||
Protected m_cpMainConnectionProvider As clsConnectionProvider
|
||||
Private m_sConnectionString As String
|
||||
Private m_bIsDisposed As Boolean
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Initialize the class' members.
|
||||
InitClass()
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Initializes class members.
|
||||
' /// </summary>
|
||||
Private Sub InitClass()
|
||||
' // create all the objects and initialize other members.
|
||||
m_scoMainConnection = new SqlConnection()
|
||||
m_bMainConnectionIsCreatedLocal = True
|
||||
m_cpMainConnectionProvider = Nothing
|
||||
m_iErrorCode = New SqlInt32(LLBLError.AllOk)
|
||||
m_bIsDisposed = False
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the IDispose' method Dispose.
|
||||
' /// </summary>
|
||||
Overloads Public Sub Dispose() Implements IDisposable.Dispose
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the Dispose functionality.
|
||||
' /// </summary>
|
||||
Overridable Overloads Protected Sub Dispose(ByVal bIsDisposing As Boolean)
|
||||
' // Check to see if Dispose has already been called.
|
||||
If Not m_bIsDisposed Then
|
||||
If bIsDisposing Then
|
||||
' // Dispose managed resources.
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Object is created in this class, so destroy it here.
|
||||
m_scoMainConnection.Close()
|
||||
m_scoMainConnection.Dispose()
|
||||
m_bMainConnectionIsCreatedLocal = True
|
||||
End If
|
||||
m_cpMainConnectionProvider = Nothing
|
||||
m_scoMainConnection = Nothing
|
||||
End If
|
||||
End If
|
||||
m_bIsDisposed = True
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.Insert() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function Insert() As Boolean Implements ICommonDBAccess.Insert
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.Delete() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function Delete() As Boolean Implements ICommonDBAccess.Delete
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.Update() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function Update() As Boolean Implements ICommonDBAccess.Update
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.SelectOne() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function SelectOne() As DataTable Implements ICommonDBAccess.SelectOne
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Implements the ICommonDBAccess.SelectAll() method.
|
||||
' /// </summary>
|
||||
Public Overridable Function SelectAll() As DataTable Implements ICommonDBAccess.SelectAll
|
||||
' // No implementation, throw exception
|
||||
Throw New NotImplementedException()
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public WriteOnly Property cpMainConnectionProvider() As clsConnectionProvider
|
||||
Set(ByVal Value As clsConnectionProvider)
|
||||
If Value Is Nothing Then
|
||||
' // Invalid value
|
||||
Throw New ArgumentNullException("cpMainConnectionProvider", "Nothing passed as value to this property which is not allowed.")
|
||||
End If
|
||||
|
||||
' // A connection provider object is passed to this class.
|
||||
' // Retrieve the SqlConnection object, if present and create a
|
||||
' // reference to it. If there is already a MainConnection object
|
||||
' // referenced by the membervar, destroy that one or simply
|
||||
' // remove the reference, based on the flag.
|
||||
If Not (m_scoMainConnection Is Nothing) Then
|
||||
' // First get rid of current connection object. Caller is responsible
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Is local created object, close it and dispose it.
|
||||
m_scoMainConnection.Close()
|
||||
m_scoMainConnection.Dispose()
|
||||
End If
|
||||
' // Remove reference.
|
||||
m_scoMainConnection = Nothing
|
||||
End If
|
||||
m_cpMainConnectionProvider = CType(Value, clsConnectionProvider)
|
||||
m_scoMainConnection = m_cpMainConnectionProvider.scoDBConnection
|
||||
m_bMainConnectionIsCreatedLocal = False
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public ReadOnly Property iErrorCode() As SqlInt32
|
||||
Get
|
||||
Return m_iErrorCode
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Public Property sConnectionString() As String
|
||||
Get
|
||||
Return m_sConnectionString
|
||||
End Get
|
||||
Set (ByVal Value As String)
|
||||
m_sConnectionString = Value
|
||||
m_scoMainConnection.ConnectionString = m_sConnectionString
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
86
Backup/EDOKA/DB/DB_Allgemein/clsDomainTable.vb
Normal file
86
Backup/EDOKA/DB/DB_Allgemein/clsDomainTable.vb
Normal file
@@ -0,0 +1,86 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // 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
|
||||
Public Class clsDomainTable
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
Dim m_Tablename As String
|
||||
Dim m_Aktive As Integer
|
||||
|
||||
Property Tablename() As String
|
||||
Get
|
||||
Return m_Tablename
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
m_Tablename = Value
|
||||
End Set
|
||||
End Property
|
||||
Property Aktive() As Boolean
|
||||
Get
|
||||
Return m_Aktive
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
If Value = False Then m_Aktive = 0 Else m_Aktive = 1
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub New()
|
||||
End Sub
|
||||
|
||||
Public Overrides Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[sp_get_Domaintable]"
|
||||
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("@Tablename", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_Tablename))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@Aktive", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_Aktive))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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("clsDomainTable::SelectAll::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
61
Backup/EDOKA/DB/DB_Allgemein/clsMyKey_Tabelle.vb
Normal file
61
Backup/EDOKA/DB/DB_Allgemein/clsMyKey_Tabelle.vb
Normal file
@@ -0,0 +1,61 @@
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
Namespace edokadb
|
||||
Public Class clsMyKey_Tabelle
|
||||
Inherits edokadb.clsKey_tabelle
|
||||
|
||||
Public Function get_dbkey(ByVal Tablename As String) As Long
|
||||
Dim m_dbkey As Long
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[sp_get_dbkey]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@Tablename", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, Tablename))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dbkey", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_dbkey))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
Try
|
||||
scmCmdToExecute.Connection.Open()
|
||||
Catch ex As Exception
|
||||
Finally
|
||||
End Try
|
||||
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_dbkey = scmCmdToExecute.Parameters.Item("@dbkey").Value
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
scmCmdToExecute.Connection.Close()
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'sp_get_dbkey' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return m_dbkey
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsKey_tabelle::get_dbkey::Error occured." + ex.Message, ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
642
Backup/EDOKA/DB/DB_Allgemein/clsNotizen.vb
Normal file
642
Backup/EDOKA/DB/DB_Allgemein/clsNotizen.vb
Normal file
@@ -0,0 +1,642 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'notizen'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 16. Februar 2003, 22:04:00
|
||||
' // 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 'notizen'.
|
||||
' /// </summary>
|
||||
Public Class clsNotizen
|
||||
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_sDokumentidOld, 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>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 Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_notizen_Insert]"
|
||||
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_notizen_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("clsNotizen::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_notizen_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_notizen_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("clsNotizen::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 'dokumentid.
|
||||
' /// This method will Update one or more existing rows in the database. It will reset the field 'dokumentid' in
|
||||
' /// all rows which have as value for this field the value as set in property 'sDokumentidOld' to
|
||||
' /// the value as set in property 'sDokumentid'.
|
||||
' /// </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>sDokumentidOld. May be SqlString.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Public Function UpdateAllWdokumentidLogic() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_notizen_UpdateAllWdokumentidLogic]"
|
||||
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("@sdokumentidOld", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentidOld))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 22, 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_notizen_UpdateAllWdokumentidLogic' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsNotizen::UpdateAllWdokumentidLogic::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>
|
||||
Overrides Public Function Delete() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_notizen_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_notizen_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("clsNotizen::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>
|
||||
Public Overrides Function SelectOne() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_notizen_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("notizen")
|
||||
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_notizen_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("clsNotizen::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_notizen_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("notizen")
|
||||
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_notizen_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("clsNotizen::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 'dokumentid'
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>sDokumentid. May be SqlString.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Public Function SelectAllWdokumentidLogic() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_notizen_SelectAllWdokumentidLogic]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("notizen")
|
||||
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, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, 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.
|
||||
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_notizen_SelectAllWdokumentidLogic' 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("clsNotizen::SelectAllWdokumentidLogic::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 [sDokumentidOld]() As SqlString
|
||||
Get
|
||||
Return m_sDokumentidOld
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDokumentidOld = 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
|
||||
44
Backup/EDOKA/DB/DB_Allgemein/db_connection.vb
Normal file
44
Backup/EDOKA/DB/DB_Allgemein/db_connection.vb
Normal file
@@ -0,0 +1,44 @@
|
||||
Imports System.IO
|
||||
Namespace EDOKA
|
||||
Public Class DB_Connection
|
||||
|
||||
Shared Sub New()
|
||||
Dim fc As Integer = 0
|
||||
If Globals.ConnectionFileName.Length = 0 Then
|
||||
Dim Dir As DirectoryInfo = New DirectoryInfo(Application.StartupPath)
|
||||
Try
|
||||
Dim f As New frmDatenbankauswahl()
|
||||
Dim ChildFile As FileInfo
|
||||
For Each ChildFile In Dir.GetFiles()
|
||||
If UCase(Left(ChildFile.Name, 5)) = "EDOKA" And UCase(ChildFile.Extension) = ".CFG" Then
|
||||
f.ListBox1.Items.Add(ChildFile.Name)
|
||||
fc = fc + 1
|
||||
End If
|
||||
Next
|
||||
If fc > 1 Then
|
||||
f.ListBox1.SelectedIndex = 0
|
||||
f.ListBox1.Select()
|
||||
f.ShowDialog()
|
||||
Globals.ConnectionFileName = f.ListBox1.SelectedItem
|
||||
f.Dispose()
|
||||
End If
|
||||
Catch except As Exception
|
||||
fc = 0
|
||||
Exit Sub
|
||||
End Try
|
||||
End If
|
||||
If fc < 2 Then Globals.ConnectionFileName = "edokaconn.cfg"
|
||||
Dim ofile As System.IO.File
|
||||
Dim oread As System.IO.StreamReader
|
||||
oread = ofile.OpenText(Application.StartupPath + "\" + Globals.ConnectionFileName)
|
||||
sConnectionString = oread.ReadLine
|
||||
sConnectionString = Crypto.DecryptText(sConnectionString, "HutterundMueller")
|
||||
sConnectionString = Left(sConnectionString, Len(sConnectionString) - 1)
|
||||
Globals.sConnectionString = sConnectionString
|
||||
oread.Close()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
End Namespace
|
||||
991
Backup/EDOKA/DB/EDEX/clsEDEX_BL_Auslieferung.vb
Normal file
991
Backup/EDOKA/DB/EDEX/clsEDEX_BL_Auslieferung.vb
Normal file
@@ -0,0 +1,991 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'EDEX_BL_Auslieferung'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 15. Mai 2005, 16:57: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 'EDEX_BL_Auslieferung'.
|
||||
' /// </summary>
|
||||
Public Class clsEDEX_BL_Auslieferung
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bAushaendigung_blv, m_bAushaendigung_kube, m_bAushaendigungsart_persoenlich, m_bGrundlage2, m_bGrundlage3, m_bGrundlage4, m_bBeilage_zur_Quittung1, m_bBeilage_zur_Quittung2, m_bBeilage_zur_Quittung3, m_bAushaendigungsart_post, m_bAushaendigung_verschlossen, m_bAushaendigung_nicht_verschlossen, m_bGrundlage1, m_bAktiv As SqlBoolean
|
||||
Private m_daDokumentebis, m_daMutiert_am, m_daDokumenteab, m_daErstellt_am, m_daGrundlage1_Datum, m_daGrundlage3_Datum, m_daGrundlage4_Datum, m_daGrundlage2_Datum As SqlDateTime
|
||||
Private m_iNrpar00, m_iAuslieferungnr, m_iBlv, m_iMutierer, m_iStatus, m_iKube As SqlInt32
|
||||
Private m_sBemerkung, m_sBeilage_zur_Quittung_text, m_sQuittungsflag, m_sDokumentid_quittung, 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>sBezeichnung. May be SqlString.Null</LI>
|
||||
' /// <LI>sDokumentid_quittung. May be SqlString.Null</LI>
|
||||
' /// <LI>sQuittungsflag. May be SqlString.Null</LI>
|
||||
' /// <LI>iNrpar00. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iStatus. 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>
|
||||
' /// <LI>bGrundlage1. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daGrundlage1_Datum. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>bGrundlage2. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daGrundlage2_Datum. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>bGrundlage3. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daGrundlage3_Datum. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>bGrundlage4. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daGrundlage4_Datum. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>bAushaendigung_blv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>iBlv. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bAushaendigung_kube. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>iKube. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bAushaendigungsart_persoenlich. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bAushaendigungsart_post. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bAushaendigung_verschlossen. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bAushaendigung_nicht_verschlossen. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bBeilage_zur_Quittung1. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bBeilage_zur_Quittung2. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bBeilage_zur_Quittung3. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>sBeilage_zur_Quittung_text. May be SqlString.Null</LI>
|
||||
' /// <LI>sBemerkung. May be SqlString.Null</LI>
|
||||
' /// <LI>daDokumenteab. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daDokumentebis. May be SqlDateTime.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iAuslieferungnr</LI>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_EDEX_BL_Auslieferung_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid_quittung", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid_quittung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@squittungsflag", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sQuittungsflag))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@inrpar00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNrpar00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
|
||||
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("@bGrundlage1", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bGrundlage1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daGrundlage1_Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daGrundlage1_Datum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bGrundlage2", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bGrundlage2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daGrundlage2_Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daGrundlage2_Datum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bGrundlage3", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bGrundlage3))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daGrundlage3_Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daGrundlage3_Datum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bGrundlage4", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bGrundlage4))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daGrundlage4_Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daGrundlage4_Datum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAushaendigung_blv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigung_blv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iblv", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBlv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAushaendigung_kube", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigung_kube))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikube", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iKube))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAushaendigungsart_persoenlich", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigungsart_persoenlich))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baushaendigungsart_post", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigungsart_post))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAushaendigung_verschlossen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigung_verschlossen))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAushaendigung_nicht_verschlossen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigung_nicht_verschlossen))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bBeilage_zur_Quittung1", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bBeilage_zur_Quittung1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bBeilage_zur_Quittung2", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bBeilage_zur_Quittung2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bBeilage_zur_Quittung3", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bBeilage_zur_Quittung3))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBeilage_zur_Quittung_text", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeilage_zur_Quittung_text))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBemerkung", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBemerkung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dadokumenteab", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDokumenteab))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dadokumentebis", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDokumentebis))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iauslieferungnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iAuslieferungnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_iAuslieferungnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iauslieferungnr").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_edex_bl_EDEX_BL_Auslieferung_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("clsEDEX_BL_Auslieferung::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>iAuslieferungnr</LI>
|
||||
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
|
||||
' /// <LI>sDokumentid_quittung. May be SqlString.Null</LI>
|
||||
' /// <LI>sQuittungsflag. May be SqlString.Null</LI>
|
||||
' /// <LI>iNrpar00. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iStatus. 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>
|
||||
' /// <LI>bGrundlage1. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daGrundlage1_Datum. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>bGrundlage2. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daGrundlage2_Datum. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>bGrundlage3. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daGrundlage3_Datum. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>bGrundlage4. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daGrundlage4_Datum. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>bAushaendigung_blv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>iBlv. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bAushaendigung_kube. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>iKube. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bAushaendigungsart_persoenlich. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bAushaendigungsart_post. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bAushaendigung_verschlossen. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bAushaendigung_nicht_verschlossen. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bBeilage_zur_Quittung1. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bBeilage_zur_Quittung2. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bBeilage_zur_Quittung3. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>sBeilage_zur_Quittung_text. May be SqlString.Null</LI>
|
||||
' /// <LI>sBemerkung. May be SqlString.Null</LI>
|
||||
' /// <LI>daDokumenteab. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daDokumentebis. May be SqlDateTime.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Update() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_EDEX_BL_Auslieferung_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iauslieferungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iAuslieferungnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid_quittung", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid_quittung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@squittungsflag", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sQuittungsflag))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@inrpar00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNrpar00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
|
||||
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("@bGrundlage1", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bGrundlage1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daGrundlage1_Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daGrundlage1_Datum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bGrundlage2", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bGrundlage2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daGrundlage2_Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daGrundlage2_Datum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bGrundlage3", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bGrundlage3))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daGrundlage3_Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daGrundlage3_Datum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bGrundlage4", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bGrundlage4))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daGrundlage4_Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daGrundlage4_Datum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAushaendigung_blv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigung_blv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iblv", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBlv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAushaendigung_kube", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigung_kube))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikube", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iKube))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAushaendigungsart_persoenlich", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigungsart_persoenlich))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baushaendigungsart_post", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigungsart_post))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAushaendigung_verschlossen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigung_verschlossen))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAushaendigung_nicht_verschlossen", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAushaendigung_nicht_verschlossen))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bBeilage_zur_Quittung1", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bBeilage_zur_Quittung1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bBeilage_zur_Quittung2", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bBeilage_zur_Quittung2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bBeilage_zur_Quittung3", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bBeilage_zur_Quittung3))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBeilage_zur_Quittung_text", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeilage_zur_Quittung_text))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBemerkung", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBemerkung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dadokumenteab", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDokumenteab))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dadokumentebis", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daDokumentebis))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_bl_EDEX_BL_Auslieferung_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("clsEDEX_BL_Auslieferung::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>iAuslieferungnr</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_edex_bl_EDEX_BL_Auslieferung_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iauslieferungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iAuslieferungnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_bl_EDEX_BL_Auslieferung_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("clsEDEX_BL_Auslieferung::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>iAuslieferungnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iAuslieferungnr</LI>
|
||||
' /// <LI>sBezeichnung</LI>
|
||||
' /// <LI>sDokumentid_quittung</LI>
|
||||
' /// <LI>sQuittungsflag</LI>
|
||||
' /// <LI>iNrpar00</LI>
|
||||
' /// <LI>iStatus</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>iMutierer</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>bGrundlage1</LI>
|
||||
' /// <LI>daGrundlage1_Datum</LI>
|
||||
' /// <LI>bGrundlage2</LI>
|
||||
' /// <LI>daGrundlage2_Datum</LI>
|
||||
' /// <LI>bGrundlage3</LI>
|
||||
' /// <LI>daGrundlage3_Datum</LI>
|
||||
' /// <LI>bGrundlage4</LI>
|
||||
' /// <LI>daGrundlage4_Datum</LI>
|
||||
' /// <LI>bAushaendigung_blv</LI>
|
||||
' /// <LI>iBlv</LI>
|
||||
' /// <LI>bAushaendigung_kube</LI>
|
||||
' /// <LI>iKube</LI>
|
||||
' /// <LI>bAushaendigungsart_persoenlich</LI>
|
||||
' /// <LI>bAushaendigungsart_post</LI>
|
||||
' /// <LI>bAushaendigung_verschlossen</LI>
|
||||
' /// <LI>bAushaendigung_nicht_verschlossen</LI>
|
||||
' /// <LI>bBeilage_zur_Quittung1</LI>
|
||||
' /// <LI>bBeilage_zur_Quittung2</LI>
|
||||
' /// <LI>bBeilage_zur_Quittung3</LI>
|
||||
' /// <LI>sBeilage_zur_Quittung_text</LI>
|
||||
' /// <LI>sBemerkung</LI>
|
||||
' /// <LI>daDokumenteab</LI>
|
||||
' /// <LI>daDokumentebis</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_edex_bl_EDEX_BL_Auslieferung_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("EDEX_BL_Auslieferung")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iauslieferungnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iAuslieferungnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_bl_EDEX_BL_Auslieferung_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iAuslieferungnr = New SqlInt32(CType(dtToReturn.Rows(0)("auslieferungnr"), 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)("dokumentid_quittung") Is System.DBNull.Value Then
|
||||
m_sDokumentid_quittung = SqlString.Null
|
||||
Else
|
||||
m_sDokumentid_quittung = New SqlString(CType(dtToReturn.Rows(0)("dokumentid_quittung"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("quittungsflag") Is System.DBNull.Value Then
|
||||
m_sQuittungsflag = SqlString.Null
|
||||
Else
|
||||
m_sQuittungsflag = New SqlString(CType(dtToReturn.Rows(0)("quittungsflag"), String))
|
||||
End If
|
||||
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)("status") Is System.DBNull.Value Then
|
||||
m_iStatus = SqlInt32.Null
|
||||
Else
|
||||
m_iStatus = New SqlInt32(CType(dtToReturn.Rows(0)("status"), 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
|
||||
If dtToReturn.Rows(0)("Grundlage1") Is System.DBNull.Value Then
|
||||
m_bGrundlage1 = SqlBoolean.Null
|
||||
Else
|
||||
m_bGrundlage1 = New SqlBoolean(CType(dtToReturn.Rows(0)("Grundlage1"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Grundlage1_Datum") Is System.DBNull.Value Then
|
||||
m_daGrundlage1_Datum = SqlDateTime.Null
|
||||
Else
|
||||
m_daGrundlage1_Datum = New SqlDateTime(CType(dtToReturn.Rows(0)("Grundlage1_Datum"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Grundlage2") Is System.DBNull.Value Then
|
||||
m_bGrundlage2 = SqlBoolean.Null
|
||||
Else
|
||||
m_bGrundlage2 = New SqlBoolean(CType(dtToReturn.Rows(0)("Grundlage2"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Grundlage2_Datum") Is System.DBNull.Value Then
|
||||
m_daGrundlage2_Datum = SqlDateTime.Null
|
||||
Else
|
||||
m_daGrundlage2_Datum = New SqlDateTime(CType(dtToReturn.Rows(0)("Grundlage2_Datum"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Grundlage3") Is System.DBNull.Value Then
|
||||
m_bGrundlage3 = SqlBoolean.Null
|
||||
Else
|
||||
m_bGrundlage3 = New SqlBoolean(CType(dtToReturn.Rows(0)("Grundlage3"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Grundlage3_Datum") Is System.DBNull.Value Then
|
||||
m_daGrundlage3_Datum = SqlDateTime.Null
|
||||
Else
|
||||
m_daGrundlage3_Datum = New SqlDateTime(CType(dtToReturn.Rows(0)("Grundlage3_Datum"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Grundlage4") Is System.DBNull.Value Then
|
||||
m_bGrundlage4 = SqlBoolean.Null
|
||||
Else
|
||||
m_bGrundlage4 = New SqlBoolean(CType(dtToReturn.Rows(0)("Grundlage4"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Grundlage4_Datum") Is System.DBNull.Value Then
|
||||
m_daGrundlage4_Datum = SqlDateTime.Null
|
||||
Else
|
||||
m_daGrundlage4_Datum = New SqlDateTime(CType(dtToReturn.Rows(0)("Grundlage4_Datum"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Aushaendigung_blv") Is System.DBNull.Value Then
|
||||
m_bAushaendigung_blv = SqlBoolean.Null
|
||||
Else
|
||||
m_bAushaendigung_blv = New SqlBoolean(CType(dtToReturn.Rows(0)("Aushaendigung_blv"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("blv") Is System.DBNull.Value Then
|
||||
m_iBlv = SqlInt32.Null
|
||||
Else
|
||||
m_iBlv = New SqlInt32(CType(dtToReturn.Rows(0)("blv"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Aushaendigung_kube") Is System.DBNull.Value Then
|
||||
m_bAushaendigung_kube = SqlBoolean.Null
|
||||
Else
|
||||
m_bAushaendigung_kube = New SqlBoolean(CType(dtToReturn.Rows(0)("Aushaendigung_kube"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("kube") Is System.DBNull.Value Then
|
||||
m_iKube = SqlInt32.Null
|
||||
Else
|
||||
m_iKube = New SqlInt32(CType(dtToReturn.Rows(0)("kube"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Aushaendigungsart_persoenlich") Is System.DBNull.Value Then
|
||||
m_bAushaendigungsart_persoenlich = SqlBoolean.Null
|
||||
Else
|
||||
m_bAushaendigungsart_persoenlich = New SqlBoolean(CType(dtToReturn.Rows(0)("Aushaendigungsart_persoenlich"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("aushaendigungsart_post") Is System.DBNull.Value Then
|
||||
m_bAushaendigungsart_post = SqlBoolean.Null
|
||||
Else
|
||||
m_bAushaendigungsart_post = New SqlBoolean(CType(dtToReturn.Rows(0)("aushaendigungsart_post"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Aushaendigung_verschlossen") Is System.DBNull.Value Then
|
||||
m_bAushaendigung_verschlossen = SqlBoolean.Null
|
||||
Else
|
||||
m_bAushaendigung_verschlossen = New SqlBoolean(CType(dtToReturn.Rows(0)("Aushaendigung_verschlossen"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Aushaendigung_nicht_verschlossen") Is System.DBNull.Value Then
|
||||
m_bAushaendigung_nicht_verschlossen = SqlBoolean.Null
|
||||
Else
|
||||
m_bAushaendigung_nicht_verschlossen = New SqlBoolean(CType(dtToReturn.Rows(0)("Aushaendigung_nicht_verschlossen"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Beilage_zur_Quittung1") Is System.DBNull.Value Then
|
||||
m_bBeilage_zur_Quittung1 = SqlBoolean.Null
|
||||
Else
|
||||
m_bBeilage_zur_Quittung1 = New SqlBoolean(CType(dtToReturn.Rows(0)("Beilage_zur_Quittung1"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Beilage_zur_Quittung2") Is System.DBNull.Value Then
|
||||
m_bBeilage_zur_Quittung2 = SqlBoolean.Null
|
||||
Else
|
||||
m_bBeilage_zur_Quittung2 = New SqlBoolean(CType(dtToReturn.Rows(0)("Beilage_zur_Quittung2"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Beilage_zur_Quittung3") Is System.DBNull.Value Then
|
||||
m_bBeilage_zur_Quittung3 = SqlBoolean.Null
|
||||
Else
|
||||
m_bBeilage_zur_Quittung3 = New SqlBoolean(CType(dtToReturn.Rows(0)("Beilage_zur_Quittung3"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Beilage_zur_Quittung_text") Is System.DBNull.Value Then
|
||||
m_sBeilage_zur_Quittung_text = SqlString.Null
|
||||
Else
|
||||
m_sBeilage_zur_Quittung_text = New SqlString(CType(dtToReturn.Rows(0)("Beilage_zur_Quittung_text"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Bemerkung") Is System.DBNull.Value Then
|
||||
m_sBemerkung = SqlString.Null
|
||||
Else
|
||||
m_sBemerkung = New SqlString(CType(dtToReturn.Rows(0)("Bemerkung"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("dokumenteab") Is System.DBNull.Value Then
|
||||
m_daDokumenteab = SqlDateTime.Null
|
||||
Else
|
||||
m_daDokumenteab = New SqlDateTime(CType(dtToReturn.Rows(0)("dokumenteab"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("dokumentebis") Is System.DBNull.Value Then
|
||||
m_daDokumentebis = SqlDateTime.Null
|
||||
Else
|
||||
m_daDokumentebis = New SqlDateTime(CType(dtToReturn.Rows(0)("dokumentebis"), Date))
|
||||
End If
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsEDEX_BL_Auslieferung::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_edex_bl_EDEX_BL_Auslieferung_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("EDEX_BL_Auslieferung")
|
||||
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_edex_bl_EDEX_BL_Auslieferung_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("clsEDEX_BL_Auslieferung::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 [iAuslieferungnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iAuslieferungnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iAuslieferungnrTmp As SqlInt32 = Value
|
||||
If iAuslieferungnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iAuslieferungnr", "iAuslieferungnr can't be NULL")
|
||||
End If
|
||||
m_iAuslieferungnr = 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 [sDokumentid_quittung]() As SqlString
|
||||
Get
|
||||
Return m_sDokumentid_quittung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDokumentid_quittung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sQuittungsflag]() As SqlString
|
||||
Get
|
||||
Return m_sQuittungsflag
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sQuittungsflag = 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 [iStatus]() As SqlInt32
|
||||
Get
|
||||
Return m_iStatus
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iStatus = 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 [bGrundlage1]() As SqlBoolean
|
||||
Get
|
||||
Return m_bGrundlage1
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bGrundlage1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daGrundlage1_Datum]() As SqlDateTime
|
||||
Get
|
||||
Return m_daGrundlage1_Datum
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daGrundlage1_Datum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bGrundlage2]() As SqlBoolean
|
||||
Get
|
||||
Return m_bGrundlage2
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bGrundlage2 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daGrundlage2_Datum]() As SqlDateTime
|
||||
Get
|
||||
Return m_daGrundlage2_Datum
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daGrundlage2_Datum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bGrundlage3]() As SqlBoolean
|
||||
Get
|
||||
Return m_bGrundlage3
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bGrundlage3 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daGrundlage3_Datum]() As SqlDateTime
|
||||
Get
|
||||
Return m_daGrundlage3_Datum
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daGrundlage3_Datum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bGrundlage4]() As SqlBoolean
|
||||
Get
|
||||
Return m_bGrundlage4
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bGrundlage4 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daGrundlage4_Datum]() As SqlDateTime
|
||||
Get
|
||||
Return m_daGrundlage4_Datum
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daGrundlage4_Datum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bAushaendigung_blv]() As SqlBoolean
|
||||
Get
|
||||
Return m_bAushaendigung_blv
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bAushaendigung_blv = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iBlv]() As SqlInt32
|
||||
Get
|
||||
Return m_iBlv
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iBlv = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bAushaendigung_kube]() As SqlBoolean
|
||||
Get
|
||||
Return m_bAushaendigung_kube
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bAushaendigung_kube = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iKube]() As SqlInt32
|
||||
Get
|
||||
Return m_iKube
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iKube = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bAushaendigungsart_persoenlich]() As SqlBoolean
|
||||
Get
|
||||
Return m_bAushaendigungsart_persoenlich
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bAushaendigungsart_persoenlich = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bAushaendigungsart_post]() As SqlBoolean
|
||||
Get
|
||||
Return m_bAushaendigungsart_post
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bAushaendigungsart_post = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bAushaendigung_verschlossen]() As SqlBoolean
|
||||
Get
|
||||
Return m_bAushaendigung_verschlossen
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bAushaendigung_verschlossen = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bAushaendigung_nicht_verschlossen]() As SqlBoolean
|
||||
Get
|
||||
Return m_bAushaendigung_nicht_verschlossen
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bAushaendigung_nicht_verschlossen = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bBeilage_zur_Quittung1]() As SqlBoolean
|
||||
Get
|
||||
Return m_bBeilage_zur_Quittung1
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bBeilage_zur_Quittung1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bBeilage_zur_Quittung2]() As SqlBoolean
|
||||
Get
|
||||
Return m_bBeilage_zur_Quittung2
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bBeilage_zur_Quittung2 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bBeilage_zur_Quittung3]() As SqlBoolean
|
||||
Get
|
||||
Return m_bBeilage_zur_Quittung3
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bBeilage_zur_Quittung3 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBeilage_zur_Quittung_text]() As SqlString
|
||||
Get
|
||||
Return m_sBeilage_zur_Quittung_text
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBeilage_zur_Quittung_text = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBemerkung]() As SqlString
|
||||
Get
|
||||
Return m_sBemerkung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBemerkung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daDokumenteab]() As SqlDateTime
|
||||
Get
|
||||
Return m_daDokumenteab
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daDokumenteab = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daDokumentebis]() As SqlDateTime
|
||||
Get
|
||||
Return m_daDokumentebis
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daDokumentebis = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
611
Backup/EDOKA/DB/EDEX/clsEDEX_BL_BLIndex.vb
Normal file
611
Backup/EDOKA/DB/EDEX/clsEDEX_BL_BLIndex.vb
Normal file
@@ -0,0 +1,611 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'EDEX_BL_BLIndex'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 4. Mai 2005, 19:42: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 'EDEX_BL_BLIndex'.
|
||||
' /// </summary>
|
||||
Public Class clsEDEX_BL_BLIndex
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bAktiv As SqlBoolean
|
||||
Private m_daScandatum, m_daMutiert_am, m_daErstellt_am As SqlDateTime
|
||||
Private m_iBLIndexnr, m_iAuslieferungnr, m_iBl_status, m_iMutierer As SqlInt32
|
||||
Private m_sRes3, m_sStapelnr, m_sUser_id, m_sDokumentid, m_sRes2, m_sRes1, m_sCold_dokumentid 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>iBl_status</LI>
|
||||
' /// <LI>sUser_id. May be SqlString.Null</LI>
|
||||
' /// <LI>sStapelnr. May be SqlString.Null</LI>
|
||||
' /// <LI>daScandatum. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>sCold_dokumentid. May be SqlString.Null</LI>
|
||||
' /// <LI>sRes1. May be SqlString.Null</LI>
|
||||
' /// <LI>sRes2. May be SqlString.Null</LI>
|
||||
' /// <LI>sRes3. May be SqlString.Null</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>iMutierer</LI>
|
||||
' /// <LI>iAuslieferungnr. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iBLIndexnr</LI>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_EDEX_BL_BLIndex_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("@ibl_status", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBl_status))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@suser_id", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sUser_id))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sstapelnr", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStapelnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dascandatum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daScandatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@scold_dokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCold_dokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRes1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRes2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres3", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRes3))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iauslieferungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAuslieferungnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iBLIndexnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iBLIndexnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_iBLIndexnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iBLIndexnr").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_edex_bl_EDEX_BL_BLIndex_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("clsEDEX_BL_BLIndex::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>iBLIndexnr</LI>
|
||||
' /// <LI>sDokumentid</LI>
|
||||
' /// <LI>iBl_status</LI>
|
||||
' /// <LI>sUser_id. May be SqlString.Null</LI>
|
||||
' /// <LI>sStapelnr. May be SqlString.Null</LI>
|
||||
' /// <LI>daScandatum. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>sCold_dokumentid. May be SqlString.Null</LI>
|
||||
' /// <LI>sRes1. May be SqlString.Null</LI>
|
||||
' /// <LI>sRes2. May be SqlString.Null</LI>
|
||||
' /// <LI>sRes3. May be SqlString.Null</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>iMutierer</LI>
|
||||
' /// <LI>iAuslieferungnr. 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_edex_bl_EDEX_BL_BLIndex_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iBLIndexnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBLIndexnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibl_status", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBl_status))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@suser_id", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sUser_id))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sstapelnr", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStapelnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dascandatum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daScandatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@scold_dokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sCold_dokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRes1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRes2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres3", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRes3))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iauslieferungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAuslieferungnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_bl_EDEX_BL_BLIndex_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("clsEDEX_BL_BLIndex::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>iBLIndexnr</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_edex_bl_EDEX_BL_BLIndex_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iBLIndexnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBLIndexnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_bl_EDEX_BL_BLIndex_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("clsEDEX_BL_BLIndex::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>iBLIndexnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iBLIndexnr</LI>
|
||||
' /// <LI>sDokumentid</LI>
|
||||
' /// <LI>iBl_status</LI>
|
||||
' /// <LI>sUser_id</LI>
|
||||
' /// <LI>sStapelnr</LI>
|
||||
' /// <LI>daScandatum</LI>
|
||||
' /// <LI>sCold_dokumentid</LI>
|
||||
' /// <LI>sRes1</LI>
|
||||
' /// <LI>sRes2</LI>
|
||||
' /// <LI>sRes3</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>iMutierer</LI>
|
||||
' /// <LI>iAuslieferungnr</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_edex_bl_EDEX_BL_BLIndex_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("EDEX_BL_BLIndex")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iBLIndexnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBLIndexnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_bl_EDEX_BL_BLIndex_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iBLIndexnr = New SqlInt32(CType(dtToReturn.Rows(0)("BLIndexnr"), Integer))
|
||||
m_sDokumentid = New SqlString(CType(dtToReturn.Rows(0)("Dokumentid"), String))
|
||||
m_iBl_status = New SqlInt32(CType(dtToReturn.Rows(0)("bl_status"), Integer))
|
||||
If dtToReturn.Rows(0)("user_id") Is System.DBNull.Value Then
|
||||
m_sUser_id = SqlString.Null
|
||||
Else
|
||||
m_sUser_id = New SqlString(CType(dtToReturn.Rows(0)("user_id"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("stapelnr") Is System.DBNull.Value Then
|
||||
m_sStapelnr = SqlString.Null
|
||||
Else
|
||||
m_sStapelnr = New SqlString(CType(dtToReturn.Rows(0)("stapelnr"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("scandatum") Is System.DBNull.Value Then
|
||||
m_daScandatum = SqlDateTime.Null
|
||||
Else
|
||||
m_daScandatum = New SqlDateTime(CType(dtToReturn.Rows(0)("scandatum"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("cold_dokumentid") Is System.DBNull.Value Then
|
||||
m_sCold_dokumentid = SqlString.Null
|
||||
Else
|
||||
m_sCold_dokumentid = New SqlString(CType(dtToReturn.Rows(0)("cold_dokumentid"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("res1") Is System.DBNull.Value Then
|
||||
m_sRes1 = SqlString.Null
|
||||
Else
|
||||
m_sRes1 = New SqlString(CType(dtToReturn.Rows(0)("res1"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("res2") Is System.DBNull.Value Then
|
||||
m_sRes2 = SqlString.Null
|
||||
Else
|
||||
m_sRes2 = New SqlString(CType(dtToReturn.Rows(0)("res2"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("res3") Is System.DBNull.Value Then
|
||||
m_sRes3 = SqlString.Null
|
||||
Else
|
||||
m_sRes3 = New SqlString(CType(dtToReturn.Rows(0)("res3"), String))
|
||||
End If
|
||||
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
|
||||
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
|
||||
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
|
||||
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
|
||||
If dtToReturn.Rows(0)("auslieferungnr") Is System.DBNull.Value Then
|
||||
m_iAuslieferungnr = SqlInt32.Null
|
||||
Else
|
||||
m_iAuslieferungnr = New SqlInt32(CType(dtToReturn.Rows(0)("auslieferungnr"), 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("clsEDEX_BL_BLIndex::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_edex_bl_EDEX_BL_BLIndex_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("EDEX_BL_BLIndex")
|
||||
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_edex_bl_EDEX_BL_BLIndex_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("clsEDEX_BL_BLIndex::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 [iBLIndexnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iBLIndexnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iBLIndexnrTmp As SqlInt32 = Value
|
||||
If iBLIndexnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iBLIndexnr", "iBLIndexnr can't be NULL")
|
||||
End If
|
||||
m_iBLIndexnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
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 [iBl_status]() As SqlInt32
|
||||
Get
|
||||
Return m_iBl_status
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iBl_status = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sUser_id]() As SqlString
|
||||
Get
|
||||
Return m_sUser_id
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sUser_id = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sStapelnr]() As SqlString
|
||||
Get
|
||||
Return m_sStapelnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sStapelnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daScandatum]() As SqlDateTime
|
||||
Get
|
||||
Return m_daScandatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daScandatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sCold_dokumentid]() As SqlString
|
||||
Get
|
||||
Return m_sCold_dokumentid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sCold_dokumentid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sRes1]() As SqlString
|
||||
Get
|
||||
Return m_sRes1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sRes1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sRes2]() As SqlString
|
||||
Get
|
||||
Return m_sRes2
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sRes2 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sRes3]() As SqlString
|
||||
Get
|
||||
Return m_sRes3
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sRes3 = 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 [bAktiv]() As SqlBoolean
|
||||
Get
|
||||
Return m_bAktiv
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bAktiv = 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 [iAuslieferungnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iAuslieferungnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iAuslieferungnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
505
Backup/EDOKA/DB/EDEX/clsEDEX_BL_BLKunde.vb
Normal file
505
Backup/EDOKA/DB/EDEX/clsEDEX_BL_BLKunde.vb
Normal file
@@ -0,0 +1,505 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'EDEX_BL_BLKunde'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 4. Mai 2005, 19:42: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 'EDEX_BL_BLKunde'.
|
||||
' /// </summary>
|
||||
Public Class clsEDEX_BL_BLKunde
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_sAktiv, m_sPeriodische_auslieferung As SqlString
|
||||
Private m_daBlerklaerung_vom, m_daMutiert_am, m_daErstellt_am As SqlDateTime
|
||||
Private m_iPeriodizitaet, m_iBlkundenr, m_iNRAR00, 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>iBlkundenr</LI>
|
||||
' /// <LI>iNRAR00</LI>
|
||||
' /// <LI>iMandantnr</LI>
|
||||
' /// <LI>sAktiv</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>iMutierer</LI>
|
||||
' /// <LI>sPeriodische_auslieferung</LI>
|
||||
' /// <LI>iPeriodizitaet</LI>
|
||||
' /// <LI>daBlerklaerung_vom. 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_edex_bl_EDEX_BL_BLKunde_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iblkundenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBlkundenr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRAR00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRAR00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@saktiv", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 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("@speriodische_auslieferung", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPeriodische_auslieferung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iperiodizitaet", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPeriodizitaet))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dablerklaerung_vom", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daBlerklaerung_vom))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_bl_EDEX_BL_BLKunde_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("clsEDEX_BL_BLKunde::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>iBlkundenr</LI>
|
||||
' /// <LI>iNRAR00</LI>
|
||||
' /// <LI>iMandantnr</LI>
|
||||
' /// <LI>sAktiv</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>iMutierer</LI>
|
||||
' /// <LI>sPeriodische_auslieferung</LI>
|
||||
' /// <LI>iPeriodizitaet</LI>
|
||||
' /// <LI>daBlerklaerung_vom. May be SqlDateTime.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Update() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_EDEX_BL_BLKunde_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iblkundenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBlkundenr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRAR00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRAR00))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@saktiv", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 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("@speriodische_auslieferung", SqlDbType.Char, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPeriodische_auslieferung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iperiodizitaet", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPeriodizitaet))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dablerklaerung_vom", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daBlerklaerung_vom))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_bl_EDEX_BL_BLKunde_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("clsEDEX_BL_BLKunde::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>iBlkundenr</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_edex_bl_EDEX_BL_BLKunde_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iblkundenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBlkundenr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_bl_EDEX_BL_BLKunde_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("clsEDEX_BL_BLKunde::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>iBlkundenr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iBlkundenr</LI>
|
||||
' /// <LI>iNRAR00</LI>
|
||||
' /// <LI>iMandantnr</LI>
|
||||
' /// <LI>sAktiv</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>iMutierer</LI>
|
||||
' /// <LI>sPeriodische_auslieferung</LI>
|
||||
' /// <LI>iPeriodizitaet</LI>
|
||||
' /// <LI>daBlerklaerung_vom</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_edex_bl_EDEX_BL_BLKunde_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("EDEX_BL_BLKunde")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iblkundenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBlkundenr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_bl_EDEX_BL_BLKunde_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iBlkundenr = New SqlInt32(CType(dtToReturn.Rows(0)("blkundenr"), Integer))
|
||||
m_iNRAR00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRAR00"), Integer))
|
||||
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
|
||||
m_sAktiv = New SqlString(CType(dtToReturn.Rows(0)("aktiv"), String))
|
||||
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
|
||||
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
|
||||
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
|
||||
m_sPeriodische_auslieferung = New SqlString(CType(dtToReturn.Rows(0)("periodische_auslieferung"), String))
|
||||
m_iPeriodizitaet = New SqlInt32(CType(dtToReturn.Rows(0)("periodizitaet"), Integer))
|
||||
If dtToReturn.Rows(0)("blerklaerung_vom") Is System.DBNull.Value Then
|
||||
m_daBlerklaerung_vom = SqlDateTime.Null
|
||||
Else
|
||||
m_daBlerklaerung_vom = New SqlDateTime(CType(dtToReturn.Rows(0)("blerklaerung_vom"), Date))
|
||||
End If
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsEDEX_BL_BLKunde::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_edex_bl_EDEX_BL_BLKunde_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("EDEX_BL_BLKunde")
|
||||
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_edex_bl_EDEX_BL_BLKunde_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("clsEDEX_BL_BLKunde::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 [iBlkundenr]() As SqlInt32
|
||||
Get
|
||||
Return m_iBlkundenr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iBlkundenrTmp As SqlInt32 = Value
|
||||
If iBlkundenrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iBlkundenr", "iBlkundenr can't be NULL")
|
||||
End If
|
||||
m_iBlkundenr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iNRAR00]() As SqlInt32
|
||||
Get
|
||||
Return m_iNRAR00
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iNRAR00Tmp As SqlInt32 = Value
|
||||
If iNRAR00Tmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iNRAR00", "iNRAR00 can't be NULL")
|
||||
End If
|
||||
m_iNRAR00 = 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 [sAktiv]() As SqlString
|
||||
Get
|
||||
Return m_sAktiv
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sAktiv = 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 [sPeriodische_auslieferung]() As SqlString
|
||||
Get
|
||||
Return m_sPeriodische_auslieferung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sPeriodische_auslieferung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iPeriodizitaet]() As SqlInt32
|
||||
Get
|
||||
Return m_iPeriodizitaet
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iPeriodizitaet = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daBlerklaerung_vom]() As SqlDateTime
|
||||
Get
|
||||
Return m_daBlerklaerung_vom
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daBlerklaerung_vom = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
619
Backup/EDOKA/DB/EDEX/clsEDEX_BL_Druckjob.vb
Normal file
619
Backup/EDOKA/DB/EDEX/clsEDEX_BL_Druckjob.vb
Normal file
@@ -0,0 +1,619 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'EDEX_BL_Druckjob'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Montag, 16. Mai 2005, 23:08: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 'EDEX_BL_Druckjob'.
|
||||
' /// </summary>
|
||||
Public Class clsEDEX_BL_Druckjob
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bAktiv As SqlBoolean
|
||||
Private m_daAufbereitet_am, m_daGedruckt_am, m_daErstellt_am, m_daMutiert_am As SqlDateTime
|
||||
Private m_blobPdfdokument As SqlBinary
|
||||
Private m_iMandantnr, m_iMutierer, m_iAuslieferungnr, m_iDruckjobnr, m_iAnzahl_dokument, m_iStatus As SqlInt32
|
||||
Private m_sBemerkung, m_sTgnummer 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>iDruckjobnr</LI>
|
||||
' /// <LI>iAuslieferungnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sTgnummer. May be SqlString.Null</LI>
|
||||
' /// <LI>iAnzahl_dokument. May be SqlInt32.Null</LI>
|
||||
' /// <LI>daAufbereitet_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daGedruckt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iStatus. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sBemerkung. May be SqlString.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>blobPdfdokument. May be SqlBinary.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>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_edex_bl_EDEX_BL_Druckjob_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idruckjobnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDruckjobnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iauslieferungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAuslieferungnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stgnummer", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTgnummer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ianzahl_dokument", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAnzahl_dokument))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daaufbereitet_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daAufbereitet_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dagedruckt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daGedruckt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbemerkung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBemerkung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
Dim iLength As Integer = 0
|
||||
If Not m_blobPdfdokument.IsNull Then
|
||||
iLength = m_blobPdfdokument.Length
|
||||
End If
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobpdfdokument", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobPdfdokument))
|
||||
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_edex_bl_EDEX_BL_Druckjob_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("clsEDEX_BL_Druckjob::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>iDruckjobnr</LI>
|
||||
' /// <LI>iAuslieferungnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sTgnummer. May be SqlString.Null</LI>
|
||||
' /// <LI>iAnzahl_dokument. May be SqlInt32.Null</LI>
|
||||
' /// <LI>daAufbereitet_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daGedruckt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iStatus. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sBemerkung. May be SqlString.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>blobPdfdokument. May be SqlBinary.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>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_edex_bl_EDEX_BL_Druckjob_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idruckjobnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDruckjobnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iauslieferungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAuslieferungnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stgnummer", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTgnummer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ianzahl_dokument", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAnzahl_dokument))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daaufbereitet_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daAufbereitet_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dagedruckt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daGedruckt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbemerkung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBemerkung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
Dim iLength As Integer = 0
|
||||
If Not m_blobPdfdokument.IsNull Then
|
||||
iLength = m_blobPdfdokument.Length
|
||||
End If
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobpdfdokument", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobPdfdokument))
|
||||
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_edex_bl_EDEX_BL_Druckjob_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("clsEDEX_BL_Druckjob::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>iDruckjobnr</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_edex_bl_EDEX_BL_Druckjob_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idruckjobnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDruckjobnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_bl_EDEX_BL_Druckjob_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("clsEDEX_BL_Druckjob::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>iDruckjobnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iDruckjobnr</LI>
|
||||
' /// <LI>iAuslieferungnr</LI>
|
||||
' /// <LI>sTgnummer</LI>
|
||||
' /// <LI>iAnzahl_dokument</LI>
|
||||
' /// <LI>daAufbereitet_am</LI>
|
||||
' /// <LI>daGedruckt_am</LI>
|
||||
' /// <LI>iStatus</LI>
|
||||
' /// <LI>sBemerkung</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>blobPdfdokument</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_edex_bl_EDEX_BL_Druckjob_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("EDEX_BL_Druckjob")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@idruckjobnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDruckjobnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_bl_EDEX_BL_Druckjob_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iDruckjobnr = New SqlInt32(CType(dtToReturn.Rows(0)("druckjobnr"), Integer))
|
||||
If dtToReturn.Rows(0)("auslieferungnr") Is System.DBNull.Value Then
|
||||
m_iAuslieferungnr = SqlInt32.Null
|
||||
Else
|
||||
m_iAuslieferungnr = New SqlInt32(CType(dtToReturn.Rows(0)("auslieferungnr"), Integer))
|
||||
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)("anzahl_dokument") Is System.DBNull.Value Then
|
||||
m_iAnzahl_dokument = SqlInt32.Null
|
||||
Else
|
||||
m_iAnzahl_dokument = New SqlInt32(CType(dtToReturn.Rows(0)("anzahl_dokument"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("aufbereitet_am") Is System.DBNull.Value Then
|
||||
m_daAufbereitet_am = SqlDateTime.Null
|
||||
Else
|
||||
m_daAufbereitet_am = New SqlDateTime(CType(dtToReturn.Rows(0)("aufbereitet_am"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("gedruckt_am") Is System.DBNull.Value Then
|
||||
m_daGedruckt_am = SqlDateTime.Null
|
||||
Else
|
||||
m_daGedruckt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("gedruckt_am"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("status") Is System.DBNull.Value Then
|
||||
m_iStatus = SqlInt32.Null
|
||||
Else
|
||||
m_iStatus = New SqlInt32(CType(dtToReturn.Rows(0)("status"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("bemerkung") Is System.DBNull.Value Then
|
||||
m_sBemerkung = SqlString.Null
|
||||
Else
|
||||
m_sBemerkung = New SqlString(CType(dtToReturn.Rows(0)("bemerkung"), 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)("pdfdokument") Is System.DBNull.Value Then
|
||||
m_blobPdfdokument = SqlBinary.Null
|
||||
Else
|
||||
m_blobPdfdokument = New SqlBinary(CType(dtToReturn.Rows(0)("pdfdokument"), Byte()))
|
||||
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)("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("clsEDEX_BL_Druckjob::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_edex_bl_EDEX_BL_Druckjob_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("EDEX_BL_Druckjob")
|
||||
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_edex_bl_EDEX_BL_Druckjob_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("clsEDEX_BL_Druckjob::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 [iDruckjobnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iDruckjobnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iDruckjobnrTmp As SqlInt32 = Value
|
||||
If iDruckjobnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iDruckjobnr", "iDruckjobnr can't be NULL")
|
||||
End If
|
||||
m_iDruckjobnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iAuslieferungnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iAuslieferungnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iAuslieferungnr = 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 [iAnzahl_dokument]() As SqlInt32
|
||||
Get
|
||||
Return m_iAnzahl_dokument
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iAnzahl_dokument = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daAufbereitet_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daAufbereitet_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daAufbereitet_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daGedruckt_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daGedruckt_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daGedruckt_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iStatus]() As SqlInt32
|
||||
Get
|
||||
Return m_iStatus
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iStatus = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBemerkung]() As SqlString
|
||||
Get
|
||||
Return m_sBemerkung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBemerkung = 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 [blobPdfdokument]() As SqlBinary
|
||||
Get
|
||||
Return m_blobPdfdokument
|
||||
End Get
|
||||
Set(ByVal Value As SqlBinary)
|
||||
m_blobPdfdokument = 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
|
||||
563
Backup/EDOKA/DB/EDEX/clsEDEX_BL_Hostdokument.vb
Normal file
563
Backup/EDOKA/DB/EDEX/clsEDEX_BL_Hostdokument.vb
Normal file
@@ -0,0 +1,563 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'EDEX_BL_Hostdokument'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 4. Mai 2005, 19:42:18
|
||||
' // 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 'EDEX_BL_Hostdokument'.
|
||||
' /// </summary>
|
||||
Public Class clsEDEX_BL_Hostdokument
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_daInserttimestamp As SqlDateTime
|
||||
Private m_iBl_status, m_iAuslieferungnr As SqlInt32
|
||||
Private m_sStandamdatum, m_sEx, m_sArchivdatum, m_sVvextern1, m_sVvextern2, m_sRes2, m_sRes3, m_sRes1, m_sDokumenttypnr, m_sLoadid, m_sPartnername_zusteller, m_sReferenzzeile1, m_sReferenzzeile2, m_sPartnernr_inhaber, m_sPartnernr_zusteller, m_sPartnername_inhaber, m_sValutadatum, m_sDokumentid, m_sAnzahlseiten, m_sNachvollziehbarkeit, m_sValutadatum1, m_sValorennr, m_sIsinnr 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>sPartnernr_inhaber</LI>
|
||||
' /// <LI>sPartnernr_zusteller</LI>
|
||||
' /// <LI>sPartnername_inhaber</LI>
|
||||
' /// <LI>sPartnername_zusteller</LI>
|
||||
' /// <LI>sReferenzzeile1</LI>
|
||||
' /// <LI>sReferenzzeile2</LI>
|
||||
' /// <LI>sValutadatum</LI>
|
||||
' /// <LI>sValutadatum1</LI>
|
||||
' /// <LI>sValorennr</LI>
|
||||
' /// <LI>sIsinnr</LI>
|
||||
' /// <LI>sDokumentid</LI>
|
||||
' /// <LI>sAnzahlseiten</LI>
|
||||
' /// <LI>sNachvollziehbarkeit</LI>
|
||||
' /// <LI>sArchivdatum</LI>
|
||||
' /// <LI>sVvextern1</LI>
|
||||
' /// <LI>sVvextern2</LI>
|
||||
' /// <LI>sEx</LI>
|
||||
' /// <LI>sStandamdatum</LI>
|
||||
' /// <LI>sDokumenttypnr</LI>
|
||||
' /// <LI>sLoadid</LI>
|
||||
' /// <LI>daInserttimestamp</LI>
|
||||
' /// <LI>iBl_status</LI>
|
||||
' /// <LI>sRes1</LI>
|
||||
' /// <LI>sRes2</LI>
|
||||
' /// <LI>sRes3</LI>
|
||||
' /// <LI>iAuslieferungnr. 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_edex_bl_EDEX_BL_Hostdokument_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnernr_inhaber", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr_inhaber))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnernr_zusteller", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr_zusteller))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnername_inhaber", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPartnername_inhaber))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@spartnername_zusteller", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sPartnername_zusteller))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sreferenzzeile1", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sReferenzzeile1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sreferenzzeile2", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sReferenzzeile2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svalutadatum", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sValutadatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svalutadatum1", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sValutadatum1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svalorennr", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sValorennr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sisinnr", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sIsinnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sanzahlseiten", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sAnzahlseiten))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@snachvollziehbarkeit", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sNachvollziehbarkeit))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sarchivdatum", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sArchivdatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svvextern1", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sVvextern1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@svvextern2", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sVvextern2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sex", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sEx))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sstandamdatum", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sStandamdatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumenttypnr", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sDokumenttypnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sloadid", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sLoadid))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dainserttimestamp", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daInserttimestamp))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibl_status", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBl_status))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres1", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sRes1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres2", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sRes2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sres3", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sRes3))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iauslieferungnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAuslieferungnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_bl_EDEX_BL_Hostdokument_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("clsEDEX_BL_Hostdokument::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_edex_bl_EDEX_BL_Hostdokument_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("EDEX_BL_Hostdokument")
|
||||
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_edex_bl_EDEX_BL_Hostdokument_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("clsEDEX_BL_Hostdokument::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 [sPartnernr_inhaber]() As SqlString
|
||||
Get
|
||||
Return m_sPartnernr_inhaber
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sPartnernr_inhaberTmp As SqlString = Value
|
||||
If sPartnernr_inhaberTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sPartnernr_inhaber", "sPartnernr_inhaber can't be NULL")
|
||||
End If
|
||||
m_sPartnernr_inhaber = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sPartnernr_zusteller]() As SqlString
|
||||
Get
|
||||
Return m_sPartnernr_zusteller
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sPartnernr_zustellerTmp As SqlString = Value
|
||||
If sPartnernr_zustellerTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sPartnernr_zusteller", "sPartnernr_zusteller can't be NULL")
|
||||
End If
|
||||
m_sPartnernr_zusteller = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sPartnername_inhaber]() As SqlString
|
||||
Get
|
||||
Return m_sPartnername_inhaber
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sPartnername_inhaberTmp As SqlString = Value
|
||||
If sPartnername_inhaberTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sPartnername_inhaber", "sPartnername_inhaber can't be NULL")
|
||||
End If
|
||||
m_sPartnername_inhaber = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sPartnername_zusteller]() As SqlString
|
||||
Get
|
||||
Return m_sPartnername_zusteller
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sPartnername_zustellerTmp As SqlString = Value
|
||||
If sPartnername_zustellerTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sPartnername_zusteller", "sPartnername_zusteller can't be NULL")
|
||||
End If
|
||||
m_sPartnername_zusteller = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sReferenzzeile1]() As SqlString
|
||||
Get
|
||||
Return m_sReferenzzeile1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sReferenzzeile1Tmp As SqlString = Value
|
||||
If sReferenzzeile1Tmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sReferenzzeile1", "sReferenzzeile1 can't be NULL")
|
||||
End If
|
||||
m_sReferenzzeile1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sReferenzzeile2]() As SqlString
|
||||
Get
|
||||
Return m_sReferenzzeile2
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sReferenzzeile2Tmp As SqlString = Value
|
||||
If sReferenzzeile2Tmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sReferenzzeile2", "sReferenzzeile2 can't be NULL")
|
||||
End If
|
||||
m_sReferenzzeile2 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sValutadatum]() As SqlString
|
||||
Get
|
||||
Return m_sValutadatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sValutadatumTmp As SqlString = Value
|
||||
If sValutadatumTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sValutadatum", "sValutadatum can't be NULL")
|
||||
End If
|
||||
m_sValutadatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sValutadatum1]() As SqlString
|
||||
Get
|
||||
Return m_sValutadatum1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sValutadatum1Tmp As SqlString = Value
|
||||
If sValutadatum1Tmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sValutadatum1", "sValutadatum1 can't be NULL")
|
||||
End If
|
||||
m_sValutadatum1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sValorennr]() As SqlString
|
||||
Get
|
||||
Return m_sValorennr
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sValorennrTmp As SqlString = Value
|
||||
If sValorennrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sValorennr", "sValorennr can't be NULL")
|
||||
End If
|
||||
m_sValorennr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sIsinnr]() As SqlString
|
||||
Get
|
||||
Return m_sIsinnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sIsinnrTmp As SqlString = Value
|
||||
If sIsinnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sIsinnr", "sIsinnr can't be NULL")
|
||||
End If
|
||||
m_sIsinnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
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 [sAnzahlseiten]() As SqlString
|
||||
Get
|
||||
Return m_sAnzahlseiten
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sAnzahlseitenTmp As SqlString = Value
|
||||
If sAnzahlseitenTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sAnzahlseiten", "sAnzahlseiten can't be NULL")
|
||||
End If
|
||||
m_sAnzahlseiten = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sNachvollziehbarkeit]() As SqlString
|
||||
Get
|
||||
Return m_sNachvollziehbarkeit
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sNachvollziehbarkeitTmp As SqlString = Value
|
||||
If sNachvollziehbarkeitTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sNachvollziehbarkeit", "sNachvollziehbarkeit can't be NULL")
|
||||
End If
|
||||
m_sNachvollziehbarkeit = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sArchivdatum]() As SqlString
|
||||
Get
|
||||
Return m_sArchivdatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sArchivdatumTmp As SqlString = Value
|
||||
If sArchivdatumTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sArchivdatum", "sArchivdatum can't be NULL")
|
||||
End If
|
||||
m_sArchivdatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sVvextern1]() As SqlString
|
||||
Get
|
||||
Return m_sVvextern1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sVvextern1Tmp As SqlString = Value
|
||||
If sVvextern1Tmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sVvextern1", "sVvextern1 can't be NULL")
|
||||
End If
|
||||
m_sVvextern1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sVvextern2]() As SqlString
|
||||
Get
|
||||
Return m_sVvextern2
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sVvextern2Tmp As SqlString = Value
|
||||
If sVvextern2Tmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sVvextern2", "sVvextern2 can't be NULL")
|
||||
End If
|
||||
m_sVvextern2 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sEx]() As SqlString
|
||||
Get
|
||||
Return m_sEx
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sExTmp As SqlString = Value
|
||||
If sExTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sEx", "sEx can't be NULL")
|
||||
End If
|
||||
m_sEx = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sStandamdatum]() As SqlString
|
||||
Get
|
||||
Return m_sStandamdatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sStandamdatumTmp As SqlString = Value
|
||||
If sStandamdatumTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sStandamdatum", "sStandamdatum can't be NULL")
|
||||
End If
|
||||
m_sStandamdatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDokumenttypnr]() As SqlString
|
||||
Get
|
||||
Return m_sDokumenttypnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sDokumenttypnrTmp As SqlString = Value
|
||||
If sDokumenttypnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sDokumenttypnr", "sDokumenttypnr can't be NULL")
|
||||
End If
|
||||
m_sDokumenttypnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sLoadid]() As SqlString
|
||||
Get
|
||||
Return m_sLoadid
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sLoadidTmp As SqlString = Value
|
||||
If sLoadidTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sLoadid", "sLoadid can't be NULL")
|
||||
End If
|
||||
m_sLoadid = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daInserttimestamp]() As SqlDateTime
|
||||
Get
|
||||
Return m_daInserttimestamp
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
Dim daInserttimestampTmp As SqlDateTime = Value
|
||||
If daInserttimestampTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("daInserttimestamp", "daInserttimestamp can't be NULL")
|
||||
End If
|
||||
m_daInserttimestamp = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iBl_status]() As SqlInt32
|
||||
Get
|
||||
Return m_iBl_status
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iBl_statusTmp As SqlInt32 = Value
|
||||
If iBl_statusTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iBl_status", "iBl_status can't be NULL")
|
||||
End If
|
||||
m_iBl_status = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sRes1]() As SqlString
|
||||
Get
|
||||
Return m_sRes1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sRes1Tmp As SqlString = Value
|
||||
If sRes1Tmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sRes1", "sRes1 can't be NULL")
|
||||
End If
|
||||
m_sRes1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sRes2]() As SqlString
|
||||
Get
|
||||
Return m_sRes2
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sRes2Tmp As SqlString = Value
|
||||
If sRes2Tmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sRes2", "sRes2 can't be NULL")
|
||||
End If
|
||||
m_sRes2 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sRes3]() As SqlString
|
||||
Get
|
||||
Return m_sRes3
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sRes3Tmp As SqlString = Value
|
||||
If sRes3Tmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sRes3", "sRes3 can't be NULL")
|
||||
End If
|
||||
m_sRes3 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iAuslieferungnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iAuslieferungnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iAuslieferungnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
470
Backup/EDOKA/DB/EDEX/clsEDEX_BL_Status.vb
Normal file
470
Backup/EDOKA/DB/EDEX/clsEDEX_BL_Status.vb
Normal file
@@ -0,0 +1,470 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'EDEX_BL_Status'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 4. Mai 2005, 19:42:18
|
||||
' // 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 'EDEX_BL_Status'.
|
||||
' /// </summary>
|
||||
Public Class clsEDEX_BL_Status
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bAktiv As SqlBoolean
|
||||
Private m_daErstellt_am, m_daMutiert_ma As SqlDateTime
|
||||
Private m_iMutierer, m_iMandantnr, m_iBLStatusnr 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>iBLStatusnr</LI>
|
||||
' /// <LI>sBezeichnung. 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_ma. 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_edex_bl_EDEX_BL_Status_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iBLStatusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBLStatusnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
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_ma", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_ma))
|
||||
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_edex_bl_EDEX_BL_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("clsEDEX_BL_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>iBLStatusnr</LI>
|
||||
' /// <LI>sBezeichnung. 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_ma. 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_edex_bl_EDEX_BL_Status_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iBLStatusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBLStatusnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
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_ma", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_ma))
|
||||
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_edex_bl_EDEX_BL_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("clsEDEX_BL_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>iBLStatusnr</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_edex_bl_EDEX_BL_Status_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iBLStatusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBLStatusnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_bl_EDEX_BL_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("clsEDEX_BL_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>iBLStatusnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iBLStatusnr</LI>
|
||||
' /// <LI>sBezeichnung</LI>
|
||||
' /// <LI>iMandantnr</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_ma</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_edex_bl_EDEX_BL_Status_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("EDEX_BL_Status")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iBLStatusnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBLStatusnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_bl_EDEX_BL_Status_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iBLStatusnr = New SqlInt32(CType(dtToReturn.Rows(0)("BLStatusnr"), 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)("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_ma") Is System.DBNull.Value Then
|
||||
m_daMutiert_ma = SqlDateTime.Null
|
||||
Else
|
||||
m_daMutiert_ma = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_ma"), 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("clsEDEX_BL_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_edex_bl_EDEX_BL_Status_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("EDEX_BL_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_edex_bl_EDEX_BL_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("clsEDEX_BL_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 [iBLStatusnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iBLStatusnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iBLStatusnrTmp As SqlInt32 = Value
|
||||
If iBLStatusnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iBLStatusnr", "iBLStatusnr can't be NULL")
|
||||
End If
|
||||
m_iBLStatusnr = 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 [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_ma]() As SqlDateTime
|
||||
Get
|
||||
Return m_daMutiert_ma
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daMutiert_ma = 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
|
||||
671
Backup/EDOKA/DB/EDEX/clsEDEX_Favoriten.vb
Normal file
671
Backup/EDOKA/DB/EDEX/clsEDEX_Favoriten.vb
Normal file
@@ -0,0 +1,671 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'EDEX_Favoriten'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 16. Januar 2005, 18:42: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 'EDEX_Favoriten'.
|
||||
' /// </summary>
|
||||
Public Class clsEDEX_Favoriten
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bStddp, m_bDp, m_bStrukturelement, m_bAktiv As SqlBoolean
|
||||
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
|
||||
Private m_iNreintrag, m_iMandantnr, m_iSprache, m_iMutierer, m_iDtnr_dpnr, m_iImageindexopen, m_iImageindex, m_iMitarbeiternr, m_iParentid, m_iSort 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>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>iDtnr_dpnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bDp. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bStddp. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>iMitarbeiternr. 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>iSprache. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bStrukturelement. May be SqlBoolean.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iNreintrag</LI>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[edex_pr_EDEX_Favoriten_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
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("@idtnr_dpnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDtnr_dpnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdp", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDp))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bstddp", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bStddp))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
|
||||
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("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bstrukturelement", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bStrukturelement))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Output, True, 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_iNreintrag = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@inreintrag").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 'edex_pr_EDEX_Favoriten_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("clsEDEX_Favoriten::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>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>iDtnr_dpnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bDp. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>bStddp. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>iMitarbeiternr. 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>iSprache. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bStrukturelement. 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.[edex_pr_EDEX_Favoriten_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("@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("@idtnr_dpnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDtnr_dpnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bdp", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bDp))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bstddp", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bStddp))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
|
||||
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("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bstrukturelement", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bStrukturelement))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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 'edex_pr_EDEX_Favoriten_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("clsEDEX_Favoriten::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.[edex_pr_EDEX_Favoriten_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 'edex_pr_EDEX_Favoriten_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("clsEDEX_Favoriten::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>sBezeichnung</LI>
|
||||
' /// <LI>iParentid</LI>
|
||||
' /// <LI>iSort</LI>
|
||||
' /// <LI>iImageindex</LI>
|
||||
' /// <LI>iImageindexopen</LI>
|
||||
' /// <LI>iDtnr_dpnr</LI>
|
||||
' /// <LI>bDp</LI>
|
||||
' /// <LI>bStddp</LI>
|
||||
' /// <LI>iMitarbeiternr</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>iMutierer</LI>
|
||||
' /// <LI>iSprache</LI>
|
||||
' /// <LI>iMandantnr</LI>
|
||||
' /// <LI>bStrukturelement</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.[edex_pr_EDEX_Favoriten_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("EDEX_Favoriten")
|
||||
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 'edex_pr_EDEX_Favoriten_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)("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)("dtnr_dpnr") Is System.DBNull.Value Then
|
||||
m_iDtnr_dpnr = SqlInt32.Null
|
||||
Else
|
||||
m_iDtnr_dpnr = New SqlInt32(CType(dtToReturn.Rows(0)("dtnr_dpnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("dp") Is System.DBNull.Value Then
|
||||
m_bDp = SqlBoolean.Null
|
||||
Else
|
||||
m_bDp = New SqlBoolean(CType(dtToReturn.Rows(0)("dp"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("stddp") Is System.DBNull.Value Then
|
||||
m_bStddp = SqlBoolean.Null
|
||||
Else
|
||||
m_bStddp = New SqlBoolean(CType(dtToReturn.Rows(0)("stddp"), Boolean))
|
||||
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)("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)("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)("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)("strukturelement") Is System.DBNull.Value Then
|
||||
m_bStrukturelement = SqlBoolean.Null
|
||||
Else
|
||||
m_bStrukturelement = New SqlBoolean(CType(dtToReturn.Rows(0)("strukturelement"), 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("clsEDEX_Favoriten::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.[edex_pr_EDEX_Favoriten_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("EDEX_Favoriten")
|
||||
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 'edex_pr_EDEX_Favoriten_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("clsEDEX_Favoriten::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 [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 [iDtnr_dpnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iDtnr_dpnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iDtnr_dpnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bDp]() As SqlBoolean
|
||||
Get
|
||||
Return m_bDp
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bDp = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bStddp]() As SqlBoolean
|
||||
Get
|
||||
Return m_bStddp
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bStddp = 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 [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 [iSprache]() As SqlInt32
|
||||
Get
|
||||
Return m_iSprache
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iSprache = 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 [bStrukturelement]() As SqlBoolean
|
||||
Get
|
||||
Return m_bStrukturelement
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bStrukturelement = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
731
Backup/EDOKA/DB/EDEX/clsEdex_bl_parameter.vb
Normal file
731
Backup/EDOKA/DB/EDEX/clsEdex_bl_parameter.vb
Normal file
@@ -0,0 +1,731 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'edex_bl_parameter'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Freitag, 13. Mai 2005, 11:41: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 'edex_bl_parameter'.
|
||||
' /// </summary>
|
||||
Public Class clsEdex_bl_parameter
|
||||
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_iBlvparamnr, m_iBlvfunktion, m_iBlvdokumenttypnr As SqlInt32
|
||||
Private m_sTxtbeilage1, m_sTxtForm2, m_sTxtForm1, m_sTxtQuittung2, m_sTxtQuittung1, m_sTxtbeilage2, m_sTxtGrundlage3, m_sTxtGrundlage2, m_sTxtGrundlage1, m_sTxtArt2, m_sTxtArt1, m_sTxtGrundlage4 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>iBlvfunktion. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iBlvdokumenttypnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sTxtGrundlage1. May be SqlString.Null</LI>
|
||||
' /// <LI>sTxtGrundlage2. May be SqlString.Null</LI>
|
||||
' /// <LI>sTxtGrundlage3. May be SqlString.Null</LI>
|
||||
' /// <LI>sTxtGrundlage4. May be SqlString.Null</LI>
|
||||
' /// <LI>sTxtArt1. May be SqlString.Null</LI>
|
||||
' /// <LI>sTxtArt2. May be SqlString.Null</LI>
|
||||
' /// <LI>sTxtForm1. May be SqlString.Null</LI>
|
||||
' /// <LI>sTxtForm2. May be SqlString.Null</LI>
|
||||
' /// <LI>sTxtbeilage1. May be SqlString.Null</LI>
|
||||
' /// <LI>sTxtbeilage2. May be SqlString.Null</LI>
|
||||
' /// <LI>sTxtQuittung1. May be SqlString.Null</LI>
|
||||
' /// <LI>sTxtQuittung2. May be SqlString.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iBlvparamnr</LI>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_edex_bl_edex_bl_parameter_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iblvfunktion", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBlvfunktion))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iblvdokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBlvdokumenttypnr))
|
||||
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("@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("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtGrundlage1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtGrundlage1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtGrundlage2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtGrundlage2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtGrundlage3", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtGrundlage3))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtGrundlage4", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtGrundlage4))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtArt1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtArt1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtArt2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtArt2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtForm1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtForm1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtForm2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtForm2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtbeilage1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtbeilage1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtbeilage2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtbeilage2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtQuittung1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtQuittung1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtQuittung2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtQuittung2))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iblvparamnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iBlvparamnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_iBlvparamnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iblvparamnr").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_edex_bl_edex_bl_parameter_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("clsEdex_bl_parameter::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>iBlvparamnr</LI>
|
||||
' /// <LI>iBlvfunktion. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iBlvdokumenttypnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sTxtGrundlage1. May be SqlString.Null</LI>
|
||||
' /// <LI>sTxtGrundlage2. May be SqlString.Null</LI>
|
||||
' /// <LI>sTxtGrundlage3. May be SqlString.Null</LI>
|
||||
' /// <LI>sTxtGrundlage4. May be SqlString.Null</LI>
|
||||
' /// <LI>sTxtArt1. May be SqlString.Null</LI>
|
||||
' /// <LI>sTxtArt2. May be SqlString.Null</LI>
|
||||
' /// <LI>sTxtForm1. May be SqlString.Null</LI>
|
||||
' /// <LI>sTxtForm2. May be SqlString.Null</LI>
|
||||
' /// <LI>sTxtbeilage1. May be SqlString.Null</LI>
|
||||
' /// <LI>sTxtbeilage2. May be SqlString.Null</LI>
|
||||
' /// <LI>sTxtQuittung1. May be SqlString.Null</LI>
|
||||
' /// <LI>sTxtQuittung2. 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_edex_bl_edex_bl_parameter_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iblvparamnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBlvparamnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iblvfunktion", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBlvfunktion))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iblvdokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBlvdokumenttypnr))
|
||||
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("@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("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtGrundlage1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtGrundlage1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtGrundlage2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtGrundlage2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtGrundlage3", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtGrundlage3))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtGrundlage4", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtGrundlage4))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtArt1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtArt1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtArt2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtArt2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtForm1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtForm1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtForm2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtForm2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtbeilage1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtbeilage1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtbeilage2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtbeilage2))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtQuittung1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtQuittung1))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@stxtQuittung2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTxtQuittung2))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_bl_edex_bl_parameter_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("clsEdex_bl_parameter::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>iBlvparamnr</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_edex_bl_edex_bl_parameter_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iblvparamnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBlvparamnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_bl_edex_bl_parameter_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("clsEdex_bl_parameter::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>iBlvparamnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iBlvparamnr</LI>
|
||||
' /// <LI>iBlvfunktion</LI>
|
||||
' /// <LI>iBlvdokumenttypnr</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>iMandantnr</LI>
|
||||
' /// <LI>iMutierer</LI>
|
||||
' /// <LI>sTxtGrundlage1</LI>
|
||||
' /// <LI>sTxtGrundlage2</LI>
|
||||
' /// <LI>sTxtGrundlage3</LI>
|
||||
' /// <LI>sTxtGrundlage4</LI>
|
||||
' /// <LI>sTxtArt1</LI>
|
||||
' /// <LI>sTxtArt2</LI>
|
||||
' /// <LI>sTxtForm1</LI>
|
||||
' /// <LI>sTxtForm2</LI>
|
||||
' /// <LI>sTxtbeilage1</LI>
|
||||
' /// <LI>sTxtbeilage2</LI>
|
||||
' /// <LI>sTxtQuittung1</LI>
|
||||
' /// <LI>sTxtQuittung2</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_edex_bl_edex_bl_parameter_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("edex_bl_parameter")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iblvparamnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBlvparamnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_bl_edex_bl_parameter_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iBlvparamnr = New SqlInt32(CType(dtToReturn.Rows(0)("blvparamnr"), Integer))
|
||||
If dtToReturn.Rows(0)("blvfunktion") Is System.DBNull.Value Then
|
||||
m_iBlvfunktion = SqlInt32.Null
|
||||
Else
|
||||
m_iBlvfunktion = New SqlInt32(CType(dtToReturn.Rows(0)("blvfunktion"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("blvdokumenttypnr") Is System.DBNull.Value Then
|
||||
m_iBlvdokumenttypnr = SqlInt32.Null
|
||||
Else
|
||||
m_iBlvdokumenttypnr = New SqlInt32(CType(dtToReturn.Rows(0)("blvdokumenttypnr"), 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)("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)("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)("txtGrundlage1") Is System.DBNull.Value Then
|
||||
m_sTxtGrundlage1 = SqlString.Null
|
||||
Else
|
||||
m_sTxtGrundlage1 = New SqlString(CType(dtToReturn.Rows(0)("txtGrundlage1"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("txtGrundlage2") Is System.DBNull.Value Then
|
||||
m_sTxtGrundlage2 = SqlString.Null
|
||||
Else
|
||||
m_sTxtGrundlage2 = New SqlString(CType(dtToReturn.Rows(0)("txtGrundlage2"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("txtGrundlage3") Is System.DBNull.Value Then
|
||||
m_sTxtGrundlage3 = SqlString.Null
|
||||
Else
|
||||
m_sTxtGrundlage3 = New SqlString(CType(dtToReturn.Rows(0)("txtGrundlage3"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("txtGrundlage4") Is System.DBNull.Value Then
|
||||
m_sTxtGrundlage4 = SqlString.Null
|
||||
Else
|
||||
m_sTxtGrundlage4 = New SqlString(CType(dtToReturn.Rows(0)("txtGrundlage4"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("txtArt1") Is System.DBNull.Value Then
|
||||
m_sTxtArt1 = SqlString.Null
|
||||
Else
|
||||
m_sTxtArt1 = New SqlString(CType(dtToReturn.Rows(0)("txtArt1"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("txtArt2") Is System.DBNull.Value Then
|
||||
m_sTxtArt2 = SqlString.Null
|
||||
Else
|
||||
m_sTxtArt2 = New SqlString(CType(dtToReturn.Rows(0)("txtArt2"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("txtForm1") Is System.DBNull.Value Then
|
||||
m_sTxtForm1 = SqlString.Null
|
||||
Else
|
||||
m_sTxtForm1 = New SqlString(CType(dtToReturn.Rows(0)("txtForm1"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("txtForm2") Is System.DBNull.Value Then
|
||||
m_sTxtForm2 = SqlString.Null
|
||||
Else
|
||||
m_sTxtForm2 = New SqlString(CType(dtToReturn.Rows(0)("txtForm2"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("txtbeilage1") Is System.DBNull.Value Then
|
||||
m_sTxtbeilage1 = SqlString.Null
|
||||
Else
|
||||
m_sTxtbeilage1 = New SqlString(CType(dtToReturn.Rows(0)("txtbeilage1"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("txtbeilage2") Is System.DBNull.Value Then
|
||||
m_sTxtbeilage2 = SqlString.Null
|
||||
Else
|
||||
m_sTxtbeilage2 = New SqlString(CType(dtToReturn.Rows(0)("txtbeilage2"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("txtQuittung1") Is System.DBNull.Value Then
|
||||
m_sTxtQuittung1 = SqlString.Null
|
||||
Else
|
||||
m_sTxtQuittung1 = New SqlString(CType(dtToReturn.Rows(0)("txtQuittung1"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("txtQuittung2") Is System.DBNull.Value Then
|
||||
m_sTxtQuittung2 = SqlString.Null
|
||||
Else
|
||||
m_sTxtQuittung2 = New SqlString(CType(dtToReturn.Rows(0)("txtQuittung2"), 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("clsEdex_bl_parameter::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_edex_bl_edex_bl_parameter_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("edex_bl_parameter")
|
||||
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_edex_bl_edex_bl_parameter_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("clsEdex_bl_parameter::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 [iBlvparamnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iBlvparamnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iBlvparamnrTmp As SqlInt32 = Value
|
||||
If iBlvparamnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iBlvparamnr", "iBlvparamnr can't be NULL")
|
||||
End If
|
||||
m_iBlvparamnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iBlvfunktion]() As SqlInt32
|
||||
Get
|
||||
Return m_iBlvfunktion
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iBlvfunktion = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iBlvdokumenttypnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iBlvdokumenttypnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iBlvdokumenttypnr = 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 [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 [iMutierer]() As SqlInt32
|
||||
Get
|
||||
Return m_iMutierer
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iMutierer = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sTxtGrundlage1]() As SqlString
|
||||
Get
|
||||
Return m_sTxtGrundlage1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sTxtGrundlage1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sTxtGrundlage2]() As SqlString
|
||||
Get
|
||||
Return m_sTxtGrundlage2
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sTxtGrundlage2 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sTxtGrundlage3]() As SqlString
|
||||
Get
|
||||
Return m_sTxtGrundlage3
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sTxtGrundlage3 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sTxtGrundlage4]() As SqlString
|
||||
Get
|
||||
Return m_sTxtGrundlage4
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sTxtGrundlage4 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sTxtArt1]() As SqlString
|
||||
Get
|
||||
Return m_sTxtArt1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sTxtArt1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sTxtArt2]() As SqlString
|
||||
Get
|
||||
Return m_sTxtArt2
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sTxtArt2 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sTxtForm1]() As SqlString
|
||||
Get
|
||||
Return m_sTxtForm1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sTxtForm1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sTxtForm2]() As SqlString
|
||||
Get
|
||||
Return m_sTxtForm2
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sTxtForm2 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sTxtbeilage1]() As SqlString
|
||||
Get
|
||||
Return m_sTxtbeilage1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sTxtbeilage1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sTxtbeilage2]() As SqlString
|
||||
Get
|
||||
Return m_sTxtbeilage2
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sTxtbeilage2 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sTxtQuittung1]() As SqlString
|
||||
Get
|
||||
Return m_sTxtQuittung1
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sTxtQuittung1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sTxtQuittung2]() As SqlString
|
||||
Get
|
||||
Return m_sTxtQuittung2
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sTxtQuittung2 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
619
Backup/EDOKA/DB/EDEX/clsEdex_dokumentpaket.vb
Normal file
619
Backup/EDOKA/DB/EDEX/clsEdex_dokumentpaket.vb
Normal file
@@ -0,0 +1,619 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'edex_dokumentpaket'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 16. Januar 2005, 23:00: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 'edex_dokumentpaket'.
|
||||
' /// </summary>
|
||||
Public Class clsEdex_dokumentpaket
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bAktiv, m_bIndividuelles_dp As SqlBoolean
|
||||
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
|
||||
Private m_blobDpbeschreibung As SqlBinary
|
||||
Private m_iSort, m_iMutierer, m_iMandantnr, m_iDokumentpaketnr, m_iOwner, m_iDokumentartnr As SqlInt32
|
||||
Private m_sWichtigehinweise, 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>iDokumentpaketnr</LI>
|
||||
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
|
||||
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
|
||||
' /// <LI>iOwner. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bIndividuelles_dp. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>blobDpbeschreibung. May be SqlBinary.Null</LI>
|
||||
' /// <LI>iDokumentartnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sWichtigehinweise. May be SqlString.Null</LI>
|
||||
' /// <LI>iSort. 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.[edex_pr_edex_dokumentpaket_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentpaketnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketnr))
|
||||
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))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iowner", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iOwner))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bindividuelles_dp", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bIndividuelles_dp))
|
||||
Dim iLength As Integer = 0
|
||||
If Not m_blobDpbeschreibung.IsNull Then
|
||||
iLength = m_blobDpbeschreibung.Length
|
||||
End If
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobdpbeschreibung", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobDpbeschreibung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentartnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentartnr))
|
||||
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("@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("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@swichtigehinweise", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sWichtigehinweise))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@isort", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSort))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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 'edex_pr_edex_dokumentpaket_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("clsEdex_dokumentpaket::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>iDokumentpaketnr</LI>
|
||||
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
|
||||
' /// <LI>sBeschreibung. May be SqlString.Null</LI>
|
||||
' /// <LI>iOwner. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bIndividuelles_dp. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>blobDpbeschreibung. May be SqlBinary.Null</LI>
|
||||
' /// <LI>iDokumentartnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sWichtigehinweise. May be SqlString.Null</LI>
|
||||
' /// <LI>iSort. 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.[edex_pr_edex_dokumentpaket_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentpaketnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketnr))
|
||||
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))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iowner", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iOwner))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bindividuelles_dp", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bIndividuelles_dp))
|
||||
Dim iLength As Integer = 0
|
||||
If Not m_blobDpbeschreibung.IsNull Then
|
||||
iLength = m_blobDpbeschreibung.Length
|
||||
End If
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobdpbeschreibung", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobDpbeschreibung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentartnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentartnr))
|
||||
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("@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("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@swichtigehinweise", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sWichtigehinweise))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@isort", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSort))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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 'edex_pr_edex_dokumentpaket_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("clsEdex_dokumentpaket::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>iDokumentpaketnr</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.[edex_pr_edex_dokumentpaket_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentpaketnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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 'edex_pr_edex_dokumentpaket_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("clsEdex_dokumentpaket::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>iDokumentpaketnr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iDokumentpaketnr</LI>
|
||||
' /// <LI>sBezeichnung</LI>
|
||||
' /// <LI>sBeschreibung</LI>
|
||||
' /// <LI>iOwner</LI>
|
||||
' /// <LI>bIndividuelles_dp</LI>
|
||||
' /// <LI>blobDpbeschreibung</LI>
|
||||
' /// <LI>iDokumentartnr</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>iMandantnr</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>iMutierer</LI>
|
||||
' /// <LI>sWichtigehinweise</LI>
|
||||
' /// <LI>iSort</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.[edex_pr_edex_dokumentpaket_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("edex_dokumentpaket")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@idokumentpaketnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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 'edex_pr_edex_dokumentpaket_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iDokumentpaketnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumentpaketnr"), 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)("owner") Is System.DBNull.Value Then
|
||||
m_iOwner = SqlInt32.Null
|
||||
Else
|
||||
m_iOwner = New SqlInt32(CType(dtToReturn.Rows(0)("owner"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("individuelles_dp") Is System.DBNull.Value Then
|
||||
m_bIndividuelles_dp = SqlBoolean.Null
|
||||
Else
|
||||
m_bIndividuelles_dp = New SqlBoolean(CType(dtToReturn.Rows(0)("individuelles_dp"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("dpbeschreibung") Is System.DBNull.Value Then
|
||||
m_blobDpbeschreibung = SqlBinary.Null
|
||||
Else
|
||||
m_blobDpbeschreibung = New SqlBinary(CType(dtToReturn.Rows(0)("dpbeschreibung"), Byte()))
|
||||
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)("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)("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)("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)("wichtigehinweise") Is System.DBNull.Value Then
|
||||
m_sWichtigehinweise = SqlString.Null
|
||||
Else
|
||||
m_sWichtigehinweise = New SqlString(CType(dtToReturn.Rows(0)("wichtigehinweise"), String))
|
||||
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
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsEdex_dokumentpaket::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.[edex_pr_edex_dokumentpaket_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("edex_dokumentpaket")
|
||||
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 'edex_pr_edex_dokumentpaket_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("clsEdex_dokumentpaket::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 [iDokumentpaketnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iDokumentpaketnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iDokumentpaketnrTmp As SqlInt32 = Value
|
||||
If iDokumentpaketnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iDokumentpaketnr", "iDokumentpaketnr can't be NULL")
|
||||
End If
|
||||
m_iDokumentpaketnr = 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 [iOwner]() As SqlInt32
|
||||
Get
|
||||
Return m_iOwner
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iOwner = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bIndividuelles_dp]() As SqlBoolean
|
||||
Get
|
||||
Return m_bIndividuelles_dp
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bIndividuelles_dp = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [blobDpbeschreibung]() As SqlBinary
|
||||
Get
|
||||
Return m_blobDpbeschreibung
|
||||
End Get
|
||||
Set(ByVal Value As SqlBinary)
|
||||
m_blobDpbeschreibung = 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 [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 [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 [iMutierer]() As SqlInt32
|
||||
Get
|
||||
Return m_iMutierer
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iMutierer = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sWichtigehinweise]() As SqlString
|
||||
Get
|
||||
Return m_sWichtigehinweise
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sWichtigehinweise = 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
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
530
Backup/EDOKA/DB/EDEX/clsEdex_dokumentpaketvorlage.vb
Normal file
530
Backup/EDOKA/DB/EDEX/clsEdex_dokumentpaketvorlage.vb
Normal file
@@ -0,0 +1,530 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'edex_dokumentpaketvorlage'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Donnerstag, 6. Januar 2005, 23:03: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 'edex_dokumentpaketvorlage'.
|
||||
' /// </summary>
|
||||
Public Class clsEdex_dokumentpaketvorlage
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bAktiv As SqlBoolean
|
||||
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
|
||||
Private m_iDokumentpaketvorlagenr, m_iSort, m_iImageindex, m_iMandantnr, m_iZwingend, m_iDokumenttypnr, m_iDokumentpaketnr 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>iDokumentpaketnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iZwingend. May be SqlInt32.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>iSort. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iImageindex. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iDokumentpaketvorlagenr</LI>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[edex_pr_edex_dokumentpaketvorlage_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentpaketnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@izwingend", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iZwingend))
|
||||
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("@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("@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("@idokumentpaketvorlagenr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketvorlagenr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_iDokumentpaketvorlagenr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@idokumentpaketvorlagenr").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 'edex_pr_edex_dokumentpaketvorlage_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("clsEdex_dokumentpaketvorlage::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>iDokumentpaketvorlagenr</LI>
|
||||
' /// <LI>iDokumentpaketnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iZwingend. May be SqlInt32.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>iSort. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iImageindex. 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.[edex_pr_edex_dokumentpaketvorlage_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentpaketvorlagenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketvorlagenr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentpaketnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@izwingend", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iZwingend))
|
||||
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("@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("@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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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 'edex_pr_edex_dokumentpaketvorlage_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("clsEdex_dokumentpaketvorlage::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>iDokumentpaketvorlagenr</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.[edex_pr_edex_dokumentpaketvorlage_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumentpaketvorlagenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketvorlagenr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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 'edex_pr_edex_dokumentpaketvorlage_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("clsEdex_dokumentpaketvorlage::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>iDokumentpaketvorlagenr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iDokumentpaketvorlagenr</LI>
|
||||
' /// <LI>iDokumentpaketnr</LI>
|
||||
' /// <LI>iDokumenttypnr</LI>
|
||||
' /// <LI>iZwingend</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>iMandantnr</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>iSort</LI>
|
||||
' /// <LI>iImageindex</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.[edex_pr_edex_dokumentpaketvorlage_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("edex_dokumentpaketvorlage")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@idokumentpaketvorlagenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketvorlagenr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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 'edex_pr_edex_dokumentpaketvorlage_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iDokumentpaketvorlagenr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumentpaketvorlagenr"), Integer))
|
||||
If dtToReturn.Rows(0)("dokumentpaketnr") Is System.DBNull.Value Then
|
||||
m_iDokumentpaketnr = SqlInt32.Null
|
||||
Else
|
||||
m_iDokumentpaketnr = New SqlInt32(CType(dtToReturn.Rows(0)("dokumentpaketnr"), 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)("zwingend") Is System.DBNull.Value Then
|
||||
m_iZwingend = SqlInt32.Null
|
||||
Else
|
||||
m_iZwingend = New SqlInt32(CType(dtToReturn.Rows(0)("zwingend"), 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)("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)("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
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsEdex_dokumentpaketvorlage::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.[edex_pr_edex_dokumentpaketvorlage_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("edex_dokumentpaketvorlage")
|
||||
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 'edex_pr_edex_dokumentpaketvorlage_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("clsEdex_dokumentpaketvorlage::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 [iDokumentpaketvorlagenr]() As SqlInt32
|
||||
Get
|
||||
Return m_iDokumentpaketvorlagenr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iDokumentpaketvorlagenrTmp As SqlInt32 = Value
|
||||
If iDokumentpaketvorlagenrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iDokumentpaketvorlagenr", "iDokumentpaketvorlagenr can't be NULL")
|
||||
End If
|
||||
m_iDokumentpaketvorlagenr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iDokumentpaketnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iDokumentpaketnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iDokumentpaketnr = 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 [iZwingend]() As SqlInt32
|
||||
Get
|
||||
Return m_iZwingend
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iZwingend = 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 [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 [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
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
600
Backup/EDOKA/DB/EDEX/clsEdex_dpinstanz.vb
Normal file
600
Backup/EDOKA/DB/EDEX/clsEdex_dpinstanz.vb
Normal file
@@ -0,0 +1,600 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'edex_dpinstanz'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 8. Februar 2005, 10:41: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 'edex_dpinstanz'.
|
||||
' /// </summary>
|
||||
Public Class clsEdex_dpinstanz
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bIndividuellesDP As SqlBoolean
|
||||
Private m_daErstellt_am As SqlDateTime
|
||||
Private m_iDokumentpaketnr, m_iProfilnr, m_iNrpar00, m_iMitarbeiternr, m_iNreintrag As SqlInt32
|
||||
Private m_sHacken, m_sDokumentpaketnummern 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>sDokumentpaketnummern. May be SqlString.Null</LI>
|
||||
' /// <LI>sHacken. May be SqlString.Null</LI>
|
||||
' /// <LI>iNrpar00. May be SqlInt32.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iDokumentpaketnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bIndividuellesDP. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>iProfilnr. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iNreintrag</LI>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[edex_pr_edex_dpinstanz_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("@sdokumentpaketnummern", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentpaketnummern))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@shacken", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sHacken))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@inrpar00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNrpar00))
|
||||
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("@iDokumentpaketnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bIndividuellesDP", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bIndividuellesDP))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iProfilnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iProfilnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Output, True, 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_iNreintrag = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@inreintrag").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 'edex_pr_edex_dpinstanz_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("clsEdex_dpinstanz::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>iMitarbeiternr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>sDokumentpaketnummern. May be SqlString.Null</LI>
|
||||
' /// <LI>sHacken. May be SqlString.Null</LI>
|
||||
' /// <LI>iNrpar00. May be SqlInt32.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iDokumentpaketnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bIndividuellesDP. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>iProfilnr. 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.[edex_pr_edex_dpinstanz_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("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentpaketnummern", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentpaketnummern))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@shacken", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sHacken))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@inrpar00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNrpar00))
|
||||
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("@iDokumentpaketnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumentpaketnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@bIndividuellesDP", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bIndividuellesDP))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iProfilnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iProfilnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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 'edex_pr_edex_dpinstanz_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("clsEdex_dpinstanz::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.[edex_pr_edex_dpinstanz_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 'edex_pr_edex_dpinstanz_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("clsEdex_dpinstanz::Delete::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
Public Function SelectByDPNr(ByVal DPNr As Integer) As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[edex_pr_edex_dpinstanz_SelectByDPNr]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("edex_dpinstanz")
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@DPNR", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, DPNr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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 'edex_pr_edex_dpinstanz_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)("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)("dokumentpaketnummern") Is System.DBNull.Value Then
|
||||
m_sDokumentpaketnummern = SqlString.Null
|
||||
Else
|
||||
m_sDokumentpaketnummern = New SqlString(CType(dtToReturn.Rows(0)("dokumentpaketnummern"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("hacken") Is System.DBNull.Value Then
|
||||
m_sHacken = SqlString.Null
|
||||
Else
|
||||
m_sHacken = New SqlString(CType(dtToReturn.Rows(0)("hacken"), String))
|
||||
End If
|
||||
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)("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)("Dokumentpaketnr") Is System.DBNull.Value Then
|
||||
m_iDokumentpaketnr = SqlInt32.Null
|
||||
Else
|
||||
m_iDokumentpaketnr = New SqlInt32(CType(dtToReturn.Rows(0)("Dokumentpaketnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("IndividuellesDP") Is System.DBNull.Value Then
|
||||
m_bIndividuellesDP = SqlBoolean.Null
|
||||
Else
|
||||
m_bIndividuellesDP = New SqlBoolean(CType(dtToReturn.Rows(0)("IndividuellesDP"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Profilnr") Is System.DBNull.Value Then
|
||||
m_iProfilnr = SqlInt32.Null
|
||||
Else
|
||||
m_iProfilnr = New SqlInt32(CType(dtToReturn.Rows(0)("Profilnr"), 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("clsEdex_dpinstanz::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. 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>iMitarbeiternr</LI>
|
||||
' /// <LI>sDokumentpaketnummern</LI>
|
||||
' /// <LI>sHacken</LI>
|
||||
' /// <LI>iNrpar00</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>iDokumentpaketnr</LI>
|
||||
' /// <LI>bIndividuellesDP</LI>
|
||||
' /// <LI>iProfilnr</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.[edex_pr_edex_dpinstanz_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("edex_dpinstanz")
|
||||
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 'edex_pr_edex_dpinstanz_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)("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)("dokumentpaketnummern") Is System.DBNull.Value Then
|
||||
m_sDokumentpaketnummern = SqlString.Null
|
||||
Else
|
||||
m_sDokumentpaketnummern = New SqlString(CType(dtToReturn.Rows(0)("dokumentpaketnummern"), String))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("hacken") Is System.DBNull.Value Then
|
||||
m_sHacken = SqlString.Null
|
||||
Else
|
||||
m_sHacken = New SqlString(CType(dtToReturn.Rows(0)("hacken"), String))
|
||||
End If
|
||||
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)("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)("Dokumentpaketnr") Is System.DBNull.Value Then
|
||||
m_iDokumentpaketnr = SqlInt32.Null
|
||||
Else
|
||||
m_iDokumentpaketnr = New SqlInt32(CType(dtToReturn.Rows(0)("Dokumentpaketnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("IndividuellesDP") Is System.DBNull.Value Then
|
||||
m_bIndividuellesDP = SqlBoolean.Null
|
||||
Else
|
||||
m_bIndividuellesDP = New SqlBoolean(CType(dtToReturn.Rows(0)("IndividuellesDP"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("Profilnr") Is System.DBNull.Value Then
|
||||
m_iProfilnr = SqlInt32.Null
|
||||
Else
|
||||
m_iProfilnr = New SqlInt32(CType(dtToReturn.Rows(0)("Profilnr"), 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("clsEdex_dpinstanz::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.[edex_pr_edex_dpinstanz_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("edex_dpinstanz")
|
||||
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 'edex_pr_edex_dpinstanz_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("clsEdex_dpinstanz::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 [iMitarbeiternr]() As SqlInt32
|
||||
Get
|
||||
Return m_iMitarbeiternr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iMitarbeiternr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sDokumentpaketnummern]() As SqlString
|
||||
Get
|
||||
Return m_sDokumentpaketnummern
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sDokumentpaketnummern = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sHacken]() As SqlString
|
||||
Get
|
||||
Return m_sHacken
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sHacken = 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 [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 [iDokumentpaketnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iDokumentpaketnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iDokumentpaketnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bIndividuellesDP]() As SqlBoolean
|
||||
Get
|
||||
Return m_bIndividuellesDP
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bIndividuellesDP = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iProfilnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iProfilnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iProfilnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
511
Backup/EDOKA/DB/EDEX/clsEdex_sb_notizen.vb
Normal file
511
Backup/EDOKA/DB/EDEX/clsEdex_sb_notizen.vb
Normal file
@@ -0,0 +1,511 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'edex_sb_notizen'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Montag, 31. Oktober 2005, 13:44: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 'edex_sb_notizen'.
|
||||
' /// </summary>
|
||||
Public Class clsEdex_sb_notizen
|
||||
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_iSerienbriefnr, m_iNotiznr As SqlInt32
|
||||
Private 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>iSerienbriefnr. May be SqlInt32.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_edex_sb_notizen_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iserienbriefnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSerienbriefnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbetreff", SqlDbType.VarChar, 255, 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_edex_sb_notizen_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("clsEdex_sb_notizen::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>iSerienbriefnr. May be SqlInt32.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_edex_sb_notizen_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("@iserienbriefnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSerienbriefnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbetreff", SqlDbType.VarChar, 255, 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_edex_sb_notizen_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("clsEdex_sb_notizen::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_edex_sb_notizen_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_edex_sb_notizen_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("clsEdex_sb_notizen::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>iSerienbriefnr</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_edex_sb_notizen_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("edex_sb_notizen")
|
||||
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_edex_sb_notizen_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)("serienbriefnr") Is System.DBNull.Value Then
|
||||
m_iSerienbriefnr = SqlInt32.Null
|
||||
Else
|
||||
m_iSerienbriefnr = New SqlInt32(CType(dtToReturn.Rows(0)("serienbriefnr"), Integer))
|
||||
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("clsEdex_sb_notizen::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_edex_sb_notizen_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("edex_sb_notizen")
|
||||
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_edex_sb_notizen_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("clsEdex_sb_notizen::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 [iSerienbriefnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iSerienbriefnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iSerienbriefnr = 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
|
||||
540
Backup/EDOKA/DB/EDEX/clsEdex_sb_partnerliste.vb
Normal file
540
Backup/EDOKA/DB/EDEX/clsEdex_sb_partnerliste.vb
Normal file
@@ -0,0 +1,540 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'edex_sb_partnerliste'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 7. September 2005, 08:30:57
|
||||
' // 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 'edex_sb_partnerliste'.
|
||||
' /// </summary>
|
||||
Public Class clsEdex_sb_partnerliste
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bAktiv As SqlBoolean
|
||||
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
|
||||
Private m_blobEmpfaenger As SqlBinary
|
||||
Private m_iVerwendung, m_iVerwendungcd, m_iPartnerlistenr, 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>sBezeichnung. May be SqlString.Null</LI>
|
||||
' /// <LI>sBeschreibung. 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>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>iVerwendung. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iVerwendungcd. May be SqlInt32.Null</LI>
|
||||
' /// <LI>blobEmpfaenger. May be SqlBinary.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iPartnerlistenr</LI>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_edex_sb_partnerliste_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
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, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
|
||||
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("@iverwendung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerwendung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iverwendungcd", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerwendungcd))
|
||||
Dim iLength As Integer = 0
|
||||
If Not m_blobEmpfaenger.IsNull Then
|
||||
iLength = m_blobEmpfaenger.Length
|
||||
End If
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobempfaenger", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobEmpfaenger))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@ipartnerlistenr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iPartnerlistenr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_iPartnerlistenr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@ipartnerlistenr").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_edex_sb_partnerliste_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("clsEdex_sb_partnerliste::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>iPartnerlistenr</LI>
|
||||
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
|
||||
' /// <LI>sBeschreibung. 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>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>iVerwendung. May be SqlInt32.Null</LI>
|
||||
' /// <LI>iVerwendungcd. May be SqlInt32.Null</LI>
|
||||
' /// <LI>blobEmpfaenger. 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_edex_sb_partnerliste_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ipartnerlistenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPartnerlistenr))
|
||||
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, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
|
||||
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("@iverwendung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerwendung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iverwendungcd", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerwendungcd))
|
||||
Dim iLength As Integer = 0
|
||||
If Not m_blobEmpfaenger.IsNull Then
|
||||
iLength = m_blobEmpfaenger.Length
|
||||
End If
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobempfaenger", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobEmpfaenger))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_sb_partnerliste_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("clsEdex_sb_partnerliste::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>iPartnerlistenr</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_edex_sb_partnerliste_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ipartnerlistenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPartnerlistenr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_sb_partnerliste_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("clsEdex_sb_partnerliste::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>iPartnerlistenr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iPartnerlistenr</LI>
|
||||
' /// <LI>sBezeichnung</LI>
|
||||
' /// <LI>sBeschreibung</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>iMutierer</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>iVerwendung</LI>
|
||||
' /// <LI>iVerwendungcd</LI>
|
||||
' /// <LI>blobEmpfaenger</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_edex_sb_partnerliste_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("edex_sb_partnerliste")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@ipartnerlistenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPartnerlistenr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_sb_partnerliste_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iPartnerlistenr = New SqlInt32(CType(dtToReturn.Rows(0)("partnerlistenr"), 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)("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)("verwendung") Is System.DBNull.Value Then
|
||||
m_iVerwendung = SqlInt32.Null
|
||||
Else
|
||||
m_iVerwendung = New SqlInt32(CType(dtToReturn.Rows(0)("verwendung"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("verwendungcd") Is System.DBNull.Value Then
|
||||
m_iVerwendungcd = SqlInt32.Null
|
||||
Else
|
||||
m_iVerwendungcd = New SqlInt32(CType(dtToReturn.Rows(0)("verwendungcd"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("empfaenger") Is System.DBNull.Value Then
|
||||
m_blobEmpfaenger = SqlBinary.Null
|
||||
Else
|
||||
m_blobEmpfaenger = New SqlBinary(CType(dtToReturn.Rows(0)("empfaenger"), 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("clsEdex_sb_partnerliste::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_edex_sb_partnerliste_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("edex_sb_partnerliste")
|
||||
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_edex_sb_partnerliste_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("clsEdex_sb_partnerliste::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 [iPartnerlistenr]() As SqlInt32
|
||||
Get
|
||||
Return m_iPartnerlistenr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iPartnerlistenrTmp As SqlInt32 = Value
|
||||
If iPartnerlistenrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iPartnerlistenr", "iPartnerlistenr can't be NULL")
|
||||
End If
|
||||
m_iPartnerlistenr = 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 [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 [iVerwendung]() As SqlInt32
|
||||
Get
|
||||
Return m_iVerwendung
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iVerwendung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iVerwendungcd]() As SqlInt32
|
||||
Get
|
||||
Return m_iVerwendungcd
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iVerwendungcd = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [blobEmpfaenger]() As SqlBinary
|
||||
Get
|
||||
Return m_blobEmpfaenger
|
||||
End Get
|
||||
Set(ByVal Value As SqlBinary)
|
||||
m_blobEmpfaenger = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
891
Backup/EDOKA/DB/EDEX/clsEdex_sb_serienbrief.vb
Normal file
891
Backup/EDOKA/DB/EDEX/clsEdex_sb_serienbrief.vb
Normal file
@@ -0,0 +1,891 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'edex_sb_serienbrief'
|
||||
' // Generated by LLBLGen v1.21.2003.712 Final on: Montag, 13. September 2010, 16:18: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 'edex_sb_serienbrief'.
|
||||
''' </summary>
|
||||
Public Class clsEdex_sb_serienbrief
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bAktiv As SqlBoolean
|
||||
Private m_daErstellt_am, m_daArchivdatum, m_daTermin, m_daDokumentdatum, m_daMutiert_am As SqlDateTime
|
||||
Private m_iDokumenttypnr, m_iWindowheight, m_iWindowwidth, m_iTreewidth, m_iBestaetigt, m_iAusgeloest, m_iBldossier, m_iGedruckt, m_iFehlerhaft, m_iInBearbeitung, m_iErstellt, m_iUnterschriftlinks, m_iUnterschriftrechts, m_iZustaendig, m_iVerantwortlich, m_iPostzustellung, m_iMutierer, m_iStatus, m_iSerienbriefnr, m_iTeam As SqlInt32
|
||||
Private m_sBezeichnung, m_sBemerkung 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>sBezeichnung. May be SqlString.Null</LI>
|
||||
''' <LI>iVerantwortlich. May be SqlInt32.Null</LI>
|
||||
''' <LI>iPostzustellung. May be SqlInt32.Null</LI>
|
||||
''' <LI>daDokumentdatum. May be SqlDateTime.Null</LI>
|
||||
''' <LI>iZustaendig. May be SqlInt32.Null</LI>
|
||||
''' <LI>iUnterschriftlinks. May be SqlInt32.Null</LI>
|
||||
''' <LI>iUnterschriftrechts. May be SqlInt32.Null</LI>
|
||||
''' <LI>iTeam. May be SqlInt32.Null</LI>
|
||||
''' <LI>daArchivdatum. May be SqlDateTime.Null</LI>
|
||||
''' <LI>daTermin. May be SqlDateTime.Null</LI>
|
||||
''' <LI>sBemerkung. 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>
|
||||
''' <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
''' <LI>iStatus. May be SqlInt32.Null</LI>
|
||||
''' <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
|
||||
''' <LI>iWindowwidth. May be SqlInt32.Null</LI>
|
||||
''' <LI>iWindowheight. May be SqlInt32.Null</LI>
|
||||
''' <LI>iTreewidth. May be SqlInt32.Null</LI>
|
||||
''' <LI>iFehlerhaft. May be SqlInt32.Null</LI>
|
||||
''' <LI>iInBearbeitung. May be SqlInt32.Null</LI>
|
||||
''' <LI>iErstellt. May be SqlInt32.Null</LI>
|
||||
''' <LI>iGedruckt. May be SqlInt32.Null</LI>
|
||||
''' <LI>iBestaetigt. May be SqlInt32.Null</LI>
|
||||
''' <LI>iAusgeloest. May be SqlInt32.Null</LI>
|
||||
''' <LI>iBldossier. May be SqlInt32.Null</LI>
|
||||
''' </UL>
|
||||
''' Properties set after a succesful call of this method:
|
||||
''' <UL>
|
||||
''' <LI>iSerienbriefnr</LI>
|
||||
''' <LI>iErrorCode</LI>
|
||||
'''</UL>
|
||||
''' </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_edex_sb_serienbrief_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iverantwortlich", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerantwortlich))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ipostzustellung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iPostzustellung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dadokumentdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daDokumentdatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@izustaendig", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iZustaendig))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iunterschriftlinks", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iUnterschriftlinks))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iunterschriftrechts", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iUnterschriftrechts))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iteam", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iTeam))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daarchivdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daArchivdatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@datermin", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daTermin))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbemerkung", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBemerkung))
|
||||
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("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iwindowwidth", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iWindowwidth))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iwindowheight", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iWindowheight))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@itreewidth", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iTreewidth))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifehlerhaft", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFehlerhaft))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iinBearbeitung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iInBearbeitung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ierstellt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iErstellt))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@igedruckt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iGedruckt))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibestaetigt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBestaetigt))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iausgeloest", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAusgeloest))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibldossier", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBldossier))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iserienbriefnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iSerienbriefnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_iSerienbriefnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iserienbriefnr").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_edex_sb_serienbrief_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("clsEdex_sb_serienbrief::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>iSerienbriefnr</LI>
|
||||
''' <LI>sBezeichnung. May be SqlString.Null</LI>
|
||||
''' <LI>iVerantwortlich. May be SqlInt32.Null</LI>
|
||||
''' <LI>iPostzustellung. May be SqlInt32.Null</LI>
|
||||
''' <LI>daDokumentdatum. May be SqlDateTime.Null</LI>
|
||||
''' <LI>iZustaendig. May be SqlInt32.Null</LI>
|
||||
''' <LI>iUnterschriftlinks. May be SqlInt32.Null</LI>
|
||||
''' <LI>iUnterschriftrechts. May be SqlInt32.Null</LI>
|
||||
''' <LI>iTeam. May be SqlInt32.Null</LI>
|
||||
''' <LI>daArchivdatum. May be SqlDateTime.Null</LI>
|
||||
''' <LI>daTermin. May be SqlDateTime.Null</LI>
|
||||
''' <LI>sBemerkung. 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>
|
||||
''' <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
''' <LI>iStatus. May be SqlInt32.Null</LI>
|
||||
''' <LI>iDokumenttypnr. May be SqlInt32.Null</LI>
|
||||
''' <LI>iWindowwidth. May be SqlInt32.Null</LI>
|
||||
''' <LI>iWindowheight. May be SqlInt32.Null</LI>
|
||||
''' <LI>iTreewidth. May be SqlInt32.Null</LI>
|
||||
''' <LI>iFehlerhaft. May be SqlInt32.Null</LI>
|
||||
''' <LI>iInBearbeitung. May be SqlInt32.Null</LI>
|
||||
''' <LI>iErstellt. May be SqlInt32.Null</LI>
|
||||
''' <LI>iGedruckt. May be SqlInt32.Null</LI>
|
||||
''' <LI>iBestaetigt. May be SqlInt32.Null</LI>
|
||||
''' <LI>iAusgeloest. May be SqlInt32.Null</LI>
|
||||
''' <LI>iBldossier. 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_edex_sb_serienbrief_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iserienbriefnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSerienbriefnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iverantwortlich", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerantwortlich))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ipostzustellung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iPostzustellung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@dadokumentdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daDokumentdatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@izustaendig", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iZustaendig))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iunterschriftlinks", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iUnterschriftlinks))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iunterschriftrechts", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iUnterschriftrechts))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iteam", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iTeam))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daarchivdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daArchivdatum))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@datermin", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_daTermin))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbemerkung", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBemerkung))
|
||||
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("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@idokumenttypnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iDokumenttypnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iwindowwidth", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iWindowwidth))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iwindowheight", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iWindowheight))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@itreewidth", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iTreewidth))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifehlerhaft", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFehlerhaft))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iinBearbeitung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iInBearbeitung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ierstellt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iErstellt))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@igedruckt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iGedruckt))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibestaetigt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBestaetigt))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iausgeloest", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAusgeloest))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ibldossier", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBldossier))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_sb_serienbrief_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("clsEdex_sb_serienbrief::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>iSerienbriefnr</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_edex_sb_serienbrief_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iserienbriefnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSerienbriefnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_sb_serienbrief_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("clsEdex_sb_serienbrief::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>iSerienbriefnr</LI>
|
||||
''' </UL>
|
||||
''' Properties set after a succesful call of this method:
|
||||
''' <UL>
|
||||
''' <LI>iErrorCode</LI>
|
||||
''' <LI>iSerienbriefnr</LI>
|
||||
''' <LI>sBezeichnung</LI>
|
||||
''' <LI>iVerantwortlich</LI>
|
||||
''' <LI>iPostzustellung</LI>
|
||||
''' <LI>daDokumentdatum</LI>
|
||||
''' <LI>iZustaendig</LI>
|
||||
''' <LI>iUnterschriftlinks</LI>
|
||||
''' <LI>iUnterschriftrechts</LI>
|
||||
''' <LI>iTeam</LI>
|
||||
''' <LI>daArchivdatum</LI>
|
||||
''' <LI>daTermin</LI>
|
||||
''' <LI>sBemerkung</LI>
|
||||
''' <LI>daErstellt_am</LI>
|
||||
''' <LI>daMutiert_am</LI>
|
||||
''' <LI>iMutierer</LI>
|
||||
''' <LI>bAktiv</LI>
|
||||
''' <LI>iStatus</LI>
|
||||
''' <LI>iDokumenttypnr</LI>
|
||||
''' <LI>iWindowwidth</LI>
|
||||
''' <LI>iWindowheight</LI>
|
||||
''' <LI>iTreewidth</LI>
|
||||
''' <LI>iFehlerhaft</LI>
|
||||
''' <LI>iInBearbeitung</LI>
|
||||
''' <LI>iErstellt</LI>
|
||||
''' <LI>iGedruckt</LI>
|
||||
''' <LI>iBestaetigt</LI>
|
||||
''' <LI>iAusgeloest</LI>
|
||||
''' <LI>iBldossier</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_edex_sb_serienbrief_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("edex_sb_serienbrief")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iserienbriefnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSerienbriefnr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_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_edex_sb_serienbrief_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iSerienbriefnr = New SqlInt32(CType(dtToReturn.Rows(0)("serienbriefnr"), 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)("verantwortlich") Is System.DBNull.Value Then
|
||||
m_iVerantwortlich = SqlInt32.Null
|
||||
Else
|
||||
m_iVerantwortlich = New SqlInt32(CType(dtToReturn.Rows(0)("verantwortlich"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("postzustellung") Is System.DBNull.Value Then
|
||||
m_iPostzustellung = SqlInt32.Null
|
||||
Else
|
||||
m_iPostzustellung = New SqlInt32(CType(dtToReturn.Rows(0)("postzustellung"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("dokumentdatum") Is System.DBNull.Value Then
|
||||
m_daDokumentdatum = SqlDateTime.Null
|
||||
Else
|
||||
m_daDokumentdatum = New SqlDateTime(CType(dtToReturn.Rows(0)("dokumentdatum"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("zustaendig") Is System.DBNull.Value Then
|
||||
m_iZustaendig = SqlInt32.Null
|
||||
Else
|
||||
m_iZustaendig = New SqlInt32(CType(dtToReturn.Rows(0)("zustaendig"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("unterschriftlinks") Is System.DBNull.Value Then
|
||||
m_iUnterschriftlinks = SqlInt32.Null
|
||||
Else
|
||||
m_iUnterschriftlinks = New SqlInt32(CType(dtToReturn.Rows(0)("unterschriftlinks"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("unterschriftrechts") Is System.DBNull.Value Then
|
||||
m_iUnterschriftrechts = SqlInt32.Null
|
||||
Else
|
||||
m_iUnterschriftrechts = New SqlInt32(CType(dtToReturn.Rows(0)("unterschriftrechts"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("team") Is System.DBNull.Value Then
|
||||
m_iTeam = SqlInt32.Null
|
||||
Else
|
||||
m_iTeam = New SqlInt32(CType(dtToReturn.Rows(0)("team"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("archivdatum") Is System.DBNull.Value Then
|
||||
m_daArchivdatum = SqlDateTime.Null
|
||||
Else
|
||||
m_daArchivdatum = New SqlDateTime(CType(dtToReturn.Rows(0)("archivdatum"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("termin") Is System.DBNull.Value Then
|
||||
m_daTermin = SqlDateTime.Null
|
||||
Else
|
||||
m_daTermin = New SqlDateTime(CType(dtToReturn.Rows(0)("termin"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("bemerkung") Is System.DBNull.Value Then
|
||||
m_sBemerkung = SqlString.Null
|
||||
Else
|
||||
m_sBemerkung = New SqlString(CType(dtToReturn.Rows(0)("bemerkung"), 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
|
||||
If dtToReturn.Rows(0)("status") Is System.DBNull.Value Then
|
||||
m_iStatus = SqlInt32.Null
|
||||
Else
|
||||
m_iStatus = New SqlInt32(CType(dtToReturn.Rows(0)("status"), 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)("windowwidth") Is System.DBNull.Value Then
|
||||
m_iWindowwidth = SqlInt32.Null
|
||||
Else
|
||||
m_iWindowwidth = New SqlInt32(CType(dtToReturn.Rows(0)("windowwidth"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("windowheight") Is System.DBNull.Value Then
|
||||
m_iWindowheight = SqlInt32.Null
|
||||
Else
|
||||
m_iWindowheight = New SqlInt32(CType(dtToReturn.Rows(0)("windowheight"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("treewidth") Is System.DBNull.Value Then
|
||||
m_iTreewidth = SqlInt32.Null
|
||||
Else
|
||||
m_iTreewidth = New SqlInt32(CType(dtToReturn.Rows(0)("treewidth"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("fehlerhaft") Is System.DBNull.Value Then
|
||||
m_iFehlerhaft = SqlInt32.Null
|
||||
Else
|
||||
m_iFehlerhaft = New SqlInt32(CType(dtToReturn.Rows(0)("fehlerhaft"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("inBearbeitung") Is System.DBNull.Value Then
|
||||
m_iInBearbeitung = SqlInt32.Null
|
||||
Else
|
||||
m_iInBearbeitung = New SqlInt32(CType(dtToReturn.Rows(0)("inBearbeitung"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("erstellt") Is System.DBNull.Value Then
|
||||
m_iErstellt = SqlInt32.Null
|
||||
Else
|
||||
m_iErstellt = New SqlInt32(CType(dtToReturn.Rows(0)("erstellt"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("gedruckt") Is System.DBNull.Value Then
|
||||
m_iGedruckt = SqlInt32.Null
|
||||
Else
|
||||
m_iGedruckt = New SqlInt32(CType(dtToReturn.Rows(0)("gedruckt"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("bestaetigt") Is System.DBNull.Value Then
|
||||
m_iBestaetigt = SqlInt32.Null
|
||||
Else
|
||||
m_iBestaetigt = New SqlInt32(CType(dtToReturn.Rows(0)("bestaetigt"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("ausgeloest") Is System.DBNull.Value Then
|
||||
m_iAusgeloest = SqlInt32.Null
|
||||
Else
|
||||
m_iAusgeloest = New SqlInt32(CType(dtToReturn.Rows(0)("ausgeloest"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("bldossier") Is System.DBNull.Value Then
|
||||
m_iBldossier = SqlInt32.Null
|
||||
Else
|
||||
m_iBldossier = New SqlInt32(CType(dtToReturn.Rows(0)("bldossier"), 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("clsEdex_sb_serienbrief::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_edex_sb_serienbrief_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("edex_sb_serienbrief")
|
||||
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_edex_sb_serienbrief_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("clsEdex_sb_serienbrief::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 [iSerienbriefnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iSerienbriefnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iSerienbriefnrTmp As SqlInt32 = Value
|
||||
If iSerienbriefnrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iSerienbriefnr", "iSerienbriefnr can't be NULL")
|
||||
End If
|
||||
m_iSerienbriefnr = 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 [iVerantwortlich]() As SqlInt32
|
||||
Get
|
||||
Return m_iVerantwortlich
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iVerantwortlich = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iPostzustellung]() As SqlInt32
|
||||
Get
|
||||
Return m_iPostzustellung
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iPostzustellung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daDokumentdatum]() As SqlDateTime
|
||||
Get
|
||||
Return m_daDokumentdatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daDokumentdatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iZustaendig]() As SqlInt32
|
||||
Get
|
||||
Return m_iZustaendig
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iZustaendig = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iUnterschriftlinks]() As SqlInt32
|
||||
Get
|
||||
Return m_iUnterschriftlinks
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iUnterschriftlinks = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iUnterschriftrechts]() As SqlInt32
|
||||
Get
|
||||
Return m_iUnterschriftrechts
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iUnterschriftrechts = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iTeam]() As SqlInt32
|
||||
Get
|
||||
Return m_iTeam
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iTeam = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daArchivdatum]() As SqlDateTime
|
||||
Get
|
||||
Return m_daArchivdatum
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daArchivdatum = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daTermin]() As SqlDateTime
|
||||
Get
|
||||
Return m_daTermin
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daTermin = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBemerkung]() As SqlString
|
||||
Get
|
||||
Return m_sBemerkung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
m_sBemerkung = 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 [iStatus]() As SqlInt32
|
||||
Get
|
||||
Return m_iStatus
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iStatus = 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 [iWindowwidth]() As SqlInt32
|
||||
Get
|
||||
Return m_iWindowwidth
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iWindowwidth = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iWindowheight]() As SqlInt32
|
||||
Get
|
||||
Return m_iWindowheight
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iWindowheight = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iTreewidth]() As SqlInt32
|
||||
Get
|
||||
Return m_iTreewidth
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iTreewidth = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iFehlerhaft]() As SqlInt32
|
||||
Get
|
||||
Return m_iFehlerhaft
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iFehlerhaft = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iInBearbeitung]() As SqlInt32
|
||||
Get
|
||||
Return m_iInBearbeitung
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iInBearbeitung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iErstellt]() As SqlInt32
|
||||
Get
|
||||
Return m_iErstellt
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iErstellt = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iGedruckt]() As SqlInt32
|
||||
Get
|
||||
Return m_iGedruckt
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iGedruckt = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iBestaetigt]() As SqlInt32
|
||||
Get
|
||||
Return m_iBestaetigt
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iBestaetigt = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iAusgeloest]() As SqlInt32
|
||||
Get
|
||||
Return m_iAusgeloest
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iAusgeloest = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iBldossier]() As SqlInt32
|
||||
Get
|
||||
Return m_iBldossier
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iBldossier = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
368
Backup/EDOKA/DB/Generierte DB Objekte/clsAnreden.vb
Normal file
368
Backup/EDOKA/DB/Generierte DB Objekte/clsAnreden.vb
Normal 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
|
||||
1230
Backup/EDOKA/DB/Generierte DB Objekte/clsApplikation.vb
Normal file
1230
Backup/EDOKA/DB/Generierte DB Objekte/clsApplikation.vb
Normal file
File diff suppressed because it is too large
Load Diff
470
Backup/EDOKA/DB/Generierte DB Objekte/clsBarcodeetikette.vb
Normal file
470
Backup/EDOKA/DB/Generierte DB Objekte/clsBarcodeetikette.vb
Normal 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
|
||||
510
Backup/EDOKA/DB/Generierte DB Objekte/clsCold_folder.vb
Normal file
510
Backup/EDOKA/DB/Generierte DB Objekte/clsCold_folder.vb
Normal 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
|
||||
814
Backup/EDOKA/DB/Generierte DB Objekte/clsColdindex.vb
Normal file
814
Backup/EDOKA/DB/Generierte DB Objekte/clsColdindex.vb
Normal 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
|
||||
368
Backup/EDOKA/DB/Generierte DB Objekte/clsDoks.vb
Normal file
368
Backup/EDOKA/DB/Generierte DB Objekte/clsDoks.vb
Normal 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
|
||||
1890
Backup/EDOKA/DB/Generierte DB Objekte/clsDokument.vb
Normal file
1890
Backup/EDOKA/DB/Generierte DB Objekte/clsDokument.vb
Normal file
File diff suppressed because it is too large
Load Diff
591
Backup/EDOKA/DB/Generierte DB Objekte/clsDokument_status.vb
Normal file
591
Backup/EDOKA/DB/Generierte DB Objekte/clsDokument_status.vb
Normal 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
|
||||
590
Backup/EDOKA/DB/Generierte DB Objekte/clsDokumentart.vb
Normal file
590
Backup/EDOKA/DB/Generierte DB Objekte/clsDokumentart.vb
Normal 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
|
||||
469
Backup/EDOKA/DB/Generierte DB Objekte/clsDokumentaufhebung.vb
Normal file
469
Backup/EDOKA/DB/Generierte DB Objekte/clsDokumentaufhebung.vb
Normal 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
|
||||
@@ -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
|
||||
470
Backup/EDOKA/DB/Generierte DB Objekte/clsDokumentfavoriten.vb
Normal file
470
Backup/EDOKA/DB/Generierte DB Objekte/clsDokumentfavoriten.vb
Normal 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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
649
Backup/EDOKA/DB/Generierte DB Objekte/clsDokumentstatus.vb
Normal file
649
Backup/EDOKA/DB/Generierte DB Objekte/clsDokumentstatus.vb
Normal 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
|
||||
@@ -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
|
||||
489
Backup/EDOKA/DB/Generierte DB Objekte/clsDokumentstatus_rolle.vb
Normal file
489
Backup/EDOKA/DB/Generierte DB Objekte/clsDokumentstatus_rolle.vb
Normal 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
|
||||
1606
Backup/EDOKA/DB/Generierte DB Objekte/clsDokumenttyp.vb
Normal file
1606
Backup/EDOKA/DB/Generierte DB Objekte/clsDokumenttyp.vb
Normal file
File diff suppressed because it is too large
Load Diff
488
Backup/EDOKA/DB/Generierte DB Objekte/clsEdoka_adressen.vb
Normal file
488
Backup/EDOKA/DB/Generierte DB Objekte/clsEdoka_adressen.vb
Normal 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
|
||||
570
Backup/EDOKA/DB/Generierte DB Objekte/clsEdoka_etbez0.vb
Normal file
570
Backup/EDOKA/DB/Generierte DB Objekte/clsEdoka_etbez0.vb
Normal 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
|
||||
1051
Backup/EDOKA/DB/Generierte DB Objekte/clsEdoka_etpar0.vb
Normal file
1051
Backup/EDOKA/DB/Generierte DB Objekte/clsEdoka_etpar0.vb
Normal file
File diff suppressed because it is too large
Load Diff
810
Backup/EDOKA/DB/Generierte DB Objekte/clsEtparn.vb
Normal file
810
Backup/EDOKA/DB/Generierte DB Objekte/clsEtparn.vb
Normal 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
|
||||
691
Backup/EDOKA/DB/Generierte DB Objekte/clsEtparu.vb
Normal file
691
Backup/EDOKA/DB/Generierte DB Objekte/clsEtparu.vb
Normal 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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
490
Backup/EDOKA/DB/Generierte DB Objekte/clsKey_tabelle.vb
Normal file
490
Backup/EDOKA/DB/Generierte DB Objekte/clsKey_tabelle.vb
Normal file
@@ -0,0 +1,490 @@
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
' // Description: Data Access class for the table 'key_tabelle'
|
||||
' // Generated by LLBLGen v1.2.1045.38210 Final on: Samstag, 7. Dezember 2002, 22:50:12
|
||||
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||
' ///////////////////////////////////////////////////////////////////////////
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace edokadb
|
||||
' /// <summary>
|
||||
' /// Purpose: Data Access class for the table 'key_tabelle'.
|
||||
' /// </summary>
|
||||
Public Class clsKey_tabelle
|
||||
Inherits clsDBInteractionBase
|
||||
|
||||
#Region " Class Member Declarations "
|
||||
|
||||
Private m_bAktiv As SqlBoolean
|
||||
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
|
||||
Private m_iMutierer, m_iKeynr, m_iKey_wert, m_iMandantnr As SqlInt32
|
||||
Private m_sBeschreibung As SqlString
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Class constructor.
|
||||
' /// </summary>
|
||||
Public Sub New()
|
||||
' // Nothing for now.
|
||||
End Sub
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iKeynr</LI>
|
||||
' /// <LI>sBeschreibung</LI>
|
||||
' /// <LI>iKey_wert</LI>
|
||||
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Insert() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_key_tabelle_Insert]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikeynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKeynr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikey_wert", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKey_wert))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_key_tabelle_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsKey_tabelle::Insert::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Update method. This method will Update one existing row in the database.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iKeynr</LI>
|
||||
' /// <LI>sBeschreibung</LI>
|
||||
' /// <LI>iKey_wert</LI>
|
||||
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Overrides Public Function Update() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_key_tabelle_Update]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikeynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKeynr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikey_wert", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKey_wert))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_key_tabelle_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsKey_tabelle::Update::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iKeynr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Public Overrides Function Delete() As Boolean
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_key_tabelle_Delete]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikeynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKeynr))
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
scmCmdToExecute.ExecuteNonQuery()
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_key_tabelle_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsKey_tabelle::Delete::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties needed for this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iKeynr</LI>
|
||||
' /// </UL>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// <LI>iKeynr</LI>
|
||||
' /// <LI>sBeschreibung</LI>
|
||||
' /// <LI>iKey_wert</LI>
|
||||
' /// <LI>iMandantnr</LI>
|
||||
' /// <LI>bAktiv</LI>
|
||||
' /// <LI>daErstellt_am</LI>
|
||||
' /// <LI>daMutiert_am</LI>
|
||||
' /// <LI>iMutierer</LI>
|
||||
' /// </UL>
|
||||
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
|
||||
' /// </remarks>
|
||||
Overrides Public Function SelectOne() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_key_tabelle_SelectOne]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = new DataTable("key_tabelle")
|
||||
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@ikeynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKeynr))
|
||||
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_key_tabelle_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
If dtToReturn.Rows.Count > 0 Then
|
||||
m_iKeynr = New SqlInt32(CType(dtToReturn.Rows(0)("keynr"), Integer))
|
||||
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("beschreibung"), String))
|
||||
m_iKey_wert = New SqlInt32(CType(dtToReturn.Rows(0)("key_wert"), Integer))
|
||||
If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then
|
||||
m_iMandantnr = SqlInt32.Null
|
||||
Else
|
||||
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
|
||||
m_bAktiv = SqlBoolean.Null
|
||||
Else
|
||||
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
|
||||
m_daErstellt_am = SqlDateTime.Null
|
||||
Else
|
||||
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
|
||||
m_daMutiert_am = SqlDateTime.Null
|
||||
Else
|
||||
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
|
||||
End If
|
||||
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
|
||||
m_iMutierer = SqlInt32.Null
|
||||
Else
|
||||
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
|
||||
End If
|
||||
End If
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsKey_tabelle::SelectOne::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
' /// <summary>
|
||||
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||
' /// </summary>
|
||||
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||
' /// <remarks>
|
||||
' /// Properties set after a succesful call of this method:
|
||||
' /// <UL>
|
||||
' /// <LI>iErrorCode</LI>
|
||||
' /// </UL>
|
||||
' /// </remarks>
|
||||
Public Overrides Function SelectAll() As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "dbo.[pr_key_tabelle_SelectAll]"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable("key_tabelle")
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
|
||||
' // Use base class' connection object
|
||||
scmCmdToExecute.Connection = m_scoMainConnection
|
||||
|
||||
Try
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Open connection.
|
||||
m_scoMainConnection.Open()
|
||||
Else
|
||||
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||
End If
|
||||
End If
|
||||
|
||||
' // Execute query.
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
|
||||
|
||||
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||
' // Throw error.
|
||||
Throw New Exception("Stored Procedure 'pr_key_tabelle_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||
End If
|
||||
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||
Throw New Exception("clsKey_tabelle::SelectAll::Error occured.", ex)
|
||||
Finally
|
||||
If m_bMainConnectionIsCreatedLocal Then
|
||||
' // Close connection.
|
||||
m_scoMainConnection.Close()
|
||||
End If
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
#Region " Class Property Declarations "
|
||||
|
||||
Public Property [iKeynr]() As SqlInt32
|
||||
Get
|
||||
Return m_iKeynr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iKeynrTmp As SqlInt32 = Value
|
||||
If iKeynrTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iKeynr", "iKeynr can't be NULL")
|
||||
End If
|
||||
m_iKeynr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [sBeschreibung]() As SqlString
|
||||
Get
|
||||
Return m_sBeschreibung
|
||||
End Get
|
||||
Set(ByVal Value As SqlString)
|
||||
Dim sBeschreibungTmp As SqlString = Value
|
||||
If sBeschreibungTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("sBeschreibung", "sBeschreibung can't be NULL")
|
||||
End If
|
||||
m_sBeschreibung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iKey_wert]() As SqlInt32
|
||||
Get
|
||||
Return m_iKey_wert
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
Dim iKey_wertTmp As SqlInt32 = Value
|
||||
If iKey_wertTmp.IsNull Then
|
||||
Throw New ArgumentOutOfRangeException("iKey_wert", "iKey_wert can't be NULL")
|
||||
End If
|
||||
m_iKey_wert = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iMandantnr]() As SqlInt32
|
||||
Get
|
||||
Return m_iMandantnr
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iMandantnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [bAktiv]() As SqlBoolean
|
||||
Get
|
||||
Return m_bAktiv
|
||||
End Get
|
||||
Set(ByVal Value As SqlBoolean)
|
||||
m_bAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daErstellt_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daErstellt_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daErstellt_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [daMutiert_am]() As SqlDateTime
|
||||
Get
|
||||
Return m_daMutiert_am
|
||||
End Get
|
||||
Set(ByVal Value As SqlDateTime)
|
||||
m_daMutiert_am = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property [iMutierer]() As SqlInt32
|
||||
Get
|
||||
Return m_iMutierer
|
||||
End Get
|
||||
Set(ByVal Value As SqlInt32)
|
||||
m_iMutierer = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
986
Backup/EDOKA/DB/Generierte DB Objekte/clsKostenstelle.vb
Normal file
986
Backup/EDOKA/DB/Generierte DB Objekte/clsKostenstelle.vb
Normal 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
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user