Initial
This commit is contained in:
BIN
.vs/EDKB08/v14/.suo
Normal file
BIN
.vs/EDKB08/v14/.suo
Normal file
Binary file not shown.
BIN
.vs/EDKB08/v15/.suo
Normal file
BIN
.vs/EDKB08/v15/.suo
Normal file
Binary file not shown.
0
.vs/EDKB08/v15/Server/sqlite3/db.lock
Normal file
0
.vs/EDKB08/v15/Server/sqlite3/db.lock
Normal file
BIN
.vs/EDKB08/v15/Server/sqlite3/storage.ide
Normal file
BIN
.vs/EDKB08/v15/Server/sqlite3/storage.ide
Normal file
Binary file not shown.
BIN
.vs/EDKB08/v16/.suo
Normal file
BIN
.vs/EDKB08/v16/.suo
Normal file
Binary file not shown.
0
.vs/EDKB08/v16/Server/sqlite3/db.lock
Normal file
0
.vs/EDKB08/v16/Server/sqlite3/db.lock
Normal file
BIN
.vs/EDKB08/v16/Server/sqlite3/storage.ide
Normal file
BIN
.vs/EDKB08/v16/Server/sqlite3/storage.ide
Normal file
Binary file not shown.
BIN
.vs/EDKB08/v17/.suo
Normal file
BIN
.vs/EDKB08/v17/.suo
Normal file
Binary file not shown.
31
AssemblyInfo.vb
Normal file
31
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("5E6C2977-CE7D-4219-82AD-A164F97D2A74")>
|
||||||
|
|
||||||
|
' 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("2.0.*")>
|
||||||
42
EDKB08.sln
Normal file
42
EDKB08.sln
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 15
|
||||||
|
VisualStudioVersion = 15.0.26228.4
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EDKB08", "EDKB08.vbproj", "{1607A887-77A7-475C-BDCC-81B033A314AD}"
|
||||||
|
EndProject
|
||||||
|
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EDKB08_GSF", "..\EDKB08_GSF\EDKB08_GSF.vbproj", "{190A0F46-BF30-4589-8003-361256BCA6F1}"
|
||||||
|
EndProject
|
||||||
|
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EDKB08_GSF_Tester", "..\EDKB08_GSF_Tester\EDKB08_GSF_Tester.vbproj", "{9EA7AA49-DB0E-4962-BE9F-B03847A249C2}"
|
||||||
|
EndProject
|
||||||
|
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EDKB08_VitruvTransfer", "..\EDKB08_VitruvTransfer\EDKB08_VitruvTransfer.vbproj", "{1A22EE57-19C4-4F70-B9B9-0765B9FEA876}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{1607A887-77A7-475C-BDCC-81B033A314AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{1607A887-77A7-475C-BDCC-81B033A314AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{1607A887-77A7-475C-BDCC-81B033A314AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{1607A887-77A7-475C-BDCC-81B033A314AD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{190A0F46-BF30-4589-8003-361256BCA6F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{190A0F46-BF30-4589-8003-361256BCA6F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{190A0F46-BF30-4589-8003-361256BCA6F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{190A0F46-BF30-4589-8003-361256BCA6F1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{9EA7AA49-DB0E-4962-BE9F-B03847A249C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{9EA7AA49-DB0E-4962-BE9F-B03847A249C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{9EA7AA49-DB0E-4962-BE9F-B03847A249C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{9EA7AA49-DB0E-4962-BE9F-B03847A249C2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{1A22EE57-19C4-4F70-B9B9-0765B9FEA876}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{1A22EE57-19C4-4F70-B9B9-0765B9FEA876}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{1A22EE57-19C4-4F70-B9B9-0765B9FEA876}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{1A22EE57-19C4-4F70-B9B9-0765B9FEA876}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
VisualSVNWorkingCopyRoot = ..
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
BIN
EDKB08.v12.suo
Normal file
BIN
EDKB08.v12.suo
Normal file
Binary file not shown.
293
EDKB08.vbproj
Normal file
293
EDKB08.vbproj
Normal file
@@ -0,0 +1,293 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ProjectType>Local</ProjectType>
|
||||||
|
<ProductVersion>8.0.50727</ProductVersion>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ProjectGuid>{1607A887-77A7-475C-BDCC-81B033A314AD}</ProjectGuid>
|
||||||
|
<SccProjectName>
|
||||||
|
</SccProjectName>
|
||||||
|
<SccLocalPath>
|
||||||
|
</SccLocalPath>
|
||||||
|
<SccAuxPath>
|
||||||
|
</SccAuxPath>
|
||||||
|
<SccProvider>
|
||||||
|
</SccProvider>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon>
|
||||||
|
</ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>EDKB08</AssemblyName>
|
||||||
|
<AssemblyOriginatorKeyFile>
|
||||||
|
</AssemblyOriginatorKeyFile>
|
||||||
|
<AssemblyOriginatorKeyMode>None</AssemblyOriginatorKeyMode>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<OptionCompare>Binary</OptionCompare>
|
||||||
|
<OptionExplicit>On</OptionExplicit>
|
||||||
|
<OptionStrict>Off</OptionStrict>
|
||||||
|
<RootNamespace>EDKB08</RootNamespace>
|
||||||
|
<StartupObject>EDKB08.Service1</StartupObject>
|
||||||
|
<FileUpgradeFlags>
|
||||||
|
</FileUpgradeFlags>
|
||||||
|
<MyType>Console</MyType>
|
||||||
|
<UpgradeBackupLocation>
|
||||||
|
</UpgradeBackupLocation>
|
||||||
|
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||||
|
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||||
|
<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>2.0.0.%2a</ApplicationVersion>
|
||||||
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
|
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<OutputPath>bin\</OutputPath>
|
||||||
|
<DocumentationFile>EDKB08.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,42353,42354,42355</NoWarn>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<OutputPath>bin\</OutputPath>
|
||||||
|
<DocumentationFile>EDKB08.xml</DocumentationFile>
|
||||||
|
<BaseAddress>285212672</BaseAddress>
|
||||||
|
<ConfigurationOverrideFile>
|
||||||
|
</ConfigurationOverrideFile>
|
||||||
|
<DefineConstants>
|
||||||
|
</DefineConstants>
|
||||||
|
<DefineDebug>true</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,42353,42354,42355</NoWarn>
|
||||||
|
<DebugType>None</DebugType>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ApplicationManifest>My Project\app.manifest</ApplicationManifest>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="EDKB08_GSF, Version=2.0.5833.25097, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\EDKB08_GSF\bin\EDKB08_GSF.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System">
|
||||||
|
<Name>System</Name>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Configuration.Install">
|
||||||
|
<Name>System.Configuration.Install</Name>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data">
|
||||||
|
<Name>System.Data</Name>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data.OracleClient" />
|
||||||
|
<Reference Include="System.Deployment" />
|
||||||
|
<Reference Include="System.Drawing">
|
||||||
|
<Name>System.Drawing</Name>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.ServiceProcess">
|
||||||
|
<Name>System.ServiceProcess</Name>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Windows.Forms">
|
||||||
|
<Name>system.windows.forms</Name>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Xml">
|
||||||
|
<Name>System.XML</Name>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Import Include="Microsoft.VisualBasic" />
|
||||||
|
<Import Include="System" />
|
||||||
|
<Import Include="System.Collections" />
|
||||||
|
<Import Include="System.Data" />
|
||||||
|
<Import Include="System.Diagnostics" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="AssemblyInfo.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\clsCheckandImport.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\clsDivFnkt.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\clsIndexData.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\clsParameter.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\Datenbank\clsAvaloq.vb" />
|
||||||
|
<Compile Include="edkb08\Datenbank\clsConnectionProvider.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\Datenbank\clsDBInteractionBase.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\Datenbank\clsDokument.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\Datenbank\clsDokumentcoldindexwert.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\Datenbank\clsDokumenttyp.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\Datenbank\clsDokument_status.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\Datenbank\clsEdex_sb_serienbrief.vb" />
|
||||||
|
<Compile Include="edkb08\Datenbank\clsFA_APPL.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\Datenbank\clsFA_BCImport.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\Datenbank\clsFA_Dokumenttyp.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\Datenbank\clsKey_tabelle.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\Datenbank\clsMehrfachscann.vb" />
|
||||||
|
<Compile Include="edkb08\Datenbank\clsMitarbeiter.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\Datenbank\clsMyKey_Tabelle.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\Datenbank\clsMyMitarbeiter.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\Datenbank\clsPartner.vb" />
|
||||||
|
<Compile Include="edkb08\Datenbank\clsPartner_sik.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\Datenbank\clsStatushistory.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\Datenbank\clsVv.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\Datenbank\db_connection.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\Datenbank\Journale\clsImport_Daten.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\Datenbank\Journale\clsImport_Eintrag.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\Datenbank\Journale\clsImport_Job.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\Globals.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\log_report\Class1.vb" />
|
||||||
|
<Compile Include="edkb08\log_report\clsJournal.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\log_report\Export.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="edkb08\Main.vb">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="My Project\Settings.Designer.vb">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ProjectInstaller.vb">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Service1.vb">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Settings.vb" />
|
||||||
|
<EmbeddedResource Include="ProjectInstaller.resx">
|
||||||
|
<DependentUpon>ProjectInstaller.vb</DependentUpon>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Service1.resx">
|
||||||
|
<DependentUpon>Service1.vb</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<None Include="app.config" />
|
||||||
|
<None Include="edkb08\log_report\Dataset1.xsd.bak" />
|
||||||
|
<None Include="edkb08\log_report\Journal.xsx">
|
||||||
|
<DependentUpon>Journal.xsd</DependentUpon>
|
||||||
|
</None>
|
||||||
|
<Content Include="edkb08\log_report\Journal.xsd" />
|
||||||
|
<None Include="My Project\app.manifest" />
|
||||||
|
<None Include="My Project\Settings.settings">
|
||||||
|
<CustomToolNamespace>My</CustomToolNamespace>
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Service Include="{967B4E0D-AD0C-4609-AB67-0FA40C0206D8}" />
|
||||||
|
<Service Include="{C0C07587-41A7-46C8-8FBD-3F9C8EBE2DDC}" />
|
||||||
|
<Service Include="{CF845C55-C321-4742-B673-E6212D061ED9}" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||||
|
<Install>false</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 2.0</ProductName>
|
||||||
|
<Install>true</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 />
|
||||||
|
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<PreBuildEvent>
|
||||||
|
</PreBuildEvent>
|
||||||
|
<PostBuildEvent>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
6
EDKB08.vbproj.user
Normal file
6
EDKB08.vbproj.user
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||||
|
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
10
EDKB08.vbproj.vspscc
Normal file
10
EDKB08.vbproj.vspscc
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
""
|
||||||
|
{
|
||||||
|
"FILE_VERSION" = "9237"
|
||||||
|
"ENLISTMENT_CHOICE" = "NEVER"
|
||||||
|
"PROJECT_FILE_RELATIVE_PATH" = ""
|
||||||
|
"NUMBER_OF_EXCLUDED_FILES" = "0"
|
||||||
|
"ORIGINAL_PROJECT_FILE_PATH" = ""
|
||||||
|
"NUMBER_OF_NESTED_PROJECTS" = "0"
|
||||||
|
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
|
||||||
|
}
|
||||||
10
EDKB08.vssscc
Normal file
10
EDKB08.vssscc
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
""
|
||||||
|
{
|
||||||
|
"FILE_VERSION" = "9237"
|
||||||
|
"ENLISTMENT_CHOICE" = "NEVER"
|
||||||
|
"PROJECT_FILE_RELATIVE_PATH" = ""
|
||||||
|
"NUMBER_OF_EXCLUDED_FILES" = "0"
|
||||||
|
"ORIGINAL_PROJECT_FILE_PATH" = ""
|
||||||
|
"NUMBER_OF_NESTED_PROJECTS" = "0"
|
||||||
|
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT"
|
||||||
|
}
|
||||||
5
GitInit.bat
Normal file
5
GitInit.bat
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
git init
|
||||||
|
git commit -m "first commit"
|
||||||
|
git remote add origin git@localhost:shu/EDKB08_DMS.git
|
||||||
|
git push -u origin main
|
||||||
|
pause
|
||||||
85
My Project/Settings.Designer.vb
generated
Normal file
85
My Project/Settings.Designer.vb
generated
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' Dieser Code wurde von einem Tool generiert.
|
||||||
|
' Laufzeitversion:4.0.30319.34209
|
||||||
|
'
|
||||||
|
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
' der Code erneut generiert wird.
|
||||||
|
' </auto-generated>
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
|
|
||||||
|
Namespace My
|
||||||
|
|
||||||
|
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||||
|
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0"), _
|
||||||
|
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Partial Friend NotInheritable Class MySettings
|
||||||
|
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||||
|
|
||||||
|
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()), MySettings)
|
||||||
|
|
||||||
|
#Region "Funktion zum automatischen Speichern von My.Settings"
|
||||||
|
#If _MyType = "WindowsForms" Then
|
||||||
|
Private Shared addedHandler As Boolean
|
||||||
|
|
||||||
|
Private Shared addedHandlerLockObject As New Object
|
||||||
|
|
||||||
|
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
||||||
|
If My.Application.SaveMySettingsOnExit Then
|
||||||
|
My.Settings.Save()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
#End If
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
Public Shared ReadOnly Property [Default]() As MySettings
|
||||||
|
Get
|
||||||
|
|
||||||
|
#If _MyType = "WindowsForms" Then
|
||||||
|
If Not addedHandler Then
|
||||||
|
SyncLock addedHandlerLockObject
|
||||||
|
If Not addedHandler Then
|
||||||
|
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||||
|
addedHandler = True
|
||||||
|
End If
|
||||||
|
End SyncLock
|
||||||
|
End If
|
||||||
|
#End If
|
||||||
|
Return defaultInstance
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||||
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
|
Global.System.Configuration.DefaultSettingValueAttribute("")> _
|
||||||
|
Public Property Setting() As String
|
||||||
|
Get
|
||||||
|
Return CType(Me("Setting"), String)
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
Me("Setting") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
|
|
||||||
|
Namespace My
|
||||||
|
|
||||||
|
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||||
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
|
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||||
|
Friend Module MySettingsProperty
|
||||||
|
|
||||||
|
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||||
|
Friend ReadOnly Property Settings() As Global.EDKB08.My.MySettings
|
||||||
|
Get
|
||||||
|
Return Global.EDKB08.My.MySettings.Default
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
End Module
|
||||||
|
End Namespace
|
||||||
9
My Project/Settings.settings
Normal file
9
My Project/Settings.settings
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true">
|
||||||
|
<Profiles />
|
||||||
|
<Settings>
|
||||||
|
<Setting Name="Setting" Type="System.String" Scope="User">
|
||||||
|
<Value Profile="(Default)" />
|
||||||
|
</Setting>
|
||||||
|
</Settings>
|
||||||
|
</SettingsFile>
|
||||||
55
My Project/app.manifest
Normal file
55
My Project/app.manifest
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||||
|
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||||
|
<security>
|
||||||
|
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<!-- UAC-Manifestoptionen
|
||||||
|
Wenn Sie die Zugangsebene für das Windows-Benutzerkonto ändern möchten, ersetzen Sie den
|
||||||
|
requestedExecutionLevel-Knoten durch eines der folgenden Elemente.
|
||||||
|
|
||||||
|
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||||
|
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||||
|
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||||
|
|
||||||
|
Durch Angeben des requestedExecutionLevel-Knotens wird die Datei- und Registrierungsvirtualisierung deaktiviert.
|
||||||
|
Wenn Sie Datei- und Registrierungsvirtualisierung für Abwärts-
|
||||||
|
kompatibilität verwenden möchten, löschen Sie den requestedExecutionLevel-Knoten.
|
||||||
|
-->
|
||||||
|
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||||
|
</requestedPrivileges>
|
||||||
|
</security>
|
||||||
|
</trustInfo>
|
||||||
|
|
||||||
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
|
<application>
|
||||||
|
<!-- Eine Liste aller Windows-Versionen, mit denen die Anwendung kompatibel ist.
|
||||||
|
Windows wählt automatisch die am stärksten kompatible Umgebung aus.-->
|
||||||
|
|
||||||
|
<!-- Wenn die Anwendung mit Windows Vista kompatibel ist, heben Sie die Auskommentierung des folgenden supportedOS-Knotens auf-->
|
||||||
|
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS>-->
|
||||||
|
|
||||||
|
<!-- Wenn die Anwendung mit Windows 7 kompatibel ist, heben Sie die Kommentierung des folgenden supportedOS-Knotens auf.-->
|
||||||
|
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->
|
||||||
|
|
||||||
|
<!-- Wenn die Anwendung mit Windows 8 kompatibel ist, heben Sie die Auskommentierung des folgenden supportedOS-Knotens auf-->
|
||||||
|
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>-->
|
||||||
|
|
||||||
|
</application>
|
||||||
|
</compatibility>
|
||||||
|
|
||||||
|
<!-- Designs für allgemeine Windows-Steuerelemente und -Dialogfelder (Windows XP und höher) aktivieren -->
|
||||||
|
<!-- <dependency>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity
|
||||||
|
type="win32"
|
||||||
|
name="Microsoft.Windows.Common-Controls"
|
||||||
|
version="6.0.0.0"
|
||||||
|
processorArchitecture="*"
|
||||||
|
publicKeyToken="6595b64144ccf1df"
|
||||||
|
language="*"
|
||||||
|
/>
|
||||||
|
</dependentAssembly>
|
||||||
|
</dependency>-->
|
||||||
|
|
||||||
|
</asmv1:assembly>
|
||||||
117
ProjectInstaller.resx
Normal file
117
ProjectInstaller.resx
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 1.3
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">1.3</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1">this is my long string</data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
[base64 mime encoded serialized .NET Framework object]
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>1.3</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="ServiceProcessInstaller1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>Assembly</value>
|
||||||
|
</data>
|
||||||
|
<data name="ServiceProcessInstaller1.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</data>
|
||||||
|
<data name="ServiceInstaller1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>Assembly</value>
|
||||||
|
</data>
|
||||||
|
<data name="ServiceInstaller1.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>188, 17</value>
|
||||||
|
</data>
|
||||||
|
<data name="$this.Name">
|
||||||
|
<value>ProjectInstaller</value>
|
||||||
|
</data>
|
||||||
|
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>False</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
60
ProjectInstaller.vb
Normal file
60
ProjectInstaller.vb
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
Imports System.ComponentModel
|
||||||
|
Imports System.Configuration.Install
|
||||||
|
|
||||||
|
<RunInstaller(True)> Public Class ProjectInstaller
|
||||||
|
Inherits System.Configuration.Install.Installer
|
||||||
|
|
||||||
|
#Region " Vom Component Designer generierter Code "
|
||||||
|
|
||||||
|
Public Sub New()
|
||||||
|
MyBase.New()
|
||||||
|
|
||||||
|
' Dieser Aufruf ist für den Komponenten-Designer erforderlich.
|
||||||
|
InitializeComponent()
|
||||||
|
|
||||||
|
' Initialisierungen nach dem Aufruf InitializeComponent() hinzufügen
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'Installer überschreibt den Löschvorgang zum Bereinigen der Komponentenliste.
|
||||||
|
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||||
|
If disposing Then
|
||||||
|
If Not (components Is Nothing) Then
|
||||||
|
components.Dispose()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
MyBase.Dispose(disposing)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Für Komponenten-Designer erforderlich
|
||||||
|
Private components As System.ComponentModel.IContainer
|
||||||
|
|
||||||
|
'HINWEIS: Die folgende Prozedur ist für den Komponenten-Designer erforderlich
|
||||||
|
'Sie kann mit dem Komponenten-Designer modifiziert werden.
|
||||||
|
'Verwenden Sie nicht den Code-Editor zur Bearbeitung.
|
||||||
|
Friend WithEvents ServiceProcessInstaller1 As System.ServiceProcess.ServiceProcessInstaller
|
||||||
|
Friend WithEvents ServiceInstaller1 As System.ServiceProcess.ServiceInstaller
|
||||||
|
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
||||||
|
Me.ServiceProcessInstaller1 = New System.ServiceProcess.ServiceProcessInstaller()
|
||||||
|
Me.ServiceInstaller1 = New System.ServiceProcess.ServiceInstaller()
|
||||||
|
'
|
||||||
|
'ServiceProcessInstaller1
|
||||||
|
'
|
||||||
|
Me.ServiceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalSystem
|
||||||
|
Me.ServiceProcessInstaller1.Password = Nothing
|
||||||
|
Me.ServiceProcessInstaller1.Username = Nothing
|
||||||
|
'
|
||||||
|
'ServiceInstaller1
|
||||||
|
'
|
||||||
|
Me.ServiceInstaller1.DisplayName = "EDKB08WS"
|
||||||
|
Me.ServiceInstaller1.ServiceName = "EDKB08WS"
|
||||||
|
'
|
||||||
|
'ProjectInstaller
|
||||||
|
'
|
||||||
|
Me.Installers.AddRange(New System.Configuration.Install.Installer() {Me.ServiceProcessInstaller1, Me.ServiceInstaller1})
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
End Class
|
||||||
187
Service1.resx
Normal file
187
Service1.resx
Normal file
@@ -0,0 +1,187 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 1.3
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">1.3</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1">this is my long string</data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
[base64 mime encoded serialized .NET Framework object]
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>1.3</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="ServiceIcon.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</data>
|
||||||
|
<data name="ServiceIcon.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>Assembly</value>
|
||||||
|
</data>
|
||||||
|
<data name="ServiceIcon.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
AAABAAIAICAQAAAAAADoAgAAJgAAABAQEAAAAAAAKAEAAA4DAAAoAAAAIAAAAEAAAAABAAQAAAAAAIAC
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAAgIAAAICAgADAwMAAAAD/AAD/
|
||||||
|
AAAA//8A/wAAAP8A/wD//wAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////
|
||||||
|
/////////////////9/////f//+f3///h9///4Hf///AX/gAAB/4AAAf///AX///gd///4ff+/+f3/v/
|
||||||
|
/9/7+f/f++H///uB///6A///+AAAH/gAAB/6A///+4H///vh///7+f//+/////v/////////////////
|
||||||
|
//8oAAAAEAAAACAAAAABAAQAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAgAAAAICAAIAA
|
||||||
|
AACAAIAAgIAAAICAgADAwMAAAAD/AAD/AAAA//8A/wAAAP8A/wD//wAA////AAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//8AAP/7
|
||||||
|
AAD/OwAA/4sAAMADAAD/iwAA/zsAAN/7AADf/wAA3P8AANH/AADAAwAA0f8AANz/AADf/wAA//8AAA==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="ImageList1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>Assembly</value>
|
||||||
|
</data>
|
||||||
|
<data name="ImageList1.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>126, 17</value>
|
||||||
|
</data>
|
||||||
|
<data name="ImageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>
|
||||||
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFpTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0xLjAuMzMw
|
||||||
|
MC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZT
|
||||||
|
eXN0ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMA
|
||||||
|
AABoCQAAAk1TRnQBSQFMAgEBAwEAAQUBAAEEAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQC
|
||||||
|
AAEoAwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB
|
||||||
|
3AHAAQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IB
|
||||||
|
AAM5AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8B
|
||||||
|
MwMAAWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYC
|
||||||
|
AAFmAZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMC
|
||||||
|
AAHMAWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQAB
|
||||||
|
ZgEAATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8B
|
||||||
|
AAEzAWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQAB
|
||||||
|
MwGZAWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQAB
|
||||||
|
MwLMAQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQAB
|
||||||
|
MwEAAWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMB
|
||||||
|
mQEAAWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQAB
|
||||||
|
ZgGZAWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYB
|
||||||
|
zAH/AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMB
|
||||||
|
mQEAAZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgAB
|
||||||
|
mQFmATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwB
|
||||||
|
AAKZAf8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB
|
||||||
|
/wEzAQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQAB
|
||||||
|
mQEAAcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYC
|
||||||
|
AAHMAWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYB
|
||||||
|
AAHMApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8C
|
||||||
|
AAHMAf8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQAB
|
||||||
|
mQEAAcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMB
|
||||||
|
AAHMAmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB
|
||||||
|
/wGZAcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC
|
||||||
|
/wEzAQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC
|
||||||
|
/wFmAQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gB
|
||||||
|
AAHwAfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD//8A/wD/AP8AiwAB
|
||||||
|
7AL7AewMAAHsAgIB7AwAAewCAgHsGwAB7AH7AvoB+wHsCgAB7AQCAewKAAHsBAIB7BcAA+wBAAH7AvoB
|
||||||
|
+wEAA+wEAAHsAQAB7AEABAIBAAHsAQAB7AQAAewBAAHsAQAEAgEAAewBAAHsFwAB7AEAAvsBAAHsCgAB
|
||||||
|
7AEAAgIBAAHsCgAB7AEAAgIBAAHsKwAB7AIDAewMAAHsAgAB7BsAAewBAAIDAQAB7AoAAewBAwL7AQMB
|
||||||
|
7AoAAewBAAIDAQAB7BcAA+wBAAQDAQAD7AQAAewBAAHsAQAE+wEAAewBAAHsBAAB7AEAAewBAAQDAQAB
|
||||||
|
7AEAAewZAAIDDAAB7AEDAvsBAwHsCgAB7AEAAgMBAAHsGgAB7AQAAewLAAHsAgMB7AwAAewCAAHsHQAC
|
||||||
|
AQwAAewBAAIBAQAB7AoAAewBAAL5AQAB7BoAAewEAQHsCwAEAQwABPkYAAPsAQAEAQEAA+wFAAHsAQAB
|
||||||
|
7AQBAewBAAHsBgAB7AEAAewE+QHsAQAB7BgAAuwCAQLsCwAB7AIBAewMAAHsAvkB7FYAAUIBTQE+BwAB
|
||||||
|
PgMAASgDAAFAAwABIAMAAQEBAAEBBgABARYAA/+BAAH8AT8B/AE/AfwBPwIAAfgBHwH4AR8B+AEfAgAB
|
||||||
|
4AEHAeABBwHgAQcCAAHAAQMBwAEDAcABAwIAAYABAQGAAQEBgAEBAgABgAEBAYABAQGAAQECAAHwAQ8B
|
||||||
|
8AEPAfABDwIAAcABAwHAAQMBwAEDAgABgAEBAYABAQGAAQECAAGAAQEBgAEBAYABAQIAAfABDwHwAQ8B
|
||||||
|
8AEPAgAB4AEHAeABBwHgAQcCAAHAAQMBwAEDAcABAwIAAYABAQGAAQEBgAEBAgABgAEBAYABAQGAAQEC
|
||||||
|
AAH4AR8B+AEfAfgBHwIACw==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>False</value>
|
||||||
|
</data>
|
||||||
|
<data name="$this.Name">
|
||||||
|
<value>Service1</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
991
Service1.vb
Normal file
991
Service1.vb
Normal file
@@ -0,0 +1,991 @@
|
|||||||
|
Imports System.ServiceProcess
|
||||||
|
Imports System.Threading
|
||||||
|
Imports System.IO
|
||||||
|
Imports System.Reflection
|
||||||
|
Imports System.IO.File
|
||||||
|
Imports System.Data.SqlClient
|
||||||
|
Imports System.Data.SqlTypes
|
||||||
|
Imports System.ComponentModel
|
||||||
|
Imports System
|
||||||
|
Imports System.SystemException
|
||||||
|
Imports System.Web.Mail
|
||||||
|
Imports System.Timers
|
||||||
|
Imports System.Collections.Generic
|
||||||
|
|
||||||
|
'''<summary></summary>
|
||||||
|
Public Class Service1
|
||||||
|
Inherits System.ServiceProcess.ServiceBase
|
||||||
|
|
||||||
|
#Region " Vom Component Designer generierter Code "
|
||||||
|
|
||||||
|
Public Sub New()
|
||||||
|
MyBase.New()
|
||||||
|
|
||||||
|
' Dieser Aufruf wird vom Komponenten-Designer benötigt.
|
||||||
|
InitializeComponent()
|
||||||
|
|
||||||
|
|
||||||
|
' Fügen Sie Initialisierungscode hinter dem InitializeComponent()-Aufruf ein
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'UserService überschreibt den Löschvorgang zum Bereinigen der Komponentenliste.
|
||||||
|
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||||
|
If disposing Then
|
||||||
|
If Not (components Is Nothing) Then
|
||||||
|
components.Dispose()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
MyBase.Dispose(disposing)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Der Haupteinstiegspunkt für den Vorgang
|
||||||
|
<MTAThread()>
|
||||||
|
Shared Sub Main()
|
||||||
|
|
||||||
|
#If CONFIG = "Release" Then
|
||||||
|
Dim ServicesToRun() As System.ServiceProcess.ServiceBase
|
||||||
|
ServicesToRun = New System.ServiceProcess.ServiceBase() {New Service1()}
|
||||||
|
System.ServiceProcess.ServiceBase.Run(ServicesToRun)
|
||||||
|
#Else
|
||||||
|
|
||||||
|
Dim myServ As New Service1
|
||||||
|
myServ.OnStart({""})
|
||||||
|
While (True)
|
||||||
|
System.Threading.Thread.Sleep(2000)
|
||||||
|
End While
|
||||||
|
#End If
|
||||||
|
'#If DEBUG Then
|
||||||
|
' Dim myServ As New Service1()
|
||||||
|
' myServ.OnStart({""})
|
||||||
|
' While (True)
|
||||||
|
' System.Threading.Thread.Sleep(2000)
|
||||||
|
' End While
|
||||||
|
|
||||||
|
'#Else
|
||||||
|
' Dim ServicesToRun() As System.ServiceProcess.ServiceBase
|
||||||
|
' ServicesToRun = New System.ServiceProcess.ServiceBase() {New Service1()}
|
||||||
|
' System.ServiceProcess.ServiceBase.Run(ServicesToRun)
|
||||||
|
'#End If
|
||||||
|
|
||||||
|
'Dim ServicesToRun() As System.ServiceProcess.ServiceBase
|
||||||
|
|
||||||
|
'ServicesToRun = New System.ServiceProcess.ServiceBase() {New Service1()}
|
||||||
|
|
||||||
|
'System.ServiceProcess.ServiceBase.Run(ServicesToRun)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Für Komponenten-Designer erforderlich
|
||||||
|
Private components As System.ComponentModel.IContainer
|
||||||
|
|
||||||
|
' HINWEIS: Die folgende Prozedur wird vom Komponenten-Designer benötigt.
|
||||||
|
' Sie kann mit dem Komponenten-Designer modifiziert werden. Verwenden Sie nicht
|
||||||
|
' den Code-Editor zur Bearbeitung.
|
||||||
|
'Friend WithEvents ServiceIcon As System.Windows.Forms.NotifyIcon
|
||||||
|
Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
|
||||||
|
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
||||||
|
Me.components = New System.ComponentModel.Container()
|
||||||
|
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Service1))
|
||||||
|
'Me.ServiceIcon = New System.Windows.Forms.NotifyIcon(Me.components)
|
||||||
|
Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
|
||||||
|
'
|
||||||
|
'ServiceIcon
|
||||||
|
'
|
||||||
|
'Me.ServiceIcon.Icon = CType(resources.GetObject("ServiceIcon.Icon"), System.Drawing.Icon)
|
||||||
|
'Me.ServiceIcon.Text = "EDKB08WS"
|
||||||
|
'Me.ServiceIcon.Visible = True
|
||||||
|
'
|
||||||
|
'ImageList1
|
||||||
|
'
|
||||||
|
Me.ImageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit
|
||||||
|
Me.ImageList1.ImageSize = New System.Drawing.Size(16, 16)
|
||||||
|
Me.ImageList1.ImageStream = CType(resources.GetObject("ImageList1.ImageStream"), System.Windows.Forms.ImageListStreamer)
|
||||||
|
Me.ImageList1.TransparentColor = System.Drawing.Color.Transparent
|
||||||
|
'
|
||||||
|
'Service1
|
||||||
|
'
|
||||||
|
Me.ServiceName = "Service1"
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region "Deklarationen"
|
||||||
|
Private StopThread As Boolean = False
|
||||||
|
'''<summary>Variable mit dem Namen des zu überwachenden Verzeichnises</summary>
|
||||||
|
Dim Watch_Directory As String
|
||||||
|
'''<summary>FileSystemWatcher</summary>
|
||||||
|
'''<remarks>Dieser Reagiert auf das Ereignis OnCreate im angegebenen Verzeichnis
|
||||||
|
'''(Watch_Directory)</remarks>
|
||||||
|
Dim FileWatch As New FileSystemWatcher()
|
||||||
|
|
||||||
|
'''<summary>Varaible zum Zwischenspeichern der Indexdaten einer
|
||||||
|
'''Indexdaten-Datei</summary>
|
||||||
|
Dim indexdata As DataTable
|
||||||
|
|
||||||
|
'''<summary>Timer zur Auslösung der täglichen Journalaufbereitung</summary>
|
||||||
|
Dim WithEvents JournalTimer As New Timers.Timer()
|
||||||
|
|
||||||
|
'Anpassungen GSF
|
||||||
|
Dim WithEvents GSF_Timer As New Timers.Timer()
|
||||||
|
|
||||||
|
Dim WithEvents DirectoryTimer As New Timers.Timer()
|
||||||
|
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region "Hauptverarbeitung"
|
||||||
|
|
||||||
|
'''<summary>Start des Dienstes EDKB08WS</summary>
|
||||||
|
'''<remarks>Beim Start des Dienstes werden neben dem Einlesen der Parameter der
|
||||||
|
'''Journaltimer sowie der Systemfilewatcher zur Verzeichnisüberwachung
|
||||||
|
'''initialisiert.</remarks>
|
||||||
|
'''<param name="args"></param>
|
||||||
|
Protected Overrides Sub OnStart(ByVal args() As String)
|
||||||
|
Try
|
||||||
|
'Dim bmp As New Bitmap(Me.ImageList1.Images(2))
|
||||||
|
'ServiceIcon.Icon = Icon.FromHandle(bmp.GetHicon())
|
||||||
|
'ServiceIcon.Visible = True
|
||||||
|
'ServiceIcon.Text = "Starting ..."
|
||||||
|
|
||||||
|
PrintOut("Start EDKB08")
|
||||||
|
|
||||||
|
'Parameter auslesen
|
||||||
|
If Params.Loadparameters = False Then
|
||||||
|
PrintOut(Params.Meldung)
|
||||||
|
PrintOut("Verarbeitung abgebrochen")
|
||||||
|
Exit Sub
|
||||||
|
Else
|
||||||
|
GSF_Timer.Interval = Params.Prop_gsf_TimerInterval
|
||||||
|
#If CONFIG = "Release" Then
|
||||||
|
|
||||||
|
GSF_Timer.Enabled = GSF_Timer.Interval > 60000
|
||||||
|
#Else
|
||||||
|
GSF_Timer.Enabled = GSF_Timer.Interval > 60000
|
||||||
|
#End If
|
||||||
|
|
||||||
|
DirectoryTimer.Interval = Params.DirectoryTimer_Intervall
|
||||||
|
DirectoryTimer.Enabled = True
|
||||||
|
Watch_Directory = Params.Inputverzeichnis
|
||||||
|
PrintOut(Params.Meldung)
|
||||||
|
PrintOut("Parameter:")
|
||||||
|
PrintOut("Überwachtes Verzeichnis: " + Params.Inputverzeichnis)
|
||||||
|
PrintOut("E-Mail OK: " + Params.MailAdresseOK)
|
||||||
|
PrintOut("E-Mail NOK:" + Params.MailAdresseNOK)
|
||||||
|
PrintOut("GSF_Timer:" + Params.Prop_gsf_TimerInterval.ToString)
|
||||||
|
PrintOut("GSF_ConfigPath:" + Params.Prop_gsf_ConfigPath)
|
||||||
|
End If
|
||||||
|
'Datenbank initialisieren
|
||||||
|
Dim db_conn As New edokadb.DB_Connection()
|
||||||
|
JournalTimer.Interval = Params.JournalTimer_Time
|
||||||
|
#If CONFIG = "Release" Then
|
||||||
|
JournalTimer.Enabled = True
|
||||||
|
|
||||||
|
#Else
|
||||||
|
Dim a As Integer = 1
|
||||||
|
JournalTimer.Enabled = True
|
||||||
|
#End If
|
||||||
|
|
||||||
|
|
||||||
|
PrintOut("Journaltimer initialisiert. Eventhalndler alle " + LTrim(Str(JournalTimer.Interval / (1000 * 60))) + " Minuten")
|
||||||
|
|
||||||
|
'Verzeichnis-Überwachung initialisieren und starten
|
||||||
|
If Not Init_Filewatcher() Then
|
||||||
|
Printout("Verarbeitung gestoppt", EventLogEntryType.Error)
|
||||||
|
End If
|
||||||
|
If Not Start_Watching() Then
|
||||||
|
Printout("Verarbeitung gestoppt", EventLogEntryType.Error)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
'Dim bmp1 As New Bitmap(Me.ImageList1.Images(1))
|
||||||
|
'ServiceIcon.Icon = Icon.FromHandle(bmp1.GetHicon())
|
||||||
|
'ServiceIcon.Text = "Waiting ..."
|
||||||
|
Catch ex As Exception
|
||||||
|
' Dim bmp1 As New Bitmap(Me.ImageList1.Images(2))
|
||||||
|
'ServiceIcon.Icon = Icon.FromHandle(bmp1.GetHicon())
|
||||||
|
Printout("Fehler beim Start von EDKB08" + ex.Message, EventLogEntryType.Error)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Overrides Sub OnStop()
|
||||||
|
' Dim bmp1 As New Bitmap(Me.ImageList1.Images(2))
|
||||||
|
'ServiceIcon.Icon = Icon.FromHandle(bmp1.GetHicon())
|
||||||
|
'ServiceIcon.Text = "Stopping..."
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region "FileWatcher"
|
||||||
|
|
||||||
|
'''<summary>Initialisierung des Filewacher-Objektes</summary>
|
||||||
|
'''<remarks>Das Filewacher-Objekt wird mit den entpsrechenden Pfad- sowie
|
||||||
|
'''Dateifilter-Angaben initialisiert.</remarks>
|
||||||
|
Private Function Init_Filewatcher() As Boolean
|
||||||
|
Try
|
||||||
|
FileWatch.Path = Watch_Directory
|
||||||
|
FileWatch.IncludeSubdirectories = False
|
||||||
|
FileWatch.Filter = "*.*"
|
||||||
|
Return True
|
||||||
|
Catch ex As Exception
|
||||||
|
Printout("Fehler bei der Initialisierung des Filewacherobjekts auf " + Watch_Directory + ex.Message, EventLogEntryType.Error)
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'''<summary>Eventhandler des FileWatching-Objektes aktivieren</summary>
|
||||||
|
Private Function Start_Watching() As Boolean
|
||||||
|
Try
|
||||||
|
AddHandler FileWatch.Created, New FileSystemEventHandler(AddressOf OnFileEvent)
|
||||||
|
AddHandler FileWatch.Renamed, AddressOf OnFileEventRename
|
||||||
|
FileWatch.EnableRaisingEvents = True
|
||||||
|
PrintOut("Filewatch Event-Handler initialisiert: " + Me.Watch_Directory)
|
||||||
|
Return True
|
||||||
|
Catch ex As Exception
|
||||||
|
Printout("Fehler bei der Event-Initialisierung " + ex.Message, EventLogEntryType.Error)
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Dim EventStopped As Boolean = False
|
||||||
|
'''<summary>Aktivitäten im Inputverzeichnis verarbeiten</summary>
|
||||||
|
'''<remarks>Wird eine Datei mit der Endung .IND angeliefert, wird der Eventhandler
|
||||||
|
'''gestoppt und die anstehenden Dokumente verarbeitet.
|
||||||
|
'''
|
||||||
|
'''Nach abgeschlossener Verarbeitung wird der Eventhandler wieder
|
||||||
|
'''eingeschaltet</remarks>
|
||||||
|
'''<param name="source"></param>
|
||||||
|
'''<param name="e"></param>
|
||||||
|
Private Sub OnFileEvent(ByVal source As Object, ByVal e As FileSystemEventArgs)
|
||||||
|
If EventStopped = True Then Exit Sub
|
||||||
|
|
||||||
|
|
||||||
|
If UCase(Microsoft.VisualBasic.Right(e.FullPath, 4)) = ".IND" Or UCase(Microsoft.VisualBasic.Right(e.FullPath, 4)) = ".XML" Then
|
||||||
|
FileWatch.EnableRaisingEvents = False
|
||||||
|
EventStopped = True
|
||||||
|
PrintTempJournal("Fileevent raised: " + e.FullPath)
|
||||||
|
'IntSleep(Params.WaitAfterFileevent)
|
||||||
|
'If UCase(Microsoft.VisualBasic.Right(e.FullPath, 4)) = ".XML" Then
|
||||||
|
' IntSleep(Params.Wait_before_xmlind_ren)
|
||||||
|
' Rename(e.FullPath, e.FullPath + ".ind")
|
||||||
|
' PrintTempJournal("Fileevent Rename XML: " + e.FullPath + " -> " + e.FullPath + ".ind")
|
||||||
|
'End If
|
||||||
|
PrintOut("Neue Datei " + e.FullPath)
|
||||||
|
Verarbeiten()
|
||||||
|
FileWatch.EnableRaisingEvents = True
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnFileEventRename(ByVal source As Object, ByVal e As RenamedEventArgs)
|
||||||
|
If Params.UseFileEventRename = False Then Exit Sub
|
||||||
|
If EventStopped = True Then Exit Sub
|
||||||
|
If UCase(Microsoft.VisualBasic.Right(e.FullPath, 4)) = ".IND" Then
|
||||||
|
FileWatch.EnableRaisingEvents = False
|
||||||
|
EventStopped = True
|
||||||
|
PrintOut("Neue Datei " + e.FullPath)
|
||||||
|
'20130131 - Sleep von 1000 auf 3000 geändert, damit bei FinFox-Dokumente die Verarbeitung nicht aussteigt, sofern die Datei noch nicht angeliefert wurde
|
||||||
|
IntSleep(3)
|
||||||
|
Verarbeiten()
|
||||||
|
FileWatch.EnableRaisingEvents = True
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region "Verarbeitung"
|
||||||
|
|
||||||
|
'''<summary>Verarbeiten von angelieferten Daten</summary>
|
||||||
|
'''<remarks>In dieser Methode werden angelieferte Indexdateien verarbeitet.
|
||||||
|
'''<para></para>
|
||||||
|
'''<para>Bevor die Verarbeitung startet, wird der Systemfilewacher
|
||||||
|
'''ausgeschaltet.</para>
|
||||||
|
'''<para>Die Verarbeitung wird solange durchgeführt, bis alle anstehenden
|
||||||
|
'''Indexdaten und Dokumente abgearbeitet sind.</para>
|
||||||
|
'''<para>Am Schluss der Verarbeitung wird der Systemfilewacher wieder
|
||||||
|
'''gestartet.</para></remarks>
|
||||||
|
'''
|
||||||
|
'''
|
||||||
|
Private nameDirection As SortOrder = SortOrder.Ascending
|
||||||
|
Private dateDirection As SortOrder = SortOrder.Ascending
|
||||||
|
Private Function CompareFileInfos(file1 As FileInfo, file2 As FileInfo) As Integer
|
||||||
|
Dim result = 0
|
||||||
|
|
||||||
|
If result = 0 Then
|
||||||
|
Select Case dateDirection
|
||||||
|
Case SortOrder.Ascending
|
||||||
|
result = file1.LastWriteTime.CompareTo(file2.LastWriteTime)
|
||||||
|
Case SortOrder.Descending
|
||||||
|
result = file2.LastWriteTime.CompareTo(file1.LastWriteTime)
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return result
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub PrintTempJournal(s As String)
|
||||||
|
If Params.Logpath = "" Then Exit Sub
|
||||||
|
Dim fn As String = Params.Logpath + "\" + Now.ToString("yyyyMMdd") + "_log.txt"
|
||||||
|
FileOpen(14, fn, OpenMode.Append)
|
||||||
|
WriteLine(14, Now.ToString("yyyy-MM-dd HH:mm:ss:hs") + " " + s)
|
||||||
|
FileClose(14)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub Verarbeiten()
|
||||||
|
Dim gsffilename As String = ""
|
||||||
|
Try
|
||||||
|
'Printout("Bei Verarbeiten() zuerst 5000ms warten", EventLogEntryType.Information)
|
||||||
|
PrintTempJournal("Verarbeitung Wait before start " + Params.WaitBeforeProcess.ToString + " Sekunden")
|
||||||
|
IntSleep(Params.WaitBeforeProcess)
|
||||||
|
Dim looper As Boolean = True
|
||||||
|
While looper = True
|
||||||
|
'Alle .IND-Dateien im Verzeichnis auslesen
|
||||||
|
PrintTempJournal("Read Directory .ind")
|
||||||
|
Dim clsindex As New clsIndexData()
|
||||||
|
Dim di As New IO.DirectoryInfo(Watch_Directory)
|
||||||
|
IntSleep(Params.Wait_before_readdir)
|
||||||
|
Dim diar1 As IO.FileInfo() = di.GetFiles("*.ind")
|
||||||
|
Dim dra As IO.FileInfo
|
||||||
|
Array.Sort(diar1, AddressOf CompareFileInfos)
|
||||||
|
If diar1.Length = 0 Then
|
||||||
|
PrintTempJournal("Read Directory .xml")
|
||||||
|
diar1 = di.GetFiles("*.xml")
|
||||||
|
Array.Sort(diar1, AddressOf CompareFileInfos)
|
||||||
|
If diar1.Length = 0 Then
|
||||||
|
looper = False
|
||||||
|
clsindex = Nothing
|
||||||
|
di = Nothing
|
||||||
|
diar1 = Nothing
|
||||||
|
EventStopped = False
|
||||||
|
PrintTempJournal("----------------------------------------------")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Try
|
||||||
|
For Each dra In diar1
|
||||||
|
Dim fullname As String = ""
|
||||||
|
Globals.Fehlermeldung = ""
|
||||||
|
IntSleep(Params.Wait_Before_Fileprocess)
|
||||||
|
PrintTempJournal("Verarbeitung " + dra.FullName)
|
||||||
|
fullname = dra.FullName
|
||||||
|
If UCase(System.IO.Path.GetExtension(dra.Name)) = ".XML" Then
|
||||||
|
PrintTempJournal(" Rename " + dra.FullName + " -> " + dra.FullName + ".ind")
|
||||||
|
IntSleep(Params.Wait_before_xmlind_ren)
|
||||||
|
Rename(dra.FullName, dra.FullName + ".ind")
|
||||||
|
fullname = dra.FullName + ".ind"
|
||||||
|
End If
|
||||||
|
|
||||||
|
gsffilename = dra.Name.Substring(0, dra.Name.IndexOf("."))
|
||||||
|
PrintTempJournal(" Journal " + fullname)
|
||||||
|
PrintOut("File: " + fullname)
|
||||||
|
Globals.Journal.Open_Journal()
|
||||||
|
Globals.Journal.Insert_Journal("", "", "", fullname, "", "Start der Verarbeitung", "", "")
|
||||||
|
|
||||||
|
DivFnkt.Save_Indexdata(Journal.JournalNr, fullname)
|
||||||
|
clsindex.IndexFileName = fullname
|
||||||
|
If clsindex.getindexdata Then
|
||||||
|
indexdata = clsindex.Indexdata
|
||||||
|
Dim check_and_import As New clsCheckandImport()
|
||||||
|
check_and_import.IndexData = indexdata
|
||||||
|
|
||||||
|
If check_and_import.Herkunftsapplikationen_auslesen = False Then
|
||||||
|
Journal.Insert_Journal("", "", "", fullname, "16", "Zuordnung zur Herkunftsapplikation fehlt.", "", "")
|
||||||
|
Else
|
||||||
|
If check_and_import.Herkunftsapplikationen_auslesen Then
|
||||||
|
Globals.Journal.Update_Journal()
|
||||||
|
check_and_import.CheckandImport()
|
||||||
|
check_and_import = Nothing
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Journal.Insert_Journal("", "", "", fullname, "", "Total Index-Datensätze: " + LTrim(Str(indexdata.Rows.Count)), "", "")
|
||||||
|
Journal.Insert_Journal("", "", "", fullname, "", "Verarbeitung abgeschlossen.", "", "")
|
||||||
|
Try
|
||||||
|
Catch
|
||||||
|
End Try
|
||||||
|
Try
|
||||||
|
PrintOut("Journal Close: " + fullname)
|
||||||
|
Globals.Journal.Close_Journal()
|
||||||
|
Catch
|
||||||
|
End Try
|
||||||
|
|
||||||
|
'Anpassungen EBES-LSV
|
||||||
|
If GSF = True Then
|
||||||
|
IntSleep(1)
|
||||||
|
Dim a As Integer
|
||||||
|
|
||||||
|
If Fehler <> 0 Then
|
||||||
|
PrintOut("Dokstatus Fehler Start: " + fullname)
|
||||||
|
OBJ_GSF.Set_DokStatus(dra.Name.Substring(0, dra.Name.IndexOf(".")), EDKB08_GSF.Common.Enum_DokStatus.OK)
|
||||||
|
PrintOut("Dokstatus Fehler Ende: " + fullname)
|
||||||
|
Else
|
||||||
|
PrintOut("Dokstatus Start: " + fullname)
|
||||||
|
OBJ_GSF.Set_DokStatus(dra.Name.Substring(0, dra.Name.IndexOf(".")), EDKB08_GSF.Common.Enum_DokStatus.OK)
|
||||||
|
PrintOut("Dokstatus Ende: " + fullname)
|
||||||
|
End If
|
||||||
|
IntSleep(3)
|
||||||
|
End If
|
||||||
|
PrintOut("Ende File: " + fullname)
|
||||||
|
PrintTempJournal(" Abschluss " + fullname)
|
||||||
|
IntSleep(Params.wait_After_Fileprocess)
|
||||||
|
If Fehler <> 0 Then
|
||||||
|
send_error_mail()
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Catch ex As Exception
|
||||||
|
Try
|
||||||
|
Globals.Journal.Close_Journal()
|
||||||
|
Catch
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Printout(ex.Message, EventLogEntryType.Error)
|
||||||
|
clsindex = Nothing
|
||||||
|
di = Nothing
|
||||||
|
diar1 = Nothing
|
||||||
|
End Try
|
||||||
|
clsindex = Nothing
|
||||||
|
di = Nothing
|
||||||
|
diar1 = Nothing
|
||||||
|
|
||||||
|
'20151225
|
||||||
|
Try
|
||||||
|
Globals.conn_edoka.CloseConnection(True)
|
||||||
|
Catch
|
||||||
|
End Try
|
||||||
|
Try
|
||||||
|
Globals.conn_journale.CloseConnection(True)
|
||||||
|
Catch
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
End While
|
||||||
|
FileWatch.EnableRaisingEvents = True
|
||||||
|
EventStopped = False
|
||||||
|
PrintTempJournal("----------------------------------------------")
|
||||||
|
Exit Sub
|
||||||
|
Catch ex As Exception
|
||||||
|
Try
|
||||||
|
Globals.conn_edoka.CloseConnection(True)
|
||||||
|
Catch
|
||||||
|
End Try
|
||||||
|
Try
|
||||||
|
Globals.conn_journale.CloseConnection(True)
|
||||||
|
Catch
|
||||||
|
End Try
|
||||||
|
Fehler = -16
|
||||||
|
Try
|
||||||
|
Journal.Insert_Journal("", "", "", "", "-16", ex.Message + ex.StackTrace, "", "")
|
||||||
|
Catch
|
||||||
|
End Try
|
||||||
|
Try
|
||||||
|
Journal.Insert_Journal("", "", "", "", "", "Verarbeitung abgebrochen", "", "")
|
||||||
|
Catch
|
||||||
|
End Try
|
||||||
|
Try
|
||||||
|
Journal.Close_Journal()
|
||||||
|
Catch
|
||||||
|
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Try
|
||||||
|
OBJ_GSF.Set_DokStatus(gsffilename, EDKB08_GSF.Common.Enum_DokStatus.FehlerEDKB08)
|
||||||
|
Catch
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Printout("Folgender Fehler ist in EDKB08 aufgetreten:" + ex.Message, EventLogEntryType.Error)
|
||||||
|
FileWatch.EnableRaisingEvents = True
|
||||||
|
'Dim bmp1 As New Bitmap(Me.ImageList1.Images(1))
|
||||||
|
'ServiceIcon.Icon = Icon.FromHandle(bmp1.GetHicon())
|
||||||
|
'ServiceIcon.Text = "Waiting ..."
|
||||||
|
EventStopped = False
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
Sub send_error_mail()
|
||||||
|
Dim subject As String
|
||||||
|
Dim body As String
|
||||||
|
subject = "EDKB08-Dokumentimport mit Fehlern " + Globals.Herkunftsapplikation.Rows(0).Item(1)
|
||||||
|
body = "Fehler EDOKB08:" + vbCrLf + vbCrLf
|
||||||
|
body = body + "Applikation: " + Globals.Herkunftsapplikation.Rows(0).Item(1).ToString + vbCrLf
|
||||||
|
body = body + "Journal-Nr: " + Journal.JournalNr.ToString + vbCrLf + vbCrLf
|
||||||
|
body = body + "Fehlermeldung: " + vbCrLf
|
||||||
|
body = body + Globals.Fehlermeldung
|
||||||
|
If Globals.Herkunftsapplikation.Rows(0).Item("Mail_Empfaneger").ToString = "" Then Exit Sub
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand
|
||||||
|
scmCmdToExecute.CommandText = "dbo.SP_SendMail"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
Dim dtToReturn As DataTable = New DataTable
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@email", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Globals.Herkunftsapplikation.Rows(0).Item("Mail_Empfaneger").ToString))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@betreff", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, subject))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@meldung", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, body))
|
||||||
|
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||||
|
Try
|
||||||
|
conn_edoka.OpenConnection()
|
||||||
|
Catch
|
||||||
|
End Try
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
Catch ex As Exception
|
||||||
|
Finally
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
conn_edoka.CloseConnection(True)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
Public Sub IntSleep(Seconds As Integer)
|
||||||
|
Dim sleeptime As DateTime
|
||||||
|
sleeptime = DateAdd(DateInterval.Second, Seconds, Now)
|
||||||
|
While Now < sleeptime
|
||||||
|
Thread.Sleep(10)
|
||||||
|
End While
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
'''<summary>Journaldatei erstellen und je nach Applikationseinstellungen
|
||||||
|
'''versenden</summary>
|
||||||
|
'''<remarks>Erstellt eine Journaldatei mit den Journaldaten der Verarbeitung und
|
||||||
|
'''sendet diese mittels Mail bzw. mittls DTO weiter</remarks>
|
||||||
|
Private Sub Logdatei_Erstellen()
|
||||||
|
Dim filename As String = ""
|
||||||
|
Try
|
||||||
|
If Globals.Herkunftsapplikation.Rows(0).Item("log_erstellung") <> 1 And Globals.Herkunftsapplikation.Rows(0).Item("log_erstellung") <> 2 Then Exit Sub
|
||||||
|
If Globals.Herkunftsapplikation.Rows(0).Item("log_erstellung") = 1 And Globals.Herkunftsapplikation.Rows(0).Item("Mail_Periodizitaet") = 0 Then
|
||||||
|
filename = Journal.Print_Log(Globals.Herkunftsapplikation.Rows(0).Item(0), Globals.Herkunftsapplikation.Rows(0).Item(1), Globals.Herkunftsapplikation.Rows(0).Item("outputformat"))
|
||||||
|
PrintOut("Aufruf Sendmail")
|
||||||
|
Send_Mail(filename, Globals.Herkunftsapplikation.Rows(0).Item("Mail_Empfaneger"))
|
||||||
|
End If
|
||||||
|
If Globals.Herkunftsapplikation.Rows(0).Item("log_erstellung") = 2 Then
|
||||||
|
filename = Journal.Print_Log(Globals.Herkunftsapplikation.Rows(0).Item(0), Globals.Herkunftsapplikation.Rows(0).Item(1), Globals.Herkunftsapplikation.Rows(0).Item("outputformat"))
|
||||||
|
Send_DTO(filename)
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
Journal.Insert_Journal("", "", "", filename, "-16", "Das Journal " + filename + " konnte nicht erstellt werden." + ex.Message, "", "")
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
'''<summary>DTO-Versand</summary>
|
||||||
|
'''<param name="filename"></param>
|
||||||
|
Private Function Send_DTO(ByVal filename As String) As Boolean
|
||||||
|
Try
|
||||||
|
Dim i As Integer
|
||||||
|
Dim tw As TextWriter
|
||||||
|
Dim s As String
|
||||||
|
s = Herkunftsapplikation.Rows(0).Item(3)
|
||||||
|
s = s.Replace("%1", filename)
|
||||||
|
s = s.Replace("%2", filename)
|
||||||
|
tw = New StreamWriter(New FileStream(Params.TempPfad + "dtotransfer.cmd", FileMode.Create))
|
||||||
|
tw.WriteLine(s)
|
||||||
|
tw.Flush()
|
||||||
|
tw.Close()
|
||||||
|
i = Microsoft.VisualBasic.Shell(Params.TempPfad + "dtotransfer.cmd", AppWinStyle.Hide, True)
|
||||||
|
If i <> 0 Then
|
||||||
|
Journal.Insert_Journal("", "", "", filename, "0", "DTO-Datei konnte nicht übermittelt werden. RC: " + LTrim(Str(i)), "", "")
|
||||||
|
Else
|
||||||
|
Journal.Insert_Journal("", "", "", filename, "0", "DTO-Datei konnte nicht übermittelt werden. RC: " + LTrim(Str(i)), "", "")
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
Catch ex As Exception
|
||||||
|
Fehler = 4
|
||||||
|
Journal.Insert_Journal("", "", "", filename, "-16", "DTO-Datei konnte nicht übermittelt werden. " + ex.Message, "", "")
|
||||||
|
'PrintOut("Der Journalversand mittls DTO ist fehlgeschlagen. " + ex.Message, EventLogEntryType.Warning)
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'''<summary>Versand von Journaldaten mittels Email</summary>
|
||||||
|
'''<param name="filename"></param>
|
||||||
|
'''<param name="empfaenger"></param>
|
||||||
|
Private Function Send_Mail(ByVal filename As String, ByVal empfaenger As String) As Boolean
|
||||||
|
'Sofern ein SMTP-Server angegeben wird, wird vie SMTP Versendet
|
||||||
|
If Params.Mailserver <> "" Then
|
||||||
|
|
||||||
|
Dim strArgs() As String = Command.Split(",")
|
||||||
|
Dim blnSMTP As Boolean = False
|
||||||
|
Dim blnCC As Boolean = False
|
||||||
|
Dim blnAttachments As Boolean = False
|
||||||
|
Try
|
||||||
|
Dim insMail As New System.Net.Mail.MailMessage(Params.Mailabsender, empfaenger)
|
||||||
|
With insMail
|
||||||
|
.Subject = "EDKB08-Journal"
|
||||||
|
'.BodyEndoding = System.Text.Encoding.Unicode
|
||||||
|
.Body = "Dieses Email wurde automatisch von EDKB08 erstellt"
|
||||||
|
' .Attachments.Add(New MailAttachment(filename))
|
||||||
|
End With
|
||||||
|
Dim myMail As New System.Net.Mail.SmtpClient
|
||||||
|
myMail.Host = Params.Mailserver
|
||||||
|
myMail.Send(insMail)
|
||||||
|
''PrintOut("Journal erfolgreich versandt.", EventLogEntryType.Information)
|
||||||
|
Journal.Insert_Journal("", "", "", filename, "0", "E-Mail mit Journal versandt.", "", "")
|
||||||
|
Catch ex As Exception
|
||||||
|
Fehler = 4
|
||||||
|
Journal.Insert_Journal("", "", "", filename, "-10", "E-Mail konnte nicht versandt werden. " + ex.Message, "", "")
|
||||||
|
'PrintOut("Journal konnte nicht versandt werden." + ex.Message, EventLogEntryType.Error)
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
Else
|
||||||
|
If Save_Report_To_DB(filename) Then
|
||||||
|
If Fehler = 0 Then
|
||||||
|
send_db_mail(empfaenger, "EDKB08-Dokumentimport erfolgreich: " + filename.Substring(filename.LastIndexOf("\") + 1), filename)
|
||||||
|
Else
|
||||||
|
send_db_mail(empfaenger, "EDKB08-Dokumentimport mit Fehlern: " + filename.Substring(filename.LastIndexOf("\") + 1), filename)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function send_db_mail(ByVal empfaenger As String, ByVal Subject As String, ByVal filename As String) As Boolean
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
Dim dtToReturn As DataTable = New DataTable()
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||||
|
scmCmdToExecute.CommandText = "dbo.sp_edoka_import_send_mail"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
scmCmdToExecute.Connection = conn_journale_Mail.scoDBConnection
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@empfaenger", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, empfaenger))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@betreff", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Subject))
|
||||||
|
filename = filename.Substring(filename.LastIndexOf("\") + 1)
|
||||||
|
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@filename", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, filename))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@jobnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, Journal.JournalNr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@errorcode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, 9))
|
||||||
|
Try
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
If scmCmdToExecute.Parameters("@errorcode").Value <> 0 Then
|
||||||
|
'Journal.Insert_Journal("", "", "", filename, "20", "Mail konnte nicht versandt werden. " + scmCmdToExecute.Parameters("@errorcode").Value, "", "")
|
||||||
|
PrintLog("Mail konnte nicht versandt werden. " + scmCmdToExecute.Parameters("@errorcode").Value, EventLogEntryType.Warning)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
'Journal.Insert_Journal("", "", "", filename, "20", "Mail konnte nicht versandt werden." + ex.Message, "", "")
|
||||||
|
PrintLog("Mail konnte nicht versandt werden." + ex.Message, EventLogEntryType.Warning)
|
||||||
|
Return False
|
||||||
|
Finally
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
sdaAdapter.Dispose()
|
||||||
|
dtToReturn.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function Save_Report_To_DB(ByVal Filename As String) As Boolean
|
||||||
|
Dim connection As New SqlConnection()
|
||||||
|
Dim da As New SqlDataAdapter("Select * From import_journaldatei where import_jobnr=" + Journal.JournalNr.ToString, connection)
|
||||||
|
Dim CB As SqlCommandBuilder = New SqlCommandBuilder(da)
|
||||||
|
Dim ds As New DataSet()
|
||||||
|
Try
|
||||||
|
'Connectionstring zur Datenbank
|
||||||
|
connection.ConnectionString = Globals.sConnectionString_journale
|
||||||
|
connection.Open()
|
||||||
|
da.Fill(ds, "docs")
|
||||||
|
Dim fs As New FileStream(Filename, FileMode.Open, FileAccess.Read)
|
||||||
|
Dim mydata(fs.Length) As Byte
|
||||||
|
fs.Read(mydata, 0, fs.Length)
|
||||||
|
fs.Close()
|
||||||
|
Dim myRow As DataRow
|
||||||
|
If ds.Tables(0).Rows.Count = 0 Then
|
||||||
|
' Neues Dokument speichern
|
||||||
|
myRow = ds.Tables(0).NewRow
|
||||||
|
myRow.Item(0) = Journal.JournalNr
|
||||||
|
myRow.Item(1) = mydata
|
||||||
|
ds.Tables(0).Rows.Add(myRow)
|
||||||
|
da.Update(ds, "docs")
|
||||||
|
Else
|
||||||
|
'Bestehendes Dokument sichenr
|
||||||
|
myRow = ds.Tables(0).Rows(0)
|
||||||
|
myRow.Item(1) = mydata
|
||||||
|
da.Update(ds, "docs")
|
||||||
|
End If
|
||||||
|
fs.Close()
|
||||||
|
fs = Nothing
|
||||||
|
File.Delete(Filename)
|
||||||
|
Return True
|
||||||
|
Catch ex As Exception
|
||||||
|
Journal.Insert_Journal("", "", "", Filename, "20", "Das Journal konnte nicht auf der Datenbank gespeichert werden." + vbNewLine + ex.Message, "", "")
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
CB = Nothing
|
||||||
|
ds = Nothing
|
||||||
|
da = Nothing
|
||||||
|
connection.Close()
|
||||||
|
connection = Nothing
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region "Journaltimer Funktionen"
|
||||||
|
|
||||||
|
Public Sub JournalTimer_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles JournalTimer.Elapsed
|
||||||
|
If EventStopped = True Then Exit Sub
|
||||||
|
Dim restartdok As New DataTable()
|
||||||
|
Dim restartjob As New DataTable()
|
||||||
|
restartdok = get_restartdok()
|
||||||
|
restartjob = get_restartjob()
|
||||||
|
Me.JournalTimer.Enabled = False
|
||||||
|
Dim i As Integer
|
||||||
|
Me.FileWatch.EnableRaisingEvents = False
|
||||||
|
For i = 0 To restartdok.Rows.Count - 1
|
||||||
|
Write_Restartfiles(restartdok.Rows(i).Item(0))
|
||||||
|
Next
|
||||||
|
For i = 0 To restartjob.Rows.Count - 1
|
||||||
|
Write_Restartjobfiles(restartjob.Rows(i).Item(0))
|
||||||
|
Next
|
||||||
|
If restartdok.Rows.Count <> 0 Or restartjob.Rows.Count <> 0 Then
|
||||||
|
Verarbeiten()
|
||||||
|
End If
|
||||||
|
'20120905 - SHU - Wenn IND-Dateien im Input-Verzeichnis vorhanden sind, diese verarbeiten
|
||||||
|
Dim di As New IO.DirectoryInfo(Watch_Directory)
|
||||||
|
Dim diar1 As IO.FileInfo() = di.GetFiles("*.ind")
|
||||||
|
If diar1.Length > 0 Then Verarbeiten()
|
||||||
|
restartjob.Dispose()
|
||||||
|
restartdok.Dispose()
|
||||||
|
|
||||||
|
If Now.Hour > 0 And Now.Hour < 1 Then
|
||||||
|
Dim filename As String
|
||||||
|
Dim dt As DataTable
|
||||||
|
PrintOut("Start Tägliche Journalerstellung")
|
||||||
|
dt = get_applikationen()
|
||||||
|
For i = 0 To dt.Rows.Count - 1
|
||||||
|
filename = Journal.Print_Log_Batch(dt.Rows(i).Item(0), dt.Rows(i).Item(1), dt.Rows(i).Item(2))
|
||||||
|
Send_Mail(filename, dt.Rows(i).Item(3))
|
||||||
|
PrintOut(dt.Rows(i).Item(1) + ": " + "Journal gesendet")
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
Me.JournalTimer.Enabled = True
|
||||||
|
Me.FileWatch.EnableRaisingEvents = True
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Write_Restartfiles(ByVal itemid As Integer)
|
||||||
|
Dim connection As New SqlConnection()
|
||||||
|
Dim da As New SqlDataAdapter("Select * From import_daten where import_data_nr=" + LTrim(Str(itemid)), connection)
|
||||||
|
Dim CB As SqlCommandBuilder = New SqlCommandBuilder(da)
|
||||||
|
Dim ds As New DataSet()
|
||||||
|
Dim Dokumentfilename As String
|
||||||
|
Dim XMLFilename As String
|
||||||
|
Dim xmlstring As String
|
||||||
|
Dim xmlds As New DataSet()
|
||||||
|
|
||||||
|
Try
|
||||||
|
'Connectionstring zur Datenbank
|
||||||
|
connection.ConnectionString = Globals.sConnectionString_journale
|
||||||
|
connection.Open()
|
||||||
|
da.Fill(ds, "docs")
|
||||||
|
Dim myRow As DataRow
|
||||||
|
xmlstring = ds.Tables(0).Rows(0).Item(3)
|
||||||
|
myRow = ds.Tables(0).Rows(0)
|
||||||
|
|
||||||
|
'Indexfile schreiben
|
||||||
|
XMLFilename = Params.Inputverzeichnis + LTrim(Str(itemid)) + "_" + Format(Now, "yyyyMMddHHmmss") + ".ind"
|
||||||
|
FileOpen(11, XMLFilename, OpenMode.Output)
|
||||||
|
PrintLine(11, xmlstring)
|
||||||
|
FileClose(11)
|
||||||
|
xmlds.ReadXml(XMLFilename)
|
||||||
|
Dokumentfilename = Params.Inputverzeichnis + xmlds.Tables(0).Rows(0).Item(12)
|
||||||
|
xmlds.Dispose()
|
||||||
|
'Dokumentdatei schreiben
|
||||||
|
Dim MyData() As Byte
|
||||||
|
MyData = myRow.Item(4)
|
||||||
|
Dim K As Long
|
||||||
|
K = UBound(MyData)
|
||||||
|
Dim fs As New FileStream(Dokumentfilename, FileMode.OpenOrCreate, FileAccess.Write)
|
||||||
|
fs.Write(MyData, 0, K)
|
||||||
|
fs.Close()
|
||||||
|
fs = Nothing
|
||||||
|
Catch ex As Exception
|
||||||
|
FileClose(11)
|
||||||
|
End Try
|
||||||
|
CB = Nothing
|
||||||
|
ds = Nothing
|
||||||
|
da = Nothing
|
||||||
|
connection.Close()
|
||||||
|
connection = Nothing
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Write_Restartjobfiles(ByVal itemid As Integer)
|
||||||
|
Dim connection As New SqlConnection()
|
||||||
|
Dim da As New SqlDataAdapter("Select * From import_job where import_jobnr=" + LTrim(Str(itemid)), connection)
|
||||||
|
Dim CB As SqlCommandBuilder = New SqlCommandBuilder(da)
|
||||||
|
Dim ds As New DataSet()
|
||||||
|
|
||||||
|
Try
|
||||||
|
'Connectionstring zur Datenbank
|
||||||
|
connection.ConnectionString = Globals.sConnectionString_journale
|
||||||
|
connection.Open()
|
||||||
|
da.Fill(ds, "docs")
|
||||||
|
Dim myRow As DataRow
|
||||||
|
myRow = ds.Tables(0).Rows(0)
|
||||||
|
|
||||||
|
Dim MyData() As Byte
|
||||||
|
MyData = myRow.Item(7)
|
||||||
|
Dim K As Long
|
||||||
|
K = UBound(MyData)
|
||||||
|
Dim fs As New FileStream(Params.Inputverzeichnis + LTrim(Str(itemid)) + "_" + Format(Now, "yyyyMMddHHmmss") + ".ind", FileMode.OpenOrCreate, FileAccess.Write)
|
||||||
|
fs.Write(MyData, 0, K)
|
||||||
|
fs.Close()
|
||||||
|
fs = Nothing
|
||||||
|
Catch ex As Exception
|
||||||
|
End Try
|
||||||
|
CB = Nothing
|
||||||
|
ds = Nothing
|
||||||
|
da = Nothing
|
||||||
|
connection.Close()
|
||||||
|
connection = Nothing
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'''<summary></summary>
|
||||||
|
Private Function get_applikationen() As DataTable
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
Dim dtToReturn As DataTable = New DataTable()
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||||
|
scmCmdToExecute.CommandText = "dbo.sp_edoka_import_get_journalprotag"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
scmCmdToExecute.Connection = conn_edoka.scoDBConnection
|
||||||
|
Try
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
Return dtToReturn
|
||||||
|
Catch ex As Exception
|
||||||
|
Printout("Tägliche Journalerstellung fehlgeschlagen. " + ex.Message, EventLogEntryType.Error)
|
||||||
|
Return dtToReturn
|
||||||
|
Finally
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
sdaAdapter.Dispose()
|
||||||
|
dtToReturn.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function get_restartdok() As DataTable
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
Dim dtToReturn As DataTable = New DataTable()
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||||
|
scmCmdToExecute.CommandText = "dbo.sp_get_restartdok"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
scmCmdToExecute.Connection = conn_journale.scoDBConnection
|
||||||
|
Try
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
Return dtToReturn
|
||||||
|
Catch ex As Exception
|
||||||
|
Printout("Auslesen von erneut zu ladenden Dokumenten ist fehlgeschlagen. " + ex.Message, EventLogEntryType.Error)
|
||||||
|
Return dtToReturn
|
||||||
|
Finally
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
sdaAdapter.Dispose()
|
||||||
|
dtToReturn.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function get_restartjob() As DataTable
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
Dim dtToReturn As DataTable = New DataTable()
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||||
|
scmCmdToExecute.CommandText = "dbo.sp_get_restartjob"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
scmCmdToExecute.Connection = conn_journale.scoDBConnection
|
||||||
|
Try
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
Return dtToReturn
|
||||||
|
Catch ex As Exception
|
||||||
|
Printout("Auslesen von erneut zu ladenden Dokumenten ist fehlgeschlagen. " + ex.Message, EventLogEntryType.Error)
|
||||||
|
Return dtToReturn
|
||||||
|
Finally
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
sdaAdapter.Dispose()
|
||||||
|
dtToReturn.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
#Region "GSF"
|
||||||
|
|
||||||
|
Dim WithEvents OBJ_GSF As New EDKB08_GSF.Common()
|
||||||
|
|
||||||
|
'Anpassungen EBES-LSV'
|
||||||
|
Dim GSF As Boolean
|
||||||
|
|
||||||
|
Public Sub GSF_Verarbeitung(ByVal Startverzeichnis As String) Handles OBJ_GSF.StartVerarbeitung
|
||||||
|
Dim savewatch_directory As String
|
||||||
|
Dim saveInputVerzeichnis As String
|
||||||
|
saveInputVerzeichnis = Params.Inputverzeichnis
|
||||||
|
savewatch_directory = Watch_Directory
|
||||||
|
Try
|
||||||
|
Params.Inputverzeichnis = Startverzeichnis
|
||||||
|
Watch_Directory = Startverzeichnis
|
||||||
|
|
||||||
|
GSF = True
|
||||||
|
GSF_Timer.Enabled = False
|
||||||
|
EventStopped = True
|
||||||
|
IntSleep(5)
|
||||||
|
Verarbeiten()
|
||||||
|
EventStopped = False
|
||||||
|
GSF = False
|
||||||
|
GSF_Timer.Enabled = GSF_Timer.Interval > 60000
|
||||||
|
Catch
|
||||||
|
Finally
|
||||||
|
Params.Inputverzeichnis = saveInputVerzeichnis
|
||||||
|
Watch_Directory = savewatch_directory
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub GSF_Timer_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles GSF_Timer.Elapsed
|
||||||
|
PrintLog("GSF_Timer elapsed")
|
||||||
|
PrintOut("Event_Stopped:" + EventStopped.ToString)
|
||||||
|
If EventStopped Then Exit Sub
|
||||||
|
PrintLog("GSF_Timer elapsed")
|
||||||
|
GSF_Timer.Enabled = False
|
||||||
|
FileWatch.EnableRaisingEvents = False
|
||||||
|
OBJ_GSF.Sub_Init(Params.Prop_gsf_ConfigPath, Params.Prop_gsf_ConfigDateiendung)
|
||||||
|
OBJ_GSF.Start_Checking()
|
||||||
|
OBJ_GSF.Sub_End()
|
||||||
|
FileWatch.EnableRaisingEvents = True
|
||||||
|
GSF_Timer.Enabled = GSF_Timer.Interval > 60000
|
||||||
|
|
||||||
|
'20201114 - Verarbeitung der während GSF-Verarbeitung angelieferten Daten
|
||||||
|
DirectoryTimer_Elapsed(sender, e)
|
||||||
|
'20201114 - Ende
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub GSF_logging(ByVal logeintrag As String, ByVal itype As Integer) Handles OBJ_GSF.LogToBMS
|
||||||
|
PrintOut(logeintrag + " " + itype.ToString)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub DirectoryTimer_Elapsed(sender As Object, e As ElapsedEventArgs) Handles DirectoryTimer.Elapsed
|
||||||
|
PrintOut("Event_Stopped:" + EventStopped.ToString)
|
||||||
|
If EventStopped Then Exit Sub
|
||||||
|
GSF_Timer.Enabled = False
|
||||||
|
FileWatch.EnableRaisingEvents = False
|
||||||
|
FileOpen(99, Params.Directoryscanner, OpenMode.Input)
|
||||||
|
While Not EOF(99)
|
||||||
|
Dim s As String
|
||||||
|
Input(99, s)
|
||||||
|
Copyfiles(s, Params.Inputverzeichnis)
|
||||||
|
End While
|
||||||
|
Verarbeiten()
|
||||||
|
FileClose(99)
|
||||||
|
FileWatch.EnableRaisingEvents = True
|
||||||
|
GSF_Timer.Enabled = GSF_Timer.Interval > 60000
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub Copyfiles(inputdir As String, outputdir As String)
|
||||||
|
Dim destextension As String
|
||||||
|
For Each fi As FileInfo In New DirectoryInfo(inputdir).GetFiles
|
||||||
|
If UCase(fi.Extension) = ".XML" Then
|
||||||
|
destextension = ".ind"
|
||||||
|
Else
|
||||||
|
destextension = fi.Extension
|
||||||
|
End If
|
||||||
|
Try
|
||||||
|
File.Move(fi.FullName, outputdir + "\" + Path.GetFileNameWithoutExtension(fi.Name) + destextension)
|
||||||
|
Catch
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
11
Settings.vb
Normal file
11
Settings.vb
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
Namespace My
|
||||||
|
|
||||||
|
'Diese Klasse ermöglicht die Behandlung bestimmter Ereignisse der Einstellungsklasse:
|
||||||
|
' Das SettingChanging-Ereignis wird ausgelöst, bevor der Wert einer Einstellung geändert wird.
|
||||||
|
' Das PropertyChanged-Ereignis wird ausgelöst, nachdem der Wert einer Einstellung geändert wurde.
|
||||||
|
' Das SettingsLoaded-Ereignis wird ausgelöst, nachdem die Einstellungswerte geladen wurden.
|
||||||
|
' Das SettingsSaving-Ereignis wird ausgelöst, bevor die Einstellungswerte gespeichert werden.
|
||||||
|
Partial Friend NotInheritable Class MySettings
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
37
app.config
Normal file
37
app.config
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||||
|
<section name="EDKB08.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
|
</sectionGroup>
|
||||||
|
</configSections>
|
||||||
|
<system.diagnostics>
|
||||||
|
<sources>
|
||||||
|
<!-- Dieser Abschnitt definiert die Protokollierungskonfiguration für My.Application.Log -->
|
||||||
|
<source name="DefaultSource" switchName="DefaultSwitch">
|
||||||
|
<listeners>
|
||||||
|
<add name="FileLog"/>
|
||||||
|
<!-- Auskommentierung des nachfolgenden Abschnitts aufheben, um in das Anwendungsereignisprotokoll zu schreiben -->
|
||||||
|
<!--<add name="EventLog"/>-->
|
||||||
|
</listeners>
|
||||||
|
</source>
|
||||||
|
</sources>
|
||||||
|
<switches>
|
||||||
|
<add name="DefaultSwitch" value="Information" />
|
||||||
|
</switches>
|
||||||
|
<sharedListeners>
|
||||||
|
<add name="FileLog"
|
||||||
|
type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
|
||||||
|
initializeData="FileLogWriter"/>
|
||||||
|
<!-- Auskommentierung des nachfolgenden Abschnitts aufheben und APPLICATION_NAME durch den Namen der Anwendung ersetzen, um in das Anwendungsereignisprotokoll zu schreiben -->
|
||||||
|
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
|
||||||
|
</sharedListeners>
|
||||||
|
</system.diagnostics>
|
||||||
|
<userSettings>
|
||||||
|
<EDKB08.My.MySettings>
|
||||||
|
<setting name="Setting" serializeAs="String">
|
||||||
|
<value />
|
||||||
|
</setting>
|
||||||
|
</EDKB08.My.MySettings>
|
||||||
|
</userSettings>
|
||||||
|
</configuration>
|
||||||
BIN
bin/20201115_edkb08.zip
Normal file
BIN
bin/20201115_edkb08.zip
Normal file
Binary file not shown.
BIN
bin/20210411_EDKB08.zip
Normal file
BIN
bin/20210411_EDKB08.zip
Normal file
Binary file not shown.
BIN
bin/20210525_EDKB08.zip
Normal file
BIN
bin/20210525_EDKB08.zip
Normal file
Binary file not shown.
BIN
bin/20210816_EDKB08.zip
Normal file
BIN
bin/20210816_EDKB08.zip
Normal file
Binary file not shown.
BIN
bin/20211020_EDKB08.zip
Normal file
BIN
bin/20211020_EDKB08.zip
Normal file
Binary file not shown.
BIN
bin/20211115_edkb08.zip
Normal file
BIN
bin/20211115_edkb08.zip
Normal file
Binary file not shown.
BIN
bin/20211213_EDKB08.zip
Normal file
BIN
bin/20211213_EDKB08.zip
Normal file
Binary file not shown.
BIN
bin/20211219_edkb08.zip
Normal file
BIN
bin/20211219_edkb08.zip
Normal file
Binary file not shown.
BIN
bin/20220312_EDKB08.zip
Normal file
BIN
bin/20220312_EDKB08.zip
Normal file
Binary file not shown.
BIN
bin/20221012_EDKB08.zip
Normal file
BIN
bin/20221012_EDKB08.zip
Normal file
Binary file not shown.
BIN
bin/20221021_EDKB08.zip
Normal file
BIN
bin/20221021_EDKB08.zip
Normal file
Binary file not shown.
40
bin/CanonStruktur.xml
Normal file
40
bin/CanonStruktur.xml
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><NewDataSet>
|
||||||
|
<Import>
|
||||||
|
<FUNKTION>ADD</FUNKTION>
|
||||||
|
<PARTNERNR></PARTNERNR>
|
||||||
|
<VVNR/>
|
||||||
|
<BARCODEID/>
|
||||||
|
<KST/>
|
||||||
|
<PARTNER_KURZBEZEICHNUNG/>
|
||||||
|
<NAME/>
|
||||||
|
<VORNAME/>
|
||||||
|
<STRASSE/>
|
||||||
|
<PLZ/>
|
||||||
|
<ORT/>
|
||||||
|
<DOKUMENTTYPNR></DOKUMENTTYPNR>
|
||||||
|
<DATEINAME></DATEINAME>
|
||||||
|
<DATEIFORMAT></DATEIFORMAT>
|
||||||
|
<ERSTELLER></ERSTELLER>
|
||||||
|
<KST_ERSTELLER/>
|
||||||
|
<ARCHIVDATUM/>
|
||||||
|
<HERKUNFTSAPPLIKATION></HERKUNFTSAPPLIKATION>
|
||||||
|
<GESCHAEFTSFALLNR/>
|
||||||
|
<VVNR_INDEX/>
|
||||||
|
<DOKUMENTSTATUS/>
|
||||||
|
<ZUERSETZENDESDOKUMENT/>
|
||||||
|
<LIETEMPFAENGERMA/>
|
||||||
|
<LSITEMPFAENGERKST/>
|
||||||
|
<LISTEMPFAENGERNL/>
|
||||||
|
<DOKUMENTWERT1/>
|
||||||
|
<DOKUMENTWERT2/>
|
||||||
|
<DOKUMENTWERT3/>
|
||||||
|
<dokumentid/>
|
||||||
|
<blkunde/>
|
||||||
|
<QRCODE></QRCODE>
|
||||||
|
<EDK_DOKTYP/>
|
||||||
|
<SEND_AVQ></SEND_AVQ>
|
||||||
|
<SEND_EDK></SEND_EDK>
|
||||||
|
<DMS_ID/>
|
||||||
|
<STAPELKENNUNG></STAPELKENNUNG>
|
||||||
|
</Import>
|
||||||
|
</NewDataSet>
|
||||||
1
bin/DirectoriesToScan.txt
Normal file
1
bin/DirectoriesToScan.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
K:\EDOKA\EDKB08\Intranet_input\
|
||||||
BIN
bin/EDKB08.exe
Normal file
BIN
bin/EDKB08.exe
Normal file
Binary file not shown.
37
bin/EDKB08.exe.config
Normal file
37
bin/EDKB08.exe.config
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||||
|
<section name="EDKB08.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
|
</sectionGroup>
|
||||||
|
</configSections>
|
||||||
|
<system.diagnostics>
|
||||||
|
<sources>
|
||||||
|
<!-- Dieser Abschnitt definiert die Protokollierungskonfiguration für My.Application.Log -->
|
||||||
|
<source name="DefaultSource" switchName="DefaultSwitch">
|
||||||
|
<listeners>
|
||||||
|
<add name="FileLog"/>
|
||||||
|
<!-- Auskommentierung des nachfolgenden Abschnitts aufheben, um in das Anwendungsereignisprotokoll zu schreiben -->
|
||||||
|
<!--<add name="EventLog"/>-->
|
||||||
|
</listeners>
|
||||||
|
</source>
|
||||||
|
</sources>
|
||||||
|
<switches>
|
||||||
|
<add name="DefaultSwitch" value="Information" />
|
||||||
|
</switches>
|
||||||
|
<sharedListeners>
|
||||||
|
<add name="FileLog"
|
||||||
|
type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
|
||||||
|
initializeData="FileLogWriter"/>
|
||||||
|
<!-- Auskommentierung des nachfolgenden Abschnitts aufheben und APPLICATION_NAME durch den Namen der Anwendung ersetzen, um in das Anwendungsereignisprotokoll zu schreiben -->
|
||||||
|
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
|
||||||
|
</sharedListeners>
|
||||||
|
</system.diagnostics>
|
||||||
|
<userSettings>
|
||||||
|
<EDKB08.My.MySettings>
|
||||||
|
<setting name="Setting" serializeAs="String">
|
||||||
|
<value />
|
||||||
|
</setting>
|
||||||
|
</EDKB08.My.MySettings>
|
||||||
|
</userSettings>
|
||||||
|
</configuration>
|
||||||
BIN
bin/EDKB08.pdb
Normal file
BIN
bin/EDKB08.pdb
Normal file
Binary file not shown.
BIN
bin/EDKB08.vshost.exe
Normal file
BIN
bin/EDKB08.vshost.exe
Normal file
Binary file not shown.
37
bin/EDKB08.vshost.exe.config
Normal file
37
bin/EDKB08.vshost.exe.config
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||||
|
<section name="EDKB08.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
|
</sectionGroup>
|
||||||
|
</configSections>
|
||||||
|
<system.diagnostics>
|
||||||
|
<sources>
|
||||||
|
<!-- Dieser Abschnitt definiert die Protokollierungskonfiguration für My.Application.Log -->
|
||||||
|
<source name="DefaultSource" switchName="DefaultSwitch">
|
||||||
|
<listeners>
|
||||||
|
<add name="FileLog"/>
|
||||||
|
<!-- Auskommentierung des nachfolgenden Abschnitts aufheben, um in das Anwendungsereignisprotokoll zu schreiben -->
|
||||||
|
<!--<add name="EventLog"/>-->
|
||||||
|
</listeners>
|
||||||
|
</source>
|
||||||
|
</sources>
|
||||||
|
<switches>
|
||||||
|
<add name="DefaultSwitch" value="Information" />
|
||||||
|
</switches>
|
||||||
|
<sharedListeners>
|
||||||
|
<add name="FileLog"
|
||||||
|
type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
|
||||||
|
initializeData="FileLogWriter"/>
|
||||||
|
<!-- Auskommentierung des nachfolgenden Abschnitts aufheben und APPLICATION_NAME durch den Namen der Anwendung ersetzen, um in das Anwendungsereignisprotokoll zu schreiben -->
|
||||||
|
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
|
||||||
|
</sharedListeners>
|
||||||
|
</system.diagnostics>
|
||||||
|
<userSettings>
|
||||||
|
<EDKB08.My.MySettings>
|
||||||
|
<setting name="Setting" serializeAs="String">
|
||||||
|
<value />
|
||||||
|
</setting>
|
||||||
|
</EDKB08.My.MySettings>
|
||||||
|
</userSettings>
|
||||||
|
</configuration>
|
||||||
55
bin/EDKB08.vshost.exe.manifest
Normal file
55
bin/EDKB08.vshost.exe.manifest
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||||
|
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||||
|
<security>
|
||||||
|
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<!-- UAC-Manifestoptionen
|
||||||
|
Wenn Sie die Zugangsebene für das Windows-Benutzerkonto ändern möchten, ersetzen Sie den
|
||||||
|
requestedExecutionLevel-Knoten durch eines der folgenden Elemente.
|
||||||
|
|
||||||
|
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||||
|
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||||
|
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||||
|
|
||||||
|
Durch Angeben des requestedExecutionLevel-Knotens wird die Datei- und Registrierungsvirtualisierung deaktiviert.
|
||||||
|
Wenn Sie Datei- und Registrierungsvirtualisierung für Abwärts-
|
||||||
|
kompatibilität verwenden möchten, löschen Sie den requestedExecutionLevel-Knoten.
|
||||||
|
-->
|
||||||
|
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||||
|
</requestedPrivileges>
|
||||||
|
</security>
|
||||||
|
</trustInfo>
|
||||||
|
|
||||||
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
|
<application>
|
||||||
|
<!-- Eine Liste aller Windows-Versionen, mit denen die Anwendung kompatibel ist.
|
||||||
|
Windows wählt automatisch die am stärksten kompatible Umgebung aus.-->
|
||||||
|
|
||||||
|
<!-- Wenn die Anwendung mit Windows Vista kompatibel ist, heben Sie die Auskommentierung des folgenden supportedOS-Knotens auf-->
|
||||||
|
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS>-->
|
||||||
|
|
||||||
|
<!-- Wenn die Anwendung mit Windows 7 kompatibel ist, heben Sie die Kommentierung des folgenden supportedOS-Knotens auf.-->
|
||||||
|
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->
|
||||||
|
|
||||||
|
<!-- Wenn die Anwendung mit Windows 8 kompatibel ist, heben Sie die Auskommentierung des folgenden supportedOS-Knotens auf-->
|
||||||
|
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>-->
|
||||||
|
|
||||||
|
</application>
|
||||||
|
</compatibility>
|
||||||
|
|
||||||
|
<!-- Designs für allgemeine Windows-Steuerelemente und -Dialogfelder (Windows XP und höher) aktivieren -->
|
||||||
|
<!-- <dependency>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity
|
||||||
|
type="win32"
|
||||||
|
name="Microsoft.Windows.Common-Controls"
|
||||||
|
version="6.0.0.0"
|
||||||
|
processorArchitecture="*"
|
||||||
|
publicKeyToken="6595b64144ccf1df"
|
||||||
|
language="*"
|
||||||
|
/>
|
||||||
|
</dependentAssembly>
|
||||||
|
</dependency>-->
|
||||||
|
|
||||||
|
</asmv1:assembly>
|
||||||
1226
bin/EDKB08.xml
Normal file
1226
bin/EDKB08.xml
Normal file
File diff suppressed because it is too large
Load Diff
50
bin/EDKB08Struktur.xml
Normal file
50
bin/EDKB08Struktur.xml
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
<?xml version="1.0" standalone="yes"?>
|
||||||
|
<NewDataSet>
|
||||||
|
<Import>
|
||||||
|
<FUNKTION />
|
||||||
|
<PARTNERNR />
|
||||||
|
<VVNR />
|
||||||
|
<BARCODEID />
|
||||||
|
<KST />
|
||||||
|
<PARTNER_KURZBEZEICHNUNG />
|
||||||
|
<NAME />
|
||||||
|
<VORNAME />
|
||||||
|
<STRASSE />
|
||||||
|
<PLZ />
|
||||||
|
<ORT />
|
||||||
|
<DOKUMENTTYPNR />
|
||||||
|
<DATEINAME />
|
||||||
|
<DATEIFORMAT />
|
||||||
|
<ERSTELLER />
|
||||||
|
<KST_ERSTELLER />
|
||||||
|
<ARCHIVDATUM />
|
||||||
|
<HERKUNFTSAPPLIKATION />
|
||||||
|
<GESCHAEFTSFALLNR />
|
||||||
|
<VVNR_INDEX />
|
||||||
|
<DOKUMENTSTATUS />
|
||||||
|
<ZUERSETZENDESDOKUMENT />
|
||||||
|
<LIETEMPFAENGERMA />
|
||||||
|
<LSITEMPFAENGERKST />
|
||||||
|
<LISTEMPFAENGERNL />
|
||||||
|
<DOKUMENTWERT1 />
|
||||||
|
<DOKUMENTWERT2 />
|
||||||
|
<DOKUMENTWERT3 />
|
||||||
|
<DOKUMENTWERT4 />
|
||||||
|
<DOKUMENTWERT5 />
|
||||||
|
<DOKUMENTWERT6 />
|
||||||
|
<DOKUMENTWERT7 />
|
||||||
|
<DOKUMENTWERT8 />
|
||||||
|
<DOKUMENTWERT9 />
|
||||||
|
<DOKUMENTWERT10 />
|
||||||
|
<DOKUMENTWERT11 />
|
||||||
|
<DOKUMENTWERT12 />
|
||||||
|
<DOKUMENTWERT13 />
|
||||||
|
<DOKUMENTWERT14 />
|
||||||
|
<DOKUMENTWERT15 />
|
||||||
|
<DOKUMENTWERT16 />
|
||||||
|
<DOKUMENTWERT17 />
|
||||||
|
<DOKUMENTWERT18 />
|
||||||
|
<DOKUMENTWERT19 />
|
||||||
|
<DOKUMENTWERT20 />
|
||||||
|
</Import>
|
||||||
|
</NewDataSet>
|
||||||
BIN
bin/EDKB08_GSF.dll
Normal file
BIN
bin/EDKB08_GSF.dll
Normal file
Binary file not shown.
BIN
bin/EDKB08_GSF.pdb
Normal file
BIN
bin/EDKB08_GSF.pdb
Normal file
Binary file not shown.
10
bin/EDKB08_GSF.xml
Normal file
10
bin/EDKB08_GSF.xml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<doc>
|
||||||
|
<assembly>
|
||||||
|
<name>
|
||||||
|
EDKB08_GSF
|
||||||
|
</name>
|
||||||
|
</assembly>
|
||||||
|
<members>
|
||||||
|
</members>
|
||||||
|
</doc>
|
||||||
34
bin/InstallUtil.InstallLog
Normal file
34
bin/InstallUtil.InstallLog
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
|
||||||
|
Eine transaktive Installation wird ausgeführt.
|
||||||
|
|
||||||
|
Die Installationsphase wird gestartet.
|
||||||
|
Die Protokolldatei enthält den Fortschritt der Assembly E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\edkb08.exe.
|
||||||
|
Die Datei befindet sich in E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\edkb08.InstallLog.
|
||||||
|
|
||||||
|
Während der Installationsphase ist eine Ausnahme aufgetreten.
|
||||||
|
System.Security.SecurityException: Die Quelle wurde nicht gefunden, aber einige oder alle Ereignisprotokolle konnten nicht durchsucht werden. Protokolle, auf die kein Zugriff möglich war: Security.
|
||||||
|
|
||||||
|
Die Rollbackphase der Installation wird gestartet.
|
||||||
|
Die Protokolldatei enthält den Fortschritt der Assembly E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\edkb08.exe.
|
||||||
|
Die Datei befindet sich in E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\edkb08.InstallLog.
|
||||||
|
|
||||||
|
Die Rollbackphase wurde erfolgreich abgeschlossen.
|
||||||
|
|
||||||
|
Die transaktive Installation ist abgeschlossen.
|
||||||
|
|
||||||
|
Eine transaktive Installation wird ausgeführt.
|
||||||
|
|
||||||
|
Die Installationsphase wird gestartet.
|
||||||
|
Die Protokolldatei enthält den Fortschritt der Assembly E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\edkb08.exe.
|
||||||
|
Die Datei befindet sich in E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\edkb08.InstallLog.
|
||||||
|
|
||||||
|
Während der Installationsphase ist eine Ausnahme aufgetreten.
|
||||||
|
System.Security.SecurityException: Die Quelle wurde nicht gefunden, aber einige oder alle Ereignisprotokolle konnten nicht durchsucht werden. Protokolle, auf die kein Zugriff möglich war: Security.
|
||||||
|
|
||||||
|
Die Rollbackphase der Installation wird gestartet.
|
||||||
|
Die Protokolldatei enthält den Fortschritt der Assembly E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\edkb08.exe.
|
||||||
|
Die Datei befindet sich in E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\edkb08.InstallLog.
|
||||||
|
|
||||||
|
Die Rollbackphase wurde erfolgreich abgeschlossen.
|
||||||
|
|
||||||
|
Die transaktive Installation ist abgeschlossen.
|
||||||
4
bin/SP_DoktypPerson.txt
Normal file
4
bin/SP_DoktypPerson.txt
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
2156
|
||||||
|
2154
|
||||||
|
2155
|
||||||
|
2153
|
||||||
BIN
bin/System.Web.dll
Normal file
BIN
bin/System.Web.dll
Normal file
Binary file not shown.
1
bin/Uebersteuerung_AVQSend.txt
Normal file
1
bin/Uebersteuerung_AVQSend.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
1436
|
||||||
1
bin/avaloqconn.cfg
Normal file
1
bin/avaloqconn.cfg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Data Source=DATG01.TGKB; User Id=tkb$i_edoka; Password=Edoka1234$1; Integrated Security=no;
|
||||||
1
bin/bms_conn.cfg
Normal file
1
bin/bms_conn.cfg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
¹µÈ¦rȽ¹¿¸ª‰¿Çx…½³»É·¥¹u¨À¦¾·¼‘–’¥¾©¿È®¿Àeŏɯ®ÆÎn»»´‰’¦¾»ºË´ÄÀÁ¸®É®»ºe»¬’ĦµÀ³¸mȮƱ‚†xŽŠºÅºÀd¶¹‚¿€Â©ÈÇ˴Ĺ‹nÀ½º~…€
|
||||||
32
bin/edkb08.InstallLog
Normal file
32
bin/edkb08.InstallLog
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
Assembly E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\edkb08.exe wird installiert.
|
||||||
|
Betroffene Parameter:
|
||||||
|
logtoconsole =
|
||||||
|
logfile = E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\edkb08.InstallLog
|
||||||
|
assemblypath = E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\edkb08.exe
|
||||||
|
Dienst EDKB08WS wird installiert...
|
||||||
|
Die EventLog-Quelle EDKB08WS im Protokoll Application wird erstellt...
|
||||||
|
Assembly E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\edkb08.exe wird zurückgesetzt.
|
||||||
|
Betroffene Parameter:
|
||||||
|
logtoconsole =
|
||||||
|
logfile = E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\edkb08.InstallLog
|
||||||
|
assemblypath = E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\edkb08.exe
|
||||||
|
Der vorherige Zustand des Ereignisprotokolls für die Quelle EDKB08WS wird wiederhergestellt.
|
||||||
|
Während der Rollbackphase des Installers System.Diagnostics.EventLogInstaller ist eine Ausnahme aufgetreten.
|
||||||
|
System.Security.SecurityException: Die Quelle wurde nicht gefunden, aber einige oder alle Ereignisprotokolle konnten nicht durchsucht werden. Protokolle, auf die kein Zugriff möglich war: Security.
|
||||||
|
Während der Rollbackphase der Installation ist eine Ausnahme aufgetreten. Diese Ausnahme wird ignoriert, und der Rollback wird fortgesetzt. Der ursprüngliche Zustand des Computers wird jedoch möglicherweise nicht vollständig wiederhergestellt, nachdem der Rollback beendet ist.
|
||||||
|
Assembly E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\edkb08.exe wird installiert.
|
||||||
|
Betroffene Parameter:
|
||||||
|
logtoconsole =
|
||||||
|
assemblypath = E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\edkb08.exe
|
||||||
|
logfile = E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\edkb08.InstallLog
|
||||||
|
Dienst EDKB08WS wird installiert...
|
||||||
|
Die EventLog-Quelle EDKB08WS im Protokoll Application wird erstellt...
|
||||||
|
Assembly E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\edkb08.exe wird zurückgesetzt.
|
||||||
|
Betroffene Parameter:
|
||||||
|
logtoconsole =
|
||||||
|
assemblypath = E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\edkb08.exe
|
||||||
|
logfile = E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\edkb08.InstallLog
|
||||||
|
Der vorherige Zustand des Ereignisprotokolls für die Quelle EDKB08WS wird wiederhergestellt.
|
||||||
|
Während der Rollbackphase des Installers System.Diagnostics.EventLogInstaller ist eine Ausnahme aufgetreten.
|
||||||
|
System.Security.SecurityException: Die Quelle wurde nicht gefunden, aber einige oder alle Ereignisprotokolle konnten nicht durchsucht werden. Protokolle, auf die kein Zugriff möglich war: Security.
|
||||||
|
Während der Rollbackphase der Installation ist eine Ausnahme aufgetreten. Diese Ausnahme wird ignoriert, und der Rollback wird fortgesetzt. Der ursprüngliche Zustand des Computers wird jedoch möglicherweise nicht vollständig wiederhergestellt, nachdem der Rollback beendet ist.
|
||||||
BIN
bin/edkb08.zip
Normal file
BIN
bin/edkb08.zip
Normal file
Binary file not shown.
BIN
bin/edkb08.zip_old
Normal file
BIN
bin/edkb08.zip_old
Normal file
Binary file not shown.
1
bin/edokaconn.cfg
Normal file
1
bin/edokaconn.cfg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Data Source=shu00;Initial Catalog=edoka;Persist Security Info=False;workstation id =;packet size=4096;User ID=sa;Password=*shu29
|
||||||
51
bin/gsf/Archiv/ABGE.xmlx
Normal file
51
bin/gsf/Archiv/ABGE.xmlx
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<root>
|
||||||
|
<config>
|
||||||
|
<!-- Name der Anwendung -->
|
||||||
|
<RootName>EBES</RootName>
|
||||||
|
|
||||||
|
<!-- Kein Net Use notwendig.
|
||||||
|
Erlaubte Typen:
|
||||||
|
- 0: Ohne Net Use (Direkte Pfadangabe)
|
||||||
|
- 1: mit Net Use
|
||||||
|
-->
|
||||||
|
<MitNetUse>0</MitNetUse>
|
||||||
|
|
||||||
|
<!-- Net Use Parameter -->
|
||||||
|
<NetUseParameter>\\sbttgzvsrv01.tgcorp.ch\steuer_imaqtg</NetUseParameter>
|
||||||
|
|
||||||
|
<!-- Pfad der Source Dateien
|
||||||
|
Immer mit \ am Schluss
|
||||||
|
-->
|
||||||
|
<PfadSourceFiles>\\sbttgzvsrv01.tgcorp.ch\steuer_imaqtg\</PfadSourceFiles>
|
||||||
|
|
||||||
|
<!-- Anmeldung mit User Notwendig.
|
||||||
|
Erlaubte Typen:
|
||||||
|
- 0: Ohne
|
||||||
|
- 1: mit Anmeldung
|
||||||
|
-->
|
||||||
|
<NetUseNT>0</NetUseNT>
|
||||||
|
|
||||||
|
<!-- Share Benutzer inkl. Domain -->
|
||||||
|
<NetUseUser>user</NetUseUser>
|
||||||
|
|
||||||
|
<!-- Share Passwort -->
|
||||||
|
<NetUsePW>password</NetUsePW>
|
||||||
|
|
||||||
|
<!-- Dateiendung Org SourceFiles -->
|
||||||
|
<DateiEndung_Org_Files>xml</DateiEndung_Org_Files>
|
||||||
|
|
||||||
|
<!-- Dateiendung OK SourceFiles -->
|
||||||
|
<DateiEndung_OK_Files>xmx</DateiEndung_OK_Files>
|
||||||
|
|
||||||
|
<!-- Dateiendung Error SourceFiles -->
|
||||||
|
<DateiEndung_Error_Files>xer</DateiEndung_Error_Files>
|
||||||
|
|
||||||
|
<!-- Dateiendung Error SourceFiles -->
|
||||||
|
<DateiEndung_ErrorEDKB08_Files>xee</DateiEndung_ErrorEDKB08_Files>
|
||||||
|
|
||||||
|
<!-- Temppfad fuer neue SourceFiles -->
|
||||||
|
<PfadTempSourceFiles>D:\edoka\EDKB08\tmp_abge\</PfadTempSourceFiles>
|
||||||
|
|
||||||
|
</config>
|
||||||
|
</root>
|
||||||
51
bin/gsf/Archiv/EBES.xmlx
Normal file
51
bin/gsf/Archiv/EBES.xmlx
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<root>
|
||||||
|
<config>
|
||||||
|
<!-- Name der Anwendung -->
|
||||||
|
<RootName>EBES</RootName>
|
||||||
|
|
||||||
|
<!-- Kein Net Use notwendig.
|
||||||
|
Erlaubte Typen:
|
||||||
|
- 0: Ohne Net Use (Direkte Pfadangabe)
|
||||||
|
- 1: mit Net Use
|
||||||
|
-->
|
||||||
|
<MitNetUse>0</MitNetUse>
|
||||||
|
|
||||||
|
<!-- Net Use Parameter -->
|
||||||
|
<NetUseParameter>d:\edoka\edkb08\agtguv</NetUseParameter>
|
||||||
|
|
||||||
|
<!-- Pfad der Source Dateien
|
||||||
|
Immer mit \ am Schluss
|
||||||
|
-->
|
||||||
|
<PfadSourceFiles>d:\edoka\edkb08\agtguv\</PfadSourceFiles>
|
||||||
|
|
||||||
|
<!-- Anmeldung mit User Notwendig.
|
||||||
|
Erlaubte Typen:
|
||||||
|
- 0: Ohne
|
||||||
|
- 1: mit Anmeldung
|
||||||
|
-->
|
||||||
|
<NetUseNT>0</NetUseNT>
|
||||||
|
|
||||||
|
<!-- Share Benutzer inkl. Domain -->
|
||||||
|
<NetUseUser>user</NetUseUser>
|
||||||
|
|
||||||
|
<!-- Share Passwort -->
|
||||||
|
<NetUsePW>password</NetUsePW>
|
||||||
|
|
||||||
|
<!-- Dateiendung Org SourceFiles -->
|
||||||
|
<DateiEndung_Org_Files>xml</DateiEndung_Org_Files>
|
||||||
|
|
||||||
|
<!-- Dateiendung OK SourceFiles -->
|
||||||
|
<DateiEndung_OK_Files>xmx</DateiEndung_OK_Files>
|
||||||
|
|
||||||
|
<!-- Dateiendung Error SourceFiles -->
|
||||||
|
<DateiEndung_Error_Files>xer</DateiEndung_Error_Files>
|
||||||
|
|
||||||
|
<!-- Dateiendung Error SourceFiles -->
|
||||||
|
<DateiEndung_ErrorEDKB08_Files>xee</DateiEndung_ErrorEDKB08_Files>
|
||||||
|
|
||||||
|
<!-- Temppfad fuer neue SourceFiles -->
|
||||||
|
<PfadTempSourceFiles>D:\edoka\EDKB08\tmp_ebes\</PfadTempSourceFiles>
|
||||||
|
|
||||||
|
</config>
|
||||||
|
</root>
|
||||||
52
bin/gsf/Archiv/Intranet.xmlc
Normal file
52
bin/gsf/Archiv/Intranet.xmlc
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<root>
|
||||||
|
<config>
|
||||||
|
<!-- Name der Anwendung -->
|
||||||
|
<RootName>LSV</RootName>
|
||||||
|
|
||||||
|
<!-- Kein Net Use notwendig.
|
||||||
|
Erlaubte Typen:
|
||||||
|
- 0: Ohne Net Use (Direkte Pfadangabe)
|
||||||
|
- 1: mit Net Use
|
||||||
|
-->
|
||||||
|
<MitNetUse>0</MitNetUse>
|
||||||
|
|
||||||
|
<!-- Net Use Parameter -->
|
||||||
|
<NetUseParameter>d:\edoka\edkb08\agtglv</NetUseParameter>
|
||||||
|
|
||||||
|
<!-- Pfad der Source Dateien
|
||||||
|
Immer mit \ am Schluss
|
||||||
|
-->
|
||||||
|
<PfadSourceFiles>d:\edoka\edkb08\agtglv\</PfadSourceFiles>
|
||||||
|
|
||||||
|
<!-- Anmeldung mit User Notwendig.
|
||||||
|
Erlaubte Typen:
|
||||||
|
- 0: Ohne
|
||||||
|
- 1: mit Anmeldung
|
||||||
|
-->
|
||||||
|
<NetUseNT>0</NetUseNT>
|
||||||
|
|
||||||
|
<!-- Share Benutzer inkl. Domain -->
|
||||||
|
<NetUseUser>user</NetUseUser>
|
||||||
|
|
||||||
|
<!-- Share Passwort -->
|
||||||
|
<NetUsePW>password</NetUsePW>
|
||||||
|
|
||||||
|
<!-- Dateiendung Org SourceFiles -->
|
||||||
|
<DateiEndung_Org_Files>xml</DateiEndung_Org_Files>
|
||||||
|
|
||||||
|
<!-- Dateiendung OK SourceFiles -->
|
||||||
|
<DateiEndung_OK_Files>xmx</DateiEndung_OK_Files>
|
||||||
|
|
||||||
|
<!-- Dateiendung Error SourceFiles -->
|
||||||
|
<DateiEndung_Error_Files>xer</DateiEndung_Error_Files>
|
||||||
|
|
||||||
|
<!-- Dateiendung Error SourceFiles -->
|
||||||
|
<DateiEndung_ErrorEDKB08_Files>xee</DateiEndung_ErrorEDKB08_Files>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Temppfad fuer neue SourceFiles -->
|
||||||
|
<PfadTempSourceFiles>D:\edoka\EDKB08\tmp_lsv\</PfadTempSourceFiles>
|
||||||
|
|
||||||
|
</config>
|
||||||
|
</root>
|
||||||
52
bin/gsf/Archiv/LSV.xmlc
Normal file
52
bin/gsf/Archiv/LSV.xmlc
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<root>
|
||||||
|
<config>
|
||||||
|
<!-- Name der Anwendung -->
|
||||||
|
<RootName>LSV</RootName>
|
||||||
|
|
||||||
|
<!-- Kein Net Use notwendig.
|
||||||
|
Erlaubte Typen:
|
||||||
|
- 0: Ohne Net Use (Direkte Pfadangabe)
|
||||||
|
- 1: mit Net Use
|
||||||
|
-->
|
||||||
|
<MitNetUse>0</MitNetUse>
|
||||||
|
|
||||||
|
<!-- Net Use Parameter -->
|
||||||
|
<NetUseParameter>d:\edoka\edkb08\agtglv</NetUseParameter>
|
||||||
|
|
||||||
|
<!-- Pfad der Source Dateien
|
||||||
|
Immer mit \ am Schluss
|
||||||
|
-->
|
||||||
|
<PfadSourceFiles>d:\edoka\edkb08\agtglv\</PfadSourceFiles>
|
||||||
|
|
||||||
|
<!-- Anmeldung mit User Notwendig.
|
||||||
|
Erlaubte Typen:
|
||||||
|
- 0: Ohne
|
||||||
|
- 1: mit Anmeldung
|
||||||
|
-->
|
||||||
|
<NetUseNT>0</NetUseNT>
|
||||||
|
|
||||||
|
<!-- Share Benutzer inkl. Domain -->
|
||||||
|
<NetUseUser>user</NetUseUser>
|
||||||
|
|
||||||
|
<!-- Share Passwort -->
|
||||||
|
<NetUsePW>password</NetUsePW>
|
||||||
|
|
||||||
|
<!-- Dateiendung Org SourceFiles -->
|
||||||
|
<DateiEndung_Org_Files>xml</DateiEndung_Org_Files>
|
||||||
|
|
||||||
|
<!-- Dateiendung OK SourceFiles -->
|
||||||
|
<DateiEndung_OK_Files>xmx</DateiEndung_OK_Files>
|
||||||
|
|
||||||
|
<!-- Dateiendung Error SourceFiles -->
|
||||||
|
<DateiEndung_Error_Files>xer</DateiEndung_Error_Files>
|
||||||
|
|
||||||
|
<!-- Dateiendung Error SourceFiles -->
|
||||||
|
<DateiEndung_ErrorEDKB08_Files>xee</DateiEndung_ErrorEDKB08_Files>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Temppfad fuer neue SourceFiles -->
|
||||||
|
<PfadTempSourceFiles>D:\edoka\EDKB08\tmp_lsv\</PfadTempSourceFiles>
|
||||||
|
|
||||||
|
</config>
|
||||||
|
</root>
|
||||||
51
bin/gsf/EBES.xml
Normal file
51
bin/gsf/EBES.xml
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<root>
|
||||||
|
<config>
|
||||||
|
<!-- Name der Anwendung -->
|
||||||
|
<RootName>EBES</RootName>
|
||||||
|
|
||||||
|
<!-- Kein Net Use notwendig.
|
||||||
|
Erlaubte Typen:
|
||||||
|
- 0: Ohne Net Use (Direkte Pfadangabe)
|
||||||
|
- 1: mit Net Use
|
||||||
|
-->
|
||||||
|
<MitNetUse>0</MitNetUse>
|
||||||
|
|
||||||
|
<!-- Net Use Parameter -->
|
||||||
|
<NetUseParameter>k:\edoka\edkb08\agtguv\input</NetUseParameter>
|
||||||
|
|
||||||
|
<!-- Pfad der Source Dateien
|
||||||
|
Immer mit \ am Schluss
|
||||||
|
-->
|
||||||
|
<PfadSourceFiles>k:\edoka\edkb08\agtguv\input\</PfadSourceFiles>
|
||||||
|
|
||||||
|
<!-- Anmeldung mit User Notwendig.
|
||||||
|
Erlaubte Typen:
|
||||||
|
- 0: Ohne
|
||||||
|
- 1: mit Anmeldung
|
||||||
|
-->
|
||||||
|
<NetUseNT>0</NetUseNT>
|
||||||
|
|
||||||
|
<!-- Share Benutzer inkl. Domain -->
|
||||||
|
<NetUseUser>user</NetUseUser>
|
||||||
|
|
||||||
|
<!-- Share Passwort -->
|
||||||
|
<NetUsePW>password</NetUsePW>
|
||||||
|
|
||||||
|
<!-- Dateiendung Org SourceFiles -->
|
||||||
|
<DateiEndung_Org_Files>xml</DateiEndung_Org_Files>
|
||||||
|
|
||||||
|
<!-- Dateiendung OK SourceFiles -->
|
||||||
|
<DateiEndung_OK_Files>xmx</DateiEndung_OK_Files>
|
||||||
|
|
||||||
|
<!-- Dateiendung Error SourceFiles -->
|
||||||
|
<DateiEndung_Error_Files>xer</DateiEndung_Error_Files>
|
||||||
|
|
||||||
|
<!-- Dateiendung Error SourceFiles -->
|
||||||
|
<DateiEndung_ErrorEDKB08_Files>xee</DateiEndung_ErrorEDKB08_Files>
|
||||||
|
|
||||||
|
<!-- Temppfad fuer neue SourceFiles -->
|
||||||
|
<PfadTempSourceFiles>k:\edoka\EDKB08\tmp_ebes\</PfadTempSourceFiles>
|
||||||
|
|
||||||
|
</config>
|
||||||
|
</root>
|
||||||
51
bin/gsf/VITRUV.XMLxxx
Normal file
51
bin/gsf/VITRUV.XMLxxx
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<root>
|
||||||
|
<config>
|
||||||
|
<!-- Name der Anwendung -->
|
||||||
|
<RootName>VITRUV</RootName>
|
||||||
|
|
||||||
|
<!-- Kein Net Use notwendig.
|
||||||
|
Erlaubte Typen:
|
||||||
|
- 0: Ohne Net Use (Direkte Pfadangabe)
|
||||||
|
- 1: mit Net Use
|
||||||
|
-->
|
||||||
|
<MitNetUse>1</MitNetUse>
|
||||||
|
|
||||||
|
<!-- Net Use Parameter -->
|
||||||
|
<NetUseParameter>x: https://webdav.vitruv.ch/CH_ThurgauerKB/VitTransfer/Export</NetUseParameter>
|
||||||
|
|
||||||
|
<!-- Pfad der Source Dateien
|
||||||
|
Immer mit \ am Schluss
|
||||||
|
-->
|
||||||
|
<PfadSourceFiles>X:</PfadSourceFiles>
|
||||||
|
|
||||||
|
<!-- Anmeldung mit User Notwendig.
|
||||||
|
Erlaubte Typen:
|
||||||
|
- 0: Ohne
|
||||||
|
- 1: mit Anmeldung
|
||||||
|
-->
|
||||||
|
<NetUseNT>1</NetUseNT>
|
||||||
|
|
||||||
|
<!-- Share Benutzer inkl. Domain -->
|
||||||
|
<NetUseUser>wd-tkbedoka</NetUseUser>
|
||||||
|
|
||||||
|
<!-- Share Passwort -->
|
||||||
|
<NetUsePW>fR*zzbED2lec</NetUsePW>
|
||||||
|
|
||||||
|
<!-- Dateiendung Org SourceFiles -->
|
||||||
|
<DateiEndung_Org_Files></DateiEndung_Org_Files>
|
||||||
|
|
||||||
|
<!-- Dateiendung OK SourceFiles -->
|
||||||
|
<DateiEndung_OK_Files></DateiEndung_OK_Files>
|
||||||
|
|
||||||
|
<!-- Dateiendung Error SourceFiles -->
|
||||||
|
<DateiEndung_Error_Files></DateiEndung_Error_Files>
|
||||||
|
|
||||||
|
<!-- Dateiendung Error SourceFiles -->
|
||||||
|
<DateiEndung_ErrorEDKB08_Files></DateiEndung_ErrorEDKB08_Files>
|
||||||
|
|
||||||
|
<!-- Temppfad fuer neue SourceFiles -->
|
||||||
|
<PfadTempSourceFiles>k:\edoka\EDKB08\</PfadTempSourceFiles>
|
||||||
|
|
||||||
|
</config>
|
||||||
|
</root>
|
||||||
6
bin/gsf/WordChange.txt
Normal file
6
bin/gsf/WordChange.txt
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
ö;oe
|
||||||
|
ü;ue
|
||||||
|
ä;ae
|
||||||
|
Ä;AE
|
||||||
|
Ö;OE
|
||||||
|
Ü;UE
|
||||||
2
bin/install.bat
Normal file
2
bin/install.bat
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
C:\Windows\Microsoft.NET\Framework\v2.0.50727\installutil E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\edkb08.exe
|
||||||
|
pause
|
||||||
2
bin/install_U.bat
Normal file
2
bin/install_U.bat
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
C:\Windows\Microsoft.NET\Framework\v4.0.30319\installutil /u E:\Software-Projekte\EDOKA\batch\EDKB17\EDKB17\EDKB17\bin\Debug\edkb17.exe
|
||||||
|
pause
|
||||||
1
bin/journaleconn.cfg
Normal file
1
bin/journaleconn.cfg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Data Source=shu00;Initial Catalog=edoka_journale;Persist Security Info=False;workstation id =;packet size=4096;User ID=sa;Password=*shu29
|
||||||
1
bin/journaleconn_Mail.cfg
Normal file
1
bin/journaleconn_Mail.cfg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
data source=sb000233.tgcorp.ch;initial catalog=edoka_journale;workstation id=;packet size=4096;user id=tgedoka;password=$tgedoka33c
|
||||||
24
bin/parameters.cfg
Normal file
24
bin/parameters.cfg
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
Applikation-ID =10
|
||||||
|
Filepfad =k:\edoka\edkb08\
|
||||||
|
Temppfad =k:\edoka\edkb08\
|
||||||
|
Journaltimer in Minuten =1
|
||||||
|
Mail-Absender =stefan.hutter@tkb.ch
|
||||||
|
SMTP-Server =
|
||||||
|
DeleteOriginalfiles =1
|
||||||
|
Mailadresse_OK =stefan.hutter@tkb.ch
|
||||||
|
Mailadresse_NOK =stefan.hutter@tkb.ch
|
||||||
|
GSF_ConfigFiles =E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\gsf\
|
||||||
|
GSF_Timer in Minuten =1
|
||||||
|
GSF_Conf_Dateiendung =xml
|
||||||
|
Directorytimer =10
|
||||||
|
Directorys =E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\DirectoriesToScan.txt
|
||||||
|
IndexSicherung =k:\edoka\edkb08\indsik\
|
||||||
|
TempLogFilePath =K:\EDOKA\EDKB08\Log
|
||||||
|
Use FileEvent Rename =False
|
||||||
|
Wait_after_fileevent =3
|
||||||
|
Wait_before_process =5
|
||||||
|
Wait_before_xmlind_ren =1
|
||||||
|
Wait_before_readdir =2
|
||||||
|
Wait_before_fileproc =2
|
||||||
|
Wait_after_fileproc =2
|
||||||
|
|
||||||
15
bin/parameters.cfg.bak
Normal file
15
bin/parameters.cfg.bak
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
Applikation-ID =10
|
||||||
|
Filepfad =k:\edoka\edkb08\
|
||||||
|
Temppfad =k:\edoka\edkb08\
|
||||||
|
Journaltimer in Minuten =1
|
||||||
|
Mail-Absender =stefan.hutter@tkb.ch
|
||||||
|
SMTP-Server =
|
||||||
|
DeleteOriginalfiles =1
|
||||||
|
Mailadresse_OK =stefan.hutter@tkb.ch
|
||||||
|
Mailadresse_NOK =stefan.hutter@tkb.ch
|
||||||
|
GSF_ConfigFiles =E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\gsf\
|
||||||
|
GSF_Timer in Minuten =100
|
||||||
|
GSF_Conf_Dateiendung =xml
|
||||||
|
Directorytimer =10
|
||||||
|
Directorys =E:\Software-Projekte\EDOKA\batch\EDKB08\EDKB08\bin\DirectoriesToScan.txt
|
||||||
|
|
||||||
3
edkb08/Datenbank/Avaloq.vb
Normal file
3
edkb08/Datenbank/Avaloq.vb
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Module Avaloq
|
||||||
|
|
||||||
|
End Module
|
||||||
417
edkb08/Datenbank/Journale/clsImport_Daten.vb
Normal file
417
edkb08/Datenbank/Journale/clsImport_Daten.vb
Normal file
@@ -0,0 +1,417 @@
|
|||||||
|
' ///////////////////////////////////////////////////////////////////////////
|
||||||
|
' // Description: Data Access class for the table 'Import_Daten'
|
||||||
|
' // Generated by LLBLGen v1.2.1045.38210 Final on: Freitag, 15. April 2005, 13:41: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 'Import_Daten'.
|
||||||
|
' /// </summary>
|
||||||
|
Public Class clsImport_Daten
|
||||||
|
Inherits clsDBInteractionBase
|
||||||
|
|
||||||
|
#Region " Class Member Declarations "
|
||||||
|
|
||||||
|
Private m_blobDaten As SqlBinary
|
||||||
|
Private m_iImport_Jobnr, m_iImport_Data_Nr As SqlInt32
|
||||||
|
Private m_sDatenformat 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>iImport_Data_Nr</LI>
|
||||||
|
' /// <LI>iImport_Jobnr. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>sDatenformat. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>blobDaten. 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_inport_Import_Daten_Insert]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_Data_Nr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_Data_Nr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_Jobnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImport_Jobnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdatenformat", SqlDbType.VarChar, 3, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDatenformat))
|
||||||
|
Dim iLength As Integer = 0
|
||||||
|
If Not m_blobDaten.IsNull Then
|
||||||
|
iLength = m_blobDaten.Length
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobdaten", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobDaten))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_inport_Import_Daten_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("clsImport_Daten::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>iImport_Data_Nr</LI>
|
||||||
|
' /// <LI>iImport_Jobnr. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>sDatenformat. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>blobDaten. 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_inport_Import_Daten_Update]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_Data_Nr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_Data_Nr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_Jobnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImport_Jobnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdatenformat", SqlDbType.VarChar, 3, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDatenformat))
|
||||||
|
Dim iLength As Integer = 0
|
||||||
|
If Not m_blobDaten.IsNull Then
|
||||||
|
iLength = m_blobDaten.Length
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@blobdaten", SqlDbType.Image, iLength, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_blobDaten))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_inport_Import_Daten_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("clsImport_Daten::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>iImport_Data_Nr</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_inport_Import_Daten_Delete]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_Data_Nr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_Data_Nr))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_inport_Import_Daten_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("clsImport_Daten::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>iImport_Data_Nr</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// <LI>iImport_Data_Nr</LI>
|
||||||
|
' /// <LI>iImport_Jobnr</LI>
|
||||||
|
' /// <LI>sDatenformat</LI>
|
||||||
|
' /// <LI>blobDaten</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_inport_Import_Daten_SelectOne]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
Dim dtToReturn As DataTable = new DataTable("Import_Daten")
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iImport_Data_Nr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_Data_Nr))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_inport_Import_Daten_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
If dtToReturn.Rows.Count > 0 Then
|
||||||
|
m_iImport_Data_Nr = New SqlInt32(CType(dtToReturn.Rows(0)("Import_Data_Nr"), Integer))
|
||||||
|
If dtToReturn.Rows(0)("Import_Jobnr") Is System.DBNull.Value Then
|
||||||
|
m_iImport_Jobnr = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iImport_Jobnr = New SqlInt32(CType(dtToReturn.Rows(0)("Import_Jobnr"), Integer))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("datenformat") Is System.DBNull.Value Then
|
||||||
|
m_sDatenformat = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sDatenformat = New SqlString(CType(dtToReturn.Rows(0)("datenformat"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("daten") Is System.DBNull.Value Then
|
||||||
|
m_blobDaten = SqlBinary.Null
|
||||||
|
Else
|
||||||
|
m_blobDaten = New SqlBinary(CType(dtToReturn.Rows(0)("daten"), 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("clsImport_Daten::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_inport_Import_Daten_SelectAll]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
Dim dtToReturn As DataTable = new DataTable("Import_Daten")
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_inport_Import_Daten_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("clsImport_Daten::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 [iImport_Data_Nr]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iImport_Data_Nr
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
Dim iImport_Data_NrTmp As SqlInt32 = Value
|
||||||
|
If iImport_Data_NrTmp.IsNull Then
|
||||||
|
Throw New ArgumentOutOfRangeException("iImport_Data_Nr", "iImport_Data_Nr can't be NULL")
|
||||||
|
End If
|
||||||
|
m_iImport_Data_Nr = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iImport_Jobnr]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iImport_Jobnr
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iImport_Jobnr = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sDatenformat]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sDatenformat
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sDatenformat = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [blobDaten]() As SqlBinary
|
||||||
|
Get
|
||||||
|
Return m_blobDaten
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlBinary)
|
||||||
|
m_blobDaten = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
590
edkb08/Datenbank/Journale/clsImport_Eintrag.vb
Normal file
590
edkb08/Datenbank/Journale/clsImport_Eintrag.vb
Normal file
@@ -0,0 +1,590 @@
|
|||||||
|
' ///////////////////////////////////////////////////////////////////////////
|
||||||
|
' // Description: Data Access class for the table 'Import_Eintrag'
|
||||||
|
' // Generated by LLBLGen v1.2.1045.38210 Final on: Donnerstag, 14. April 2005, 21:41: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 'Import_Eintrag'.
|
||||||
|
' /// </summary>
|
||||||
|
Public Class clsImport_Eintrag
|
||||||
|
Inherits clsDBInteractionBase
|
||||||
|
|
||||||
|
#Region " Class Member Declarations "
|
||||||
|
|
||||||
|
Private m_daTS As SqlDateTime
|
||||||
|
Private m_iImport_Eintragnr, m_iImport_JobNr As SqlInt32
|
||||||
|
Private m_sEDOKA_Dokumentid, m_sStatustext, m_sEDOKA_Dokumenttyp, m_sIndexdaten, m_sApplikationsnr, m_sPartnernr, m_sRecordNo, m_sDateityp, m_sStatus, m_sDateiname As SqlString
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Class constructor.
|
||||||
|
' /// </summary>
|
||||||
|
Public Sub New()
|
||||||
|
' // Nothing for now.
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||||
|
' /// </summary>
|
||||||
|
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||||
|
' /// <remarks>
|
||||||
|
' /// Properties needed for this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iImport_JobNr. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>daTS. May be SqlDateTime.Null</LI>
|
||||||
|
' /// <LI>sRecordNo. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sPartnernr. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sDateityp. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sDateiname. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sStatus. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sStatustext. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sEDOKA_Dokumentid. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sEDOKA_Dokumenttyp. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sApplikationsnr. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sIndexdaten. May be SqlString.Null</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iImport_Eintragnr</LI>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// </remarks>
|
||||||
|
Overrides Public Function Insert() As Boolean
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[pr_inport_Import_Eintrag_Insert]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_JobNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImport_JobNr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daTS", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daTS))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sRecordNo", SqlDbType.VarChar, 4, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRecordNo))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sPartnernr", SqlDbType.VarChar, 9, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDateityp", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateityp))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDateiname", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateiname))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sStatus", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStatus))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sStatustext", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStatustext))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sEDOKA_Dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEDOKA_Dokumentid))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sEDOKA_Dokumenttyp", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEDOKA_Dokumenttyp))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sApplikationsnr", SqlDbType.VarChar, 4, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sApplikationsnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sIndexdaten", SqlDbType.VarChar, 4096, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sIndexdaten))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iImport_Eintragnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iImport_Eintragnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iImport_Eintragnr = scmCmdToExecute.Parameters.Item("@iImport_Eintragnr").Value
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_inport_Import_Eintrag_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("clsImport_Eintrag::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>iImport_Eintragnr</LI>
|
||||||
|
' /// <LI>iImport_JobNr. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>daTS. May be SqlDateTime.Null</LI>
|
||||||
|
' /// <LI>sRecordNo. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sPartnernr. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sDateityp. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sDateiname. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sStatus. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sStatustext. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sEDOKA_Dokumentid. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sEDOKA_Dokumenttyp. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sApplikationsnr. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sIndexdaten. 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_inport_Import_Eintrag_Update]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_Eintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_Eintragnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_JobNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImport_JobNr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daTS", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daTS))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sRecordNo", SqlDbType.VarChar, 4, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRecordNo))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sPartnernr", SqlDbType.VarChar, 9, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sPartnernr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDateityp", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateityp))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDateiname", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateiname))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sStatus", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStatus))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sStatustext", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sStatustext))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sEDOKA_Dokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEDOKA_Dokumentid))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sEDOKA_Dokumenttyp", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEDOKA_Dokumenttyp))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sApplikationsnr", SqlDbType.VarChar, 4, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sApplikationsnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sIndexdaten", SqlDbType.VarChar, 4096, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sIndexdaten))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_inport_Import_Eintrag_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("clsImport_Eintrag::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>iImport_Eintragnr</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_inport_Import_Eintrag_Delete]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_Eintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_Eintragnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_inport_Import_Eintrag_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("clsImport_Eintrag::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>iImport_Eintragnr</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// <LI>iImport_Eintragnr</LI>
|
||||||
|
' /// <LI>iImport_JobNr</LI>
|
||||||
|
' /// <LI>daTS</LI>
|
||||||
|
' /// <LI>sRecordNo</LI>
|
||||||
|
' /// <LI>sPartnernr</LI>
|
||||||
|
' /// <LI>sDateityp</LI>
|
||||||
|
' /// <LI>sDateiname</LI>
|
||||||
|
' /// <LI>sStatus</LI>
|
||||||
|
' /// <LI>sStatustext</LI>
|
||||||
|
' /// <LI>sEDOKA_Dokumentid</LI>
|
||||||
|
' /// <LI>sEDOKA_Dokumenttyp</LI>
|
||||||
|
' /// <LI>sApplikationsnr</LI>
|
||||||
|
' /// <LI>sIndexdaten</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_inport_Import_Eintrag_SelectOne]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
Dim dtToReturn As DataTable = new DataTable("Import_Eintrag")
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iImport_Eintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_Eintragnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_inport_Import_Eintrag_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
If dtToReturn.Rows.Count > 0 Then
|
||||||
|
m_iImport_Eintragnr = New SqlInt32(CType(dtToReturn.Rows(0)("Import_Eintragnr"), Integer))
|
||||||
|
If dtToReturn.Rows(0)("Import_JobNr") Is System.DBNull.Value Then
|
||||||
|
m_iImport_JobNr = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iImport_JobNr = New SqlInt32(CType(dtToReturn.Rows(0)("Import_JobNr"), Integer))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("TS") Is System.DBNull.Value Then
|
||||||
|
m_daTS = SqlDateTime.Null
|
||||||
|
Else
|
||||||
|
m_daTS = New SqlDateTime(CType(dtToReturn.Rows(0)("TS"), Date))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("RecordNo") Is System.DBNull.Value Then
|
||||||
|
m_sRecordNo = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sRecordNo = New SqlString(CType(dtToReturn.Rows(0)("RecordNo"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("Partnernr") Is System.DBNull.Value Then
|
||||||
|
m_sPartnernr = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sPartnernr = New SqlString(CType(dtToReturn.Rows(0)("Partnernr"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("Dateityp") Is System.DBNull.Value Then
|
||||||
|
m_sDateityp = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sDateityp = New SqlString(CType(dtToReturn.Rows(0)("Dateityp"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("Dateiname") Is System.DBNull.Value Then
|
||||||
|
m_sDateiname = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sDateiname = New SqlString(CType(dtToReturn.Rows(0)("Dateiname"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("Status") Is System.DBNull.Value Then
|
||||||
|
m_sStatus = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sStatus = New SqlString(CType(dtToReturn.Rows(0)("Status"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("Statustext") Is System.DBNull.Value Then
|
||||||
|
m_sStatustext = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sStatustext = New SqlString(CType(dtToReturn.Rows(0)("Statustext"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("EDOKA_Dokumentid") Is System.DBNull.Value Then
|
||||||
|
m_sEDOKA_Dokumentid = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sEDOKA_Dokumentid = New SqlString(CType(dtToReturn.Rows(0)("EDOKA_Dokumentid"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("EDOKA_Dokumenttyp") Is System.DBNull.Value Then
|
||||||
|
m_sEDOKA_Dokumenttyp = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sEDOKA_Dokumenttyp = New SqlString(CType(dtToReturn.Rows(0)("EDOKA_Dokumenttyp"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("Applikationsnr") Is System.DBNull.Value Then
|
||||||
|
m_sApplikationsnr = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sApplikationsnr = New SqlString(CType(dtToReturn.Rows(0)("Applikationsnr"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("Indexdaten") Is System.DBNull.Value Then
|
||||||
|
m_sIndexdaten = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sIndexdaten = New SqlString(CType(dtToReturn.Rows(0)("Indexdaten"), 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("clsImport_Eintrag::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_inport_Import_Eintrag_SelectAll]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
Dim dtToReturn As DataTable = new DataTable("Import_Eintrag")
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_inport_Import_Eintrag_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("clsImport_Eintrag::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 [iImport_Eintragnr]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iImport_Eintragnr
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
Dim iImport_EintragnrTmp As SqlInt32 = Value
|
||||||
|
If iImport_EintragnrTmp.IsNull Then
|
||||||
|
Throw New ArgumentOutOfRangeException("iImport_Eintragnr", "iImport_Eintragnr can't be NULL")
|
||||||
|
End If
|
||||||
|
m_iImport_Eintragnr = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iImport_JobNr]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iImport_JobNr
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iImport_JobNr = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [daTS]() As SqlDateTime
|
||||||
|
Get
|
||||||
|
Return m_daTS
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlDateTime)
|
||||||
|
m_daTS = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sRecordNo]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sRecordNo
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sRecordNo = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sPartnernr]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sPartnernr
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sPartnernr = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sDateityp]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sDateityp
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sDateityp = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sDateiname]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sDateiname
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sDateiname = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sStatus]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sStatus
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sStatus = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sStatustext]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sStatustext
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sStatustext = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sEDOKA_Dokumentid]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sEDOKA_Dokumentid
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sEDOKA_Dokumentid = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sEDOKA_Dokumenttyp]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sEDOKA_Dokumenttyp
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sEDOKA_Dokumenttyp = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sApplikationsnr]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sApplikationsnr
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sApplikationsnr = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sIndexdaten]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sIndexdaten
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sIndexdaten = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
469
edkb08/Datenbank/Journale/clsImport_Job.vb
Normal file
469
edkb08/Datenbank/Journale/clsImport_Job.vb
Normal file
@@ -0,0 +1,469 @@
|
|||||||
|
' ///////////////////////////////////////////////////////////////////////////
|
||||||
|
' // Description: Data Access class for the table 'Import_Job'
|
||||||
|
' // Generated by LLBLGen v1.2.1045.38210 Final on: Dienstag, 5. April 2005, 22:50: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 'Import_Job'.
|
||||||
|
' /// </summary>
|
||||||
|
Public Class clsImport_Job
|
||||||
|
Inherits clsDBInteractionBase
|
||||||
|
|
||||||
|
#Region " Class Member Declarations "
|
||||||
|
|
||||||
|
Private m_daEnde_TS, m_daStart_TS, m_daJournal_Datum As SqlDateTime
|
||||||
|
Private m_iJournal_Ausgeliefert, m_iApplikationNr, m_iImport_JobNr, m_iFeherhaft 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>daStart_TS. May be SqlDateTime.Null</LI>
|
||||||
|
' /// <LI>daEnde_TS. May be SqlDateTime.Null</LI>
|
||||||
|
' /// <LI>iFeherhaft. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>iApplikationNr. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>iJournal_Ausgeliefert. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>daJournal_Datum. May be SqlDateTime.Null</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iImport_JobNr</LI>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// </remarks>
|
||||||
|
Overrides Public Function Insert() As Boolean
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[pr_Import_Job_Insert]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daStart_TS", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daStart_TS))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daEnde_TS", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daEnde_TS))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iFeherhaft", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFeherhaft))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iApplikationNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iApplikationNr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iJournal_Ausgeliefert", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iJournal_Ausgeliefert))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daJournal_Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daJournal_Datum))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iImport_JobNr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iImport_JobNr))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iImport_JobNr = scmCmdToExecute.Parameters.Item("@iImport_JobNr").Value
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_Import_Job_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("clsImport_Job::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>iImport_JobNr</LI>
|
||||||
|
' /// <LI>daStart_TS. May be SqlDateTime.Null</LI>
|
||||||
|
' /// <LI>daEnde_TS. May be SqlDateTime.Null</LI>
|
||||||
|
' /// <LI>iFeherhaft. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>iApplikationNr. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>iJournal_Ausgeliefert. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>daJournal_Datum. 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_Import_Job_Update]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_JobNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_JobNr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daStart_TS", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daStart_TS))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daEnde_TS", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daEnde_TS))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iFeherhaft", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFeherhaft))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iApplikationNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iApplikationNr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iJournal_Ausgeliefert", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iJournal_Ausgeliefert))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daJournal_Datum", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daJournal_Datum))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_Import_Job_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("clsImport_Job::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>iImport_JobNr</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_Import_Job_Delete]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImport_JobNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_JobNr))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_Import_Job_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("clsImport_Job::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>iImport_JobNr</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// <LI>iImport_JobNr</LI>
|
||||||
|
' /// <LI>daStart_TS</LI>
|
||||||
|
' /// <LI>daEnde_TS</LI>
|
||||||
|
' /// <LI>iFeherhaft</LI>
|
||||||
|
' /// <LI>iApplikationNr</LI>
|
||||||
|
' /// <LI>iJournal_Ausgeliefert</LI>
|
||||||
|
' /// <LI>daJournal_Datum</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_Import_Job_SelectOne]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
Dim dtToReturn As DataTable = new DataTable("Import_Job")
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iImport_JobNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iImport_JobNr))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_Import_Job_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
If dtToReturn.Rows.Count > 0 Then
|
||||||
|
m_iImport_JobNr = New SqlInt32(CType(dtToReturn.Rows(0)("Import_JobNr"), Integer))
|
||||||
|
If dtToReturn.Rows(0)("Start_TS") Is System.DBNull.Value Then
|
||||||
|
m_daStart_TS = SqlDateTime.Null
|
||||||
|
Else
|
||||||
|
m_daStart_TS = New SqlDateTime(CType(dtToReturn.Rows(0)("Start_TS"), Date))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("Ende_TS") Is System.DBNull.Value Then
|
||||||
|
m_daEnde_TS = SqlDateTime.Null
|
||||||
|
Else
|
||||||
|
m_daEnde_TS = New SqlDateTime(CType(dtToReturn.Rows(0)("Ende_TS"), Date))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("Feherhaft") Is System.DBNull.Value Then
|
||||||
|
m_iFeherhaft = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iFeherhaft = New SqlInt32(CType(dtToReturn.Rows(0)("Feherhaft"), Integer))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("ApplikationNr") Is System.DBNull.Value Then
|
||||||
|
m_iApplikationNr = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iApplikationNr = New SqlInt32(CType(dtToReturn.Rows(0)("ApplikationNr"), Integer))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("Journal_Ausgeliefert") Is System.DBNull.Value Then
|
||||||
|
m_iJournal_Ausgeliefert = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iJournal_Ausgeliefert = New SqlInt32(CType(dtToReturn.Rows(0)("Journal_Ausgeliefert"), Integer))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("Journal_Datum") Is System.DBNull.Value Then
|
||||||
|
m_daJournal_Datum = SqlDateTime.Null
|
||||||
|
Else
|
||||||
|
m_daJournal_Datum = New SqlDateTime(CType(dtToReturn.Rows(0)("Journal_Datum"), 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("clsImport_Job::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_Import_Job_SelectAll]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
Dim dtToReturn As DataTable = new DataTable("Import_Job")
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_Import_Job_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("clsImport_Job::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 [iImport_JobNr]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iImport_JobNr
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
Dim iImport_JobNrTmp As SqlInt32 = Value
|
||||||
|
If iImport_JobNrTmp.IsNull Then
|
||||||
|
Throw New ArgumentOutOfRangeException("iImport_JobNr", "iImport_JobNr can't be NULL")
|
||||||
|
End If
|
||||||
|
m_iImport_JobNr = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [daStart_TS]() As SqlDateTime
|
||||||
|
Get
|
||||||
|
Return m_daStart_TS
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlDateTime)
|
||||||
|
m_daStart_TS = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [daEnde_TS]() As SqlDateTime
|
||||||
|
Get
|
||||||
|
Return m_daEnde_TS
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlDateTime)
|
||||||
|
m_daEnde_TS = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iFeherhaft]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iFeherhaft
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iFeherhaft = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iApplikationNr]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iApplikationNr
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iApplikationNr = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iJournal_Ausgeliefert]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iJournal_Ausgeliefert
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iJournal_Ausgeliefert = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [daJournal_Datum]() As SqlDateTime
|
||||||
|
Get
|
||||||
|
Return m_daJournal_Datum
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlDateTime)
|
||||||
|
m_daJournal_Datum = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
BIN
edkb08/Datenbank/Journale/vssver.scc
Normal file
BIN
edkb08/Datenbank/Journale/vssver.scc
Normal file
Binary file not shown.
390
edkb08/Datenbank/clsAvaloq.vb
Normal file
390
edkb08/Datenbank/clsAvaloq.vb
Normal file
@@ -0,0 +1,390 @@
|
|||||||
|
Imports System
|
||||||
|
Imports System.Data
|
||||||
|
Imports System.Data.OracleClient
|
||||||
|
|
||||||
|
Namespace Avaloq
|
||||||
|
|
||||||
|
Public Class SST
|
||||||
|
Const queryString As String = "k.tkb$out_dsp_in#.edoka_in"
|
||||||
|
Const queryStringGetValues As String = "k.tkb$out_dsp_in#.edoka_get_values"
|
||||||
|
Const queryStringOpenSession As String = "k.session#.open_session"
|
||||||
|
Const queryStringCloseSession As String = "k.session#.close_session"
|
||||||
|
Const avqOracleUser As String = "TKB$I_EDOKA"
|
||||||
|
Const avqSecUserId As Integer = 34
|
||||||
|
Const avqBuId As Integer = 1
|
||||||
|
|
||||||
|
Const edkFaDokTyp As String = "1688"
|
||||||
|
|
||||||
|
'Const edkDokBezeichnungKey As String = "edk_bez"
|
||||||
|
'Const edkDokBezeichnungDflt As String = "Antworttalon"
|
||||||
|
Dim connStrg As String
|
||||||
|
|
||||||
|
|
||||||
|
Private _hasErrors As Boolean
|
||||||
|
|
||||||
|
Private _dlvEDK As Boolean
|
||||||
|
Private _dlvAVQ As Boolean
|
||||||
|
|
||||||
|
Private _edkDokNr As String
|
||||||
|
Private _edkDokTypOvr As Boolean
|
||||||
|
Private _edkDokBezeichnung As String
|
||||||
|
Private _qrcode As String
|
||||||
|
Private _bpnr As String
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Public Sub New()
|
||||||
|
oread = System.IO.File.OpenText(DivFnkt.ApplicationPath + "avaloqconn.cfg")
|
||||||
|
connStrg = oread.ReadLine
|
||||||
|
oread.Close()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Public ReadOnly Property hasErrors() As Boolean
|
||||||
|
Get
|
||||||
|
Return _hasErrors
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property DeliverToEDK As Boolean
|
||||||
|
Get
|
||||||
|
Return _dlvEDK
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property DeliverToAVQ As Boolean
|
||||||
|
Get
|
||||||
|
Return _dlvAVQ
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property BPNr As String
|
||||||
|
Get
|
||||||
|
Return _bpnr
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property edkDokNr As String
|
||||||
|
Get
|
||||||
|
Return _edkDokNr
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property edkDokTypOvr As Boolean
|
||||||
|
Get
|
||||||
|
Return _edkDokTypOvr
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property edkDokBezeichnung As String
|
||||||
|
Get
|
||||||
|
Return _edkDokBezeichnung
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub InitItem()
|
||||||
|
_hasErrors = False
|
||||||
|
_dlvEDK = True
|
||||||
|
_dlvAVQ = True
|
||||||
|
_bpnr = Nothing
|
||||||
|
_edkDokNr = Nothing
|
||||||
|
_edkDokTypOvr = False
|
||||||
|
_edkDokBezeichnung = Nothing
|
||||||
|
_qrcode = Nothing
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub Prepare(ByVal BPNr As String, ByVal XmlDokTypNr As String, ByVal Instructions As String, ByVal dlvEDK As String, ByVal dlvAVQ As String)
|
||||||
|
PrintOut("AVQ Prepare Start")
|
||||||
|
InitItem()
|
||||||
|
|
||||||
|
If Instructions.IndexOf("dms_id:;bp_nr:;attr1:") > -1 Then
|
||||||
|
Instructions = Instructions.Replace("dms_id:;bp_nr:;attr1:", "")
|
||||||
|
End If
|
||||||
|
_qrcode = Instructions
|
||||||
|
|
||||||
|
If Len(XmlDokTypNr) > 0 Then
|
||||||
|
If XmlDokTypNr <> edkFaDokTyp Then
|
||||||
|
'DokTyp ist ein Edoka-Doktyp
|
||||||
|
_edkDokNr = XmlDokTypNr
|
||||||
|
_edkDokTypOvr = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If dlvEDK = "0" Then
|
||||||
|
_dlvEDK = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If dlvAVQ = "0" Then
|
||||||
|
_dlvAVQ = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Len(_qrcode) > 0 Then
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If _dlvAVQ = True Or _dlvEDK = True Then
|
||||||
|
|
||||||
|
GetAvqData(BPNr, Instructions)
|
||||||
|
|
||||||
|
If Len(BPNr) > 0 And BPNr <> _bpnr Then
|
||||||
|
|
||||||
|
'Wahrscheinlich falsch manuell indexiert
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
'If Len(_qrcode) > 0 Then
|
||||||
|
' _hasQrCode = True
|
||||||
|
'
|
||||||
|
''EDOKA-Dokument-Bezeichnung auslesen
|
||||||
|
'Try
|
||||||
|
'For Each pairs As String In _qrcode.Split(";"c)
|
||||||
|
'Dim values As String() = pairs.Split(":"c)
|
||||||
|
'If values(0) = edkDokBezeichnungKey Then
|
||||||
|
' _edkDokBezeichnung = values(1)
|
||||||
|
' End If
|
||||||
|
' Next
|
||||||
|
' Catch ex As Exception
|
||||||
|
' _hasErrors = True
|
||||||
|
' _edkDokBezeichnung = edkDokBezeichnungDflt
|
||||||
|
' End Try
|
||||||
|
' Else
|
||||||
|
' _hasErrors = True
|
||||||
|
' _edkDokBezeichnung = edkDokBezeichnungDflt
|
||||||
|
' End If
|
||||||
|
PrintOut("AVQ Prepare Ende")
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub GetAvqData(ByVal BPNr As String, ByVal Instructions As String)
|
||||||
|
PrintOut("GetAVQData Start")
|
||||||
|
Dim dataReader As OracleDataReader
|
||||||
|
Dim connectionSession As New OracleConnection
|
||||||
|
|
||||||
|
connectionSession.ConnectionString = connStrg
|
||||||
|
'OracleConnection.ClearAllPools()
|
||||||
|
Dim command As OracleCommand = connectionSession.CreateCommand()
|
||||||
|
|
||||||
|
command.Parameters.Clear()
|
||||||
|
|
||||||
|
command.CommandText = queryStringOpenSession
|
||||||
|
command.CommandType = CommandType.StoredProcedure
|
||||||
|
command.Parameters.Add(New OracleParameter("i_sec_user_id", OracleType.Int32)).Value = avqSecUserId
|
||||||
|
command.Parameters.Add(New OracleParameter("i_oracle_user", OracleType.VarChar)).Value = avqOracleUser
|
||||||
|
command.Parameters.Add(New OracleParameter("i_bu_id", OracleType.Int32)).Value = avqBuId
|
||||||
|
Try
|
||||||
|
connectionSession.Open()
|
||||||
|
command.ExecuteReader()
|
||||||
|
'dataReader.Read()
|
||||||
|
'dataReader.Close()
|
||||||
|
'dataReader.Dispose()
|
||||||
|
Catch ex As Exception
|
||||||
|
PrintOut("Get_AVQ_Data (1):" + ex.Message)
|
||||||
|
If connectionSession.State = ConnectionState.Closed Then
|
||||||
|
connectionSession.Open()
|
||||||
|
command.ExecuteReader()
|
||||||
|
End If
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
command.Parameters.Clear()
|
||||||
|
|
||||||
|
command.CommandText = queryStringGetValues
|
||||||
|
command.CommandType = CommandType.StoredProcedure
|
||||||
|
command.Parameters.Add(New OracleParameter("i_bp_nr", OracleType.VarChar)).Value = BPNr
|
||||||
|
command.Parameters.Add(New OracleParameter("i_instructions", OracleType.VarChar)).Value = Instructions
|
||||||
|
command.Parameters.Add(New OracleParameter("o_bp_nr", OracleType.Char, 4000)).Direction = ParameterDirection.Output
|
||||||
|
command.Parameters.Add(New OracleParameter("o_edk_dok_nr", OracleType.Char, 4000)).Direction = ParameterDirection.Output
|
||||||
|
command.Parameters.Add(New OracleParameter("o_edk_dok_bez", OracleType.Char, 4000)).Direction = ParameterDirection.Output
|
||||||
|
command.Parameters.Add(New OracleParameter("o_ret_val", OracleType.Char, 4000)).Direction = ParameterDirection.Output
|
||||||
|
|
||||||
|
Try
|
||||||
|
If connectionSession.State = ConnectionState.Open Then
|
||||||
|
'nothing
|
||||||
|
Else
|
||||||
|
connectionSession.Open()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
dataReader = command.ExecuteReader()
|
||||||
|
dataReader.Read()
|
||||||
|
|
||||||
|
Dim rbpnr As String = Trim(command.Parameters.Item(2).Value)
|
||||||
|
Dim rdoktypnr As String = Trim(command.Parameters.Item(3).Value)
|
||||||
|
Dim rdokbez As String = Trim(command.Parameters.Item(4).Value)
|
||||||
|
Dim ret As String = Trim(command.Parameters.Item(5).Value)
|
||||||
|
|
||||||
|
If ret = "OK" Then
|
||||||
|
_hasErrors = False
|
||||||
|
Else
|
||||||
|
_hasErrors = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
_bpnr = rbpnr
|
||||||
|
_edkDokBezeichnung = rdokbez 'Edoka-Dokumentbezeichnung für allfälligen Override UND für den Standard-Fall
|
||||||
|
|
||||||
|
If _edkDokTypOvr = False Then
|
||||||
|
'Falls Doktyp-Override aus Scanning kommt, ist Definition in Avaloq-Table-Editor irrelevant
|
||||||
|
If Len(rdoktypnr) > 0 And rdoktypnr <> edkFaDokTyp Then
|
||||||
|
_edkDokNr = rdoktypnr
|
||||||
|
_edkDokTypOvr = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
dataReader.Close()
|
||||||
|
dataReader.Dispose()
|
||||||
|
connectionSession.Close()
|
||||||
|
connectionSession.Dispose()
|
||||||
|
'ACHTUNG
|
||||||
|
connectionSession = Nothing
|
||||||
|
dataReader = Nothing
|
||||||
|
command = Nothing
|
||||||
|
|
||||||
|
'ACHTUNG
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
PrintOut("Get_AVQ_Data (2):" + ex.Message)
|
||||||
|
|
||||||
|
Console.WriteLine(ex.Message)
|
||||||
|
If connectionSession.State = ConnectionState.Open Then
|
||||||
|
command.Parameters.Clear()
|
||||||
|
command.CommandText = "k.session#.close_session"
|
||||||
|
command.CommandType = CommandType.StoredProcedure
|
||||||
|
Try
|
||||||
|
dataReader = command.ExecuteReader()
|
||||||
|
dataReader.Read()
|
||||||
|
dataReader.Close()
|
||||||
|
dataReader.Dispose()
|
||||||
|
Catch ex1 As Exception
|
||||||
|
|
||||||
|
End Try
|
||||||
|
|
||||||
|
command.Dispose()
|
||||||
|
connectionSession.Close()
|
||||||
|
connectionSession.Dispose()
|
||||||
|
Console.WriteLine(connectionSession.State)
|
||||||
|
End If
|
||||||
|
End Try
|
||||||
|
PrintOut("GetAVQData Ende")
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Public Sub SendData()
|
||||||
|
PrintOut("AVQ Sendata Start")
|
||||||
|
|
||||||
|
If Len(_bpnr) = 0 Or Len(_qrcode) = 0 Then
|
||||||
|
_hasErrors = True
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
_hasErrors = True 'wird bei erfolgreicher Übermittlung auf false gesetellt
|
||||||
|
|
||||||
|
Dim dataReader As OracleDataReader
|
||||||
|
Dim connectionSession As New OracleConnection
|
||||||
|
|
||||||
|
connectionSession.ConnectionString = connStrg
|
||||||
|
'OracleConnection.ClearAllPools()
|
||||||
|
Dim command As OracleCommand = connectionSession.CreateCommand()
|
||||||
|
|
||||||
|
command.Parameters.Clear()
|
||||||
|
|
||||||
|
command.CommandText = queryStringOpenSession
|
||||||
|
command.CommandType = CommandType.StoredProcedure
|
||||||
|
command.Parameters.Add(New OracleParameter("i_sec_user_id", OracleType.Int32)).Value = avqSecUserId
|
||||||
|
command.Parameters.Add(New OracleParameter("i_oracle_user", OracleType.VarChar)).Value = avqOracleUser
|
||||||
|
command.Parameters.Add(New OracleParameter("i_bu_id", OracleType.Int32)).Value = avqBuId
|
||||||
|
Try
|
||||||
|
connectionSession.Open()
|
||||||
|
'connectionSession.Open()
|
||||||
|
'connectionSession.open
|
||||||
|
'dataReader =
|
||||||
|
command.ExecuteReader()
|
||||||
|
'dataReader.Read()
|
||||||
|
'dataReader.Close()
|
||||||
|
'dataReader.Dispose()
|
||||||
|
Catch ex As Exception
|
||||||
|
PrintOut("AVQ Send_Data (1):" + ex.Message)
|
||||||
|
|
||||||
|
If connectionSession.State = ConnectionState.Closed Then
|
||||||
|
connectionSession.Open()
|
||||||
|
command.ExecuteReader()
|
||||||
|
End If
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
command.Parameters.Clear()
|
||||||
|
|
||||||
|
command.CommandText = queryString
|
||||||
|
command.CommandType = CommandType.StoredProcedure
|
||||||
|
command.Parameters.Add(New OracleParameter("i_bp_nr", OracleType.VarChar)).Value = _bpnr
|
||||||
|
command.Parameters.Add(New OracleParameter("i_instructions", OracleType.VarChar)).Value = _qrcode
|
||||||
|
command.Parameters.Add(New OracleParameter("o_ret_val", OracleType.VarChar, 20)).Direction = ParameterDirection.Output
|
||||||
|
|
||||||
|
Try
|
||||||
|
If connectionSession.State = ConnectionState.Open Then
|
||||||
|
'nothing
|
||||||
|
Else
|
||||||
|
connectionSession.Open()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
dataReader = command.ExecuteReader()
|
||||||
|
dataReader.Read()
|
||||||
|
|
||||||
|
Dim result As String = command.Parameters.Item(2).Value
|
||||||
|
If result = "OK" Then
|
||||||
|
_hasErrors = False
|
||||||
|
Else
|
||||||
|
_hasErrors = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
dataReader.Close()
|
||||||
|
dataReader.Dispose()
|
||||||
|
connectionSession.Close()
|
||||||
|
connectionSession.Dispose()
|
||||||
|
'ACHTUNG
|
||||||
|
connectionSession = Nothing
|
||||||
|
dataReader = Nothing
|
||||||
|
command = Nothing
|
||||||
|
|
||||||
|
'ACHTUNG
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
PrintOut("AVQ Send_Data (2):" + ex.Message)
|
||||||
|
|
||||||
|
Console.WriteLine(ex.Message)
|
||||||
|
If connectionSession.State = ConnectionState.Open Then
|
||||||
|
command.Parameters.Clear()
|
||||||
|
command.CommandText = "k.session#.close_session"
|
||||||
|
command.CommandType = CommandType.StoredProcedure
|
||||||
|
Try
|
||||||
|
dataReader = command.ExecuteReader()
|
||||||
|
dataReader.Read()
|
||||||
|
dataReader.Close()
|
||||||
|
dataReader.Dispose()
|
||||||
|
Catch ex1 As Exception
|
||||||
|
|
||||||
|
End Try
|
||||||
|
|
||||||
|
command.Dispose()
|
||||||
|
connectionSession.Close()
|
||||||
|
connectionSession.Dispose()
|
||||||
|
Console.WriteLine(connectionSession.State)
|
||||||
|
End If
|
||||||
|
End Try
|
||||||
|
PrintOut("AVQ Sendata Ende")
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Namespace
|
||||||
|
|
||||||
289
edkb08/Datenbank/clsConnectionProvider.vb
Normal file
289
edkb08/Datenbank/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: Sonntag, 18. Mai 2003, 00:06:25
|
||||||
|
' // 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
edkb08/Datenbank/clsDBInteractionBase.vb
Normal file
202
edkb08/Datenbank/clsDBInteractionBase.vb
Normal file
@@ -0,0 +1,202 @@
|
|||||||
|
' //////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
' // Description: Base class for Database Interaction.
|
||||||
|
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 18. Mai 2003, 00:06:25
|
||||||
|
' // 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
|
||||||
1890
edkb08/Datenbank/clsDokument.vb
Normal file
1890
edkb08/Datenbank/clsDokument.vb
Normal file
File diff suppressed because it is too large
Load Diff
591
edkb08/Datenbank/clsDokument_status.vb
Normal file
591
edkb08/Datenbank/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 = scmCmdToExecute.Parameters.Item("@idokument_statusnr").Value
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_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 = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
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>
|
||||||
|
Overrides Public 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 = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
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 = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
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>
|
||||||
|
Overrides Public 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 = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
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
|
||||||
751
edkb08/Datenbank/clsDokumentcoldindexwert.vb
Normal file
751
edkb08/Datenbank/clsDokumentcoldindexwert.vb
Normal file
@@ -0,0 +1,751 @@
|
|||||||
|
' ///////////////////////////////////////////////////////////////////////////
|
||||||
|
' // Description: Data Access class for the table 'dokumentcoldindexwert'
|
||||||
|
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 6. April 2005, 10:10:46
|
||||||
|
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||||
|
' ///////////////////////////////////////////////////////////////////////////
|
||||||
|
Imports System
|
||||||
|
Imports System.Data
|
||||||
|
Imports System.Data.SqlTypes
|
||||||
|
Imports System.Data.SqlClient
|
||||||
|
|
||||||
|
Namespace edokadb
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Data Access class for the table 'dokumentcoldindexwert'.
|
||||||
|
' /// </summary>
|
||||||
|
Public Class clsDokumentcoldindexwert
|
||||||
|
Inherits clsDBInteractionBase
|
||||||
|
|
||||||
|
#Region " Class Member Declarations "
|
||||||
|
|
||||||
|
Private m_bAktiv As SqlBoolean
|
||||||
|
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
|
||||||
|
Private m_iIndextyp, m_iColdindexwertnr, m_iMutierer, m_iMandantnr As SqlInt32
|
||||||
|
Private m_sNRSTA00, m_sNRDOC00, m_sBEGSF00, m_sBERES03, m_sBEUSR00, m_sBKPAR00, m_sNAVVG00, m_sDokumentid, m_sNRPAR00, m_sBEBEZ00, m_sBESTA00, m_sBEORT00, m_sDMSTA01, m_sBEDAT00 As SqlString
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Class constructor.
|
||||||
|
' /// </summary>
|
||||||
|
Public Sub New()
|
||||||
|
' // Nothing for now.
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||||
|
' /// </summary>
|
||||||
|
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||||
|
' /// <remarks>
|
||||||
|
' /// Properties needed for this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iIndextyp. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>sDokumentid. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sNRPAR00. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sBKPAR00. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sNAVVG00. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sBEBEZ00. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sDMSTA01. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sBEDAT00. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sBESTA00. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sBEORT00. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sNRDOC00. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sNRSTA00. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sBEGSF00. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sBEUSR00. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sBERES03. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||||
|
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||||
|
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iColdindexwertnr</LI>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// </remarks>
|
||||||
|
Public Overrides 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 = scmCmdToExecute.Parameters.Item("@icoldindexwertnr").Value
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_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>
|
||||||
|
Public Overrides 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 = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
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 = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
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>
|
||||||
|
Public Overrides 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 = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
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 = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
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
|
||||||
1390
edkb08/Datenbank/clsDokumenttyp.vb
Normal file
1390
edkb08/Datenbank/clsDokumenttyp.vb
Normal file
File diff suppressed because it is too large
Load Diff
891
edkb08/Datenbank/clsEdex_sb_serienbrief.vb
Normal file
891
edkb08/Datenbank/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
|
||||||
711
edkb08/Datenbank/clsFA_APPL.vb
Normal file
711
edkb08/Datenbank/clsFA_APPL.vb
Normal file
@@ -0,0 +1,711 @@
|
|||||||
|
' ///////////////////////////////////////////////////////////////////////////
|
||||||
|
' // Description: Data Access class for the table 'FA_APPL'
|
||||||
|
' // Generated by LLBLGen v1.2.1045.38210 Final on: Montag, 4. April 2005, 23:36:30
|
||||||
|
' // 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 'FA_APPL'.
|
||||||
|
' /// </summary>
|
||||||
|
Public Class clsFA_APPL
|
||||||
|
Inherits clsDBInteractionBase
|
||||||
|
|
||||||
|
#Region " Class Member Declarations "
|
||||||
|
|
||||||
|
Private m_bLog_In_DB, m_bLog_Per_Mail, m_bAktiv, m_bLog_Mit_DTO As SqlBoolean
|
||||||
|
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
|
||||||
|
Private m_iVerarbeitungsart, m_iMail_Periodizitaet, m_iMandantnr, m_iMutierer, m_iApplNr, m_iEDOKA_Mitarbeiter As SqlInt32
|
||||||
|
Private m_sReserve_2, m_sOutputFormat, m_sReserve_1, m_sInputverzeichnis, m_sMail_Empfaneger, m_sBezeichnung, m_sDTO_Parameter 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>iEDOKA_Mitarbeiter. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>sDTO_Parameter. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sReserve_1. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sReserve_2. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sInputverzeichnis. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>bLog_Per_Mail. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>bLog_In_DB. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>bLog_Mit_DTO. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>sMail_Empfaneger. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>iMail_Periodizitaet. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>iVerarbeitungsart. 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>iMandantnr. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>sOutputFormat. May be SqlString.Null</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iApplNr</LI>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// </remarks>
|
||||||
|
Overrides Public Function Insert() As Boolean
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[pr_edokaimport_FA_APPL_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("@iEDOKA_Mitarbeiter", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iEDOKA_Mitarbeiter))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDTO_Parameter", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDTO_Parameter))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sReserve_1", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReserve_1))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sReserve_2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReserve_2))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sInputverzeichnis", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sInputverzeichnis))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@bLog_Per_Mail", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bLog_Per_Mail))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@bLog_In_DB", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bLog_In_DB))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@bLog_Mit_DTO", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bLog_Mit_DTO))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sMail_Empfaneger", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sMail_Empfaneger))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iMail_Periodizitaet", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMail_Periodizitaet))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iVerarbeitungsart", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerarbeitungsart))
|
||||||
|
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("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sOutputFormat", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sOutputFormat))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iApplNr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iApplNr))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iApplNr = scmCmdToExecute.Parameters.Item("@iApplNr").Value
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_edokaimport_FA_APPL_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("clsFA_APPL::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>iApplNr</LI>
|
||||||
|
' /// <LI>sBezeichnung. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>iEDOKA_Mitarbeiter. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>sDTO_Parameter. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sReserve_1. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sReserve_2. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sInputverzeichnis. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>bLog_Per_Mail. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>bLog_In_DB. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>bLog_Mit_DTO. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>sMail_Empfaneger. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>iMail_Periodizitaet. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>iVerarbeitungsart. 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>iMandantnr. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>sOutputFormat. 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_edokaimport_FA_APPL_Update]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iApplNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iApplNr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iEDOKA_Mitarbeiter", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iEDOKA_Mitarbeiter))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sDTO_Parameter", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDTO_Parameter))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sReserve_1", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReserve_1))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sReserve_2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sReserve_2))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sInputverzeichnis", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sInputverzeichnis))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@bLog_Per_Mail", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bLog_Per_Mail))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@bLog_In_DB", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bLog_In_DB))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@bLog_Mit_DTO", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bLog_Mit_DTO))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sMail_Empfaneger", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sMail_Empfaneger))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iMail_Periodizitaet", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMail_Periodizitaet))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iVerarbeitungsart", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerarbeitungsart))
|
||||||
|
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("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sOutputFormat", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sOutputFormat))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_edokaimport_FA_APPL_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("clsFA_APPL::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>iApplNr</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_edokaimport_FA_APPL_Delete]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iApplNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iApplNr))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_edokaimport_FA_APPL_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("clsFA_APPL::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>iApplNr</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// <LI>iApplNr</LI>
|
||||||
|
' /// <LI>sBezeichnung</LI>
|
||||||
|
' /// <LI>iEDOKA_Mitarbeiter</LI>
|
||||||
|
' /// <LI>sDTO_Parameter</LI>
|
||||||
|
' /// <LI>sReserve_1</LI>
|
||||||
|
' /// <LI>sReserve_2</LI>
|
||||||
|
' /// <LI>sInputverzeichnis</LI>
|
||||||
|
' /// <LI>bLog_Per_Mail</LI>
|
||||||
|
' /// <LI>bLog_In_DB</LI>
|
||||||
|
' /// <LI>bLog_Mit_DTO</LI>
|
||||||
|
' /// <LI>sMail_Empfaneger</LI>
|
||||||
|
' /// <LI>iMail_Periodizitaet</LI>
|
||||||
|
' /// <LI>iVerarbeitungsart</LI>
|
||||||
|
' /// <LI>daErstellt_am</LI>
|
||||||
|
' /// <LI>daMutiert_am</LI>
|
||||||
|
' /// <LI>iMutierer</LI>
|
||||||
|
' /// <LI>bAktiv</LI>
|
||||||
|
' /// <LI>iMandantnr</LI>
|
||||||
|
' /// <LI>sOutputFormat</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_edokaimport_FA_APPL_SelectOne]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
Dim dtToReturn As DataTable = new DataTable("FA_APPL")
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iApplNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iApplNr))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_edokaimport_FA_APPL_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
If dtToReturn.Rows.Count > 0 Then
|
||||||
|
m_iApplNr = New SqlInt32(CType(dtToReturn.Rows(0)("ApplNr"), 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)("EDOKA_Mitarbeiter") Is System.DBNull.Value Then
|
||||||
|
m_iEDOKA_Mitarbeiter = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iEDOKA_Mitarbeiter = New SqlInt32(CType(dtToReturn.Rows(0)("EDOKA_Mitarbeiter"), Integer))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("DTO_Parameter") Is System.DBNull.Value Then
|
||||||
|
m_sDTO_Parameter = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sDTO_Parameter = New SqlString(CType(dtToReturn.Rows(0)("DTO_Parameter"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("Reserve_1") Is System.DBNull.Value Then
|
||||||
|
m_sReserve_1 = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sReserve_1 = New SqlString(CType(dtToReturn.Rows(0)("Reserve_1"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("Reserve_2") Is System.DBNull.Value Then
|
||||||
|
m_sReserve_2 = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sReserve_2 = New SqlString(CType(dtToReturn.Rows(0)("Reserve_2"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("Inputverzeichnis") Is System.DBNull.Value Then
|
||||||
|
m_sInputverzeichnis = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sInputverzeichnis = New SqlString(CType(dtToReturn.Rows(0)("Inputverzeichnis"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("Log_Per_Mail") Is System.DBNull.Value Then
|
||||||
|
m_bLog_Per_Mail = SqlBoolean.Null
|
||||||
|
Else
|
||||||
|
m_bLog_Per_Mail = New SqlBoolean(CType(dtToReturn.Rows(0)("Log_Per_Mail"), Boolean))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("Log_In_DB") Is System.DBNull.Value Then
|
||||||
|
m_bLog_In_DB = SqlBoolean.Null
|
||||||
|
Else
|
||||||
|
m_bLog_In_DB = New SqlBoolean(CType(dtToReturn.Rows(0)("Log_In_DB"), Boolean))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("Log_Mit_DTO") Is System.DBNull.Value Then
|
||||||
|
m_bLog_Mit_DTO = SqlBoolean.Null
|
||||||
|
Else
|
||||||
|
m_bLog_Mit_DTO = New SqlBoolean(CType(dtToReturn.Rows(0)("Log_Mit_DTO"), Boolean))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("Mail_Empfaneger") Is System.DBNull.Value Then
|
||||||
|
m_sMail_Empfaneger = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sMail_Empfaneger = New SqlString(CType(dtToReturn.Rows(0)("Mail_Empfaneger"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("Mail_Periodizitaet") Is System.DBNull.Value Then
|
||||||
|
m_iMail_Periodizitaet = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iMail_Periodizitaet = New SqlInt32(CType(dtToReturn.Rows(0)("Mail_Periodizitaet"), Integer))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("Verarbeitungsart") Is System.DBNull.Value Then
|
||||||
|
m_iVerarbeitungsart = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iVerarbeitungsart = New SqlInt32(CType(dtToReturn.Rows(0)("Verarbeitungsart"), 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)("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)("OutputFormat") Is System.DBNull.Value Then
|
||||||
|
m_sOutputFormat = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sOutputFormat = New SqlString(CType(dtToReturn.Rows(0)("OutputFormat"), 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("clsFA_APPL::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_edokaimport_FA_APPL_SelectAll]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
Dim dtToReturn As DataTable = new DataTable("FA_APPL")
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_edokaimport_FA_APPL_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("clsFA_APPL::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 [iApplNr]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iApplNr
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
Dim iApplNrTmp As SqlInt32 = Value
|
||||||
|
If iApplNrTmp.IsNull Then
|
||||||
|
Throw New ArgumentOutOfRangeException("iApplNr", "iApplNr can't be NULL")
|
||||||
|
End If
|
||||||
|
m_iApplNr = 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 [iEDOKA_Mitarbeiter]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iEDOKA_Mitarbeiter
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iEDOKA_Mitarbeiter = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sDTO_Parameter]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sDTO_Parameter
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sDTO_Parameter = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sReserve_1]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sReserve_1
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sReserve_1 = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sReserve_2]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sReserve_2
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sReserve_2 = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sInputverzeichnis]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sInputverzeichnis
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sInputverzeichnis = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [bLog_Per_Mail]() As SqlBoolean
|
||||||
|
Get
|
||||||
|
Return m_bLog_Per_Mail
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlBoolean)
|
||||||
|
m_bLog_Per_Mail = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [bLog_In_DB]() As SqlBoolean
|
||||||
|
Get
|
||||||
|
Return m_bLog_In_DB
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlBoolean)
|
||||||
|
m_bLog_In_DB = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [bLog_Mit_DTO]() As SqlBoolean
|
||||||
|
Get
|
||||||
|
Return m_bLog_Mit_DTO
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlBoolean)
|
||||||
|
m_bLog_Mit_DTO = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sMail_Empfaneger]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sMail_Empfaneger
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sMail_Empfaneger = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iMail_Periodizitaet]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iMail_Periodizitaet
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iMail_Periodizitaet = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iVerarbeitungsart]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iVerarbeitungsart
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iVerarbeitungsart = 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 [iMandantnr]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iMandantnr
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iMandantnr = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sOutputFormat]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sOutputFormat
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sOutputFormat = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
491
edkb08/Datenbank/clsFA_BCImport.vb
Normal file
491
edkb08/Datenbank/clsFA_BCImport.vb
Normal file
@@ -0,0 +1,491 @@
|
|||||||
|
' ///////////////////////////////////////////////////////////////////////////
|
||||||
|
' // Description: Data Access class for the table 'FA_BCImport'
|
||||||
|
' // Generated by LLBLGen v1.2.1045.38210 Final on: Montag, 4. April 2005, 23:36:30
|
||||||
|
' // 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 'FA_BCImport'.
|
||||||
|
' /// </summary>
|
||||||
|
Public Class clsFA_BCImport
|
||||||
|
Inherits clsDBInteractionBase
|
||||||
|
|
||||||
|
#Region " Class Member Declarations "
|
||||||
|
|
||||||
|
Private m_bAktiv As SqlBoolean
|
||||||
|
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
|
||||||
|
Private m_iStatus, m_iFabcimportnr As SqlInt32
|
||||||
|
Private m_sDateiformat, m_sDateiname, 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. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sDateiname. May be SqlString.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>bAktiv. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>sDateiformat. May be SqlString.Null</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iFabcimportnr</LI>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// </remarks>
|
||||||
|
Overrides Public Function Insert() As Boolean
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[pr_edokaimport_FA_BCImport_Insert]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdateiname", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateiname))
|
||||||
|
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("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdateiformat", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateiformat))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@ifabcimportnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iFabcimportnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iFabcimportnr = scmCmdToExecute.Parameters.Item("@ifabcimportnr").Value
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_edokaimport_FA_BCImport_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("clsFA_BCImport::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>iFabcimportnr</LI>
|
||||||
|
' /// <LI>sDokumentid. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sDateiname. May be SqlString.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>bAktiv. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>sDateiformat. 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_edokaimport_FA_BCImport_Update]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifabcimportnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFabcimportnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdateiname", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateiname))
|
||||||
|
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("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdateiformat", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDateiformat))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_edokaimport_FA_BCImport_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("clsFA_BCImport::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>iFabcimportnr</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_edokaimport_FA_BCImport_Delete]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifabcimportnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFabcimportnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_edokaimport_FA_BCImport_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("clsFA_BCImport::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>iFabcimportnr</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// <LI>iFabcimportnr</LI>
|
||||||
|
' /// <LI>sDokumentid</LI>
|
||||||
|
' /// <LI>sDateiname</LI>
|
||||||
|
' /// <LI>iStatus</LI>
|
||||||
|
' /// <LI>daErstellt_am</LI>
|
||||||
|
' /// <LI>daMutiert_am</LI>
|
||||||
|
' /// <LI>bAktiv</LI>
|
||||||
|
' /// <LI>sDateiformat</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_edokaimport_FA_BCImport_SelectOne]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
Dim dtToReturn As DataTable = new DataTable("FA_BCImport")
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@ifabcimportnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFabcimportnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_edokaimport_FA_BCImport_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
If dtToReturn.Rows.Count > 0 Then
|
||||||
|
m_iFabcimportnr = New SqlInt32(CType(dtToReturn.Rows(0)("fabcimportnr"), 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)("dateiname") Is System.DBNull.Value Then
|
||||||
|
m_sDateiname = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sDateiname = New SqlString(CType(dtToReturn.Rows(0)("dateiname"), String))
|
||||||
|
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)("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)("dateiformat") Is System.DBNull.Value Then
|
||||||
|
m_sDateiformat = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sDateiformat = New SqlString(CType(dtToReturn.Rows(0)("dateiformat"), 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("clsFA_BCImport::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_edokaimport_FA_BCImport_SelectAll]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
Dim dtToReturn As DataTable = new DataTable("FA_BCImport")
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_edokaimport_FA_BCImport_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("clsFA_BCImport::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 [iFabcimportnr]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iFabcimportnr
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
Dim iFabcimportnrTmp As SqlInt32 = Value
|
||||||
|
If iFabcimportnrTmp.IsNull Then
|
||||||
|
Throw New ArgumentOutOfRangeException("iFabcimportnr", "iFabcimportnr can't be NULL")
|
||||||
|
End If
|
||||||
|
m_iFabcimportnr = 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 [sDateiname]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sDateiname
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sDateiname = 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 [bAktiv]() As SqlBoolean
|
||||||
|
Get
|
||||||
|
Return m_bAktiv
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlBoolean)
|
||||||
|
m_bAktiv = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sDateiformat]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sDateiformat
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sDateiformat = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
490
edkb08/Datenbank/clsFA_Dokumenttyp.vb
Normal file
490
edkb08/Datenbank/clsFA_Dokumenttyp.vb
Normal file
@@ -0,0 +1,490 @@
|
|||||||
|
' ///////////////////////////////////////////////////////////////////////////
|
||||||
|
' // Description: Data Access class for the table 'FA_Dokumenttyp'
|
||||||
|
' // Generated by LLBLGen v1.2.1045.38210 Final on: Montag, 4. April 2005, 23:36:30
|
||||||
|
' // 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 'FA_Dokumenttyp'.
|
||||||
|
' /// </summary>
|
||||||
|
Public Class clsFA_Dokumenttyp
|
||||||
|
Inherits clsDBInteractionBase
|
||||||
|
|
||||||
|
#Region " Class Member Declarations "
|
||||||
|
|
||||||
|
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
|
||||||
|
Private m_iAktiv, m_iMutierer, m_iApplNr, m_iEintragnr, m_iEDOKA_Dokumenttyp As SqlInt32
|
||||||
|
Private m_sFA_Dokumenttyp 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>iApplNr. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>sFA_Dokumenttyp. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>iEDOKA_Dokumenttyp. 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>iAktiv. May be SqlInt32.Null</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iEintragnr</LI>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// </remarks>
|
||||||
|
Overrides Public Function Insert() As Boolean
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[pr_edokaimport_FA_Dokumenttyp_Insert]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iApplNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iApplNr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sFA_Dokumenttyp", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFA_Dokumenttyp))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iEDOKA_Dokumenttyp", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iEDOKA_Dokumenttyp))
|
||||||
|
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("@iaktiv", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAktiv))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iEintragnr", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iEintragnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iEintragnr = scmCmdToExecute.Parameters.Item("@iEintragnr").Value
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_edokaimport_FA_Dokumenttyp_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return True
|
||||||
|
Catch ex As Exception
|
||||||
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||||
|
Throw New Exception("clsFA_Dokumenttyp::Insert::Error occured.", ex)
|
||||||
|
Finally
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Close connection.
|
||||||
|
m_scoMainConnection.Close()
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Update method. This method will Update one existing row in the database.
|
||||||
|
' /// </summary>
|
||||||
|
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||||
|
' /// <remarks>
|
||||||
|
' /// Properties needed for this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iEintragnr</LI>
|
||||||
|
' /// <LI>iApplNr. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>sFA_Dokumenttyp. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>iEDOKA_Dokumenttyp. 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>iAktiv. 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_edokaimport_FA_Dokumenttyp_Update]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iEintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iEintragnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iApplNr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iApplNr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sFA_Dokumenttyp", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFA_Dokumenttyp))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iEDOKA_Dokumenttyp", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iEDOKA_Dokumenttyp))
|
||||||
|
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("@iaktiv", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iAktiv))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_edokaimport_FA_Dokumenttyp_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return True
|
||||||
|
Catch ex As Exception
|
||||||
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||||
|
Throw New Exception("clsFA_Dokumenttyp::Update::Error occured.", ex)
|
||||||
|
Finally
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Close connection.
|
||||||
|
m_scoMainConnection.Close()
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
|
||||||
|
' /// </summary>
|
||||||
|
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||||
|
' /// <remarks>
|
||||||
|
' /// Properties needed for this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iEintragnr</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_edokaimport_FA_Dokumenttyp_Delete]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iEintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iEintragnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_edokaimport_FA_Dokumenttyp_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return True
|
||||||
|
Catch ex As Exception
|
||||||
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||||
|
Throw New Exception("clsFA_Dokumenttyp::Delete::Error occured.", ex)
|
||||||
|
Finally
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Close connection.
|
||||||
|
m_scoMainConnection.Close()
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
|
||||||
|
' /// </summary>
|
||||||
|
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||||
|
' /// <remarks>
|
||||||
|
' /// Properties needed for this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iEintragnr</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// <LI>iEintragnr</LI>
|
||||||
|
' /// <LI>iApplNr</LI>
|
||||||
|
' /// <LI>sFA_Dokumenttyp</LI>
|
||||||
|
' /// <LI>iEDOKA_Dokumenttyp</LI>
|
||||||
|
' /// <LI>daErstellt_am</LI>
|
||||||
|
' /// <LI>daMutiert_am</LI>
|
||||||
|
' /// <LI>iMutierer</LI>
|
||||||
|
' /// <LI>iAktiv</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_edokaimport_FA_Dokumenttyp_SelectOne]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
Dim dtToReturn As DataTable = new DataTable("FA_Dokumenttyp")
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iEintragnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iEintragnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_edokaimport_FA_Dokumenttyp_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
If dtToReturn.Rows.Count > 0 Then
|
||||||
|
m_iEintragnr = New SqlInt32(CType(dtToReturn.Rows(0)("Eintragnr"), Integer))
|
||||||
|
If dtToReturn.Rows(0)("ApplNr") Is System.DBNull.Value Then
|
||||||
|
m_iApplNr = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iApplNr = New SqlInt32(CType(dtToReturn.Rows(0)("ApplNr"), Integer))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("FA_Dokumenttyp") Is System.DBNull.Value Then
|
||||||
|
m_sFA_Dokumenttyp = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sFA_Dokumenttyp = New SqlString(CType(dtToReturn.Rows(0)("FA_Dokumenttyp"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("EDOKA_Dokumenttyp") Is System.DBNull.Value Then
|
||||||
|
m_iEDOKA_Dokumenttyp = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iEDOKA_Dokumenttyp = New SqlInt32(CType(dtToReturn.Rows(0)("EDOKA_Dokumenttyp"), 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_iAktiv = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iAktiv = New SqlInt32(CType(dtToReturn.Rows(0)("aktiv"), 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("clsFA_Dokumenttyp::SelectOne::Error occured.", ex)
|
||||||
|
Finally
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Close connection.
|
||||||
|
m_scoMainConnection.Close()
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
sdaAdapter.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||||
|
' /// </summary>
|
||||||
|
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||||
|
' /// <remarks>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// </remarks>
|
||||||
|
Overrides Public Function SelectAll() As DataTable
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[pr_edokaimport_FA_Dokumenttyp_SelectAll]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
Dim dtToReturn As DataTable = new DataTable("FA_Dokumenttyp")
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_edokaimport_FA_Dokumenttyp_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return dtToReturn
|
||||||
|
Catch ex As Exception
|
||||||
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||||
|
Throw New Exception("clsFA_Dokumenttyp::SelectAll::Error occured.", ex)
|
||||||
|
Finally
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Close connection.
|
||||||
|
m_scoMainConnection.Close()
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
sdaAdapter.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
#Region " Class Property Declarations "
|
||||||
|
|
||||||
|
Public Property [iEintragnr]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iEintragnr
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
Dim iEintragnrTmp As SqlInt32 = Value
|
||||||
|
If iEintragnrTmp.IsNull Then
|
||||||
|
Throw New ArgumentOutOfRangeException("iEintragnr", "iEintragnr can't be NULL")
|
||||||
|
End If
|
||||||
|
m_iEintragnr = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iApplNr]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iApplNr
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iApplNr = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sFA_Dokumenttyp]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sFA_Dokumenttyp
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sFA_Dokumenttyp = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iEDOKA_Dokumenttyp]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iEDOKA_Dokumenttyp
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iEDOKA_Dokumenttyp = 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 [iAktiv]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iAktiv
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iAktiv = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
490
edkb08/Datenbank/clsKey_tabelle.vb
Normal file
490
edkb08/Datenbank/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 = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
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 = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
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>
|
||||||
|
Overrides Public 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 = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
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 = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
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>
|
||||||
|
Overrides Public 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 = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
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
|
||||||
261
edkb08/Datenbank/clsMehrfachscann.vb
Normal file
261
edkb08/Datenbank/clsMehrfachscann.vb
Normal file
@@ -0,0 +1,261 @@
|
|||||||
|
' ///////////////////////////////////////////////////////////////////////////
|
||||||
|
' // Description: Data Access class for the table 'mehrfachscann'
|
||||||
|
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 19. Juli 2006, 15:16:33
|
||||||
|
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||||
|
' ///////////////////////////////////////////////////////////////////////////
|
||||||
|
Imports System
|
||||||
|
Imports System.Data
|
||||||
|
Imports System.Data.SqlTypes
|
||||||
|
Imports System.Data.SqlClient
|
||||||
|
|
||||||
|
Namespace edokadb
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Data Access class for the table 'mehrfachscann'.
|
||||||
|
' /// </summary>
|
||||||
|
Public Class clsMehrfachscann
|
||||||
|
Inherits clsDBInteractionBase
|
||||||
|
|
||||||
|
#Region " Class Member Declarations "
|
||||||
|
|
||||||
|
Private m_bAktiv As SqlBoolean
|
||||||
|
Private m_daStatusdatum, m_daMutiert_am, m_daErstellt_am, m_daMutationsdatum As SqlDateTime
|
||||||
|
Private m_iMutierer, m_iNreintrag, m_iStatus, m_iMandantnr As SqlInt32
|
||||||
|
Private m_sDokumentid, m_sStapelnr, m_sColddokumentid As SqlString
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Class constructor.
|
||||||
|
' /// </summary>
|
||||||
|
Public Sub New()
|
||||||
|
' // Nothing for now.
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||||
|
' /// </summary>
|
||||||
|
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||||
|
' /// <remarks>
|
||||||
|
' /// Properties needed for this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iNreintrag</LI>
|
||||||
|
' /// <LI>daMutationsdatum</LI>
|
||||||
|
' /// <LI>sColddokumentid. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sStapelnr</LI>
|
||||||
|
' /// <LI>iStatus</LI>
|
||||||
|
' /// <LI>daStatusdatum</LI>
|
||||||
|
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||||
|
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||||
|
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>sDokumentid. May be SqlString.Null</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// </remarks>
|
||||||
|
Overrides Public Function Insert() As Boolean
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
'scmCmdToExecute.CommandText = "dbo.[pv_mehrfachscann_Insert]"
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[pv_mehrfachscann_Insert_EDKB02]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@inreintrag", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNreintrag))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutationsdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daMutationsdatum))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@scolddokumentid", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sColddokumentid))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sstapelnr", SqlDbType.VarChar, 20, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sStapelnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@dastatusdatum", SqlDbType.DateTime, 8, ParameterDirection.Input, False, 23, 3, "", DataRowVersion.Proposed, m_daStatusdatum))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pv_mehrfachscann_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("clsMehrfachscann::Insert::Error occured.", ex)
|
||||||
|
Finally
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Close connection.
|
||||||
|
m_scoMainConnection.Close()
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
#Region " Class Property Declarations "
|
||||||
|
|
||||||
|
Public Property [iNreintrag]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iNreintrag
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
Dim iNreintragTmp As SqlInt32 = Value
|
||||||
|
If iNreintragTmp.IsNull Then
|
||||||
|
Throw New ArgumentOutOfRangeException("iNreintrag", "iNreintrag can't be NULL")
|
||||||
|
End If
|
||||||
|
m_iNreintrag = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [daMutationsdatum]() As SqlDateTime
|
||||||
|
Get
|
||||||
|
Return m_daMutationsdatum
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlDateTime)
|
||||||
|
Dim daMutationsdatumTmp As SqlDateTime = Value
|
||||||
|
If daMutationsdatumTmp.IsNull Then
|
||||||
|
Throw New ArgumentOutOfRangeException("daMutationsdatum", "daMutationsdatum can't be NULL")
|
||||||
|
End If
|
||||||
|
m_daMutationsdatum = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sColddokumentid]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sColddokumentid
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sColddokumentid = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sStapelnr]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sStapelnr
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
Dim sStapelnrTmp As SqlString = Value
|
||||||
|
If sStapelnrTmp.IsNull Then
|
||||||
|
Throw New ArgumentOutOfRangeException("sStapelnr", "sStapelnr can't be NULL")
|
||||||
|
End If
|
||||||
|
m_sStapelnr = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iStatus]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iStatus
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
Dim iStatusTmp As SqlInt32 = Value
|
||||||
|
If iStatusTmp.IsNull Then
|
||||||
|
Throw New ArgumentOutOfRangeException("iStatus", "iStatus can't be NULL")
|
||||||
|
End If
|
||||||
|
m_iStatus = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [daStatusdatum]() As SqlDateTime
|
||||||
|
Get
|
||||||
|
Return m_daStatusdatum
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlDateTime)
|
||||||
|
Dim daStatusdatumTmp As SqlDateTime = Value
|
||||||
|
If daStatusdatumTmp.IsNull Then
|
||||||
|
Throw New ArgumentOutOfRangeException("daStatusdatum", "daStatusdatum can't be NULL")
|
||||||
|
End If
|
||||||
|
m_daStatusdatum = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iMandantnr]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iMandantnr
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iMandantnr = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [bAktiv]() As SqlBoolean
|
||||||
|
Get
|
||||||
|
Return m_bAktiv
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlBoolean)
|
||||||
|
m_bAktiv = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [daErstellt_am]() As SqlDateTime
|
||||||
|
Get
|
||||||
|
Return m_daErstellt_am
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlDateTime)
|
||||||
|
m_daErstellt_am = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [daMutiert_am]() As SqlDateTime
|
||||||
|
Get
|
||||||
|
Return m_daMutiert_am
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlDateTime)
|
||||||
|
m_daMutiert_am = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iMutierer]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iMutierer
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iMutierer = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sDokumentid]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sDokumentid
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sDokumentid = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
910
edkb08/Datenbank/clsMitarbeiter.vb
Normal file
910
edkb08/Datenbank/clsMitarbeiter.vb
Normal file
@@ -0,0 +1,910 @@
|
|||||||
|
' ///////////////////////////////////////////////////////////////////////////
|
||||||
|
' // Description: Data Access class for the table 'mitarbeiter'
|
||||||
|
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 10. August 2003, 23:09:05
|
||||||
|
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||||
|
' ///////////////////////////////////////////////////////////////////////////
|
||||||
|
Imports System
|
||||||
|
Imports System.Data
|
||||||
|
Imports System.Data.SqlTypes
|
||||||
|
Imports System.Data.SqlClient
|
||||||
|
|
||||||
|
Namespace edokadb
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Data Access class for the table 'mitarbeiter'.
|
||||||
|
' /// </summary>
|
||||||
|
Public Class clsMitarbeiter
|
||||||
|
Inherits clsDBInteractionBase
|
||||||
|
|
||||||
|
#Region " Class Member Declarations "
|
||||||
|
|
||||||
|
Private m_bMailempfang, m_bEdokaMesasge, m_bShowtip, m_bAktiv, m_bMailDirektVersenden, m_bEdoka_mail, m_bJournalisierung, m_bMailDokumentrueckgang As SqlBoolean
|
||||||
|
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
|
||||||
|
Private m_iPartnernr, m_iKlassifizierung, m_iMutierer, m_iMandantnr, m_iFunktionnr, m_iMitarbeiternr, m_iFuermandant, m_iSprache As SqlInt32
|
||||||
|
Private m_sRang, m_sAnrede, m_sKurzzeichen, m_sVorname, m_sName, m_sFax, m_sTelefon, m_sUnterschrift_text, m_sFunktion, m_sTgnummer, m_sEmail As SqlString
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Class constructor.
|
||||||
|
' /// </summary>
|
||||||
|
Public Sub New()
|
||||||
|
' // Nothing for now.
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||||
|
' /// </summary>
|
||||||
|
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||||
|
' /// <remarks>
|
||||||
|
' /// Properties needed for this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iMitarbeiternr</LI>
|
||||||
|
' /// <LI>sVorname. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sName. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sKurzzeichen. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sAnrede. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sTgnummer. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sEmail. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sFax. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sTelefon. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sUnterschrift_text. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>iFunktionnr. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>iSprache. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>iFuermandant</LI>
|
||||||
|
' /// <LI>bShowtip</LI>
|
||||||
|
' /// <LI>iPartnernr</LI>
|
||||||
|
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||||
|
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||||
|
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>bMailempfang. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>bEdokaMesasge. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>sFunktion. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>bMailDirektVersenden. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>sRang. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>bMailDokumentrueckgang. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>iKlassifizierung. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>bEdoka_mail. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>bJournalisierung. May be SqlBoolean.Null</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// </remarks>
|
||||||
|
Overrides Public Function Insert() As Boolean
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[pr_mitarbeiter_Insert]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@svorname", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVorname))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sname", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sName))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@skurzzeichen", SqlDbType.VarChar, 10, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sKurzzeichen))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sanrede", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAnrede))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@stgnummer", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTgnummer))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@semail", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEmail))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfax", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFax))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@stelefon", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTelefon))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sunterschrift_text", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sUnterschrift_text))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifuermandant", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFuermandant))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@bshowtip", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bShowtip))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@ipartnernr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPartnernr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailempfang", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailempfang))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@bEdokaMesasge", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bEdokaMesasge))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfunktion", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFunktion))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailDirektVersenden", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailDirektVersenden))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sRang", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRang))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailDokumentrueckgang", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailDokumentrueckgang))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iklassifizierung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iKlassifizierung))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@bedoka_mail", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bEdoka_mail))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@bjournalisierung", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bJournalisierung))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_mitarbeiter_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return True
|
||||||
|
Catch ex As Exception
|
||||||
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||||
|
Throw New Exception("clsMitarbeiter::Insert::Error occured.", ex)
|
||||||
|
Finally
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Close connection.
|
||||||
|
m_scoMainConnection.Close()
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Update method. This method will Update one existing row in the database.
|
||||||
|
' /// </summary>
|
||||||
|
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||||
|
' /// <remarks>
|
||||||
|
' /// Properties needed for this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iMitarbeiternr</LI>
|
||||||
|
' /// <LI>sVorname. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sName. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sKurzzeichen. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sAnrede. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sTgnummer. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sEmail. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sFax. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sTelefon. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sUnterschrift_text. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>iFunktionnr. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>iSprache. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>iFuermandant</LI>
|
||||||
|
' /// <LI>bShowtip</LI>
|
||||||
|
' /// <LI>iPartnernr</LI>
|
||||||
|
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||||
|
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||||
|
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>bMailempfang. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>bEdokaMesasge. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>sFunktion. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>bMailDirektVersenden. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>sRang. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>bMailDokumentrueckgang. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>iKlassifizierung. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>bEdoka_mail. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>bJournalisierung. May be SqlBoolean.Null</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// </remarks>
|
||||||
|
Overrides Public Function Update() As Boolean
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[pr_mitarbeiter_Update]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@svorname", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVorname))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sname", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sName))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@skurzzeichen", SqlDbType.VarChar, 10, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sKurzzeichen))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sanrede", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sAnrede))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@stgnummer", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTgnummer))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@semail", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sEmail))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfax", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFax))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@stelefon", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTelefon))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sunterschrift_text", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sUnterschrift_text))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifuermandant", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFuermandant))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@bshowtip", SqlDbType.Bit, 1, ParameterDirection.Input, False, 1, 0, "", DataRowVersion.Proposed, m_bShowtip))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@ipartnernr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPartnernr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailempfang", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailempfang))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@bEdokaMesasge", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bEdokaMesasge))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sfunktion", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFunktion))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailDirektVersenden", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailDirektVersenden))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sRang", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sRang))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@bMailDokumentrueckgang", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bMailDokumentrueckgang))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iklassifizierung", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iKlassifizierung))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@bedoka_mail", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bEdoka_mail))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@bjournalisierung", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bJournalisierung))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_mitarbeiter_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return True
|
||||||
|
Catch ex As Exception
|
||||||
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||||
|
Throw New Exception("clsMitarbeiter::Update::Error occured.", ex)
|
||||||
|
Finally
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Close connection.
|
||||||
|
m_scoMainConnection.Close()
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
|
||||||
|
' /// </summary>
|
||||||
|
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||||
|
' /// <remarks>
|
||||||
|
' /// Properties needed for this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iMitarbeiternr</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// </remarks>
|
||||||
|
Overrides Public Function Delete() As Boolean
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[pr_mitarbeiter_Delete]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_mitarbeiter_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return True
|
||||||
|
Catch ex As Exception
|
||||||
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||||
|
Throw New Exception("clsMitarbeiter::Delete::Error occured.", ex)
|
||||||
|
Finally
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Close connection.
|
||||||
|
m_scoMainConnection.Close()
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
|
||||||
|
' /// </summary>
|
||||||
|
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||||
|
' /// <remarks>
|
||||||
|
' /// Properties needed for this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iMitarbeiternr</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// <LI>iMitarbeiternr</LI>
|
||||||
|
' /// <LI>sVorname</LI>
|
||||||
|
' /// <LI>sName</LI>
|
||||||
|
' /// <LI>sKurzzeichen</LI>
|
||||||
|
' /// <LI>sAnrede</LI>
|
||||||
|
' /// <LI>sTgnummer</LI>
|
||||||
|
' /// <LI>sEmail</LI>
|
||||||
|
' /// <LI>sFax</LI>
|
||||||
|
' /// <LI>sTelefon</LI>
|
||||||
|
' /// <LI>sUnterschrift_text</LI>
|
||||||
|
' /// <LI>iFunktionnr</LI>
|
||||||
|
' /// <LI>iSprache</LI>
|
||||||
|
' /// <LI>iFuermandant</LI>
|
||||||
|
' /// <LI>bShowtip</LI>
|
||||||
|
' /// <LI>iPartnernr</LI>
|
||||||
|
' /// <LI>iMandantnr</LI>
|
||||||
|
' /// <LI>bAktiv</LI>
|
||||||
|
' /// <LI>daErstellt_am</LI>
|
||||||
|
' /// <LI>daMutiert_am</LI>
|
||||||
|
' /// <LI>iMutierer</LI>
|
||||||
|
' /// <LI>bMailempfang</LI>
|
||||||
|
' /// <LI>bEdokaMesasge</LI>
|
||||||
|
' /// <LI>sFunktion</LI>
|
||||||
|
' /// <LI>bMailDirektVersenden</LI>
|
||||||
|
' /// <LI>sRang</LI>
|
||||||
|
' /// <LI>bMailDokumentrueckgang</LI>
|
||||||
|
' /// <LI>iKlassifizierung</LI>
|
||||||
|
' /// <LI>bEdoka_mail</LI>
|
||||||
|
' /// <LI>bJournalisierung</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
|
||||||
|
' /// </remarks>
|
||||||
|
Overrides Public Function SelectOne() As DataTable
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[pr_mitarbeiter_SelectOne]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
Dim dtToReturn As DataTable = new DataTable("mitarbeiter")
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_mitarbeiter_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
If dtToReturn.Rows.Count > 0 Then
|
||||||
|
m_iMitarbeiternr = New SqlInt32(CType(dtToReturn.Rows(0)("mitarbeiternr"), Integer))
|
||||||
|
If dtToReturn.Rows(0)("vorname") Is System.DBNull.Value Then
|
||||||
|
m_sVorname = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sVorname = New SqlString(CType(dtToReturn.Rows(0)("vorname"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("name") Is System.DBNull.Value Then
|
||||||
|
m_sName = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sName = New SqlString(CType(dtToReturn.Rows(0)("name"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("kurzzeichen") Is System.DBNull.Value Then
|
||||||
|
m_sKurzzeichen = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sKurzzeichen = New SqlString(CType(dtToReturn.Rows(0)("kurzzeichen"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("anrede") Is System.DBNull.Value Then
|
||||||
|
m_sAnrede = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sAnrede = New SqlString(CType(dtToReturn.Rows(0)("anrede"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("tgnummer") Is System.DBNull.Value Then
|
||||||
|
m_sTgnummer = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sTgnummer = New SqlString(CType(dtToReturn.Rows(0)("tgnummer"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("email") Is System.DBNull.Value Then
|
||||||
|
m_sEmail = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sEmail = New SqlString(CType(dtToReturn.Rows(0)("email"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("fax") Is System.DBNull.Value Then
|
||||||
|
m_sFax = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sFax = New SqlString(CType(dtToReturn.Rows(0)("fax"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("telefon") Is System.DBNull.Value Then
|
||||||
|
m_sTelefon = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sTelefon = New SqlString(CType(dtToReturn.Rows(0)("telefon"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("unterschrift_text") Is System.DBNull.Value Then
|
||||||
|
m_sUnterschrift_text = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sUnterschrift_text = New SqlString(CType(dtToReturn.Rows(0)("unterschrift_text"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("funktionnr") Is System.DBNull.Value Then
|
||||||
|
m_iFunktionnr = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iFunktionnr = New SqlInt32(CType(dtToReturn.Rows(0)("funktionnr"), Integer))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("sprache") Is System.DBNull.Value Then
|
||||||
|
m_iSprache = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iSprache = New SqlInt32(CType(dtToReturn.Rows(0)("sprache"), Integer))
|
||||||
|
End If
|
||||||
|
m_iFuermandant = New SqlInt32(CType(dtToReturn.Rows(0)("fuermandant"), Integer))
|
||||||
|
m_bShowtip = New SqlBoolean(CType(dtToReturn.Rows(0)("showtip"), Boolean))
|
||||||
|
m_iPartnernr = New SqlInt32(CType(dtToReturn.Rows(0)("partnernr"), Integer))
|
||||||
|
If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then
|
||||||
|
m_iMandantnr = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
|
||||||
|
m_bAktiv = SqlBoolean.Null
|
||||||
|
Else
|
||||||
|
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
|
||||||
|
m_daErstellt_am = SqlDateTime.Null
|
||||||
|
Else
|
||||||
|
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
|
||||||
|
m_daMutiert_am = SqlDateTime.Null
|
||||||
|
Else
|
||||||
|
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
|
||||||
|
m_iMutierer = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("Mailempfang") Is System.DBNull.Value Then
|
||||||
|
m_bMailempfang = SqlBoolean.Null
|
||||||
|
Else
|
||||||
|
m_bMailempfang = New SqlBoolean(CType(dtToReturn.Rows(0)("Mailempfang"), Boolean))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("EdokaMesasge") Is System.DBNull.Value Then
|
||||||
|
m_bEdokaMesasge = SqlBoolean.Null
|
||||||
|
Else
|
||||||
|
m_bEdokaMesasge = New SqlBoolean(CType(dtToReturn.Rows(0)("EdokaMesasge"), Boolean))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("funktion") Is System.DBNull.Value Then
|
||||||
|
m_sFunktion = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sFunktion = New SqlString(CType(dtToReturn.Rows(0)("funktion"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("MailDirektVersenden") Is System.DBNull.Value Then
|
||||||
|
m_bMailDirektVersenden = SqlBoolean.Null
|
||||||
|
Else
|
||||||
|
m_bMailDirektVersenden = New SqlBoolean(CType(dtToReturn.Rows(0)("MailDirektVersenden"), Boolean))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("Rang") Is System.DBNull.Value Then
|
||||||
|
m_sRang = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sRang = New SqlString(CType(dtToReturn.Rows(0)("Rang"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("MailDokumentrueckgang") Is System.DBNull.Value Then
|
||||||
|
m_bMailDokumentrueckgang = SqlBoolean.Null
|
||||||
|
Else
|
||||||
|
m_bMailDokumentrueckgang = New SqlBoolean(CType(dtToReturn.Rows(0)("MailDokumentrueckgang"), Boolean))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("klassifizierung") Is System.DBNull.Value Then
|
||||||
|
m_iKlassifizierung = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iKlassifizierung = New SqlInt32(CType(dtToReturn.Rows(0)("klassifizierung"), Integer))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("edoka_mail") Is System.DBNull.Value Then
|
||||||
|
m_bEdoka_mail = SqlBoolean.Null
|
||||||
|
Else
|
||||||
|
m_bEdoka_mail = New SqlBoolean(CType(dtToReturn.Rows(0)("edoka_mail"), Boolean))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("journalisierung") Is System.DBNull.Value Then
|
||||||
|
m_bJournalisierung = SqlBoolean.Null
|
||||||
|
Else
|
||||||
|
m_bJournalisierung = New SqlBoolean(CType(dtToReturn.Rows(0)("journalisierung"), Boolean))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Return dtToReturn
|
||||||
|
Catch ex As Exception
|
||||||
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||||
|
Throw New Exception("clsMitarbeiter::SelectOne::Error occured.", ex)
|
||||||
|
Finally
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Close connection.
|
||||||
|
m_scoMainConnection.Close()
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
sdaAdapter.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||||
|
' /// </summary>
|
||||||
|
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||||
|
' /// <remarks>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// </remarks>
|
||||||
|
Overrides Public Function SelectAll() As DataTable
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[pr_mitarbeiter_SelectAll]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
Dim dtToReturn As DataTable = new DataTable("mitarbeiter")
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_mitarbeiter_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return dtToReturn
|
||||||
|
Catch ex As Exception
|
||||||
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||||
|
Throw New Exception("clsMitarbeiter::SelectAll::Error occured.", ex)
|
||||||
|
Finally
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Close connection.
|
||||||
|
m_scoMainConnection.Close()
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
sdaAdapter.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
#Region " Class Property Declarations "
|
||||||
|
|
||||||
|
Public Property [iMitarbeiternr]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iMitarbeiternr
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
Dim iMitarbeiternrTmp As SqlInt32 = Value
|
||||||
|
If iMitarbeiternrTmp.IsNull Then
|
||||||
|
Throw New ArgumentOutOfRangeException("iMitarbeiternr", "iMitarbeiternr can't be NULL")
|
||||||
|
End If
|
||||||
|
m_iMitarbeiternr = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sVorname]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sVorname
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sVorname = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sName]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sName
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sName = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sKurzzeichen]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sKurzzeichen
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sKurzzeichen = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sAnrede]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sAnrede
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sAnrede = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sTgnummer]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sTgnummer
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sTgnummer = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sEmail]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sEmail
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sEmail = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sFax]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sFax
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sFax = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sTelefon]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sTelefon
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sTelefon = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sUnterschrift_text]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sUnterschrift_text
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sUnterschrift_text = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iFunktionnr]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iFunktionnr
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iFunktionnr = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iSprache]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iSprache
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iSprache = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iFuermandant]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iFuermandant
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
Dim iFuermandantTmp As SqlInt32 = Value
|
||||||
|
If iFuermandantTmp.IsNull Then
|
||||||
|
Throw New ArgumentOutOfRangeException("iFuermandant", "iFuermandant can't be NULL")
|
||||||
|
End If
|
||||||
|
m_iFuermandant = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [bShowtip]() As SqlBoolean
|
||||||
|
Get
|
||||||
|
Return m_bShowtip
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlBoolean)
|
||||||
|
Dim bShowtipTmp As SqlBoolean = Value
|
||||||
|
If bShowtipTmp.IsNull Then
|
||||||
|
Throw New ArgumentOutOfRangeException("bShowtip", "bShowtip can't be NULL")
|
||||||
|
End If
|
||||||
|
m_bShowtip = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iPartnernr]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iPartnernr
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
Dim iPartnernrTmp As SqlInt32 = Value
|
||||||
|
If iPartnernrTmp.IsNull Then
|
||||||
|
Throw New ArgumentOutOfRangeException("iPartnernr", "iPartnernr can't be NULL")
|
||||||
|
End If
|
||||||
|
m_iPartnernr = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iMandantnr]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iMandantnr
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iMandantnr = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [bAktiv]() As SqlBoolean
|
||||||
|
Get
|
||||||
|
Return m_bAktiv
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlBoolean)
|
||||||
|
m_bAktiv = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [daErstellt_am]() As SqlDateTime
|
||||||
|
Get
|
||||||
|
Return m_daErstellt_am
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlDateTime)
|
||||||
|
m_daErstellt_am = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [daMutiert_am]() As SqlDateTime
|
||||||
|
Get
|
||||||
|
Return m_daMutiert_am
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlDateTime)
|
||||||
|
m_daMutiert_am = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iMutierer]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iMutierer
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iMutierer = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [bMailempfang]() As SqlBoolean
|
||||||
|
Get
|
||||||
|
Return m_bMailempfang
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlBoolean)
|
||||||
|
m_bMailempfang = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [bEdokaMesasge]() As SqlBoolean
|
||||||
|
Get
|
||||||
|
Return m_bEdokaMesasge
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlBoolean)
|
||||||
|
m_bEdokaMesasge = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sFunktion]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sFunktion
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sFunktion = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [bMailDirektVersenden]() As SqlBoolean
|
||||||
|
Get
|
||||||
|
Return m_bMailDirektVersenden
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlBoolean)
|
||||||
|
m_bMailDirektVersenden = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sRang]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sRang
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sRang = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [bMailDokumentrueckgang]() As SqlBoolean
|
||||||
|
Get
|
||||||
|
Return m_bMailDokumentrueckgang
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlBoolean)
|
||||||
|
m_bMailDokumentrueckgang = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iKlassifizierung]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iKlassifizierung
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iKlassifizierung = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [bEdoka_mail]() As SqlBoolean
|
||||||
|
Get
|
||||||
|
Return m_bEdoka_mail
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlBoolean)
|
||||||
|
m_bEdoka_mail = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [bJournalisierung]() As SqlBoolean
|
||||||
|
Get
|
||||||
|
Return m_bJournalisierung
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlBoolean)
|
||||||
|
m_bJournalisierung = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
61
edkb08/Datenbank/clsMyKey_Tabelle.vb
Normal file
61
edkb08/Datenbank/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 = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
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
|
||||||
73
edkb08/Datenbank/clsMyMitarbeiter.vb
Normal file
73
edkb08/Datenbank/clsMyMitarbeiter.vb
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
Imports System
|
||||||
|
Imports System.Data
|
||||||
|
Imports System.Data.SqlTypes
|
||||||
|
Imports System.Data.SqlClient
|
||||||
|
Imports System.Security.Principal
|
||||||
|
|
||||||
|
|
||||||
|
Namespace edokadb
|
||||||
|
Public Class clsMyMitarbeiter
|
||||||
|
Inherits edokaDB.clsMitarbeiter
|
||||||
|
|
||||||
|
#Region "Deklarationen"
|
||||||
|
Private m_xtgnummer As String
|
||||||
|
|
||||||
|
Property xtgnummer() As String
|
||||||
|
Get
|
||||||
|
Return m_xtgnummer
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As String)
|
||||||
|
m_xtgnummer = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
Public Function SelectWithTGNummer() As DataTable
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[sp_mitarbeiter_SelectWithTGNummer]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
Dim dtToReturn As DataTable = New DataTable("mitarbeiter")
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
Try
|
||||||
|
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@stgnummer", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_xtgnummer))
|
||||||
|
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_mitarbeiter_SelectAllWithTGNummer' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
Return dtToReturn
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox(ex.Message)
|
||||||
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||||
|
Throw New Exception("clsMitarbeiter::SelectWithTGNummer::Error occured." + ex.Message, ex)
|
||||||
|
Finally
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Close connection.
|
||||||
|
m_scoMainConnection.Close()
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
sdaAdapter.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
|
|
||||||
1150
edkb08/Datenbank/clsPartner.vb
Normal file
1150
edkb08/Datenbank/clsPartner.vb
Normal file
File diff suppressed because it is too large
Load Diff
1121
edkb08/Datenbank/clsPartner_sik.vb
Normal file
1121
edkb08/Datenbank/clsPartner_sik.vb
Normal file
File diff suppressed because it is too large
Load Diff
510
edkb08/Datenbank/clsStatushistory.vb
Normal file
510
edkb08/Datenbank/clsStatushistory.vb
Normal file
@@ -0,0 +1,510 @@
|
|||||||
|
' ///////////////////////////////////////////////////////////////////////////
|
||||||
|
' // Description: Data Access class for the table 'statushistory'
|
||||||
|
' // Generated by LLBLGen v1.2.1045.38210 Final on: Sonntag, 25. Mai 2003, 21:40:11
|
||||||
|
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||||
|
' ///////////////////////////////////////////////////////////////////////////
|
||||||
|
Imports System
|
||||||
|
Imports System.Data
|
||||||
|
Imports System.Data.SqlTypes
|
||||||
|
Imports System.Data.SqlClient
|
||||||
|
|
||||||
|
Namespace edokadb
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Data Access class for the table 'statushistory'.
|
||||||
|
' /// </summary>
|
||||||
|
Public Class clsStatushistory
|
||||||
|
Inherits clsDBInteractionBase
|
||||||
|
|
||||||
|
#Region " Class Member Declarations "
|
||||||
|
|
||||||
|
Private m_bAktiv As SqlBoolean
|
||||||
|
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
|
||||||
|
Private m_iMutierer, m_iVerantwortlich, m_iStatushistorynr, m_iMandantnr, m_iStatus As SqlInt32
|
||||||
|
Private m_sDokumentid As SqlString
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Class constructor.
|
||||||
|
' /// </summary>
|
||||||
|
Public Sub New()
|
||||||
|
' // Nothing for now.
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||||
|
' /// </summary>
|
||||||
|
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||||
|
' /// <remarks>
|
||||||
|
' /// Properties needed for this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iStatushistorynr</LI>
|
||||||
|
' /// <LI>iStatus</LI>
|
||||||
|
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||||
|
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||||
|
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>sDokumentid. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>iVerantwortlich. May be SqlInt32.Null</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// </remarks>
|
||||||
|
Overrides Public Function Insert() As Boolean
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[pr_statushistory_Insert]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatushistorynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatushistorynr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iverantwortlich", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerantwortlich))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_statushistory_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return True
|
||||||
|
Catch ex As Exception
|
||||||
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||||
|
Throw New Exception("clsStatushistory::Insert::Error occured.", ex)
|
||||||
|
Finally
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Close connection.
|
||||||
|
m_scoMainConnection.Close()
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Update method. This method will Update one existing row in the database.
|
||||||
|
' /// </summary>
|
||||||
|
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||||
|
' /// <remarks>
|
||||||
|
' /// Properties needed for this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iStatushistorynr</LI>
|
||||||
|
' /// <LI>iStatus</LI>
|
||||||
|
' /// <LI>iMandantnr. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>bAktiv. May be SqlBoolean.Null</LI>
|
||||||
|
' /// <LI>daErstellt_am. May be SqlDateTime.Null</LI>
|
||||||
|
' /// <LI>daMutiert_am. May be SqlDateTime.Null</LI>
|
||||||
|
' /// <LI>iMutierer. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>sDokumentid. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>iVerantwortlich. May be SqlInt32.Null</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// </remarks>
|
||||||
|
Overrides Public Function Update() As Boolean
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[pr_statushistory_Update]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatushistorynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatushistorynr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatus", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatus))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 1, 0, "", DataRowVersion.Proposed, m_bAktiv))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daErstellt_am))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@damutiert_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 23, 3, "", DataRowVersion.Proposed, m_daMutiert_am))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@imutierer", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMutierer))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sdokumentid", SqlDbType.VarChar, 22, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDokumentid))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iverantwortlich", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iVerantwortlich))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_statushistory_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return True
|
||||||
|
Catch ex As Exception
|
||||||
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||||
|
Throw New Exception("clsStatushistory::Update::Error occured.", ex)
|
||||||
|
Finally
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Close connection.
|
||||||
|
m_scoMainConnection.Close()
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
|
||||||
|
' /// </summary>
|
||||||
|
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||||
|
' /// <remarks>
|
||||||
|
' /// Properties needed for this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iStatushistorynr</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// </remarks>
|
||||||
|
Overrides Public Function Delete() As Boolean
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[pr_statushistory_Delete]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@istatushistorynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatushistorynr))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_statushistory_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return True
|
||||||
|
Catch ex As Exception
|
||||||
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||||
|
Throw New Exception("clsStatushistory::Delete::Error occured.", ex)
|
||||||
|
Finally
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Close connection.
|
||||||
|
m_scoMainConnection.Close()
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
|
||||||
|
' /// </summary>
|
||||||
|
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||||
|
' /// <remarks>
|
||||||
|
' /// Properties needed for this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iStatushistorynr</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// <LI>iStatushistorynr</LI>
|
||||||
|
' /// <LI>iStatus</LI>
|
||||||
|
' /// <LI>iMandantnr</LI>
|
||||||
|
' /// <LI>bAktiv</LI>
|
||||||
|
' /// <LI>daErstellt_am</LI>
|
||||||
|
' /// <LI>daMutiert_am</LI>
|
||||||
|
' /// <LI>iMutierer</LI>
|
||||||
|
' /// <LI>sDokumentid</LI>
|
||||||
|
' /// <LI>iVerantwortlich</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
|
||||||
|
' /// </remarks>
|
||||||
|
Overrides Public Function SelectOne() As DataTable
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[pr_statushistory_SelectOne]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
Dim dtToReturn As DataTable = new DataTable("statushistory")
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@istatushistorynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iStatushistorynr))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_statushistory_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
If dtToReturn.Rows.Count > 0 Then
|
||||||
|
m_iStatushistorynr = New SqlInt32(CType(dtToReturn.Rows(0)("statushistorynr"), Integer))
|
||||||
|
m_iStatus = New SqlInt32(CType(dtToReturn.Rows(0)("status"), Integer))
|
||||||
|
If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then
|
||||||
|
m_iMandantnr = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
|
||||||
|
m_bAktiv = SqlBoolean.Null
|
||||||
|
Else
|
||||||
|
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
|
||||||
|
m_daErstellt_am = SqlDateTime.Null
|
||||||
|
Else
|
||||||
|
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
|
||||||
|
m_daMutiert_am = SqlDateTime.Null
|
||||||
|
Else
|
||||||
|
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
|
||||||
|
m_iMutierer = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("dokumentid") Is System.DBNull.Value Then
|
||||||
|
m_sDokumentid = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sDokumentid = New SqlString(CType(dtToReturn.Rows(0)("dokumentid"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("verantwortlich") Is System.DBNull.Value Then
|
||||||
|
m_iVerantwortlich = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iVerantwortlich = New SqlInt32(CType(dtToReturn.Rows(0)("verantwortlich"), Integer))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Return dtToReturn
|
||||||
|
Catch ex As Exception
|
||||||
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||||
|
Throw New Exception("clsStatushistory::SelectOne::Error occured.", ex)
|
||||||
|
Finally
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Close connection.
|
||||||
|
m_scoMainConnection.Close()
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
sdaAdapter.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||||
|
' /// </summary>
|
||||||
|
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||||
|
' /// <remarks>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// </remarks>
|
||||||
|
Overrides Public Function SelectAll() As DataTable
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[pr_statushistory_SelectAll]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
Dim dtToReturn As DataTable = new DataTable("statushistory")
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_statushistory_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return dtToReturn
|
||||||
|
Catch ex As Exception
|
||||||
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||||
|
Throw New Exception("clsStatushistory::SelectAll::Error occured.", ex)
|
||||||
|
Finally
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Close connection.
|
||||||
|
m_scoMainConnection.Close()
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
sdaAdapter.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
#Region " Class Property Declarations "
|
||||||
|
|
||||||
|
Public Property [iStatushistorynr]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iStatushistorynr
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
Dim iStatushistorynrTmp As SqlInt32 = Value
|
||||||
|
If iStatushistorynrTmp.IsNull Then
|
||||||
|
Throw New ArgumentOutOfRangeException("iStatushistorynr", "iStatushistorynr can't be NULL")
|
||||||
|
End If
|
||||||
|
m_iStatushistorynr = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iStatus]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iStatus
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
Dim iStatusTmp As SqlInt32 = Value
|
||||||
|
If iStatusTmp.IsNull Then
|
||||||
|
Throw New ArgumentOutOfRangeException("iStatus", "iStatus can't be NULL")
|
||||||
|
End If
|
||||||
|
m_iStatus = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iMandantnr]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iMandantnr
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iMandantnr = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [bAktiv]() As SqlBoolean
|
||||||
|
Get
|
||||||
|
Return m_bAktiv
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlBoolean)
|
||||||
|
m_bAktiv = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [daErstellt_am]() As SqlDateTime
|
||||||
|
Get
|
||||||
|
Return m_daErstellt_am
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlDateTime)
|
||||||
|
m_daErstellt_am = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [daMutiert_am]() As SqlDateTime
|
||||||
|
Get
|
||||||
|
Return m_daMutiert_am
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlDateTime)
|
||||||
|
m_daMutiert_am = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iMutierer]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iMutierer
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iMutierer = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sDokumentid]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sDokumentid
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sDokumentid = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iVerantwortlich]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iVerantwortlich
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iVerantwortlich = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
528
edkb08/Datenbank/clsVv.vb
Normal file
528
edkb08/Datenbank/clsVv.vb
Normal file
@@ -0,0 +1,528 @@
|
|||||||
|
' ///////////////////////////////////////////////////////////////////////////
|
||||||
|
' // Description: Data Access class for the table 'VV'
|
||||||
|
' // Generated by LLBLGen v1.2.1045.38210 Final on: Mittwoch, 17. September 2003, 00:12:40
|
||||||
|
' // Because the Base Class already implements IDispose, this class doesn't.
|
||||||
|
' ///////////////////////////////////////////////////////////////////////////
|
||||||
|
Imports System
|
||||||
|
Imports System.Data
|
||||||
|
Imports System.Data.SqlTypes
|
||||||
|
Imports System.Data.SqlClient
|
||||||
|
|
||||||
|
Namespace edokadb
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Data Access class for the table 'VV'.
|
||||||
|
' /// </summary>
|
||||||
|
Public Class clsVV
|
||||||
|
Inherits clsDBInteractionBase
|
||||||
|
|
||||||
|
#Region " Class Member Declarations "
|
||||||
|
|
||||||
|
Private m_iNRPRD00, m_iNRVBS00, m_iNRSPR00, m_iNRVVG00, m_iNRPAR00 As SqlInt32
|
||||||
|
Private m_sNAVVG00, m_sSAREC00, m_sBEPRDLG, m_sTXRBK00, m_sNEVVG00 As SqlString
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Class constructor.
|
||||||
|
' /// </summary>
|
||||||
|
Public Sub New()
|
||||||
|
' // Nothing for now.
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Insert method. This method will insert one new row into the database.
|
||||||
|
' /// </summary>
|
||||||
|
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||||
|
' /// <remarks>
|
||||||
|
' /// Properties needed for this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iNRVVG00</LI>
|
||||||
|
' /// <LI>iNRPAR00. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>iNRSPR00. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>sBEPRDLG. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>iNRPRD00. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>sTXRBK00. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sNEVVG00. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sNAVVG00. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>iNRVBS00. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>sSAREC00. May be SqlString.Null</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// </remarks>
|
||||||
|
Overrides Public Function Insert() As Boolean
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[pr_VV_Insert]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRVVG00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRVVG00))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPAR00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRPAR00))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRSPR00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRSPR00))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEPRDLG", SqlDbType.NVarChar, 35, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEPRDLG))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPRD00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRPRD00))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sTXRBK00", SqlDbType.VarChar, 35, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTXRBK00))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNEVVG00", SqlDbType.VarChar, 16, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNEVVG00))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNAVVG00", SqlDbType.VarChar, 16, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNAVVG00))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRVBS00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRVBS00))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAREC00", SqlDbType.VarChar, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSAREC00))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_VV_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return True
|
||||||
|
Catch ex As Exception
|
||||||
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||||
|
Throw New Exception("clsVV::Insert::Error occured.", ex)
|
||||||
|
Finally
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Close connection.
|
||||||
|
m_scoMainConnection.Close()
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Update method. This method will Update one existing row in the database.
|
||||||
|
' /// </summary>
|
||||||
|
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||||
|
' /// <remarks>
|
||||||
|
' /// Properties needed for this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iNRVVG00</LI>
|
||||||
|
' /// <LI>iNRPAR00. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>iNRSPR00. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>sBEPRDLG. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>iNRPRD00. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>sTXRBK00. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sNEVVG00. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>sNAVVG00. May be SqlString.Null</LI>
|
||||||
|
' /// <LI>iNRVBS00. May be SqlInt32.Null</LI>
|
||||||
|
' /// <LI>sSAREC00. May be SqlString.Null</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// </remarks>
|
||||||
|
Overrides Public Function Update() As Boolean
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[pr_VV_Update]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRVVG00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRVVG00))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPAR00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRPAR00))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRSPR00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRSPR00))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBEPRDLG", SqlDbType.NVarChar, 35, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBEPRDLG))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRPRD00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRPRD00))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sTXRBK00", SqlDbType.VarChar, 35, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTXRBK00))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNEVVG00", SqlDbType.VarChar, 16, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNEVVG00))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNAVVG00", SqlDbType.VarChar, 16, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNAVVG00))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRVBS00", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iNRVBS00))
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSAREC00", SqlDbType.VarChar, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSAREC00))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_VV_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return True
|
||||||
|
Catch ex As Exception
|
||||||
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||||
|
Throw New Exception("clsVV::Update::Error occured.", ex)
|
||||||
|
Finally
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Close connection.
|
||||||
|
m_scoMainConnection.Close()
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
|
||||||
|
' /// </summary>
|
||||||
|
' /// <returns>True if succeeded, otherwise an Exception is thrown. </returns>
|
||||||
|
' /// <remarks>
|
||||||
|
' /// Properties needed for this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iNRVVG00</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// </remarks>
|
||||||
|
Overrides Public Function Delete() As Boolean
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[pr_VV_Delete]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@iNRVVG00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRVVG00))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
scmCmdToExecute.ExecuteNonQuery()
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_VV_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return True
|
||||||
|
Catch ex As Exception
|
||||||
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||||
|
Throw New Exception("clsVV::Delete::Error occured.", ex)
|
||||||
|
Finally
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Close connection.
|
||||||
|
m_scoMainConnection.Close()
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
|
||||||
|
' /// </summary>
|
||||||
|
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||||
|
' /// <remarks>
|
||||||
|
' /// Properties needed for this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iNRVVG00</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// <LI>iNRVVG00</LI>
|
||||||
|
' /// <LI>iNRPAR00</LI>
|
||||||
|
' /// <LI>iNRSPR00</LI>
|
||||||
|
' /// <LI>sBEPRDLG</LI>
|
||||||
|
' /// <LI>iNRPRD00</LI>
|
||||||
|
' /// <LI>sTXRBK00</LI>
|
||||||
|
' /// <LI>sNEVVG00</LI>
|
||||||
|
' /// <LI>sNAVVG00</LI>
|
||||||
|
' /// <LI>iNRVBS00</LI>
|
||||||
|
' /// <LI>sSAREC00</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// Will fill all properties corresponding with a field in the table with the value of the row selected.
|
||||||
|
' /// </remarks>
|
||||||
|
Overrides Public Function SelectOne() As DataTable
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[pr_VV_SelectOne]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
Dim dtToReturn As DataTable = new DataTable("VV")
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iNRVVG00", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iNRVVG00))
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_VV_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
If dtToReturn.Rows.Count > 0 Then
|
||||||
|
m_iNRVVG00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRVVG00"), Integer))
|
||||||
|
If dtToReturn.Rows(0)("NRPAR00") Is System.DBNull.Value Then
|
||||||
|
m_iNRPAR00 = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iNRPAR00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRPAR00"), Integer))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("NRSPR00") Is System.DBNull.Value Then
|
||||||
|
m_iNRSPR00 = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iNRSPR00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRSPR00"), Integer))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("BEPRDLG") Is System.DBNull.Value Then
|
||||||
|
m_sBEPRDLG = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sBEPRDLG = New SqlString(CType(dtToReturn.Rows(0)("BEPRDLG"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("NRPRD00") Is System.DBNull.Value Then
|
||||||
|
m_iNRPRD00 = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iNRPRD00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRPRD00"), Integer))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("TXRBK00") Is System.DBNull.Value Then
|
||||||
|
m_sTXRBK00 = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sTXRBK00 = New SqlString(CType(dtToReturn.Rows(0)("TXRBK00"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("NEVVG00") Is System.DBNull.Value Then
|
||||||
|
m_sNEVVG00 = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sNEVVG00 = New SqlString(CType(dtToReturn.Rows(0)("NEVVG00"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("NAVVG00") Is System.DBNull.Value Then
|
||||||
|
m_sNAVVG00 = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sNAVVG00 = New SqlString(CType(dtToReturn.Rows(0)("NAVVG00"), String))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("NRVBS00") Is System.DBNull.Value Then
|
||||||
|
m_iNRVBS00 = SqlInt32.Null
|
||||||
|
Else
|
||||||
|
m_iNRVBS00 = New SqlInt32(CType(dtToReturn.Rows(0)("NRVBS00"), Integer))
|
||||||
|
End If
|
||||||
|
If dtToReturn.Rows(0)("SAREC00") Is System.DBNull.Value Then
|
||||||
|
m_sSAREC00 = SqlString.Null
|
||||||
|
Else
|
||||||
|
m_sSAREC00 = New SqlString(CType(dtToReturn.Rows(0)("SAREC00"), String))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Return dtToReturn
|
||||||
|
Catch ex As Exception
|
||||||
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||||
|
Throw New Exception("clsVV::SelectOne::Error occured.", ex)
|
||||||
|
Finally
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Close connection.
|
||||||
|
m_scoMainConnection.Close()
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
sdaAdapter.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
' /// <summary>
|
||||||
|
' /// Purpose: SelectAll method. This method will Select all rows from the table.
|
||||||
|
' /// </summary>
|
||||||
|
' /// <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
|
||||||
|
' /// <remarks>
|
||||||
|
' /// Properties set after a succesful call of this method:
|
||||||
|
' /// <UL>
|
||||||
|
' /// <LI>iErrorCode</LI>
|
||||||
|
' /// </UL>
|
||||||
|
' /// </remarks>
|
||||||
|
Overrides Public Function SelectAll() As DataTable
|
||||||
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||||
|
scmCmdToExecute.CommandText = "dbo.[pr_VV_SelectAll]"
|
||||||
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||||
|
Dim dtToReturn As DataTable = new DataTable("VV")
|
||||||
|
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
|
||||||
|
|
||||||
|
' // Use base class' connection object
|
||||||
|
scmCmdToExecute.Connection = m_scoMainConnection
|
||||||
|
|
||||||
|
Try
|
||||||
|
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
|
||||||
|
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Open connection.
|
||||||
|
m_scoMainConnection.Open()
|
||||||
|
Else
|
||||||
|
If m_cpMainConnectionProvider.bIsTransactionPending Then
|
||||||
|
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
' // Execute query.
|
||||||
|
sdaAdapter.Fill(dtToReturn)
|
||||||
|
m_iErrorCode = scmCmdToExecute.Parameters.Item("@iErrorCode").Value
|
||||||
|
|
||||||
|
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
|
||||||
|
' // Throw error.
|
||||||
|
Throw New Exception("Stored Procedure 'pr_VV_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return dtToReturn
|
||||||
|
Catch ex As Exception
|
||||||
|
' // some error occured. Bubble it to caller and encapsulate Exception object
|
||||||
|
Throw New Exception("clsVV::SelectAll::Error occured.", ex)
|
||||||
|
Finally
|
||||||
|
If m_bMainConnectionIsCreatedLocal Then
|
||||||
|
' // Close connection.
|
||||||
|
m_scoMainConnection.Close()
|
||||||
|
End If
|
||||||
|
scmCmdToExecute.Dispose()
|
||||||
|
sdaAdapter.Dispose()
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
#Region " Class Property Declarations "
|
||||||
|
|
||||||
|
Public Property [iNRVVG00]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iNRVVG00
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
Dim iNRVVG00Tmp As SqlInt32 = Value
|
||||||
|
If iNRVVG00Tmp.IsNull Then
|
||||||
|
Throw New ArgumentOutOfRangeException("iNRVVG00", "iNRVVG00 can't be NULL")
|
||||||
|
End If
|
||||||
|
m_iNRVVG00 = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iNRPAR00]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iNRPAR00
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iNRPAR00 = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iNRSPR00]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iNRSPR00
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iNRSPR00 = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sBEPRDLG]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sBEPRDLG
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sBEPRDLG = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iNRPRD00]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iNRPRD00
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iNRPRD00 = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sTXRBK00]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sTXRBK00
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sTXRBK00 = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sNEVVG00]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sNEVVG00
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sNEVVG00 = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sNAVVG00]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sNAVVG00
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sNAVVG00 = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [iNRVBS00]() As SqlInt32
|
||||||
|
Get
|
||||||
|
Return m_iNRVBS00
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlInt32)
|
||||||
|
m_iNRVBS00 = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public Property [sSAREC00]() As SqlString
|
||||||
|
Get
|
||||||
|
Return m_sSAREC00
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As SqlString)
|
||||||
|
m_sSAREC00 = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
43
edkb08/Datenbank/db_connection.vb
Normal file
43
edkb08/Datenbank/db_connection.vb
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
Imports System.ComponentModel
|
||||||
|
Imports Microsoft.VisualBasic
|
||||||
|
|
||||||
|
Namespace edokadb
|
||||||
|
|
||||||
|
Public Class DB_Connection
|
||||||
|
Shared Sub New()
|
||||||
|
'Edoka
|
||||||
|
oread = System.IO.File.OpenText(DivFnkt.ApplicationPath + "edokaconn.cfg")
|
||||||
|
sConnectionString_edoka = oread.ReadLine
|
||||||
|
'sConnectionString_edoka = Crypto.DecryptText(sConnectionString, "HutterundMueller")
|
||||||
|
'sConnectionString_edoka = Left(sConnectionString, Len(sConnectionString) - 1)
|
||||||
|
Globals.sConnectionString_edoka = sConnectionString_edoka
|
||||||
|
oread.Close()
|
||||||
|
|
||||||
|
'Journale
|
||||||
|
oread = System.IO.File.OpenText(DivFnkt.ApplicationPath + "journaleconn.cfg")
|
||||||
|
sConnectionString_journale = oread.ReadLine
|
||||||
|
'sConnectionString_journale = Crypto.DecryptText(sConnectionString, "HutterundMueller")
|
||||||
|
'sConnectionString_journale = Left(sConnectionString, Len(sConnectionString) - 1)
|
||||||
|
Globals.sConnectionString_journale = sConnectionString_journale
|
||||||
|
oread.Close()
|
||||||
|
|
||||||
|
|
||||||
|
'Journale für Mailversand
|
||||||
|
oread = System.IO.File.OpenText(DivFnkt.ApplicationPath + "journaleconn_Mail.cfg")
|
||||||
|
sConnectionString_journale_mail = oread.ReadLine
|
||||||
|
'sConnectionString_journale = Crypto.DecryptText(sConnectionString, "HutterundMueller")
|
||||||
|
'sConnectionString_journale = Left(sConnectionString, Len(sConnectionString) - 1)
|
||||||
|
Globals.sConnectionString_journale_mail = sConnectionString_journale_Mail
|
||||||
|
oread.Close()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Globals.conn_edoka.sConnectionString = sConnectionString_edoka
|
||||||
|
Globals.conn_journale.sConnectionString = sConnectionString_journale
|
||||||
|
Globals.conn_journale_Mail.sConnectionString = sConnectionString_journale_Mail
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
|
|
||||||
|
|
||||||
BIN
edkb08/Datenbank/vssver.scc
Normal file
BIN
edkb08/Datenbank/vssver.scc
Normal file
Binary file not shown.
134
edkb08/Globals.vb
Normal file
134
edkb08/Globals.vb
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
'''<summary>Globale Variablen und FUnktionen</summary>
|
||||||
|
Module Globals
|
||||||
|
'''<summary>Datentabelle mit den EDOKA-Applikationsdaten</summary>
|
||||||
|
Public Applikationsdaten As DataTable
|
||||||
|
'''<summary>Datensatzzeiger in der Tabelle Applikationsdaten</summary>
|
||||||
|
Public AppldataRow As Integer
|
||||||
|
|
||||||
|
'''<summary>Verbindung zur Daten EDOKA</summary>
|
||||||
|
Public sConnectionString_edoka As String
|
||||||
|
'''<summary>Verbindung zur Daten EDOKA_Journale</summary>
|
||||||
|
Public sConnectionString_journale As String
|
||||||
|
'''<summary>Verbindung zur Daten EDOKA_Journale mit dem Mail-User</summary>
|
||||||
|
Public sConnectionString_journale_Mail As String
|
||||||
|
Public CurrentTS As String
|
||||||
|
Public BLScan As Boolean = False
|
||||||
|
Public NoIndexdata As Boolean = False
|
||||||
|
Public ImportPraefix As String = "EDKIMP"
|
||||||
|
Public ImportPraefix_Canon_Nr As Integer = 0
|
||||||
|
'Public Canon_Herkunft As String = "IRIS_FORMS"
|
||||||
|
Public Fehlermeldung As String = ""
|
||||||
|
Public Function Canon_Herkunft(Input As String) As Boolean
|
||||||
|
If Input = "IRIS_FORMS" Then
|
||||||
|
Return True
|
||||||
|
Exit Function
|
||||||
|
End If
|
||||||
|
If Input = "IRIS_FORMS_DMS" Then
|
||||||
|
Return True
|
||||||
|
Exit Function
|
||||||
|
End If
|
||||||
|
If Input = "IRIS_FORMS_EDK" Then
|
||||||
|
Return True
|
||||||
|
Exit Function
|
||||||
|
End If
|
||||||
|
If Input = "IRIS_FORMS_LSV" Then
|
||||||
|
Return True
|
||||||
|
Exit Function
|
||||||
|
End If
|
||||||
|
If Input = "IRIS_FORMS_UVM" Then
|
||||||
|
Return True
|
||||||
|
Exit Function
|
||||||
|
End If
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'''<summary>Befehlszeilenargumente</summary>
|
||||||
|
Public args As String() = Environment.GetCommandLineArgs()
|
||||||
|
|
||||||
|
'''<summary>Connectionprovider für die Datenbank EDOKA</summary>
|
||||||
|
'''<seealso
|
||||||
|
'''cref="edokadb.clsConnectionProvider">edokadb.clsConnectionProvider</seealso>
|
||||||
|
Public conn_edoka As New edokadb.clsConnectionProvider()
|
||||||
|
'''<summary>Connectionprovider für die Datenbank EDOKA_Journale</summary>
|
||||||
|
'''<seealso
|
||||||
|
'''cref="edokadb.clsConnectionProvider">edokadb.clsConnectionProvider</seealso>
|
||||||
|
Public conn_journale As New edokadb.clsConnectionProvider()
|
||||||
|
|
||||||
|
|
||||||
|
'''<summary>Connectionprovider für die Datenbank EDOKA_Journale</summary>
|
||||||
|
'''<seealso
|
||||||
|
'''cref="edokadb.clsConnectionProvider">edokadb.clsConnectionProvider</seealso>
|
||||||
|
Public conn_journale_Mail As New edokadb.clsConnectionProvider()
|
||||||
|
|
||||||
|
'''<summary>Instanz des Objektes DivFnkt</summary>
|
||||||
|
Public DivFnkt As New clsDivFnkt()
|
||||||
|
|
||||||
|
Public xFehler As Integer = 0
|
||||||
|
Public Warning As Integer = 0
|
||||||
|
Public DokumentID As String
|
||||||
|
Public ColdDokumentID As String
|
||||||
|
Public KeyNr As Long
|
||||||
|
Public Params As New ClsParameters()
|
||||||
|
Public temp_indexdaten As DataTable
|
||||||
|
|
||||||
|
|
||||||
|
Public ofile As System.IO.File
|
||||||
|
Public oread As System.IO.StreamReader
|
||||||
|
|
||||||
|
'''<summary>Hält die Applikationsdaten für ein zu importierendes Dokumente
|
||||||
|
'''fest</summary>
|
||||||
|
Public ApplData As New DataTable()
|
||||||
|
|
||||||
|
'''<summary>Ausgabe eines Strings mit vorgestelltem TimeStamp</summary>
|
||||||
|
'''<param name="s"></param>
|
||||||
|
Public Sub PrintOut(ByVal s As String)
|
||||||
|
'Console.WriteLine(Format(Now, "yyyyMMddHHmmss") + ": " + s)
|
||||||
|
PrintLog(Format(Now, "yyyyMMddHHmmss") + ": " + s, EventLogEntryType.Information)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub Printout(ByVal s As String, ByVal LogEntryType As EventLogEntryType)
|
||||||
|
PrintLog(Format(Now, "yyyyMMddHHmmss") + ": " + s, LogEntryType)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Dim EVLog As New EventLog("Log_EDKB08")
|
||||||
|
|
||||||
|
'''<summary>Eintrag ins EventLog von EDKB08 schreiben</summary>
|
||||||
|
'''<param name="message"></param>
|
||||||
|
'''<param name="eventmessage"></param>
|
||||||
|
Public Sub PrintLog(ByVal message As String, Optional ByVal eventmessage As EventLogEntryType = EventLogEntryType.Information)
|
||||||
|
#If CONFIG = "Release" Then 'Release
|
||||||
|
If Not EventLog.SourceExists("EDKB08") Then
|
||||||
|
EventLog.CreateEventSource("EDKB08", "EDKB08 Log")
|
||||||
|
End If
|
||||||
|
EVLog.Source = "EDKB08 Log"
|
||||||
|
|
||||||
|
EventLog.WriteEntry(EVLog.Source, message, eventmessage)
|
||||||
|
#Else
|
||||||
|
Debug.Print(message)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'''<summary>Globaler Verweis zur Klasse CLSJournal</summary>
|
||||||
|
Public Journal As New clsJournal()
|
||||||
|
|
||||||
|
'''<summary>Daten für der Herkunftsapplikation</summary>
|
||||||
|
'''<remarks>Diese interne Tabelle enthält die Daten für die Herkunftsapplikation
|
||||||
|
'''einer Indexdatei</remarks>
|
||||||
|
Public Herkunftsapplikation As DataTable
|
||||||
|
|
||||||
|
'''<summary>Interne Variable zur Festhaltung von Fehlern</summary>
|
||||||
|
Public Fehler As Integer = 0
|
||||||
|
|
||||||
|
|
||||||
|
Public Mitarbeiternr As Integer = 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Module
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user