Initial commit

This commit is contained in:
2021-04-20 07:44:06 +02:00
commit 1cc7ed8893
1562 changed files with 496306 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
################################################################################
# Diese .gitignore-Datei wurde von Microsoft(R) Visual Studio automatisch erstellt.
################################################################################
/.vs/BEA/v16/Server/sqlite3/db.lock

BIN
.vs/BEA/v14/.suo Normal file

Binary file not shown.

BIN
.vs/BEA/v15/.suo Normal file

Binary file not shown.

View File

Binary file not shown.

BIN
.vs/BEA/v16/.suo Normal file

Binary file not shown.

Binary file not shown.

BIN
20150523_script.sql Normal file

Binary file not shown.

BIN
BEA - Kopie (2)/BEA.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

433
BEA - Kopie (2)/BEA.vbproj Normal file
View File

@@ -0,0 +1,433 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{6389CFE9-95AF-474D-BC03-83A1B083D5AB}</ProjectGuid>
<OutputType>WinExe</OutputType>
<StartupObject>BEA.My.MyApplication</StartupObject>
<RootNamespace>BEA</RootNamespace>
<AssemblyName>BEA</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>WindowsForms</MyType>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>BEA.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>BEA.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>BEA.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Aga.Controls">
<HintPath>..\..\..\Klassen\TreeViewAdv\Aga.Controls\bin\Debug\Aga.Controls.dll</HintPath>
</Reference>
<Reference Include="C1.Win.C1TrueDBGrid.2, Version=2.0.20123.61277, Culture=neutral, PublicKeyToken=75ae3fb0e2b1e0da, processorArchitecture=MSIL" />
<Reference Include="csvadapter">
<HintPath>..\..\..\EDOKA\client\EDOKA\bin\csvadapter.dll</HintPath>
</Reference>
<Reference Include="DevComponents.DotNetBar2, Version=12.5.0.5, Culture=neutral, PublicKeyToken=7eb7c3a35b91de04, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files (x86)\DotNetBar for Windows Forms\Signed\DevComponents.DotNetBar2.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FlexCel">
<HintPath>..\..\..\ITSM\Vertragsverwaltung\bin\Debug\FlexCel.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Design" />
<Reference Include="System.Drawing" />
<Reference Include="System.Drawing.Design" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="XLSLib">
<HintPath>..\..\..\ITSM\Vertragsverwaltung\bin\Debug\XLSLib.dll</HintPath>
</Reference>
<Reference Include="_DataClass, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\_DataClass\bin\Debug\_DataClass.dll</HintPath>
</Reference>
<Reference Include="_FRReporting">
<HintPath>..\_FRReporting\bin\Debug\_FRReporting.dll</HintPath>
</Reference>
<Reference Include="_Generic_Event_Handler">
<HintPath>..\_Generic_Event_Handler\bin\Debug\_Generic_Event_Handler.dll</HintPath>
</Reference>
<Reference Include="_MyBeziehungen, Version=1.0.4782.19943, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\_MyBeziehungen\bin\Debug\_MyBeziehungen.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Drawing" />
<Import Include="System.Diagnostics" />
<Import Include="System.Windows.Forms" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<Compile Include="DB\Generierte Objekte\clsBerechtigung.vb" />
<Compile Include="DB\Generierte Objekte\clsApplication.vb" />
<Compile Include="DB\Generierte Objekte\clsConnectionProvider.vb" />
<Compile Include="DB\Generierte Objekte\clsDBInteractionBase.vb" />
<Compile Include="DB\Generierte Objekte\clsFunktionsgruppe.vb" />
<Compile Include="DB\Generierte Objekte\clsFunktionsgruppe_rolle.vb" />
<Compile Include="DB\Generierte Objekte\clsFunktionstelle.vb" />
<Compile Include="DB\Generierte Objekte\clsKey_tabelle.vb" />
<Compile Include="DB\Generierte Objekte\clsMeldungstexte.vb" />
<Compile Include="DB\Generierte Objekte\clsMitarbeiter.vb" />
<Compile Include="DB\Generierte Objekte\clsMitarbeiter_funktionsgruppe.vb" />
<Compile Include="DB\Generierte Objekte\clsObjekt.vb" />
<Compile Include="DB\Generierte Objekte\clsObjektBeziehung.vb" />
<Compile Include="DB\Generierte Objekte\clsPersonal.vb" />
<Compile Include="DB\Generierte Objekte\clsPlattform.vb" />
<Compile Include="DB\Generierte Objekte\clsRolle.vb" />
<Compile Include="DB\Generierte Objekte\clsRolle_SecurityObject.vb" />
<Compile Include="DB\Generierte Objekte\clsRolle_sysadminfunktion.vb" />
<Compile Include="DB\Generierte Objekte\clsSecurityObject.vb" />
<Compile Include="DB\Generierte Objekte\clsServer.vb" />
<Compile Include="DB\Generierte Objekte\clsSpalten.vb" />
<Compile Include="DB\Generierte Objekte\clsSysadminfunktion.vb" />
<Compile Include="DB\Generierte Objekte\clsToolTip.vb" />
<Compile Include="DB\Generierte Objekte\clsVerwaltung_durch.vb" />
<Compile Include="DB\Generierte Objekte\clsVerwaltung_mit.vb" />
<Compile Include="DB\MyDBObjects\clsMyKey_Tabelle.vb" />
<Compile Include="DB\MyDBObjects\db_connection.vb" />
<Compile Include="DB\MyDBObjects\frmDatenbankauswahl.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="DB\MyDBObjects\MyMitarbeiter.vb" />
<Compile Include="Diverse Formulare\frmAbout.designer.vb">
<DependentUpon>frmAbout.vb</DependentUpon>
</Compile>
<Compile Include="Diverse Formulare\frmAbout.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Diverse Formulare\frmExportContainer.Designer.vb">
<DependentUpon>frmExportContainer.vb</DependentUpon>
</Compile>
<Compile Include="Diverse Formulare\frmExportContainer.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Diverse Formulare\frmFortschritt.Designer.vb">
<DependentUpon>frmFortschritt.vb</DependentUpon>
</Compile>
<Compile Include="Diverse Formulare\frmFortschritt.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Diverse Formulare\frmLogin.designer.vb">
<DependentUpon>frmLogin.vb</DependentUpon>
</Compile>
<Compile Include="Diverse Formulare\frmLogin.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Diverse Formulare\frmMsgBox.designer.vb">
<DependentUpon>frmMsgBox.vb</DependentUpon>
</Compile>
<Compile Include="Diverse Formulare\frmMsgBox.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Diverse Formulare\frmSplash.designer.vb">
<DependentUpon>frmSplash.vb</DependentUpon>
</Compile>
<Compile Include="Diverse Formulare\frmSplash.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Diverse Formulare\frmTempBerechtigung.Designer.vb">
<DependentUpon>frmTempBerechtigung.vb</DependentUpon>
</Compile>
<Compile Include="Diverse Formulare\frmTempBerechtigung.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Excel\clsExcelImport.vb" />
<Compile Include="Excel\frmDatenverarbeitung.Designer.vb">
<DependentUpon>frmDatenverarbeitung.vb</DependentUpon>
</Compile>
<Compile Include="Excel\frmDatenverarbeitung.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Excel\frmExcelSheets.designer.vb">
<DependentUpon>frmExcelSheets.vb</DependentUpon>
</Compile>
<Compile Include="Excel\frmExcelSheets.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Excel\frmUpdate.Designer.vb">
<DependentUpon>frmUpdate.vb</DependentUpon>
</Compile>
<Compile Include="Excel\frmUpdate.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.vb">
<DependentUpon>Form1.vb</DependentUpon>
</Compile>
<Compile Include="Form1.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmMain.designer.vb">
<DependentUpon>frmMain.vb</DependentUpon>
</Compile>
<Compile Include="frmMain.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Klassen\clsReporting.vb" />
<Compile Include="Klassen\clsToolTips.vb" />
<Compile Include="Klassen\clsWindowHandling.vb" />
<Compile Include="Klassen\FilterClass.vb" />
<Compile Include="Klassen\MyDocMgmt.vb" />
<Compile Include="Klassen\MyMessage.vb" />
<Compile Include="Klassen\MySecurity.vb" />
<Compile Include="Klassen\MySpalten.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="Sysadmin\frmDomainEditor.designer.vb">
<DependentUpon>frmDomainEditor.vb</DependentUpon>
</Compile>
<Compile Include="Sysadmin\frmDomainEditor.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Sysadmin\frmDomainEditorExtTables.designer.vb">
<DependentUpon>frmDomainEditorExtTables.vb</DependentUpon>
</Compile>
<Compile Include="Sysadmin\frmDomainEditorExtTables.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Sysadmin\frmFormSelector.designer.vb">
<DependentUpon>frmFormSelector.vb</DependentUpon>
</Compile>
<Compile Include="Sysadmin\frmFormSelector.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Sysadmin\frmSysadminMenu.designer.vb">
<DependentUpon>frmSysadminMenu.vb</DependentUpon>
</Compile>
<Compile Include="Sysadmin\frmSysadminMenu.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Sysadmin\frmSysadminTableSelector.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Sysadmin\FrmToolTipEditor.designer.vb">
<DependentUpon>FrmToolTipEditor.vb</DependentUpon>
</Compile>
<Compile Include="Sysadmin\FrmToolTipEditor.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Sysadmin\frmVerbindungEditor.designer.vb">
<DependentUpon>frmVerbindungEditor.vb</DependentUpon>
</Compile>
<Compile Include="Sysadmin\frmVerbindungEditor.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Sysadmin\MySysadmin.vb" />
<Compile Include="Sysadmin\MySysadminFunktion.vb" />
<Compile Include="Utils\Crypto.vb" />
<Compile Include="Utils\Globals.vb" />
<Compile Include="Übersicht\clsUebersicht.vb" />
<Compile Include="Übersicht\clsUebersichtRE.vb" />
<Compile Include="Übersicht\frmSuche.Designer.vb">
<DependentUpon>frmSuche.vb</DependentUpon>
</Compile>
<Compile Include="Übersicht\frmSuche.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Übersicht\frmUebersichtRE.designer.vb">
<DependentUpon>frmUebersichtRE.vb</DependentUpon>
</Compile>
<Compile Include="Übersicht\frmUebersichtRE.vb">
<SubType>Form</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="DB\MyDBObjects\frmDatenbankauswahl.resx">
<DependentUpon>frmDatenbankauswahl.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Diverse Formulare\frmAbout.resx">
<DependentUpon>frmAbout.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Diverse Formulare\frmExportContainer.resx">
<DependentUpon>frmExportContainer.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Diverse Formulare\frmFortschritt.resx">
<DependentUpon>frmFortschritt.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Diverse Formulare\frmLogin.resx">
<DependentUpon>frmLogin.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Diverse Formulare\frmMsgBox.resx">
<DependentUpon>frmMsgBox.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Diverse Formulare\frmSplash.resx">
<DependentUpon>frmSplash.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Diverse Formulare\frmTempBerechtigung.resx">
<DependentUpon>frmTempBerechtigung.vb</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Excel\frmDatenverarbeitung.resx">
<DependentUpon>frmDatenverarbeitung.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Excel\frmExcelSheets.resx">
<DependentUpon>frmExcelSheets.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Excel\frmUpdate.resx">
<DependentUpon>frmUpdate.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmMain.resx">
<DependentUpon>frmMain.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="My Project\licenses.licx" />
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Sysadmin\frmDomainEditor.resx">
<DependentUpon>frmDomainEditor.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Sysadmin\frmDomainEditorExtTables.resx">
<DependentUpon>frmDomainEditorExtTables.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Sysadmin\frmFormSelector.resx">
<DependentUpon>frmFormSelector.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Sysadmin\frmSysadminMenu.resx">
<DependentUpon>frmSysadminMenu.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Sysadmin\frmSysadminTableSelector.resx">
<DependentUpon>frmSysadminTableSelector.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Sysadmin\FrmToolTipEditor.resx">
<DependentUpon>FrmToolTipEditor.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Sysadmin\frmVerbindungEditor.resx">
<DependentUpon>frmVerbindungEditor.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Übersicht\frmSuche.resx">
<DependentUpon>frmSuche.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Übersicht\frmUebersichtRE.resx">
<DependentUpon>frmUebersichtRE.vb</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="BEA.ico" />
<None Include="Resources\Hands-One-Finger-icon2.png" />
<None Include="Resources\Stop.bmp" />
<None Include="Resources\Hands-One-Finger-icon1.png" />
<None Include="Resources\copy_cursor.png" />
<None Include="Resources\Hands-One-Finger-icon.png" />
<None Include="Resources\Image1.png" />
<None Include="Resources\CopyCursor.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\_AllgMainObjekte\_AllgMainObjekte.vbproj">
<Project>{17C24C36-1D76-447F-B688-AC92C5BA9CBD}</Project>
<Name>_AllgMainObjekte</Name>
</ProjectReference>
<ProjectReference Include="..\_FunktionDetail\_FunktionDetail.vbproj">
<Project>{C08BD3F2-8DC9-4CE9-9F34-1CCBC7F429EC}</Project>
<Name>_FunktionDetail</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<COMReference Include="Microsoft.Office.Interop.Excel">
<Guid>{00020813-0000-0000-C000-000000000046}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>7</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
<COMReference Include="VBIDE">
<Guid>{0002E157-0000-0000-C000-000000000046}</Guid>
<VersionMajor>5</VersionMajor>
<VersionMinor>3</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,435 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{6389CFE9-95AF-474D-BC03-83A1B083D5AB}</ProjectGuid>
<OutputType>WinExe</OutputType>
<StartupObject>BEA.My.MyApplication</StartupObject>
<RootNamespace>BEA</RootNamespace>
<AssemblyName>BEA</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>WindowsForms</MyType>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>BEA.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>BEA.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>BEA.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="C1.Win.C1TrueDBGrid.2, Version=2.0.20123.61277, Culture=neutral, PublicKeyToken=75ae3fb0e2b1e0da, processorArchitecture=MSIL" />
<Reference Include="csvadapter">
<HintPath>..\..\..\EDOKA\client\EDOKA\bin\csvadapter.dll</HintPath>
</Reference>
<Reference Include="DevComponents.DotNetBar2, Version=12.2.0.5, Culture=neutral, PublicKeyToken=7eb7c3a35b91de04, processorArchitecture=MSIL" />
<Reference Include="FlexCel, Version=5.5.1.0, Culture=neutral, PublicKeyToken=cb8f6080e6d5a4d6, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\_FRReporting\bin\Debug\FlexCel.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Design" />
<Reference Include="System.Drawing" />
<Reference Include="System.Drawing.Design" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="XLSLib">
<HintPath>..\..\..\EDOKA\client\EDOKA\bin\XLSLib.dll</HintPath>
</Reference>
<Reference Include="_DataClass, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\_DataClass\bin\Debug\_DataClass.dll</HintPath>
</Reference>
<Reference Include="_FRReporting">
<HintPath>..\_FRReporting\bin\Debug\_FRReporting.dll</HintPath>
</Reference>
<Reference Include="_Generic_Event_Handler">
<HintPath>..\_Generic_Event_Handler\bin\Debug\_Generic_Event_Handler.dll</HintPath>
</Reference>
<Reference Include="_MyBeziehungen, Version=1.0.4782.19943, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\_MyBeziehungen\bin\Debug\_MyBeziehungen.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Drawing" />
<Import Include="System.Diagnostics" />
<Import Include="System.Windows.Forms" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<Compile Include="DB\Generierte Objekte\clsBerechtigung.vb" />
<Compile Include="DB\Generierte Objekte\clsApplication.vb" />
<Compile Include="DB\Generierte Objekte\clsConnectionProvider.vb" />
<Compile Include="DB\Generierte Objekte\clsDBInteractionBase.vb" />
<Compile Include="DB\Generierte Objekte\clsFunktionsgruppe.vb" />
<Compile Include="DB\Generierte Objekte\clsFunktionsgruppe_rolle.vb" />
<Compile Include="DB\Generierte Objekte\clsFunktionstelle.vb" />
<Compile Include="DB\Generierte Objekte\clsKey_tabelle.vb" />
<Compile Include="DB\Generierte Objekte\clsMeldungstexte.vb" />
<Compile Include="DB\Generierte Objekte\clsMitarbeiter.vb" />
<Compile Include="DB\Generierte Objekte\clsMitarbeiter_funktionsgruppe.vb" />
<Compile Include="DB\Generierte Objekte\clsObjekt.vb" />
<Compile Include="DB\Generierte Objekte\clsObjektBeziehung.vb" />
<Compile Include="DB\Generierte Objekte\clsPersonal.vb" />
<Compile Include="DB\Generierte Objekte\clsPlattform.vb" />
<Compile Include="DB\Generierte Objekte\clsRolle.vb" />
<Compile Include="DB\Generierte Objekte\clsRolle_SecurityObject.vb" />
<Compile Include="DB\Generierte Objekte\clsRolle_sysadminfunktion.vb" />
<Compile Include="DB\Generierte Objekte\clsSecurityObject.vb" />
<Compile Include="DB\Generierte Objekte\clsServer.vb" />
<Compile Include="DB\Generierte Objekte\clsSpalten.vb" />
<Compile Include="DB\Generierte Objekte\clsSysadminfunktion.vb" />
<Compile Include="DB\Generierte Objekte\clsToolTip.vb" />
<Compile Include="DB\Generierte Objekte\clsVerwaltung_durch.vb" />
<Compile Include="DB\Generierte Objekte\clsVerwaltung_mit.vb" />
<Compile Include="DB\MyDBObjects\clsMyKey_Tabelle.vb" />
<Compile Include="DB\MyDBObjects\db_connection.vb" />
<Compile Include="DB\MyDBObjects\frmDatenbankauswahl.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="DB\MyDBObjects\MyMitarbeiter.vb" />
<Compile Include="Diverse Formulare\frmAbout.designer.vb">
<DependentUpon>frmAbout.vb</DependentUpon>
</Compile>
<Compile Include="Diverse Formulare\frmAbout.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Diverse Formulare\frmExportContainer.Designer.vb">
<DependentUpon>frmExportContainer.vb</DependentUpon>
</Compile>
<Compile Include="Diverse Formulare\frmExportContainer.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Diverse Formulare\frmFortschritt.Designer.vb">
<DependentUpon>frmFortschritt.vb</DependentUpon>
</Compile>
<Compile Include="Diverse Formulare\frmFortschritt.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Diverse Formulare\frmLogin.designer.vb">
<DependentUpon>frmLogin.vb</DependentUpon>
</Compile>
<Compile Include="Diverse Formulare\frmLogin.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Diverse Formulare\frmMsgBox.designer.vb">
<DependentUpon>frmMsgBox.vb</DependentUpon>
</Compile>
<Compile Include="Diverse Formulare\frmMsgBox.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Diverse Formulare\frmSplash.designer.vb">
<DependentUpon>frmSplash.vb</DependentUpon>
</Compile>
<Compile Include="Diverse Formulare\frmSplash.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Diverse Formulare\frmTempBerechtigung.Designer.vb">
<DependentUpon>frmTempBerechtigung.vb</DependentUpon>
</Compile>
<Compile Include="Diverse Formulare\frmTempBerechtigung.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Excel\clsExcelImport.vb" />
<Compile Include="Excel\frmDatenverarbeitung.Designer.vb">
<DependentUpon>frmDatenverarbeitung.vb</DependentUpon>
</Compile>
<Compile Include="Excel\frmDatenverarbeitung.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Excel\frmExcelSheets.designer.vb">
<DependentUpon>frmExcelSheets.vb</DependentUpon>
</Compile>
<Compile Include="Excel\frmExcelSheets.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Excel\frmUpdate.Designer.vb">
<DependentUpon>frmUpdate.vb</DependentUpon>
</Compile>
<Compile Include="Excel\frmUpdate.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.vb">
<DependentUpon>Form1.vb</DependentUpon>
</Compile>
<Compile Include="Form1.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmMain.designer.vb">
<DependentUpon>frmMain.vb</DependentUpon>
</Compile>
<Compile Include="frmMain.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Klassen\clsReporting.vb" />
<Compile Include="Klassen\clsToolTips.vb" />
<Compile Include="Klassen\clsWindowHandling.vb" />
<Compile Include="Klassen\FilterClass.vb" />
<Compile Include="Klassen\MyDocMgmt.vb" />
<Compile Include="Klassen\MyMessage.vb" />
<Compile Include="Klassen\MySecurity.vb" />
<Compile Include="Klassen\MySpalten.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="Sysadmin\frmDomainEditor.designer.vb">
<DependentUpon>frmDomainEditor.vb</DependentUpon>
</Compile>
<Compile Include="Sysadmin\frmDomainEditor.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Sysadmin\frmDomainEditorExtTables.designer.vb">
<DependentUpon>frmDomainEditorExtTables.vb</DependentUpon>
</Compile>
<Compile Include="Sysadmin\frmDomainEditorExtTables.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Sysadmin\frmFormSelector.designer.vb">
<DependentUpon>frmFormSelector.vb</DependentUpon>
</Compile>
<Compile Include="Sysadmin\frmFormSelector.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Sysadmin\frmSysadminMenu.designer.vb">
<DependentUpon>frmSysadminMenu.vb</DependentUpon>
</Compile>
<Compile Include="Sysadmin\frmSysadminMenu.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Sysadmin\frmSysadminTableSelector.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Sysadmin\FrmToolTipEditor.designer.vb">
<DependentUpon>FrmToolTipEditor.vb</DependentUpon>
</Compile>
<Compile Include="Sysadmin\FrmToolTipEditor.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Sysadmin\frmVerbindungEditor.designer.vb">
<DependentUpon>frmVerbindungEditor.vb</DependentUpon>
</Compile>
<Compile Include="Sysadmin\frmVerbindungEditor.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Sysadmin\MySysadmin.vb" />
<Compile Include="Sysadmin\MySysadminFunktion.vb" />
<Compile Include="Utils\Crypto.vb" />
<Compile Include="Utils\Globals.vb" />
<Compile Include="Übersicht\clsUebersicht.vb" />
<Compile Include="Übersicht\clsUebersichtRE.vb" />
<Compile Include="Übersicht\frmSuche.Designer.vb">
<DependentUpon>frmSuche.vb</DependentUpon>
</Compile>
<Compile Include="Übersicht\frmSuche.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Übersicht\frmUebersicht.Designer.vb">
<DependentUpon>frmUebersicht.vb</DependentUpon>
</Compile>
<Compile Include="Übersicht\frmUebersicht.vb">
<SubType>Form</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="DB\MyDBObjects\frmDatenbankauswahl.resx">
<DependentUpon>frmDatenbankauswahl.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Diverse Formulare\frmAbout.resx">
<DependentUpon>frmAbout.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Diverse Formulare\frmExportContainer.resx">
<DependentUpon>frmExportContainer.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Diverse Formulare\frmFortschritt.resx">
<DependentUpon>frmFortschritt.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Diverse Formulare\frmLogin.resx">
<DependentUpon>frmLogin.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Diverse Formulare\frmMsgBox.resx">
<DependentUpon>frmMsgBox.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Diverse Formulare\frmSplash.resx">
<DependentUpon>frmSplash.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Diverse Formulare\frmTempBerechtigung.resx">
<DependentUpon>frmTempBerechtigung.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Excel\frmDatenverarbeitung.resx">
<DependentUpon>frmDatenverarbeitung.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Excel\frmExcelSheets.resx">
<DependentUpon>frmExcelSheets.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Excel\frmUpdate.resx">
<DependentUpon>frmUpdate.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmMain.resx">
<DependentUpon>frmMain.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="My Project\licenses.licx" />
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Sysadmin\frmDomainEditor.resx">
<DependentUpon>frmDomainEditor.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Sysadmin\frmDomainEditorExtTables.resx">
<DependentUpon>frmDomainEditorExtTables.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Sysadmin\frmFormSelector.resx">
<DependentUpon>frmFormSelector.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Sysadmin\frmSysadminMenu.resx">
<DependentUpon>frmSysadminMenu.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Sysadmin\frmSysadminTableSelector.resx">
<DependentUpon>frmSysadminTableSelector.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Sysadmin\FrmToolTipEditor.resx">
<DependentUpon>FrmToolTipEditor.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Sysadmin\frmVerbindungEditor.resx">
<DependentUpon>frmVerbindungEditor.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Übersicht\frmSuche.resx">
<DependentUpon>frmSuche.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Übersicht\frmUebersicht.resx">
<DependentUpon>frmUebersicht.vb</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="BEA.ico" />
<None Include="Resources\Hands-One-Finger-icon2.png" />
<None Include="Resources\Stop.bmp" />
<None Include="Resources\Hands-One-Finger-icon1.png" />
<None Include="Resources\copy_cursor.png" />
<None Include="Resources\Hands-One-Finger-icon.png" />
<None Include="Resources\Image1.png" />
<None Include="Resources\CopyCursor.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\_AllgMainObjekte\_AllgMainObjekte.vbproj">
<Project>{17C24C36-1D76-447F-B688-AC92C5BA9CBD}</Project>
<Name>_AllgMainObjekte</Name>
</ProjectReference>
<ProjectReference Include="..\_FunktionDetail\_FunktionDetail.vbproj">
<Project>{C08BD3F2-8DC9-4CE9-9F34-1CCBC7F429EC}</Project>
<Name>_FunktionDetail</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<COMReference Include="Microsoft.Office.Core">
<Guid>{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}</Guid>
<VersionMajor>2</VersionMajor>
<VersionMinor>5</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
<COMReference Include="Microsoft.Office.Interop.Excel">
<Guid>{00020813-0000-0000-C000-000000000046}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>7</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
<COMReference Include="VBIDE">
<Guid>{0002E157-0000-0000-C000-000000000046}</Guid>
<VersionMajor>5</VersionMajor>
<VersionMinor>3</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- VSdocman config file for current project/solution.-->
<activeProfile>default</activeProfile>
<appSettings>
</appSettings>
</configuration>

View File

@@ -0,0 +1,432 @@
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace DB
Public Class clsApplication
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bShowlogin, m_bAktiv As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iMutierer, m_iMandantnr, m_iApplikationsnr As SqlInt32
Private m_sTag_Externe_MA, m_sTmp_filepath, m_sVersion As SqlString
#End Region
Public Sub New()
' // Nothing for now.
End Sub
Public Overrides Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Application_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iapplikationsnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iApplikationsnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sversion", SqlDbType.VarChar, 4, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVersion))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bshowlogin", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bShowlogin))
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, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@stmp_filepath", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTmp_filepath))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sTag_Externe_MA", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTag_Externe_MA))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Application_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("clsApplication::Insert::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Public Overrides Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Application_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iapplikationsnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iApplikationsnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sversion", SqlDbType.VarChar, 4, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sVersion))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bshowlogin", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bShowlogin))
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, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@stmp_filepath", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTmp_filepath))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sTag_Externe_MA", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTag_Externe_MA))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Application_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("clsApplication::Update::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Public Overrides Function Delete() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Application_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iapplikationsnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iApplikationsnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Application_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("clsApplication::Delete::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Public Overrides Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Application_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("Application")
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iapplikationsnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iApplikationsnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_Application_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iApplikationsnr = New SqlInt32(CType(dtToReturn.Rows(0)("applikationsnr"), Integer))
If dtToReturn.Rows(0)("version") Is System.DBNull.Value Then
m_sVersion = SqlString.Null
Else
m_sVersion = New SqlString(CType(dtToReturn.Rows(0)("version"), String))
End If
If dtToReturn.Rows(0)("showlogin") Is System.DBNull.Value Then
m_bShowlogin = SqlBoolean.Null
Else
m_bShowlogin = New SqlBoolean(CType(dtToReturn.Rows(0)("showlogin"), Boolean))
End If
If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then
m_iMandantnr = SqlInt32.Null
Else
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
End If
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
m_bAktiv = SqlBoolean.Null
Else
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
End If
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
m_daErstellt_am = SqlDateTime.Null
Else
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
End If
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
m_daMutiert_am = SqlDateTime.Null
Else
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
End If
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
m_iMutierer = SqlInt32.Null
Else
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
End If
If dtToReturn.Rows(0)("tmp_filepath") Is System.DBNull.Value Then
m_sTmp_filepath = SqlString.Null
Else
m_sTmp_filepath = New SqlString(CType(dtToReturn.Rows(0)("tmp_filepath"), String))
End If
If dtToReturn.Rows(0)("Tag_Externe_MA") Is System.DBNull.Value Then
m_sTag_Externe_MA = SqlString.Null
Else
m_sTag_Externe_MA = New SqlString(CType(dtToReturn.Rows(0)("Tag_Externe_MA"), 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("clsApplication::SelectOne::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
Public Overrides Function SelectAll() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Application_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("Application")
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_Application_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("clsApplication::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 [iApplikationsnr]() As SqlInt32
Get
Return m_iApplikationsnr
End Get
Set(ByVal Value As SqlInt32)
Dim iApplikationsnrTmp As SqlInt32 = Value
If iApplikationsnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iApplikationsnr", "iApplikationsnr can't be NULL")
End If
m_iApplikationsnr = Value
End Set
End Property
Public Property [sVersion]() As SqlString
Get
Return m_sVersion
End Get
Set(ByVal Value As SqlString)
m_sVersion = Value
End Set
End Property
Public Property [bShowlogin]() As SqlBoolean
Get
Return m_bShowlogin
End Get
Set(ByVal Value As SqlBoolean)
m_bShowlogin = 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 [sTmp_filepath]() As SqlString
Get
Dim s As String
s = m_sTmp_filepath.ToString
If UCase(s).IndexOf("%APPDATA%") > -1 Then
s = s.Replace("%appdata%", System.Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData))
End If
m_sTmp_filepath = New SqlString(CType(s, String))
Return m_sTmp_filepath
End Get
Set(ByVal Value As SqlString)
m_sTmp_filepath = Value
End Set
End Property
Public Property [sTag_Externe_MA]() As SqlString
Get
Return m_sTag_Externe_MA
End Get
Set(ByVal Value As SqlString)
m_sTag_Externe_MA = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,424 @@
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace DB
Public Class clsBerechtigung
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iCID, m_iMutierer, m_iBerechtigungNr, m_iParentID, m_iSequenz As SqlInt32
Private m_sBezeichnung, m_sBeschreibung As SqlString
#End Region
Public Sub New()
' // Nothing for now.
End Sub
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Berechtigung_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iBerechtigungNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBerechtigungNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParentID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSequenz", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSequenz))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iCID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCID))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Berechtigung_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("clsBerechtigung::Insert::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Berechtigung_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iBerechtigungNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBerechtigungNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParentID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSequenz", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSequenz))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iCID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCID))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Berechtigung_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("clsBerechtigung::Update::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function Delete() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Berechtigung_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iBerechtigungNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBerechtigungNr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Berechtigung_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("clsBerechtigung::Delete::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Berechtigung_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Berechtigung")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iBerechtigungNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iBerechtigungNr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_Berechtigung_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iBerechtigungNr = New SqlInt32(CType(dtToReturn.Rows(0)("BerechtigungNr"), Integer))
If dtToReturn.Rows(0)("ParentID") Is System.DBNull.Value Then
m_iParentID = SqlInt32.Null
Else
m_iParentID = New SqlInt32(CType(dtToReturn.Rows(0)("ParentID"), Integer))
End If
If dtToReturn.Rows(0)("Bezeichnung") Is System.DBNull.Value Then
m_sBezeichnung = SqlString.Null
Else
m_sBezeichnung = New SqlString(CType(dtToReturn.Rows(0)("Bezeichnung"), String))
End If
If dtToReturn.Rows(0)("Beschreibung") Is System.DBNull.Value Then
m_sBeschreibung = SqlString.Null
Else
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("Beschreibung"), String))
End If
If dtToReturn.Rows(0)("Sequenz") Is System.DBNull.Value Then
m_iSequenz = SqlInt32.Null
Else
m_iSequenz = New SqlInt32(CType(dtToReturn.Rows(0)("Sequenz"), 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)("CID") Is System.DBNull.Value Then
m_iCID = SqlInt32.Null
Else
m_iCID = New SqlInt32(CType(dtToReturn.Rows(0)("CID"), 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("clsBerechtigung::SelectOne::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
Overrides Public Function SelectAll() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Berechtigung_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Berechtigung")
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_Berechtigung_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("clsBerechtigung::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 [iBerechtigungNr]() As SqlInt32
Get
Return m_iBerechtigungNr
End Get
Set(ByVal Value As SqlInt32)
Dim iBerechtigungNrTmp As SqlInt32 = Value
If iBerechtigungNrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iBerechtigungNr", "iBerechtigungNr can't be NULL")
End If
m_iBerechtigungNr = Value
End Set
End Property
Public Property [iParentID]() As SqlInt32
Get
Return m_iParentID
End Get
Set(ByVal Value As SqlInt32)
m_iParentID = Value
End Set
End Property
Public Property [sBezeichnung]() As SqlString
Get
Return m_sBezeichnung
End Get
Set(ByVal Value As SqlString)
m_sBezeichnung = Value
End Set
End Property
Public Property [sBeschreibung]() As SqlString
Get
Return m_sBeschreibung
End Get
Set(ByVal Value As SqlString)
m_sBeschreibung = Value
End Set
End Property
Public Property [iSequenz]() As SqlInt32
Get
Return m_iSequenz
End Get
Set(ByVal Value As SqlInt32)
m_iSequenz = 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 [iCID]() As SqlInt32
Get
Return m_iCID
End Get
Set(ByVal Value As SqlInt32)
m_iCID = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,236 @@
Imports System
Imports System.Configuration
Imports System.Data
Imports System.Data.SqlClient
Imports System.Collections
Namespace DB
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
Overloads Public Sub Dispose() Implements IDisposable.Dispose
Dispose(True)
GC.SuppressFinalize(Me)
End Sub
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
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
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
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
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
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
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
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

View File

@@ -0,0 +1,167 @@
Imports System
Imports System.Configuration
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Namespace DB
Public Enum LLBLError
AllOk
' // Add more here (check the comma's!)
End Enum
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
Public MustInherit Class clsDBInteractionBase
Implements IDisposable
Implements ICommonDBAccess
#Region " Class Member Declarations "
Protected m_scoMainConnection As SqlConnection
Protected m_iRowsAffected As Integer
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
Public Sub New()
' // Initialize the class' members.
InitClass()
End Sub
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
Overloads Public Sub Dispose() Implements IDisposable.Dispose
Dispose(True)
GC.SuppressFinalize(Me)
End Sub
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
Public Overridable Function Insert() As Boolean Implements ICommonDBAccess.Insert
' // No implementation, throw exception
Throw New NotImplementedException()
End Function
Public Overridable Function Delete() As Boolean Implements ICommonDBAccess.Delete
' // No implementation, throw exception
Throw New NotImplementedException()
End Function
Public Overridable Function Update() As Boolean Implements ICommonDBAccess.Update
' // No implementation, throw exception
Throw New NotImplementedException()
End Function
Public Overridable Function SelectOne() As DataTable Implements ICommonDBAccess.SelectOne
' // No implementation, throw exception
Throw New NotImplementedException()
End Function
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
Public Readonly Property iRowsAffected() As Integer
Get
Return m_iRowsAffected
End Get
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,407 @@
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace DB
Public Class clsFunktionsgruppe
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iMandantnr, m_iFunktionsgruppenr As SqlInt32
Private m_sZugehoerigkeit, m_sBezeichnung, m_sBeschreibung As SqlString
#End Region
Public Sub New()
' // Nothing for now.
End Sub
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_funktionsgruppe_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionsgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgruppenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@szugehoerigkeit", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sZugehoerigkeit))
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, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_funktionsgruppe_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsFunktionsgruppe::Insert::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_funktionsgruppe_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionsgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgruppenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@szugehoerigkeit", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sZugehoerigkeit))
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, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_funktionsgruppe_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsFunktionsgruppe::Update::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function Delete() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_funktionsgruppe_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionsgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgruppenr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_funktionsgruppe_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsFunktionsgruppe::Delete::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_funktionsgruppe_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("funktionsgruppe")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@ifunktionsgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgruppenr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
sdaAdapter.Fill(dtToReturn)
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_funktionsgruppe_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iFunktionsgruppenr = New SqlInt32(CType(dtToReturn.Rows(0)("funktionsgruppenr"), Integer))
If dtToReturn.Rows(0)("bezeichnung") Is System.DBNull.Value Then
m_sBezeichnung = SqlString.Null
Else
m_sBezeichnung = New SqlString(CType(dtToReturn.Rows(0)("bezeichnung"), String))
End If
If dtToReturn.Rows(0)("beschreibung") Is System.DBNull.Value Then
m_sBeschreibung = SqlString.Null
Else
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("beschreibung"), String))
End If
If dtToReturn.Rows(0)("zugehoerigkeit") Is System.DBNull.Value Then
m_sZugehoerigkeit = SqlString.Null
Else
m_sZugehoerigkeit = New SqlString(CType(dtToReturn.Rows(0)("zugehoerigkeit"), String))
End If
If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then
m_iMandantnr = SqlInt32.Null
Else
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
End If
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
m_bAktiv = SqlBoolean.Null
Else
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
End If
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
m_daErstellt_am = SqlDateTime.Null
Else
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
End If
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
m_daMutiert_am = SqlDateTime.Null
Else
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
End If
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
m_iMutierer = SqlInt32.Null
Else
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
End If
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsFunktionsgruppe::SelectOne::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
Overrides Public Function SelectAll() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_funktionsgruppe_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("funktionsgruppe")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
sdaAdapter.Fill(dtToReturn)
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_funktionsgruppe_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsFunktionsgruppe::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 [iFunktionsgruppenr]() As SqlInt32
Get
Return m_iFunktionsgruppenr
End Get
Set(ByVal Value As SqlInt32)
Dim iFunktionsgruppenrTmp As SqlInt32 = Value
If iFunktionsgruppenrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iFunktionsgruppenr", "iFunktionsgruppenr can't be NULL")
End If
m_iFunktionsgruppenr = Value
End Set
End Property
Public Property [sBezeichnung]() As SqlString
Get
Return m_sBezeichnung
End Get
Set(ByVal Value As SqlString)
m_sBezeichnung = Value
End Set
End Property
Public Property [sBeschreibung]() As SqlString
Get
Return m_sBeschreibung
End Get
Set(ByVal Value As SqlString)
m_sBeschreibung = Value
End Set
End Property
Public Property [sZugehoerigkeit]() As SqlString
Get
Return m_sZugehoerigkeit
End Get
Set(ByVal Value As SqlString)
m_sZugehoerigkeit = 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

View File

@@ -0,0 +1,489 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'funktionsgruppe_rolle'
' // Generated by LLBLGen v1.21.2003.712 Final on: Dienstag, 1. Januar 2013, 19:36:38
' // 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 DB
''' <summary>
''' Purpose: Data Access class for the table 'funktionsgruppe_rolle'.
''' </summary>
Public Class clsFunktionsgruppe_rolle
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iFunktionsgruppenr, m_iFunktionsgrupperollenr, m_iMandantnr, m_iRollenr As SqlInt32
#End Region
''' <summary>
''' Purpose: Class constructor.
''' </summary>
Public Sub New()
' // Nothing for now.
End Sub
''' <summary>
''' Purpose: Insert method. This method will insert one new row into the database.
''' </summary>
''' <returns>True if succeeded, otherwise an Exception is thrown. </returns>
''' <remarks>
''' Properties needed for this method:
''' <UL>
''' <LI>iFunktionsgrupperollenr</LI>
''' <LI>iFunktionsgruppenr. May be SqlInt32.Null</LI>
''' <LI>iRollenr. May be SqlInt32.Null</LI>
''' <LI>iMandantnr. May be SqlInt32.Null</LI>
''' <LI>bAktiv. May be SqlBoolean.Null</LI>
''' <LI>daErstellt_am. May be SqlDateTime.Null</LI>
''' <LI>daMutiert_am. May be SqlDateTime.Null</LI>
''' <LI>iMutierer. May be SqlInt32.Null</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_funktionsgruppe_rolle_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iFunktionsgrupperollenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgrupperollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionsgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgruppenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_funktionsgruppe_rolle_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsFunktionsgruppe_rolle::Insert::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
''' <summary>
''' Purpose: Update method. This method will Update one existing row in the database.
''' </summary>
''' <returns>True if succeeded, otherwise an Exception is thrown. </returns>
''' <remarks>
''' Properties needed for this method:
''' <UL>
''' <LI>iFunktionsgrupperollenr</LI>
''' <LI>iFunktionsgruppenr. May be SqlInt32.Null</LI>
''' <LI>iRollenr. May be SqlInt32.Null</LI>
''' <LI>iMandantnr. May be SqlInt32.Null</LI>
''' <LI>bAktiv. May be SqlBoolean.Null</LI>
''' <LI>daErstellt_am. May be SqlDateTime.Null</LI>
''' <LI>daMutiert_am. May be SqlDateTime.Null</LI>
''' <LI>iMutierer. May be SqlInt32.Null</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_funktionsgruppe_rolle_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iFunktionsgrupperollenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgrupperollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionsgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgruppenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_funktionsgruppe_rolle_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsFunktionsgruppe_rolle::Update::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
''' <summary>
''' Purpose: Delete method. This method will Delete one existing row in the database, based on the Primary Key.
''' </summary>
''' <returns>True if succeeded, otherwise an Exception is thrown. </returns>
''' <remarks>
''' Properties needed for this method:
''' <UL>
''' <LI>iFunktionsgrupperollenr</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
Overrides Public Function Delete() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_funktionsgruppe_rolle_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iFunktionsgrupperollenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgrupperollenr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_funktionsgruppe_rolle_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsFunktionsgruppe_rolle::Delete::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
''' <summary>
''' Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
''' </summary>
''' <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
''' <remarks>
''' Properties needed for this method:
''' <UL>
''' <LI>iFunktionsgrupperollenr</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
''' <LI>iFunktionsgrupperollenr</LI>
''' <LI>iFunktionsgruppenr</LI>
''' <LI>iRollenr</LI>
''' <LI>iMandantnr</LI>
''' <LI>bAktiv</LI>
''' <LI>daErstellt_am</LI>
''' <LI>daMutiert_am</LI>
''' <LI>iMutierer</LI>
'''</UL>
''' Will fill all properties corresponding with a field in the table with the value of the row selected.
''' </remarks>
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_funktionsgruppe_rolle_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("funktionsgruppe_rolle")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iFunktionsgrupperollenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgrupperollenr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
sdaAdapter.Fill(dtToReturn)
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_funktionsgruppe_rolle_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iFunktionsgrupperollenr = New SqlInt32(CType(dtToReturn.Rows(0)("Funktionsgrupperollenr"), Integer))
If dtToReturn.Rows(0)("funktionsgruppenr") Is System.DBNull.Value Then
m_iFunktionsgruppenr = SqlInt32.Null
Else
m_iFunktionsgruppenr = New SqlInt32(CType(dtToReturn.Rows(0)("funktionsgruppenr"), Integer))
End If
If dtToReturn.Rows(0)("rollenr") Is System.DBNull.Value Then
m_iRollenr = SqlInt32.Null
Else
m_iRollenr = New SqlInt32(CType(dtToReturn.Rows(0)("rollenr"), Integer))
End If
If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then
m_iMandantnr = SqlInt32.Null
Else
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
End If
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
m_bAktiv = SqlBoolean.Null
Else
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
End If
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
m_daErstellt_am = SqlDateTime.Null
Else
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
End If
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
m_daMutiert_am = SqlDateTime.Null
Else
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
End If
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
m_iMutierer = SqlInt32.Null
Else
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
End If
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsFunktionsgruppe_rolle::SelectOne::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
''' <summary>
''' Purpose: SelectAll method. This method will Select all rows from the table.
''' </summary>
''' <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
''' <remarks>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
Overrides Public Function SelectAll() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_funktionsgruppe_rolle_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("funktionsgruppe_rolle")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
sdaAdapter.Fill(dtToReturn)
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_funktionsgruppe_rolle_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsFunktionsgruppe_rolle::SelectAll::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
#Region " Class Property Declarations "
Public Property [iFunktionsgrupperollenr]() As SqlInt32
Get
Return m_iFunktionsgrupperollenr
End Get
Set(ByVal Value As SqlInt32)
Dim iFunktionsgrupperollenrTmp As SqlInt32 = Value
If iFunktionsgrupperollenrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iFunktionsgrupperollenr", "iFunktionsgrupperollenr can't be NULL")
End If
m_iFunktionsgrupperollenr = Value
End Set
End Property
Public Property [iFunktionsgruppenr]() As SqlInt32
Get
Return m_iFunktionsgruppenr
End Get
Set(ByVal Value As SqlInt32)
m_iFunktionsgruppenr = Value
End Set
End Property
Public Property [iRollenr]() As SqlInt32
Get
Return m_iRollenr
End Get
Set(ByVal Value As SqlInt32)
m_iRollenr = Value
End Set
End Property
Public Property [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr = Value
End Set
End Property
Public Property [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
m_bAktiv = Value
End Set
End Property
Public Property [daErstellt_am]() As SqlDateTime
Get
Return m_daErstellt_am
End Get
Set(ByVal Value As SqlDateTime)
m_daErstellt_am = Value
End Set
End Property
Public Property [daMutiert_am]() As SqlDateTime
Get
Return m_daMutiert_am
End Get
Set(ByVal Value As SqlDateTime)
m_daMutiert_am = Value
End Set
End Property
Public Property [iMutierer]() As SqlInt32
Get
Return m_iMutierer
End Get
Set(ByVal Value As SqlInt32)
m_iMutierer = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,458 @@
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace DB
Public Class clsFunktionstelle
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iSequenz, m_iMutierer, m_iCID, m_iParentID, m_iFunktionstelleNr As SqlInt32
Private m_sFunktionsstelle, m_sFunktionsnummer, m_sBeschreibung, m_sBezeichnung As SqlString
#End Region
Public Sub New()
' // Nothing for now.
End Sub
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Funktionstelle_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iFunktionstelleNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFunktionstelleNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParentID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sFunktionsnummer", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFunktionsnummer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sFunktionsstelle", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFunktionsstelle))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSequenz", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSequenz))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iCID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCID))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Funktionstelle_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("clsFunktionstelle::Insert::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Funktionstelle_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iFunktionstelleNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFunktionstelleNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParentID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sFunktionsnummer", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFunktionsnummer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sFunktionsstelle", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFunktionsstelle))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSequenz", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSequenz))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iCID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCID))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Funktionstelle_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("clsFunktionstelle::Update::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function Delete() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Funktionstelle_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iFunktionstelleNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFunktionstelleNr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Funktionstelle_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("clsFunktionstelle::Delete::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Funktionstelle_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Funktionstelle")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iFunktionstelleNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iFunktionstelleNr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_Funktionstelle_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iFunktionstelleNr = New SqlInt32(CType(dtToReturn.Rows(0)("FunktionstelleNr"), Integer))
If dtToReturn.Rows(0)("ParentID") Is System.DBNull.Value Then
m_iParentID = SqlInt32.Null
Else
m_iParentID = New SqlInt32(CType(dtToReturn.Rows(0)("ParentID"), Integer))
End If
If dtToReturn.Rows(0)("Bezeichnung") Is System.DBNull.Value Then
m_sBezeichnung = SqlString.Null
Else
m_sBezeichnung = New SqlString(CType(dtToReturn.Rows(0)("Bezeichnung"), String))
End If
If dtToReturn.Rows(0)("Beschreibung") Is System.DBNull.Value Then
m_sBeschreibung = SqlString.Null
Else
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("Beschreibung"), String))
End If
If dtToReturn.Rows(0)("Funktionsnummer") Is System.DBNull.Value Then
m_sFunktionsnummer = SqlString.Null
Else
m_sFunktionsnummer = New SqlString(CType(dtToReturn.Rows(0)("Funktionsnummer"), String))
End If
If dtToReturn.Rows(0)("Funktionsstelle") Is System.DBNull.Value Then
m_sFunktionsstelle = SqlString.Null
Else
m_sFunktionsstelle = New SqlString(CType(dtToReturn.Rows(0)("Funktionsstelle"), String))
End If
If dtToReturn.Rows(0)("Sequenz") Is System.DBNull.Value Then
m_iSequenz = SqlInt32.Null
Else
m_iSequenz = New SqlInt32(CType(dtToReturn.Rows(0)("Sequenz"), 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)("CID") Is System.DBNull.Value Then
m_iCID = SqlInt32.Null
Else
m_iCID = New SqlInt32(CType(dtToReturn.Rows(0)("CID"), 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("clsFunktionstelle::SelectOne::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
Overrides Public Function SelectAll() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Funktionstelle_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Funktionstelle")
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_Funktionstelle_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("clsFunktionstelle::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 [iFunktionstelleNr]() As SqlInt32
Get
Return m_iFunktionstelleNr
End Get
Set(ByVal Value As SqlInt32)
Dim iFunktionstelleNrTmp As SqlInt32 = Value
If iFunktionstelleNrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iFunktionstelleNr", "iFunktionstelleNr can't be NULL")
End If
m_iFunktionstelleNr = Value
End Set
End Property
Public Property [iParentID]() As SqlInt32
Get
Return m_iParentID
End Get
Set(ByVal Value As SqlInt32)
m_iParentID = Value
End Set
End Property
Public Property [sBezeichnung]() As SqlString
Get
Return m_sBezeichnung
End Get
Set(ByVal Value As SqlString)
m_sBezeichnung = Value
End Set
End Property
Public Property [sBeschreibung]() As SqlString
Get
Return m_sBeschreibung
End Get
Set(ByVal Value As SqlString)
m_sBeschreibung = Value
End Set
End Property
Public Property [sFunktionsnummer]() As SqlString
Get
Return m_sFunktionsnummer
End Get
Set(ByVal Value As SqlString)
m_sFunktionsnummer = Value
End Set
End Property
Public Property [sFunktionsstelle]() As SqlString
Get
Return m_sFunktionsstelle
End Get
Set(ByVal Value As SqlString)
m_sFunktionsstelle = Value
End Set
End Property
Public Property [iSequenz]() As SqlInt32
Get
Return m_iSequenz
End Get
Set(ByVal Value As SqlInt32)
m_iSequenz = 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 [iCID]() As SqlInt32
Get
Return m_iCID
End Get
Set(ByVal Value As SqlInt32)
m_iCID = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,491 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'key_tabelle'
' // Generated by LLBLGen v1.21.2003.712 Final on: Dienstag, 1. Januar 2013, 19:36:38
' // 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 DB
''' <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>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>iKeynr</LI>
''' <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("@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, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@ikeynr", SqlDbType.Int, 4, ParameterDirection.Output, True, 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.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iKeynr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@ikeynr").Value, Integer))
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_key_tabelle_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsKey_tabelle::Insert::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
''' <summary>
''' Purpose: Update method. This method will Update one existing row in the database.
''' </summary>
''' <returns>True if succeeded, otherwise an Exception is thrown. </returns>
''' <remarks>
''' Properties needed for this method:
''' <UL>
''' <LI>iKeynr</LI>
''' <LI>sBeschreibung</LI>
''' <LI>iKey_wert</LI>
''' <LI>iMandantnr. May be SqlInt32.Null</LI>
''' <LI>bAktiv. May be SqlBoolean.Null</LI>
''' <LI>daErstellt_am. May be SqlDateTime.Null</LI>
''' <LI>daMutiert_am. May be SqlDateTime.Null</LI>
''' <LI>iMutierer. May be SqlInt32.Null</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_key_tabelle_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikeynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKeynr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ikey_wert", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKey_wert))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_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.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_key_tabelle_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsKey_tabelle::Delete::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
''' <summary>
''' Purpose: Select method. This method will Select one existing row from the database, based on the Primary Key.
''' </summary>
''' <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
''' <remarks>
''' Properties needed for this method:
''' <UL>
''' <LI>iKeynr</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
''' <LI>iKeynr</LI>
''' <LI>sBeschreibung</LI>
''' <LI>iKey_wert</LI>
''' <LI>iMandantnr</LI>
''' <LI>bAktiv</LI>
''' <LI>daErstellt_am</LI>
''' <LI>daMutiert_am</LI>
''' <LI>iMutierer</LI>
'''</UL>
''' Will fill all properties corresponding with a field in the table with the value of the row selected.
''' </remarks>
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_key_tabelle_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("key_tabelle")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@ikeynr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iKeynr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
sdaAdapter.Fill(dtToReturn)
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_key_tabelle_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iKeynr = New SqlInt32(CType(dtToReturn.Rows(0)("keynr"), Integer))
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("beschreibung"), String))
m_iKey_wert = New SqlInt32(CType(dtToReturn.Rows(0)("key_wert"), Integer))
If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then
m_iMandantnr = SqlInt32.Null
Else
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
End If
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
m_bAktiv = SqlBoolean.Null
Else
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
End If
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
m_daErstellt_am = SqlDateTime.Null
Else
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
End If
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
m_daMutiert_am = SqlDateTime.Null
Else
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
End If
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
m_iMutierer = SqlInt32.Null
Else
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
End If
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsKey_tabelle::SelectOne::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
''' <summary>
''' Purpose: SelectAll method. This method will Select all rows from the table.
''' </summary>
''' <returns>DataTable object if succeeded, otherwise an Exception is thrown. </returns>
''' <remarks>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
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 = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_key_tabelle_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsKey_tabelle::SelectAll::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
#Region " Class Property Declarations "
Public Property [iKeynr]() As SqlInt32
Get
Return m_iKeynr
End Get
Set(ByVal Value As SqlInt32)
Dim iKeynrTmp As SqlInt32 = Value
If iKeynrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iKeynr", "iKeynr can't be NULL")
End If
m_iKeynr = Value
End Set
End Property
Public Property [sBeschreibung]() As SqlString
Get
Return m_sBeschreibung
End Get
Set(ByVal Value As SqlString)
Dim sBeschreibungTmp As SqlString = Value
If sBeschreibungTmp.IsNull Then
Throw New ArgumentOutOfRangeException("sBeschreibung", "sBeschreibung can't be NULL")
End If
m_sBeschreibung = Value
End Set
End Property
Public Property [iKey_wert]() As SqlInt32
Get
Return m_iKey_wert
End Get
Set(ByVal Value As SqlInt32)
Dim iKey_wertTmp As SqlInt32 = Value
If iKey_wertTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iKey_wert", "iKey_wert can't be NULL")
End If
m_iKey_wert = Value
End Set
End Property
Public Property [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr = Value
End Set
End Property
Public Property [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
m_bAktiv = Value
End Set
End Property
Public Property [daErstellt_am]() As SqlDateTime
Get
Return m_daErstellt_am
End Get
Set(ByVal Value As SqlDateTime)
m_daErstellt_am = Value
End Set
End Property
Public Property [daMutiert_am]() As SqlDateTime
Get
Return m_daMutiert_am
End Get
Set(ByVal Value As SqlDateTime)
m_daMutiert_am = Value
End Set
End Property
Public Property [iMutierer]() As SqlInt32
Get
Return m_iMutierer
End Get
Set(ByVal Value As SqlInt32)
m_iMutierer = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,632 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'meldungstexte'
' // Generated by LLBLGen v1.21.2003.712 Final on: Dienstag, 1. Januar 2013, 19:36:38
' // 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 DB
''' <summary>
''' Purpose: Data Access class for the table 'meldungstexte'.
''' </summary>
Public Class clsMeldungstexte
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iMutierer, m_iMandantnr, m_iSprache, m_iMeldungstextnr As SqlInt32
Private m_sBeschreibung, m_sInhalt 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>iMeldungstextnr</LI>
''' <LI>iSprache</LI>
''' <LI>sInhalt. May be SqlString.Null</LI>
''' <LI>sBeschreibung. May be SqlString.Null</LI>
''' <LI>bAktiv</LI>
''' <LI>daErstellt_am. May be SqlDateTime.Null</LI>
''' <LI>daMutiert_am. May be SqlDateTime.Null</LI>
''' <LI>iMutierer. May be SqlInt32.Null</LI>
''' <LI>iMandantnr. May be SqlInt32.Null</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_meldungstexte_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imeldungstextnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMeldungstextnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sinhalt", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sInhalt))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_meldungstexte_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("clsMeldungstexte::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>iMeldungstextnr</LI>
''' <LI>iSprache</LI>
''' <LI>sInhalt. May be SqlString.Null</LI>
''' <LI>sBeschreibung. May be SqlString.Null</LI>
''' <LI>bAktiv</LI>
''' <LI>daErstellt_am. May be SqlDateTime.Null</LI>
''' <LI>daMutiert_am. May be SqlDateTime.Null</LI>
''' <LI>iMutierer. May be SqlInt32.Null</LI>
''' <LI>iMandantnr. May be SqlInt32.Null</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_meldungstexte_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imeldungstextnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMeldungstextnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sinhalt", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sInhalt))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_meldungstexte_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("clsMeldungstexte::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>iMeldungstextnr</LI>
''' <LI>iSprache</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_meldungstexte_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imeldungstextnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMeldungstextnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_meldungstexte_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("clsMeldungstexte::Delete::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 using PK field 'meldungstextnr'. This method will
''' delete one or more rows from the database, based on the Primary Key field 'meldungstextnr'.
''' </summary>
''' <returns>True if succeeded, otherwise an Exception is thrown. </returns>
''' <remarks>
''' Properties needed for this method:
''' <UL>
''' <LI>iMeldungstextnr</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
''' </UL>
''' </remarks>
Public Function DeleteAllWmeldungstextnrLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_meldungstexte_DeleteAllWmeldungstextnrLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@imeldungstextnr", SqlDbType.Int, 4, ParameterDirection.Input, false, 10, 0, "", DataRowVersion.Proposed, m_iMeldungstextnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iMeldungstextnr = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@imeldungstextnr").Value, Integer))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_meldungstexte_DeleteAllWmeldungstextnrLogic' 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("clsMeldungstexte::DeleteAllWmeldungstextnrLogic::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 using PK field 'sprache'. This method will
''' delete one or more rows from the database, based on the Primary Key field 'sprache'.
''' </summary>
''' <returns>True if succeeded, otherwise an Exception is thrown. </returns>
''' <remarks>
''' Properties needed for this method:
''' <UL>
''' <LI>iSprache</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
''' </UL>
''' </remarks>
Public Function DeleteAllWspracheLogic() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_meldungstexte_DeleteAllWspracheLogic]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, false, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iSprache = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@isprache").Value, Integer))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_meldungstexte_DeleteAllWspracheLogic' 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("clsMeldungstexte::DeleteAllWspracheLogic::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>iMeldungstextnr</LI>
''' <LI>iSprache</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
''' <LI>iMeldungstextnr</LI>
''' <LI>iSprache</LI>
''' <LI>sInhalt</LI>
''' <LI>sBeschreibung</LI>
''' <LI>bAktiv</LI>
''' <LI>daErstellt_am</LI>
''' <LI>daMutiert_am</LI>
''' <LI>iMutierer</LI>
''' <LI>iMandantnr</LI>
'''</UL>
''' Will fill all properties corresponding with a field in the table with the value of the row selected.
''' </remarks>
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_meldungstexte_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("meldungstexte")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@imeldungstextnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMeldungstextnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_meldungstexte_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iMeldungstextnr = New SqlInt32(CType(dtToReturn.Rows(0)("meldungstextnr"), Integer))
m_iSprache = New SqlInt32(CType(dtToReturn.Rows(0)("sprache"), Integer))
If dtToReturn.Rows(0)("inhalt") Is System.DBNull.Value Then
m_sInhalt = SqlString.Null
Else
m_sInhalt = New SqlString(CType(dtToReturn.Rows(0)("inhalt"), String))
End If
If dtToReturn.Rows(0)("Beschreibung") Is System.DBNull.Value Then
m_sBeschreibung = SqlString.Null
Else
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("Beschreibung"), String))
End If
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
m_daErstellt_am = SqlDateTime.Null
Else
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
End If
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
m_daMutiert_am = SqlDateTime.Null
Else
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
End If
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
m_iMutierer = SqlInt32.Null
Else
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
End If
If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then
m_iMandantnr = SqlInt32.Null
Else
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
End If
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsMeldungstexte::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_meldungstexte_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("meldungstexte")
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_meldungstexte_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("clsMeldungstexte::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 [iMeldungstextnr]() As SqlInt32
Get
Return m_iMeldungstextnr
End Get
Set(ByVal Value As SqlInt32)
Dim iMeldungstextnrTmp As SqlInt32 = Value
If iMeldungstextnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iMeldungstextnr", "iMeldungstextnr can't be NULL")
End If
m_iMeldungstextnr = Value
End Set
End Property
Public Property [iSprache]() As SqlInt32
Get
Return m_iSprache
End Get
Set(ByVal Value As SqlInt32)
Dim iSpracheTmp As SqlInt32 = Value
If iSpracheTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iSprache", "iSprache can't be NULL")
End If
m_iSprache = Value
End Set
End Property
Public Property [sInhalt]() As SqlString
Get
Return m_sInhalt
End Get
Set(ByVal Value As SqlString)
m_sInhalt = Value
End Set
End Property
Public Property [sBeschreibung]() As SqlString
Get
Return m_sBeschreibung
End Get
Set(ByVal Value As SqlString)
m_sBeschreibung = Value
End Set
End Property
Public Property [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
Dim bAktivTmp As SqlBoolean = Value
If bAktivTmp.IsNull Then
Throw New ArgumentOutOfRangeException("bAktiv", "bAktiv can't be NULL")
End If
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 [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,530 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'mitarbeiter'
' // Generated by LLBLGen v1.21.2003.712 Final on: Dienstag, 1. Januar 2013, 19:36:38
' // 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 DB
''' <summary>
''' Purpose: Data Access class for the table 'mitarbeiter'.
''' </summary>
Public Class clsMitarbeiter
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMandantnr, m_iMutierer, m_iMitarbeiternr As SqlInt32
Private m_sEmail, m_sVorname, m_sTgnummer, m_sName 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>sTgnummer. May be SqlString.Null</LI>
''' <LI>sEmail. May be SqlString.Null</LI>
''' <LI>iMandantnr. May be SqlInt32.Null</LI>
''' <LI>bAktiv. May be SqlBoolean.Null</LI>
''' <LI>daErstellt_am. May be SqlDateTime.Null</LI>
''' <LI>daMutiert_am. May be SqlDateTime.Null</LI>
''' <LI>iMutierer. May be SqlInt32.Null</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_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("@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("@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, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_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>sTgnummer. May be SqlString.Null</LI>
''' <LI>sEmail. May be SqlString.Null</LI>
''' <LI>iMandantnr. May be SqlInt32.Null</LI>
''' <LI>bAktiv. May be SqlBoolean.Null</LI>
''' <LI>daErstellt_am. May be SqlDateTime.Null</LI>
''' <LI>daMutiert_am. May be SqlDateTime.Null</LI>
''' <LI>iMutierer. May be SqlInt32.Null</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_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("@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("@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, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_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.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_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>sTgnummer</LI>
''' <LI>sEmail</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_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 = 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_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)("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)("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("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 = 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_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 [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 [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

View File

@@ -0,0 +1,489 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'mitarbeiter_funktionsgruppe'
' // Generated by LLBLGen v1.21.2003.712 Final on: Dienstag, 1. Januar 2013, 19:36:38
' // 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 DB
''' <summary>
''' Purpose: Data Access class for the table 'mitarbeiter_funktionsgruppe'.
''' </summary>
Public Class clsMitarbeiter_funktionsgruppe
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iMutierer, m_iMandantnr, m_iMitarbeiternr, m_iFunktionsgruppenr, m_iMitarbeiter_funktionsgruppenr 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>iMitarbeiter_funktionsgruppenr</LI>
''' <LI>iMitarbeiternr. May be SqlInt32.Null</LI>
''' <LI>iFunktionsgruppenr. May be SqlInt32.Null</LI>
''' <LI>bAktiv. May be SqlBoolean.Null</LI>
''' <LI>iMandantnr. May be SqlInt32.Null</LI>
''' <LI>daErstellt_am. May be SqlDateTime.Null</LI>
''' <LI>daMutiert_am. May be SqlDateTime.Null</LI>
''' <LI>iMutierer. May be SqlInt32.Null</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_mitarbeiter_funktionsgruppe_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiter_funktionsgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiter_funktionsgruppenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionsgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgruppenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_mitarbeiter_funktionsgruppe_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_funktionsgruppe::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>iMitarbeiter_funktionsgruppenr</LI>
''' <LI>iMitarbeiternr. May be SqlInt32.Null</LI>
''' <LI>iFunktionsgruppenr. May be SqlInt32.Null</LI>
''' <LI>bAktiv. May be SqlBoolean.Null</LI>
''' <LI>iMandantnr. May be SqlInt32.Null</LI>
''' <LI>daErstellt_am. May be SqlDateTime.Null</LI>
''' <LI>daMutiert_am. May be SqlDateTime.Null</LI>
''' <LI>iMutierer. May be SqlInt32.Null</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_mitarbeiter_funktionsgruppe_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiter_funktionsgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiter_funktionsgruppenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiternr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiternr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifunktionsgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFunktionsgruppenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@daerstellt_am", SqlDbType.DateTime, 8, ParameterDirection.Input, True, 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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_mitarbeiter_funktionsgruppe_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_funktionsgruppe::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>iMitarbeiter_funktionsgruppenr</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_funktionsgruppe_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@imitarbeiter_funktionsgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiter_funktionsgruppenr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_mitarbeiter_funktionsgruppe_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_funktionsgruppe::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>iMitarbeiter_funktionsgruppenr</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
''' <LI>iMitarbeiter_funktionsgruppenr</LI>
''' <LI>iMitarbeiternr</LI>
''' <LI>iFunktionsgruppenr</LI>
''' <LI>bAktiv</LI>
''' <LI>iMandantnr</LI>
''' <LI>daErstellt_am</LI>
''' <LI>daMutiert_am</LI>
''' <LI>iMutierer</LI>
'''</UL>
''' Will fill all properties corresponding with a field in the table with the value of the row selected.
''' </remarks>
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_mitarbeiter_funktionsgruppe_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("mitarbeiter_funktionsgruppe")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@imitarbeiter_funktionsgruppenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMitarbeiter_funktionsgruppenr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_mitarbeiter_funktionsgruppe_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iMitarbeiter_funktionsgruppenr = New SqlInt32(CType(dtToReturn.Rows(0)("mitarbeiter_funktionsgruppenr"), Integer))
If dtToReturn.Rows(0)("mitarbeiternr") Is System.DBNull.Value Then
m_iMitarbeiternr = SqlInt32.Null
Else
m_iMitarbeiternr = New SqlInt32(CType(dtToReturn.Rows(0)("mitarbeiternr"), Integer))
End If
If dtToReturn.Rows(0)("funktionsgruppenr") Is System.DBNull.Value Then
m_iFunktionsgruppenr = SqlInt32.Null
Else
m_iFunktionsgruppenr = New SqlInt32(CType(dtToReturn.Rows(0)("funktionsgruppenr"), Integer))
End If
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
m_bAktiv = SqlBoolean.Null
Else
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
End If
If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then
m_iMandantnr = SqlInt32.Null
Else
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
End If
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
m_daErstellt_am = SqlDateTime.Null
Else
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
End If
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
m_daMutiert_am = SqlDateTime.Null
Else
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
End If
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
m_iMutierer = SqlInt32.Null
Else
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
End If
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsMitarbeiter_funktionsgruppe::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_funktionsgruppe_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("mitarbeiter_funktionsgruppe")
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_mitarbeiter_funktionsgruppe_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_funktionsgruppe::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 [iMitarbeiter_funktionsgruppenr]() As SqlInt32
Get
Return m_iMitarbeiter_funktionsgruppenr
End Get
Set(ByVal Value As SqlInt32)
Dim iMitarbeiter_funktionsgruppenrTmp As SqlInt32 = Value
If iMitarbeiter_funktionsgruppenrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iMitarbeiter_funktionsgruppenr", "iMitarbeiter_funktionsgruppenr can't be NULL")
End If
m_iMitarbeiter_funktionsgruppenr = Value
End Set
End Property
Public Property [iMitarbeiternr]() As SqlInt32
Get
Return m_iMitarbeiternr
End Get
Set(ByVal Value As SqlInt32)
m_iMitarbeiternr = Value
End Set
End Property
Public Property [iFunktionsgruppenr]() As SqlInt32
Get
Return m_iFunktionsgruppenr
End Get
Set(ByVal Value As SqlInt32)
m_iFunktionsgruppenr = Value
End Set
End Property
Public Property [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
m_bAktiv = Value
End Set
End Property
Public Property [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr = Value
End Set
End Property
Public Property [daErstellt_am]() As SqlDateTime
Get
Return m_daErstellt_am
End Get
Set(ByVal Value As SqlDateTime)
m_daErstellt_am = Value
End Set
End Property
Public Property [daMutiert_am]() As SqlDateTime
Get
Return m_daMutiert_am
End Get
Set(ByVal Value As SqlDateTime)
m_daMutiert_am = Value
End Set
End Property
Public Property [iMutierer]() As SqlInt32
Get
Return m_iMutierer
End Get
Set(ByVal Value As SqlInt32)
m_iMutierer = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,490 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'Objekt'
' // Generated by LLBLGen v1.21.2003.712 Final on: Sonntag, 10. Februar 2013, 19:52:14
' // 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 DB
''' <summary>
''' Purpose: Data Access class for the table 'Objekt'.
''' </summary>
Public Class clsObjekt
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iMutierer, m_iObjektnr As SqlInt32
Private m_sDBOBject, m_sBezeichnung, m_sBeschreibung As SqlString
#End Region
''' <summary>
''' Purpose: Class constructor.
''' </summary>
Public Sub New()
' // Nothing for now.
End Sub
''' <summary>
''' Purpose: Insert method. This method will insert one new row into the database.
''' </summary>
''' <returns>True if succeeded, otherwise an Exception is thrown. </returns>
''' <remarks>
''' Properties needed for this method:
''' <UL>
''' <LI>iObjektnr</LI>
''' <LI>sBezeichnung. May be SqlString.Null</LI>
''' <LI>sBeschreibung. 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>
''' <LI>sDBOBject. 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_Objekt_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iObjektnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iObjektnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@sDBOBject", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDBOBject))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Objekt_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("clsObjekt::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>iObjektnr</LI>
''' <LI>sBezeichnung. May be SqlString.Null</LI>
''' <LI>sBeschreibung. 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>
''' <LI>sDBOBject. 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_Objekt_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iObjektnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iObjektnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@sDBOBject", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDBOBject))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Objekt_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("clsObjekt::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>iObjektnr</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_Objekt_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iObjektnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iObjektnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Objekt_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("clsObjekt::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>iObjektnr</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
''' <LI>iObjektnr</LI>
''' <LI>sBezeichnung</LI>
''' <LI>sBeschreibung</LI>
''' <LI>bAktiv</LI>
''' <LI>daErstellt_am</LI>
''' <LI>daMutiert_am</LI>
''' <LI>iMutierer</LI>
''' <LI>sDBOBject</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_Objekt_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Objekt")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iObjektnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iObjektnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_Objekt_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iObjektnr = New SqlInt32(CType(dtToReturn.Rows(0)("Objektnr"), Integer))
If dtToReturn.Rows(0)("Bezeichnung") Is System.DBNull.Value Then
m_sBezeichnung = SqlString.Null
Else
m_sBezeichnung = New SqlString(CType(dtToReturn.Rows(0)("Bezeichnung"), String))
End If
If dtToReturn.Rows(0)("Beschreibung") Is System.DBNull.Value Then
m_sBeschreibung = SqlString.Null
Else
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("Beschreibung"), String))
End If
If dtToReturn.Rows(0)("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)("DBOBject") Is System.DBNull.Value Then
m_sDBOBject = SqlString.Null
Else
m_sDBOBject = New SqlString(CType(dtToReturn.Rows(0)("DBOBject"), 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("clsObjekt::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_Objekt_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Objekt")
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_Objekt_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("clsObjekt::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 [iObjektnr]() As SqlInt32
Get
Return m_iObjektnr
End Get
Set(ByVal Value As SqlInt32)
Dim iObjektnrTmp As SqlInt32 = Value
If iObjektnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iObjektnr", "iObjektnr can't be NULL")
End If
m_iObjektnr = Value
End Set
End Property
Public Property [sBezeichnung]() As SqlString
Get
Return m_sBezeichnung
End Get
Set(ByVal Value As SqlString)
m_sBezeichnung = Value
End Set
End Property
Public Property [sBeschreibung]() As SqlString
Get
Return m_sBeschreibung
End Get
Set(ByVal Value As SqlString)
m_sBeschreibung = Value
End Set
End Property
Public Property [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 [sDBOBject]() As SqlString
Get
Return m_sDBOBject
End Get
Set(ByVal Value As SqlString)
m_sDBOBject = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,530 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'ObjektBeziehung'
' // Generated by LLBLGen v1.21.2003.712 Final on: Mittwoch, 6. Februar 2013, 12:26:16
' // Because the Base Class already implements IDispose, this class doesn't.
' ///////////////////////////////////////////////////////////////////////////
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace DB
''' <summary>
''' Purpose: Data Access class for the table 'ObjektBeziehung'.
''' </summary>
Public Class clsObjektBeziehung
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iMutierer, m_iObjekt_BeziehungNr, m_iObjekt1, m_iObjekt2 As SqlInt32
Private m_sKeyField2, m_sKeyField1, m_sObjektname 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>iObjekt_BeziehungNr</LI>
''' <LI>iObjekt1. May be SqlInt32.Null</LI>
''' <LI>iObjekt2. 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>sObjektname. May be SqlString.Null</LI>
''' <LI>sKeyField1. May be SqlString.Null</LI>
''' <LI>sKeyField2. 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_ObjektBeziehung_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iObjekt_BeziehungNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iObjekt_BeziehungNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iObjekt1", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iObjekt1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iObjekt2", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iObjekt2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@sObjektname", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sObjektname))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sKeyField1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sKeyField1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sKeyField2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sKeyField2))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_ObjektBeziehung_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("clsObjektBeziehung::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>iObjekt_BeziehungNr</LI>
''' <LI>iObjekt1. May be SqlInt32.Null</LI>
''' <LI>iObjekt2. 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>sObjektname. May be SqlString.Null</LI>
''' <LI>sKeyField1. May be SqlString.Null</LI>
''' <LI>sKeyField2. 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_ObjektBeziehung_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iObjekt_BeziehungNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iObjekt_BeziehungNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iObjekt1", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iObjekt1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iObjekt2", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iObjekt2))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@sObjektname", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sObjektname))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sKeyField1", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sKeyField1))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sKeyField2", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sKeyField2))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_ObjektBeziehung_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("clsObjektBeziehung::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>iObjekt_BeziehungNr</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_ObjektBeziehung_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iObjekt_BeziehungNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iObjekt_BeziehungNr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_ObjektBeziehung_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("clsObjektBeziehung::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>iObjekt_BeziehungNr</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
''' <LI>iObjekt_BeziehungNr</LI>
''' <LI>iObjekt1</LI>
''' <LI>iObjekt2</LI>
''' <LI>bAktiv</LI>
''' <LI>daErstellt_am</LI>
''' <LI>daMutiert_am</LI>
''' <LI>iMutierer</LI>
''' <LI>sObjektname</LI>
''' <LI>sKeyField1</LI>
''' <LI>sKeyField2</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_ObjektBeziehung_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("ObjektBeziehung")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iObjekt_BeziehungNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iObjekt_BeziehungNr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_ObjektBeziehung_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iObjekt_BeziehungNr = New SqlInt32(CType(dtToReturn.Rows(0)("Objekt_BeziehungNr"), Integer))
If dtToReturn.Rows(0)("Objekt1") Is System.DBNull.Value Then
m_iObjekt1 = SqlInt32.Null
Else
m_iObjekt1 = New SqlInt32(CType(dtToReturn.Rows(0)("Objekt1"), Integer))
End If
If dtToReturn.Rows(0)("Objekt2") Is System.DBNull.Value Then
m_iObjekt2 = SqlInt32.Null
Else
m_iObjekt2 = New SqlInt32(CType(dtToReturn.Rows(0)("Objekt2"), 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)("Objektname") Is System.DBNull.Value Then
m_sObjektname = SqlString.Null
Else
m_sObjektname = New SqlString(CType(dtToReturn.Rows(0)("Objektname"), String))
End If
If dtToReturn.Rows(0)("KeyField1") Is System.DBNull.Value Then
m_sKeyField1 = SqlString.Null
Else
m_sKeyField1 = New SqlString(CType(dtToReturn.Rows(0)("KeyField1"), String))
End If
If dtToReturn.Rows(0)("KeyField2") Is System.DBNull.Value Then
m_sKeyField2 = SqlString.Null
Else
m_sKeyField2 = New SqlString(CType(dtToReturn.Rows(0)("KeyField2"), 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("clsObjektBeziehung::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_ObjektBeziehung_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("ObjektBeziehung")
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_ObjektBeziehung_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("clsObjektBeziehung::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 [iObjekt_BeziehungNr]() As SqlInt32
Get
Return m_iObjekt_BeziehungNr
End Get
Set(ByVal Value As SqlInt32)
Dim iObjekt_BeziehungNrTmp As SqlInt32 = Value
If iObjekt_BeziehungNrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iObjekt_BeziehungNr", "iObjekt_BeziehungNr can't be NULL")
End If
m_iObjekt_BeziehungNr = Value
End Set
End Property
Public Property [iObjekt1]() As SqlInt32
Get
Return m_iObjekt1
End Get
Set(ByVal Value As SqlInt32)
m_iObjekt1 = Value
End Set
End Property
Public Property [iObjekt2]() As SqlInt32
Get
Return m_iObjekt2
End Get
Set(ByVal Value As SqlInt32)
m_iObjekt2 = 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 [sObjektname]() As SqlString
Get
Return m_sObjektname
End Get
Set(ByVal Value As SqlString)
m_sObjektname = Value
End Set
End Property
Public Property [sKeyField1]() As SqlString
Get
Return m_sKeyField1
End Get
Set(ByVal Value As SqlString)
m_sKeyField1 = Value
End Set
End Property
Public Property [sKeyField2]() As SqlString
Get
Return m_sKeyField2
End Get
Set(ByVal Value As SqlString)
m_sKeyField2 = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,441 @@
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace DB
Public Class clsPersonal
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iMutierer, m_iSequenz, m_iParentID, m_iPersonalnr As SqlInt32
Private m_sName, m_sTGNummer, m_sBeschreibung, m_sBezeichnung As SqlString
#End Region
Public Sub New()
' // Nothing for now.
End Sub
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Personal_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iPersonalnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPersonalnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParentID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sTGNummer", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTGNummer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sName", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sName))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSequenz", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSequenz))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Personal_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("clsPersonal::Insert::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Personal_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iPersonalnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPersonalnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParentID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sTGNummer", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTGNummer))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sName", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sName))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSequenz", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSequenz))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Personal_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("clsPersonal::Update::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function Delete() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Personal_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iPersonalnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPersonalnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Personal_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("clsPersonal::Delete::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Personal_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Personal")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iPersonalnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPersonalnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_Personal_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iPersonalnr = New SqlInt32(CType(dtToReturn.Rows(0)("Personalnr"), Integer))
If dtToReturn.Rows(0)("ParentID") Is System.DBNull.Value Then
m_iParentID = SqlInt32.Null
Else
m_iParentID = New SqlInt32(CType(dtToReturn.Rows(0)("ParentID"), Integer))
End If
If dtToReturn.Rows(0)("Bezeichnung") Is System.DBNull.Value Then
m_sBezeichnung = SqlString.Null
Else
m_sBezeichnung = New SqlString(CType(dtToReturn.Rows(0)("Bezeichnung"), String))
End If
If dtToReturn.Rows(0)("Beschreibung") Is System.DBNull.Value Then
m_sBeschreibung = SqlString.Null
Else
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("Beschreibung"), String))
End If
If dtToReturn.Rows(0)("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)("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)("Sequenz") Is System.DBNull.Value Then
m_iSequenz = SqlInt32.Null
Else
m_iSequenz = New SqlInt32(CType(dtToReturn.Rows(0)("Sequenz"), 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("clsPersonal::SelectOne::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
Overrides Public Function SelectAll() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Personal_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Personal")
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_Personal_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("clsPersonal::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 [iPersonalnr]() As SqlInt32
Get
Return m_iPersonalnr
End Get
Set(ByVal Value As SqlInt32)
Dim iPersonalnrTmp As SqlInt32 = Value
If iPersonalnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iPersonalnr", "iPersonalnr can't be NULL")
End If
m_iPersonalnr = Value
End Set
End Property
Public Property [iParentID]() As SqlInt32
Get
Return m_iParentID
End Get
Set(ByVal Value As SqlInt32)
m_iParentID = Value
End Set
End Property
Public Property [sBezeichnung]() As SqlString
Get
Return m_sBezeichnung
End Get
Set(ByVal Value As SqlString)
m_sBezeichnung = Value
End Set
End Property
Public Property [sBeschreibung]() As SqlString
Get
Return m_sBeschreibung
End Get
Set(ByVal Value As SqlString)
m_sBeschreibung = Value
End Set
End Property
Public Property [sTGNummer]() As SqlString
Get
Return m_sTGNummer
End Get
Set(ByVal Value As SqlString)
m_sTGNummer = 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 [iSequenz]() As SqlInt32
Get
Return m_iSequenz
End Get
Set(ByVal Value As SqlInt32)
m_iSequenz = 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

View File

@@ -0,0 +1,424 @@
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace DB
Public Class clsPlattform
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iCID, m_iMutierer, m_iPlattformNr, m_iParentID, m_iSequenz As SqlInt32
Private m_sBezeichnung, m_sBeschreibung As SqlString
#End Region
Public Sub New()
' // Nothing for now.
End Sub
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Plattform_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iPlattformNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPlattformNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParentID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSequenz", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSequenz))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iCID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCID))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Plattform_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("clsPlattform::Insert::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Plattform_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iPlattformNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPlattformNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParentID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSequenz", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSequenz))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iCID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCID))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Plattform_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("clsPlattform::Update::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function Delete() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Plattform_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iPlattformNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPlattformNr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Plattform_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("clsPlattform::Delete::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Plattform_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Plattform")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iPlattformNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iPlattformNr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_Plattform_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iPlattformNr = New SqlInt32(CType(dtToReturn.Rows(0)("PlattformNr"), Integer))
If dtToReturn.Rows(0)("ParentID") Is System.DBNull.Value Then
m_iParentID = SqlInt32.Null
Else
m_iParentID = New SqlInt32(CType(dtToReturn.Rows(0)("ParentID"), Integer))
End If
If dtToReturn.Rows(0)("Bezeichnung") Is System.DBNull.Value Then
m_sBezeichnung = SqlString.Null
Else
m_sBezeichnung = New SqlString(CType(dtToReturn.Rows(0)("Bezeichnung"), String))
End If
If dtToReturn.Rows(0)("Beschreibung") Is System.DBNull.Value Then
m_sBeschreibung = SqlString.Null
Else
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("Beschreibung"), String))
End If
If dtToReturn.Rows(0)("Sequenz") Is System.DBNull.Value Then
m_iSequenz = SqlInt32.Null
Else
m_iSequenz = New SqlInt32(CType(dtToReturn.Rows(0)("Sequenz"), 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)("CID") Is System.DBNull.Value Then
m_iCID = SqlInt32.Null
Else
m_iCID = New SqlInt32(CType(dtToReturn.Rows(0)("CID"), 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("clsPlattform::SelectOne::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
Overrides Public Function SelectAll() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Plattform_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Plattform")
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_Plattform_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("clsPlattform::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 [iPlattformNr]() As SqlInt32
Get
Return m_iPlattformNr
End Get
Set(ByVal Value As SqlInt32)
Dim iPlattformNrTmp As SqlInt32 = Value
If iPlattformNrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iPlattformNr", "iPlattformNr can't be NULL")
End If
m_iPlattformNr = Value
End Set
End Property
Public Property [iParentID]() As SqlInt32
Get
Return m_iParentID
End Get
Set(ByVal Value As SqlInt32)
m_iParentID = Value
End Set
End Property
Public Property [sBezeichnung]() As SqlString
Get
Return m_sBezeichnung
End Get
Set(ByVal Value As SqlString)
m_sBezeichnung = Value
End Set
End Property
Public Property [sBeschreibung]() As SqlString
Get
Return m_sBeschreibung
End Get
Set(ByVal Value As SqlString)
m_sBeschreibung = Value
End Set
End Property
Public Property [iSequenz]() As SqlInt32
Get
Return m_iSequenz
End Get
Set(ByVal Value As SqlInt32)
m_iSequenz = 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 [iCID]() As SqlInt32
Get
Return m_iCID
End Get
Set(ByVal Value As SqlInt32)
m_iCID = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,510 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'rolle'
' // Generated by LLBLGen v1.21.2003.712 Final on: Dienstag, 1. Januar 2013, 19:36:38
' // 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 DB
''' <summary>
''' Purpose: Data Access class for the table 'rolle'.
''' </summary>
Public Class clsRolle
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bSysadminrolle, m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iRollenr, m_iMandantnr As SqlInt32
Private m_sBeschreibung, m_sBezeichnung As SqlString
#End Region
''' <summary>
''' Purpose: Class constructor.
''' </summary>
Public Sub New()
' // Nothing for now.
End Sub
''' <summary>
''' Purpose: Insert method. This method will insert one new row into the database.
''' </summary>
''' <returns>True if succeeded, otherwise an Exception is thrown. </returns>
''' <remarks>
''' Properties needed for this method:
''' <UL>
''' <LI>iRollenr</LI>
''' <LI>sBezeichnung. May be SqlString.Null</LI>
''' <LI>sBeschreibung. May be SqlString.Null</LI>
''' <LI>bSysadminrolle. May be SqlBoolean.Null</LI>
''' <LI>iMandantnr. May be SqlInt32.Null</LI>
''' <LI>bAktiv. May be SqlBoolean.Null</LI>
''' <LI>daErstellt_am. May be SqlDateTime.Null</LI>
''' <LI>daMutiert_am. May be SqlDateTime.Null</LI>
''' <LI>iMutierer. May be SqlInt32.Null</LI>
''' </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_rolle_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bsysadminrolle", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bSysadminrolle))
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, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_rolle_Insert' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsRolle::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>iRollenr</LI>
''' <LI>sBezeichnung. May be SqlString.Null</LI>
''' <LI>sBeschreibung. May be SqlString.Null</LI>
''' <LI>bSysadminrolle. May be SqlBoolean.Null</LI>
''' <LI>iMandantnr. May be SqlInt32.Null</LI>
''' <LI>bAktiv. May be SqlBoolean.Null</LI>
''' <LI>daErstellt_am. May be SqlDateTime.Null</LI>
''' <LI>daMutiert_am. May be SqlDateTime.Null</LI>
''' <LI>iMutierer. May be SqlInt32.Null</LI>
''' </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_rolle_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bsysadminrolle", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bSysadminrolle))
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, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_rolle_Update' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsRolle::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>iRollenr</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_rolle_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_rolle_Delete' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return True
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsRolle::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>iRollenr</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
''' <LI>iRollenr</LI>
''' <LI>sBezeichnung</LI>
''' <LI>sBeschreibung</LI>
''' <LI>bSysadminrolle</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_rolle_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("rolle")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_rolle_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iRollenr = New SqlInt32(CType(dtToReturn.Rows(0)("rollenr"), Integer))
If dtToReturn.Rows(0)("bezeichnung") Is System.DBNull.Value Then
m_sBezeichnung = SqlString.Null
Else
m_sBezeichnung = New SqlString(CType(dtToReturn.Rows(0)("bezeichnung"), String))
End If
If dtToReturn.Rows(0)("beschreibung") Is System.DBNull.Value Then
m_sBeschreibung = SqlString.Null
Else
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("beschreibung"), String))
End If
If dtToReturn.Rows(0)("sysadminrolle") Is System.DBNull.Value Then
m_bSysadminrolle = SqlBoolean.Null
Else
m_bSysadminrolle = New SqlBoolean(CType(dtToReturn.Rows(0)("sysadminrolle"), Boolean))
End If
If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then
m_iMandantnr = SqlInt32.Null
Else
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
End If
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
m_bAktiv = SqlBoolean.Null
Else
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
End If
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
m_daErstellt_am = SqlDateTime.Null
Else
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
End If
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
m_daMutiert_am = SqlDateTime.Null
Else
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
End If
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
m_iMutierer = SqlInt32.Null
Else
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
End If
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsRolle::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_rolle_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("rolle")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
sdaAdapter.Fill(dtToReturn)
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_rolle_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsRolle::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 [iRollenr]() As SqlInt32
Get
Return m_iRollenr
End Get
Set(ByVal Value As SqlInt32)
Dim iRollenrTmp As SqlInt32 = Value
If iRollenrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iRollenr", "iRollenr can't be NULL")
End If
m_iRollenr = Value
End Set
End Property
Public Property [sBezeichnung]() As SqlString
Get
Return m_sBezeichnung
End Get
Set(ByVal Value As SqlString)
m_sBezeichnung = Value
End Set
End Property
Public Property [sBeschreibung]() As SqlString
Get
Return m_sBeschreibung
End Get
Set(ByVal Value As SqlString)
m_sBeschreibung = Value
End Set
End Property
Public Property [bSysadminrolle]() As SqlBoolean
Get
Return m_bSysadminrolle
End Get
Set(ByVal Value As SqlBoolean)
m_bSysadminrolle = 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

View File

@@ -0,0 +1,529 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'Rolle_SecurityObject'
' // Generated by LLBLGen v1.21.2003.712 Final on: Dienstag, 1. Januar 2013, 19:36:38
' // 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 DB
''' <summary>
''' Purpose: Data Access class for the table 'Rolle_SecurityObject'.
''' </summary>
Public Class clsRolle_SecurityObject
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bReadonly, m_bAktiv, m_bInvisible As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iMandantnr, m_iRollenr, m_iSecurityobjectnr, m_iRolle_securityobjectnr 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>iRolle_securityobjectnr</LI>
''' <LI>iRollenr. May be SqlInt32.Null</LI>
''' <LI>iSecurityobjectnr. May be SqlInt32.Null</LI>
''' <LI>bReadonly. May be SqlBoolean.Null</LI>
''' <LI>bInvisible. May be SqlBoolean.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>iMandantnr. May be SqlInt32.Null</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Rolle_SecurityObject_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irolle_securityobjectnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolle_securityobjectnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isecurityobjectnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSecurityobjectnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@breadonly", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bReadonly))
scmCmdToExecute.Parameters.Add(New SqlParameter("@binvisible", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bInvisible))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Rolle_SecurityObject_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("clsRolle_SecurityObject::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>iRolle_securityobjectnr</LI>
''' <LI>iRollenr. May be SqlInt32.Null</LI>
''' <LI>iSecurityobjectnr. May be SqlInt32.Null</LI>
''' <LI>bReadonly. May be SqlBoolean.Null</LI>
''' <LI>bInvisible. May be SqlBoolean.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>iMandantnr. May be SqlInt32.Null</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Rolle_SecurityObject_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irolle_securityobjectnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolle_securityobjectnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isecurityobjectnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSecurityobjectnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@breadonly", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bReadonly))
scmCmdToExecute.Parameters.Add(New SqlParameter("@binvisible", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bInvisible))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Rolle_SecurityObject_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("clsRolle_SecurityObject::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>iRolle_securityobjectnr</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_Rolle_SecurityObject_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irolle_securityobjectnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolle_securityobjectnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Rolle_SecurityObject_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("clsRolle_SecurityObject::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>iRolle_securityobjectnr</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
''' <LI>iRolle_securityobjectnr</LI>
''' <LI>iRollenr</LI>
''' <LI>iSecurityobjectnr</LI>
''' <LI>bReadonly</LI>
''' <LI>bInvisible</LI>
''' <LI>bAktiv</LI>
''' <LI>daErstellt_am</LI>
''' <LI>daMutiert_am</LI>
''' <LI>iMutierer</LI>
''' <LI>iMandantnr</LI>
'''</UL>
''' Will fill all properties corresponding with a field in the table with the value of the row selected.
''' </remarks>
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Rolle_SecurityObject_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Rolle_SecurityObject")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@irolle_securityobjectnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolle_securityobjectnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_Rolle_SecurityObject_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iRolle_securityobjectnr = New SqlInt32(CType(dtToReturn.Rows(0)("rolle_securityobjectnr"), Integer))
If dtToReturn.Rows(0)("rollenr") Is System.DBNull.Value Then
m_iRollenr = SqlInt32.Null
Else
m_iRollenr = New SqlInt32(CType(dtToReturn.Rows(0)("rollenr"), Integer))
End If
If dtToReturn.Rows(0)("securityobjectnr") Is System.DBNull.Value Then
m_iSecurityobjectnr = SqlInt32.Null
Else
m_iSecurityobjectnr = New SqlInt32(CType(dtToReturn.Rows(0)("securityobjectnr"), Integer))
End If
If dtToReturn.Rows(0)("readonly") Is System.DBNull.Value Then
m_bReadonly = SqlBoolean.Null
Else
m_bReadonly = New SqlBoolean(CType(dtToReturn.Rows(0)("readonly"), Boolean))
End If
If dtToReturn.Rows(0)("invisible") Is System.DBNull.Value Then
m_bInvisible = SqlBoolean.Null
Else
m_bInvisible = New SqlBoolean(CType(dtToReturn.Rows(0)("invisible"), 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)("mutiert_am") Is System.DBNull.Value Then
m_daMutiert_am = SqlDateTime.Null
Else
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
End If
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
m_iMutierer = SqlInt32.Null
Else
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
End If
If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then
m_iMandantnr = SqlInt32.Null
Else
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
End If
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsRolle_SecurityObject::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_Rolle_SecurityObject_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Rolle_SecurityObject")
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_Rolle_SecurityObject_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("clsRolle_SecurityObject::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 [iRolle_securityobjectnr]() As SqlInt32
Get
Return m_iRolle_securityobjectnr
End Get
Set(ByVal Value As SqlInt32)
Dim iRolle_securityobjectnrTmp As SqlInt32 = Value
If iRolle_securityobjectnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iRolle_securityobjectnr", "iRolle_securityobjectnr can't be NULL")
End If
m_iRolle_securityobjectnr = Value
End Set
End Property
Public Property [iRollenr]() As SqlInt32
Get
Return m_iRollenr
End Get
Set(ByVal Value As SqlInt32)
m_iRollenr = Value
End Set
End Property
Public Property [iSecurityobjectnr]() As SqlInt32
Get
Return m_iSecurityobjectnr
End Get
Set(ByVal Value As SqlInt32)
m_iSecurityobjectnr = Value
End Set
End Property
Public Property [bReadonly]() As SqlBoolean
Get
Return m_bReadonly
End Get
Set(ByVal Value As SqlBoolean)
m_bReadonly = Value
End Set
End Property
Public Property [bInvisible]() As SqlBoolean
Get
Return m_bInvisible
End Get
Set(ByVal Value As SqlBoolean)
m_bInvisible = 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 [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,489 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'rolle_sysadminfunktion'
' // Generated by LLBLGen v1.21.2003.712 Final on: Dienstag, 1. Januar 2013, 19:36:38
' // 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 DB
''' <summary>
''' Purpose: Data Access class for the table 'rolle_sysadminfunktion'.
''' </summary>
Public Class clsRolle_sysadminfunktion
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iRollenr, m_iMandant, m_iSysadminfnktnr, m_iRolle_sysadminfnktnr, m_iMutierer As SqlInt32
#End Region
''' <summary>
''' Purpose: Class constructor.
''' </summary>
Public Sub New()
' // Nothing for now.
End Sub
''' <summary>
''' Purpose: Insert method. This method will insert one new row into the database.
''' </summary>
''' <returns>True if succeeded, otherwise an Exception is thrown. </returns>
''' <remarks>
''' Properties needed for this method:
''' <UL>
''' <LI>iRolle_sysadminfnktnr</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>iSysadminfnktnr. May be SqlInt32.Null</LI>
''' <LI>iRollenr. May be SqlInt32.Null</LI>
''' <LI>iMandant. 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_rolle_sysadminfunktion_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irolle_sysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolle_sysadminfnktnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@isysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSysadminfnktnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandant", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandant))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_rolle_sysadminfunktion_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("clsRolle_sysadminfunktion::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>iRolle_sysadminfnktnr</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>iSysadminfnktnr. May be SqlInt32.Null</LI>
''' <LI>iRollenr. May be SqlInt32.Null</LI>
''' <LI>iMandant. 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_rolle_sysadminfunktion_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irolle_sysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolle_sysadminfnktnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@isysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSysadminfnktnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@irollenr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iRollenr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandant", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandant))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_rolle_sysadminfunktion_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("clsRolle_sysadminfunktion::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>iRolle_sysadminfnktnr</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_rolle_sysadminfunktion_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@irolle_sysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolle_sysadminfnktnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_rolle_sysadminfunktion_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("clsRolle_sysadminfunktion::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>iRolle_sysadminfnktnr</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
''' <LI>iRolle_sysadminfnktnr</LI>
''' <LI>bAktiv</LI>
''' <LI>daErstellt_am</LI>
''' <LI>daMutiert_am</LI>
''' <LI>iMutierer</LI>
''' <LI>iSysadminfnktnr</LI>
''' <LI>iRollenr</LI>
''' <LI>iMandant</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_rolle_sysadminfunktion_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("rolle_sysadminfunktion")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@irolle_sysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iRolle_sysadminfnktnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_rolle_sysadminfunktion_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iRolle_sysadminfnktnr = New SqlInt32(CType(dtToReturn.Rows(0)("rolle_sysadminfnktnr"), Integer))
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
m_bAktiv = SqlBoolean.Null
Else
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
End If
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
m_daErstellt_am = SqlDateTime.Null
Else
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
End If
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
m_daMutiert_am = SqlDateTime.Null
Else
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
End If
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
m_iMutierer = SqlInt32.Null
Else
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
End If
If dtToReturn.Rows(0)("sysadminfnktnr") Is System.DBNull.Value Then
m_iSysadminfnktnr = SqlInt32.Null
Else
m_iSysadminfnktnr = New SqlInt32(CType(dtToReturn.Rows(0)("sysadminfnktnr"), Integer))
End If
If dtToReturn.Rows(0)("rollenr") Is System.DBNull.Value Then
m_iRollenr = SqlInt32.Null
Else
m_iRollenr = New SqlInt32(CType(dtToReturn.Rows(0)("rollenr"), Integer))
End If
If dtToReturn.Rows(0)("mandant") Is System.DBNull.Value Then
m_iMandant = SqlInt32.Null
Else
m_iMandant = New SqlInt32(CType(dtToReturn.Rows(0)("mandant"), 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("clsRolle_sysadminfunktion::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_rolle_sysadminfunktion_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("rolle_sysadminfunktion")
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_rolle_sysadminfunktion_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("clsRolle_sysadminfunktion::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 [iRolle_sysadminfnktnr]() As SqlInt32
Get
Return m_iRolle_sysadminfnktnr
End Get
Set(ByVal Value As SqlInt32)
Dim iRolle_sysadminfnktnrTmp As SqlInt32 = Value
If iRolle_sysadminfnktnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iRolle_sysadminfnktnr", "iRolle_sysadminfnktnr can't be NULL")
End If
m_iRolle_sysadminfnktnr = 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 [iSysadminfnktnr]() As SqlInt32
Get
Return m_iSysadminfnktnr
End Get
Set(ByVal Value As SqlInt32)
m_iSysadminfnktnr = Value
End Set
End Property
Public Property [iRollenr]() As SqlInt32
Get
Return m_iRollenr
End Get
Set(ByVal Value As SqlInt32)
m_iRollenr = Value
End Set
End Property
Public Property [iMandant]() As SqlInt32
Get
Return m_iMandant
End Get
Set(ByVal Value As SqlInt32)
m_iMandant = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,570 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'SecurityObject'
' // Generated by LLBLGen v1.21.2003.712 Final on: Dienstag, 1. Januar 2013, 19:36:38
' // 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 DB
''' <summary>
''' Purpose: Data Access class for the table 'SecurityObject'.
''' </summary>
Public Class clsSecurityObject
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iLevel, m_iMutierer, m_iMandantnr, m_iSecurityObjectNr As SqlInt32
Private m_sSecurityForm, m_sSecurityObjectDescriotion, m_sSecurityObjectItem, m_sSecurityObject, m_sSecurityObjectType 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>iSecurityObjectNr</LI>
''' <LI>sSecurityForm. May be SqlString.Null</LI>
''' <LI>sSecurityObjectType. May be SqlString.Null</LI>
''' <LI>sSecurityObject. May be SqlString.Null</LI>
''' <LI>sSecurityObjectItem. May be SqlString.Null</LI>
''' <LI>sSecurityObjectDescriotion. May be SqlString.Null</LI>
''' <LI>iLevel. 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>iMandantnr. May be SqlInt32.Null</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_SecurityObject_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSecurityObjectNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSecurityObjectNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSecurityForm", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSecurityForm))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSecurityObjectType", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSecurityObjectType))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSecurityObject", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSecurityObject))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSecurityObjectItem", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSecurityObjectItem))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSecurityObjectDescriotion", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSecurityObjectDescriotion))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iLevel", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iLevel))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iMandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_SecurityObject_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("clsSecurityObject::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>iSecurityObjectNr</LI>
''' <LI>sSecurityForm. May be SqlString.Null</LI>
''' <LI>sSecurityObjectType. May be SqlString.Null</LI>
''' <LI>sSecurityObject. May be SqlString.Null</LI>
''' <LI>sSecurityObjectItem. May be SqlString.Null</LI>
''' <LI>sSecurityObjectDescriotion. May be SqlString.Null</LI>
''' <LI>iLevel. 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>iMandantnr. May be SqlInt32.Null</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_SecurityObject_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSecurityObjectNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSecurityObjectNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSecurityForm", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSecurityForm))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSecurityObjectType", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSecurityObjectType))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSecurityObject", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSecurityObject))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSecurityObjectItem", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSecurityObjectItem))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sSecurityObjectDescriotion", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSecurityObjectDescriotion))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iLevel", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iLevel))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iMandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_SecurityObject_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("clsSecurityObject::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>iSecurityObjectNr</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_SecurityObject_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSecurityObjectNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSecurityObjectNr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_SecurityObject_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("clsSecurityObject::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>iSecurityObjectNr</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
''' <LI>iSecurityObjectNr</LI>
''' <LI>sSecurityForm</LI>
''' <LI>sSecurityObjectType</LI>
''' <LI>sSecurityObject</LI>
''' <LI>sSecurityObjectItem</LI>
''' <LI>sSecurityObjectDescriotion</LI>
''' <LI>iLevel</LI>
''' <LI>bAktiv</LI>
''' <LI>daErstellt_am</LI>
''' <LI>daMutiert_am</LI>
''' <LI>iMutierer</LI>
''' <LI>iMandantnr</LI>
'''</UL>
''' Will fill all properties corresponding with a field in the table with the value of the row selected.
''' </remarks>
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_SecurityObject_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("SecurityObject")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iSecurityObjectNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSecurityObjectNr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_SecurityObject_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iSecurityObjectNr = New SqlInt32(CType(dtToReturn.Rows(0)("SecurityObjectNr"), Integer))
If dtToReturn.Rows(0)("SecurityForm") Is System.DBNull.Value Then
m_sSecurityForm = SqlString.Null
Else
m_sSecurityForm = New SqlString(CType(dtToReturn.Rows(0)("SecurityForm"), String))
End If
If dtToReturn.Rows(0)("SecurityObjectType") Is System.DBNull.Value Then
m_sSecurityObjectType = SqlString.Null
Else
m_sSecurityObjectType = New SqlString(CType(dtToReturn.Rows(0)("SecurityObjectType"), String))
End If
If dtToReturn.Rows(0)("SecurityObject") Is System.DBNull.Value Then
m_sSecurityObject = SqlString.Null
Else
m_sSecurityObject = New SqlString(CType(dtToReturn.Rows(0)("SecurityObject"), String))
End If
If dtToReturn.Rows(0)("SecurityObjectItem") Is System.DBNull.Value Then
m_sSecurityObjectItem = SqlString.Null
Else
m_sSecurityObjectItem = New SqlString(CType(dtToReturn.Rows(0)("SecurityObjectItem"), String))
End If
If dtToReturn.Rows(0)("SecurityObjectDescriotion") Is System.DBNull.Value Then
m_sSecurityObjectDescriotion = SqlString.Null
Else
m_sSecurityObjectDescriotion = New SqlString(CType(dtToReturn.Rows(0)("SecurityObjectDescriotion"), String))
End If
If dtToReturn.Rows(0)("Level") Is System.DBNull.Value Then
m_iLevel = SqlInt32.Null
Else
m_iLevel = New SqlInt32(CType(dtToReturn.Rows(0)("Level"), 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)("Mandantnr") Is System.DBNull.Value Then
m_iMandantnr = SqlInt32.Null
Else
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("Mandantnr"), Integer))
End If
End If
Return dtToReturn
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsSecurityObject::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_SecurityObject_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("SecurityObject")
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_SecurityObject_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("clsSecurityObject::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 [iSecurityObjectNr]() As SqlInt32
Get
Return m_iSecurityObjectNr
End Get
Set(ByVal Value As SqlInt32)
Dim iSecurityObjectNrTmp As SqlInt32 = Value
If iSecurityObjectNrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iSecurityObjectNr", "iSecurityObjectNr can't be NULL")
End If
m_iSecurityObjectNr = Value
End Set
End Property
Public Property [sSecurityForm]() As SqlString
Get
Return m_sSecurityForm
End Get
Set(ByVal Value As SqlString)
m_sSecurityForm = Value
End Set
End Property
Public Property [sSecurityObjectType]() As SqlString
Get
Return m_sSecurityObjectType
End Get
Set(ByVal Value As SqlString)
m_sSecurityObjectType = Value
End Set
End Property
Public Property [sSecurityObject]() As SqlString
Get
Return m_sSecurityObject
End Get
Set(ByVal Value As SqlString)
m_sSecurityObject = Value
End Set
End Property
Public Property [sSecurityObjectItem]() As SqlString
Get
Return m_sSecurityObjectItem
End Get
Set(ByVal Value As SqlString)
m_sSecurityObjectItem = Value
End Set
End Property
Public Property [sSecurityObjectDescriotion]() As SqlString
Get
Return m_sSecurityObjectDescriotion
End Get
Set(ByVal Value As SqlString)
m_sSecurityObjectDescriotion = Value
End Set
End Property
Public Property [iLevel]() As SqlInt32
Get
Return m_iLevel
End Get
Set(ByVal Value As SqlInt32)
m_iLevel = 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 [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,424 @@
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace DB
Public Class clsServer
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iCID, m_iMutierer, m_iServerNr, m_iParentID, m_iSequenz As SqlInt32
Private m_sBezeichnung, m_sBeschreibung As SqlString
#End Region
Public Sub New()
' // Nothing for now.
End Sub
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Server_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iServerNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iServerNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParentID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSequenz", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSequenz))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iCID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCID))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Server_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("clsServer::Insert::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Server_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iServerNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iServerNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParentID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSequenz", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSequenz))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iCID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iCID))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Server_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("clsServer::Update::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function Delete() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Server_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iServerNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iServerNr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Server_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("clsServer::Delete::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Server_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Server")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iServerNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iServerNr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_Server_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iServerNr = New SqlInt32(CType(dtToReturn.Rows(0)("ServerNr"), Integer))
If dtToReturn.Rows(0)("ParentID") Is System.DBNull.Value Then
m_iParentID = SqlInt32.Null
Else
m_iParentID = New SqlInt32(CType(dtToReturn.Rows(0)("ParentID"), Integer))
End If
If dtToReturn.Rows(0)("Bezeichnung") Is System.DBNull.Value Then
m_sBezeichnung = SqlString.Null
Else
m_sBezeichnung = New SqlString(CType(dtToReturn.Rows(0)("Bezeichnung"), String))
End If
If dtToReturn.Rows(0)("Beschreibung") Is System.DBNull.Value Then
m_sBeschreibung = SqlString.Null
Else
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("Beschreibung"), String))
End If
If dtToReturn.Rows(0)("Sequenz") Is System.DBNull.Value Then
m_iSequenz = SqlInt32.Null
Else
m_iSequenz = New SqlInt32(CType(dtToReturn.Rows(0)("Sequenz"), 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)("CID") Is System.DBNull.Value Then
m_iCID = SqlInt32.Null
Else
m_iCID = New SqlInt32(CType(dtToReturn.Rows(0)("CID"), 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("clsServer::SelectOne::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
Overrides Public Function SelectAll() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Server_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Server")
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_Server_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("clsServer::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 [iServerNr]() As SqlInt32
Get
Return m_iServerNr
End Get
Set(ByVal Value As SqlInt32)
Dim iServerNrTmp As SqlInt32 = Value
If iServerNrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iServerNr", "iServerNr can't be NULL")
End If
m_iServerNr = Value
End Set
End Property
Public Property [iParentID]() As SqlInt32
Get
Return m_iParentID
End Get
Set(ByVal Value As SqlInt32)
m_iParentID = Value
End Set
End Property
Public Property [sBezeichnung]() As SqlString
Get
Return m_sBezeichnung
End Get
Set(ByVal Value As SqlString)
m_sBezeichnung = Value
End Set
End Property
Public Property [sBeschreibung]() As SqlString
Get
Return m_sBeschreibung
End Get
Set(ByVal Value As SqlString)
m_sBeschreibung = Value
End Set
End Property
Public Property [iSequenz]() As SqlInt32
Get
Return m_iSequenz
End Get
Set(ByVal Value As SqlInt32)
m_iSequenz = 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 [iCID]() As SqlInt32
Get
Return m_iCID
End Get
Set(ByVal Value As SqlInt32)
m_iCID = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,630 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'spalten'
' // Generated by LLBLGen v1.21.2003.712 Final on: Dienstag, 1. Januar 2013, 13:15:45
' // 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 db
''' <summary>
''' Purpose: Data Access class for the table 'spalten'.
''' </summary>
Public Class clsSpalten
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bReadonly, m_bAlsHacken, m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMandantnr, m_iMutierer, m_iReihenfolge, m_iEintragnr, m_iBreite As SqlInt32
Private m_sTabelle, m_sNumberFormat, m_sTiptext, m_sSpalte, m_sTabellenspalte 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>iEintragnr</LI>
''' <LI>sTabelle. May be SqlString.Null</LI>
''' <LI>sTabellenspalte. May be SqlString.Null</LI>
''' <LI>sSpalte. May be SqlString.Null</LI>
''' <LI>bReadonly</LI>
''' <LI>bAlsHacken</LI>
''' <LI>iBreite. May be SqlInt32.Null</LI>
''' <LI>iReihenfolge. May be SqlInt32.Null</LI>
''' <LI>sTiptext. May be SqlString.Null</LI>
''' <LI>bAktiv</LI>
''' <LI>daErstellt_am. May be SqlDateTime.Null</LI>
''' <LI>daMutiert_am. May be SqlDateTime.Null</LI>
''' <LI>iMutierer. May be SqlInt32.Null</LI>
''' <LI>iMandantnr. May be SqlInt32.Null</LI>
''' <LI>sNumberFormat. 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_spalten_Insert]"
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("@stabelle", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTabelle))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stabellenspalte", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTabellenspalte))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sspalte", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSpalte))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bReadonly", SqlDbType.Bit, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_bReadonly))
scmCmdToExecute.Parameters.Add(New SqlParameter("@balsHacken", SqlDbType.Bit, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_bAlsHacken))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iBreite", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBreite))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iReihenfolge", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReihenfolge))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stiptext", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTiptext))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNumberFormat", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNumberFormat))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_spalten_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("clsSpalten::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>sTabelle. May be SqlString.Null</LI>
''' <LI>sTabellenspalte. May be SqlString.Null</LI>
''' <LI>sSpalte. May be SqlString.Null</LI>
''' <LI>bReadonly</LI>
''' <LI>bAlsHacken</LI>
''' <LI>iBreite. May be SqlInt32.Null</LI>
''' <LI>iReihenfolge. May be SqlInt32.Null</LI>
''' <LI>sTiptext. May be SqlString.Null</LI>
''' <LI>bAktiv</LI>
''' <LI>daErstellt_am. May be SqlDateTime.Null</LI>
''' <LI>daMutiert_am. May be SqlDateTime.Null</LI>
''' <LI>iMutierer. May be SqlInt32.Null</LI>
''' <LI>iMandantnr. May be SqlInt32.Null</LI>
''' <LI>sNumberFormat. 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_spalten_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("@stabelle", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTabelle))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stabellenspalte", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTabellenspalte))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sspalte", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sSpalte))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bReadonly", SqlDbType.Bit, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_bReadonly))
scmCmdToExecute.Parameters.Add(New SqlParameter("@balsHacken", SqlDbType.Bit, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_bAlsHacken))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iBreite", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iBreite))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iReihenfolge", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iReihenfolge))
scmCmdToExecute.Parameters.Add(New SqlParameter("@stiptext", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sTiptext))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, False, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sNumberFormat", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sNumberFormat))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_spalten_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("clsSpalten::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_spalten_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.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_spalten_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("clsSpalten::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>sTabelle</LI>
''' <LI>sTabellenspalte</LI>
''' <LI>sSpalte</LI>
''' <LI>bReadonly</LI>
''' <LI>bAlsHacken</LI>
''' <LI>iBreite</LI>
''' <LI>iReihenfolge</LI>
''' <LI>sTiptext</LI>
''' <LI>bAktiv</LI>
''' <LI>daErstellt_am</LI>
''' <LI>daMutiert_am</LI>
''' <LI>iMutierer</LI>
''' <LI>iMandantnr</LI>
''' <LI>sNumberFormat</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_spalten_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("spalten")
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 = 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_spalten_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)("tabelle") Is System.DBNull.Value Then
m_sTabelle = SqlString.Null
Else
m_sTabelle = New SqlString(CType(dtToReturn.Rows(0)("tabelle"), String))
End If
If dtToReturn.Rows(0)("tabellenspalte") Is System.DBNull.Value Then
m_sTabellenspalte = SqlString.Null
Else
m_sTabellenspalte = New SqlString(CType(dtToReturn.Rows(0)("tabellenspalte"), String))
End If
If dtToReturn.Rows(0)("spalte") Is System.DBNull.Value Then
m_sSpalte = SqlString.Null
Else
m_sSpalte = New SqlString(CType(dtToReturn.Rows(0)("spalte"), String))
End If
m_bReadonly = New SqlBoolean(CType(dtToReturn.Rows(0)("Readonly"), Boolean))
m_bAlsHacken = New SqlBoolean(CType(dtToReturn.Rows(0)("alsHacken"), Boolean))
If dtToReturn.Rows(0)("Breite") Is System.DBNull.Value Then
m_iBreite = SqlInt32.Null
Else
m_iBreite = New SqlInt32(CType(dtToReturn.Rows(0)("Breite"), Integer))
End If
If dtToReturn.Rows(0)("Reihenfolge") Is System.DBNull.Value Then
m_iReihenfolge = SqlInt32.Null
Else
m_iReihenfolge = New SqlInt32(CType(dtToReturn.Rows(0)("Reihenfolge"), Integer))
End If
If dtToReturn.Rows(0)("tiptext") Is System.DBNull.Value Then
m_sTiptext = SqlString.Null
Else
m_sTiptext = New SqlString(CType(dtToReturn.Rows(0)("tiptext"), String))
End If
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
m_daErstellt_am = SqlDateTime.Null
Else
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
End If
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
m_daMutiert_am = SqlDateTime.Null
Else
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
End If
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
m_iMutierer = SqlInt32.Null
Else
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
End If
If dtToReturn.Rows(0)("mandantnr") Is System.DBNull.Value Then
m_iMandantnr = SqlInt32.Null
Else
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
End If
If dtToReturn.Rows(0)("NumberFormat") Is System.DBNull.Value Then
m_sNumberFormat = SqlString.Null
Else
m_sNumberFormat = New SqlString(CType(dtToReturn.Rows(0)("NumberFormat"), 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("clsSpalten::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_spalten_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("spalten")
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_spalten_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("clsSpalten::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 [sTabelle]() As SqlString
Get
Return m_sTabelle
End Get
Set(ByVal Value As SqlString)
m_sTabelle = Value
End Set
End Property
Public Property [sTabellenspalte]() As SqlString
Get
Return m_sTabellenspalte
End Get
Set(ByVal Value As SqlString)
m_sTabellenspalte = Value
End Set
End Property
Public Property [sSpalte]() As SqlString
Get
Return m_sSpalte
End Get
Set(ByVal Value As SqlString)
m_sSpalte = Value
End Set
End Property
Public Property [bReadonly]() As SqlBoolean
Get
Return m_bReadonly
End Get
Set(ByVal Value As SqlBoolean)
Dim bReadonlyTmp As SqlBoolean = Value
If bReadonlyTmp.IsNull Then
Throw New ArgumentOutOfRangeException("bReadonly", "bReadonly can't be NULL")
End If
m_bReadonly = Value
End Set
End Property
Public Property [bAlsHacken]() As SqlBoolean
Get
Return m_bAlsHacken
End Get
Set(ByVal Value As SqlBoolean)
Dim bAlsHackenTmp As SqlBoolean = Value
If bAlsHackenTmp.IsNull Then
Throw New ArgumentOutOfRangeException("bAlsHacken", "bAlsHacken can't be NULL")
End If
m_bAlsHacken = Value
End Set
End Property
Public Property [iBreite]() As SqlInt32
Get
Return m_iBreite
End Get
Set(ByVal Value As SqlInt32)
m_iBreite = Value
End Set
End Property
Public Property [iReihenfolge]() As SqlInt32
Get
Return m_iReihenfolge
End Get
Set(ByVal Value As SqlInt32)
m_iReihenfolge = Value
End Set
End Property
Public Property [sTiptext]() As SqlString
Get
Return m_sTiptext
End Get
Set(ByVal Value As SqlString)
m_sTiptext = Value
End Set
End Property
Public Property [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
Dim bAktivTmp As SqlBoolean = Value
If bAktivTmp.IsNull Then
Throw New ArgumentOutOfRangeException("bAktiv", "bAktiv can't be NULL")
End If
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 [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
m_iMandantnr = Value
End Set
End Property
Public Property [sNumberFormat]() As SqlString
Get
Return m_sNumberFormat
End Get
Set(ByVal Value As SqlString)
m_sNumberFormat = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,710 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'sysadminfunktion'
' // Generated by LLBLGen v1.21.2003.712 Final on: Dienstag, 1. Januar 2013, 18:17: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 DB
''' <summary>
''' Purpose: Data Access class for the table 'sysadminfunktion'.
''' </summary>
Public Class clsSysadminfunktion
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iFheight, m_iFwidth, m_iMandantnr, m_iMutierer, m_iSprache, m_iSort, m_iImageIndex, m_iSysadminfnktnr, m_iParentID, m_iFtop, m_iFleft, m_iImageIndexOpen As SqlInt32
Private m_sKeyFields, m_sDomaintable, m_sBeschreibung, m_sBezeichnung As SqlString
#End Region
''' <summary>
''' Purpose: Class constructor.
''' </summary>
Public Sub New()
' // Nothing for now.
End Sub
''' <summary>
''' Purpose: Insert method. This method will insert one new row into the database.
''' </summary>
''' <returns>True if succeeded, otherwise an Exception is thrown. </returns>
''' <remarks>
''' Properties needed for this method:
''' <UL>
''' <LI>iSysadminfnktnr</LI>
''' <LI>sBezeichnung. May be SqlString.Null</LI>
''' <LI>iParentID. May be SqlInt32.Null</LI>
''' <LI>iSort. May be SqlInt32.Null</LI>
''' <LI>iImageIndex. May be SqlInt32.Null</LI>
''' <LI>iImageIndexOpen. May be SqlInt32.Null</LI>
''' <LI>iFtop. May be SqlInt32.Null</LI>
''' <LI>iFleft. May be SqlInt32.Null</LI>
''' <LI>iFwidth. May be SqlInt32.Null</LI>
''' <LI>iFheight. May be SqlInt32.Null</LI>
''' <LI>sBeschreibung. May be SqlString.Null</LI>
''' <LI>iMandantnr</LI>
''' <LI>iSprache</LI>
''' <LI>bAktiv. May be SqlBoolean.Null</LI>
''' <LI>daErstellt_am. May be SqlDateTime.Null</LI>
''' <LI>daMutiert_am. May be SqlDateTime.Null</LI>
''' <LI>iMutierer. May be SqlInt32.Null</LI>
''' <LI>sDomaintable. May be SqlString.Null</LI>
''' <LI>sKeyFields. 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_sysadminfunktion_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@isysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSysadminfnktnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParentID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSort", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSort))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImageIndex", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageIndex))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImageIndexOpen", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageIndexOpen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iftop", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFtop))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifleft", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFleft))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifwidth", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFwidth))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifheight", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFheight))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@sDomaintable", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDomaintable))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sKeyFields", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sKeyFields))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_sysadminfunktion_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("clsSysadminfunktion::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>iSysadminfnktnr</LI>
''' <LI>sBezeichnung. May be SqlString.Null</LI>
''' <LI>iParentID. May be SqlInt32.Null</LI>
''' <LI>iSort. May be SqlInt32.Null</LI>
''' <LI>iImageIndex. May be SqlInt32.Null</LI>
''' <LI>iImageIndexOpen. May be SqlInt32.Null</LI>
''' <LI>iFtop. May be SqlInt32.Null</LI>
''' <LI>iFleft. May be SqlInt32.Null</LI>
''' <LI>iFwidth. May be SqlInt32.Null</LI>
''' <LI>iFheight. May be SqlInt32.Null</LI>
''' <LI>sBeschreibung. May be SqlString.Null</LI>
''' <LI>iMandantnr</LI>
''' <LI>iSprache</LI>
''' <LI>bAktiv. May be SqlBoolean.Null</LI>
''' <LI>daErstellt_am. May be SqlDateTime.Null</LI>
''' <LI>daMutiert_am. May be SqlDateTime.Null</LI>
''' <LI>iMutierer. May be SqlInt32.Null</LI>
''' <LI>sDomaintable. May be SqlString.Null</LI>
''' <LI>sKeyFields. 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_sysadminfunktion_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@isysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSysadminfnktnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParentID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSort", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSort))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImageIndex", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageIndex))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iImageIndexOpen", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iImageIndexOpen))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iftop", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFtop))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifleft", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFleft))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifwidth", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFwidth))
scmCmdToExecute.Parameters.Add(New SqlParameter("@ifheight", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iFheight))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sbeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@imandantnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iMandantnr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@isprache", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSprache))
scmCmdToExecute.Parameters.Add(New SqlParameter("@baktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@sDomaintable", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sDomaintable))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sKeyFields", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sKeyFields))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_sysadminfunktion_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("clsSysadminfunktion::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>iSysadminfnktnr</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_sysadminfunktion_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@isysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSysadminfnktnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_sysadminfunktion_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("clsSysadminfunktion::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>iSysadminfnktnr</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
''' <LI>iSysadminfnktnr</LI>
''' <LI>sBezeichnung</LI>
''' <LI>iParentID</LI>
''' <LI>iSort</LI>
''' <LI>iImageIndex</LI>
''' <LI>iImageIndexOpen</LI>
''' <LI>iFtop</LI>
''' <LI>iFleft</LI>
''' <LI>iFwidth</LI>
''' <LI>iFheight</LI>
''' <LI>sBeschreibung</LI>
''' <LI>iMandantnr</LI>
''' <LI>iSprache</LI>
''' <LI>bAktiv</LI>
''' <LI>daErstellt_am</LI>
''' <LI>daMutiert_am</LI>
''' <LI>iMutierer</LI>
''' <LI>sDomaintable</LI>
''' <LI>sKeyFields</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_sysadminfunktion_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("sysadminfunktion")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@isysadminfnktnr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iSysadminfnktnr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_sysadminfunktion_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iSysadminfnktnr = New SqlInt32(CType(dtToReturn.Rows(0)("sysadminfnktnr"), Integer))
If dtToReturn.Rows(0)("bezeichnung") Is System.DBNull.Value Then
m_sBezeichnung = SqlString.Null
Else
m_sBezeichnung = New SqlString(CType(dtToReturn.Rows(0)("bezeichnung"), String))
End If
If dtToReturn.Rows(0)("ParentID") Is System.DBNull.Value Then
m_iParentID = SqlInt32.Null
Else
m_iParentID = New SqlInt32(CType(dtToReturn.Rows(0)("ParentID"), Integer))
End If
If dtToReturn.Rows(0)("Sort") Is System.DBNull.Value Then
m_iSort = SqlInt32.Null
Else
m_iSort = New SqlInt32(CType(dtToReturn.Rows(0)("Sort"), Integer))
End If
If dtToReturn.Rows(0)("ImageIndex") Is System.DBNull.Value Then
m_iImageIndex = SqlInt32.Null
Else
m_iImageIndex = New SqlInt32(CType(dtToReturn.Rows(0)("ImageIndex"), Integer))
End If
If dtToReturn.Rows(0)("ImageIndexOpen") Is System.DBNull.Value Then
m_iImageIndexOpen = SqlInt32.Null
Else
m_iImageIndexOpen = New SqlInt32(CType(dtToReturn.Rows(0)("ImageIndexOpen"), Integer))
End If
If dtToReturn.Rows(0)("ftop") Is System.DBNull.Value Then
m_iFtop = SqlInt32.Null
Else
m_iFtop = New SqlInt32(CType(dtToReturn.Rows(0)("ftop"), Integer))
End If
If dtToReturn.Rows(0)("fleft") Is System.DBNull.Value Then
m_iFleft = SqlInt32.Null
Else
m_iFleft = New SqlInt32(CType(dtToReturn.Rows(0)("fleft"), Integer))
End If
If dtToReturn.Rows(0)("fwidth") Is System.DBNull.Value Then
m_iFwidth = SqlInt32.Null
Else
m_iFwidth = New SqlInt32(CType(dtToReturn.Rows(0)("fwidth"), Integer))
End If
If dtToReturn.Rows(0)("fheight") Is System.DBNull.Value Then
m_iFheight = SqlInt32.Null
Else
m_iFheight = New SqlInt32(CType(dtToReturn.Rows(0)("fheight"), Integer))
End If
If dtToReturn.Rows(0)("beschreibung") Is System.DBNull.Value Then
m_sBeschreibung = SqlString.Null
Else
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("beschreibung"), String))
End If
m_iMandantnr = New SqlInt32(CType(dtToReturn.Rows(0)("mandantnr"), Integer))
m_iSprache = New SqlInt32(CType(dtToReturn.Rows(0)("sprache"), Integer))
If dtToReturn.Rows(0)("aktiv") Is System.DBNull.Value Then
m_bAktiv = SqlBoolean.Null
Else
m_bAktiv = New SqlBoolean(CType(dtToReturn.Rows(0)("aktiv"), Boolean))
End If
If dtToReturn.Rows(0)("erstellt_am") Is System.DBNull.Value Then
m_daErstellt_am = SqlDateTime.Null
Else
m_daErstellt_am = New SqlDateTime(CType(dtToReturn.Rows(0)("erstellt_am"), Date))
End If
If dtToReturn.Rows(0)("mutiert_am") Is System.DBNull.Value Then
m_daMutiert_am = SqlDateTime.Null
Else
m_daMutiert_am = New SqlDateTime(CType(dtToReturn.Rows(0)("mutiert_am"), Date))
End If
If dtToReturn.Rows(0)("mutierer") Is System.DBNull.Value Then
m_iMutierer = SqlInt32.Null
Else
m_iMutierer = New SqlInt32(CType(dtToReturn.Rows(0)("mutierer"), Integer))
End If
If dtToReturn.Rows(0)("Domaintable") Is System.DBNull.Value Then
m_sDomaintable = SqlString.Null
Else
m_sDomaintable = New SqlString(CType(dtToReturn.Rows(0)("Domaintable"), String))
End If
If dtToReturn.Rows(0)("KeyFields") Is System.DBNull.Value Then
m_sKeyFields = SqlString.Null
Else
m_sKeyFields = New SqlString(CType(dtToReturn.Rows(0)("KeyFields"), 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("clsSysadminfunktion::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_sysadminfunktion_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("sysadminfunktion")
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_sysadminfunktion_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("clsSysadminfunktion::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 [iSysadminfnktnr]() As SqlInt32
Get
Return m_iSysadminfnktnr
End Get
Set(ByVal Value As SqlInt32)
Dim iSysadminfnktnrTmp As SqlInt32 = Value
If iSysadminfnktnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iSysadminfnktnr", "iSysadminfnktnr can't be NULL")
End If
m_iSysadminfnktnr = Value
End Set
End Property
Public Property [sBezeichnung]() As SqlString
Get
Return m_sBezeichnung
End Get
Set(ByVal Value As SqlString)
m_sBezeichnung = Value
End Set
End Property
Public Property [iParentID]() As SqlInt32
Get
Return m_iParentID
End Get
Set(ByVal Value As SqlInt32)
m_iParentID = Value
End Set
End Property
Public Property [iSort]() As SqlInt32
Get
Return m_iSort
End Get
Set(ByVal Value As SqlInt32)
m_iSort = Value
End Set
End Property
Public Property [iImageIndex]() As SqlInt32
Get
Return m_iImageIndex
End Get
Set(ByVal Value As SqlInt32)
m_iImageIndex = Value
End Set
End Property
Public Property [iImageIndexOpen]() As SqlInt32
Get
Return m_iImageIndexOpen
End Get
Set(ByVal Value As SqlInt32)
m_iImageIndexOpen = Value
End Set
End Property
Public Property [iFtop]() As SqlInt32
Get
Return m_iFtop
End Get
Set(ByVal Value As SqlInt32)
m_iFtop = Value
End Set
End Property
Public Property [iFleft]() As SqlInt32
Get
Return m_iFleft
End Get
Set(ByVal Value As SqlInt32)
m_iFleft = Value
End Set
End Property
Public Property [iFwidth]() As SqlInt32
Get
Return m_iFwidth
End Get
Set(ByVal Value As SqlInt32)
m_iFwidth = Value
End Set
End Property
Public Property [iFheight]() As SqlInt32
Get
Return m_iFheight
End Get
Set(ByVal Value As SqlInt32)
m_iFheight = Value
End Set
End Property
Public Property [sBeschreibung]() As SqlString
Get
Return m_sBeschreibung
End Get
Set(ByVal Value As SqlString)
m_sBeschreibung = Value
End Set
End Property
Public Property [iMandantnr]() As SqlInt32
Get
Return m_iMandantnr
End Get
Set(ByVal Value As SqlInt32)
Dim iMandantnrTmp As SqlInt32 = Value
If iMandantnrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iMandantnr", "iMandantnr can't be NULL")
End If
m_iMandantnr = Value
End Set
End Property
Public Property [iSprache]() As SqlInt32
Get
Return m_iSprache
End Get
Set(ByVal Value As SqlInt32)
Dim iSpracheTmp As SqlInt32 = Value
If iSpracheTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iSprache", "iSprache can't be NULL")
End If
m_iSprache = Value
End Set
End Property
Public Property [bAktiv]() As SqlBoolean
Get
Return m_bAktiv
End Get
Set(ByVal Value As SqlBoolean)
m_bAktiv = Value
End Set
End Property
Public Property [daErstellt_am]() As SqlDateTime
Get
Return m_daErstellt_am
End Get
Set(ByVal Value As SqlDateTime)
m_daErstellt_am = Value
End Set
End Property
Public Property [daMutiert_am]() As SqlDateTime
Get
Return m_daMutiert_am
End Get
Set(ByVal Value As SqlDateTime)
m_daMutiert_am = Value
End Set
End Property
Public Property [iMutierer]() As SqlInt32
Get
Return m_iMutierer
End Get
Set(ByVal Value As SqlInt32)
m_iMutierer = Value
End Set
End Property
Public Property [sDomaintable]() As SqlString
Get
Return m_sDomaintable
End Get
Set(ByVal Value As SqlString)
m_sDomaintable = Value
End Set
End Property
Public Property [sKeyFields]() As SqlString
Get
Return m_sKeyFields
End Get
Set(ByVal Value As SqlString)
m_sKeyFields = Value
End Set
End Property
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,490 @@
' ///////////////////////////////////////////////////////////////////////////
' // Description: Data Access class for the table 'ToolTip'
' // Generated by LLBLGen v1.21.2003.712 Final on: Dienstag, 1. Januar 2013, 14:02:28
' // 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 DB
''' <summary>
''' Purpose: Data Access class for the table 'ToolTip'.
''' </summary>
Public Class clsToolTip
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daMutiert_am, m_daErstellt_am As SqlDateTime
Private m_iMutierer, m_iToolTipNr As SqlInt32
Private m_sToolTip, m_sControlName, m_sFormularName 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>iToolTipNr</LI>
''' <LI>sFormularName. May be SqlString.Null</LI>
''' <LI>sControlName. May be SqlString.Null</LI>
''' <LI>sToolTip. May be SqlString.Null</LI>
''' <LI>bAktiv. May be SqlBoolean.Null</LI>
''' <LI>daErstellt_am. May be SqlDateTime.Null</LI>
''' <LI>daMutiert_am. May be SqlDateTime.Null</LI>
''' <LI>iMutierer. May be SqlInt32.Null</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_ToolTip_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iToolTipNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iToolTipNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sFormularName", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFormularName))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sControlName", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sControlName))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sToolTip", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sToolTip))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_ToolTip_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("clsToolTip::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>iToolTipNr</LI>
''' <LI>sFormularName. May be SqlString.Null</LI>
''' <LI>sControlName. May be SqlString.Null</LI>
''' <LI>sToolTip. May be SqlString.Null</LI>
''' <LI>bAktiv. May be SqlBoolean.Null</LI>
''' <LI>daErstellt_am. May be SqlDateTime.Null</LI>
''' <LI>daMutiert_am. May be SqlDateTime.Null</LI>
''' <LI>iMutierer. May be SqlInt32.Null</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
'''</UL>
''' </remarks>
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_ToolTip_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iToolTipNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iToolTipNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sFormularName", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sFormularName))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sControlName", SqlDbType.VarChar, 50, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sControlName))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sToolTip", SqlDbType.VarChar, 1024, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sToolTip))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_ToolTip_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("clsToolTip::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>iToolTipNr</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_ToolTip_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iToolTipNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iToolTipNr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_ToolTip_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("clsToolTip::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>iToolTipNr</LI>
''' </UL>
''' Properties set after a succesful call of this method:
''' <UL>
''' <LI>iErrorCode</LI>
''' <LI>iToolTipNr</LI>
''' <LI>sFormularName</LI>
''' <LI>sControlName</LI>
''' <LI>sToolTip</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_ToolTip_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("ToolTip")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iToolTipNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iToolTipNr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_ToolTip_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iToolTipNr = New SqlInt32(CType(dtToReturn.Rows(0)("ToolTipNr"), Integer))
If dtToReturn.Rows(0)("FormularName") Is System.DBNull.Value Then
m_sFormularName = SqlString.Null
Else
m_sFormularName = New SqlString(CType(dtToReturn.Rows(0)("FormularName"), String))
End If
If dtToReturn.Rows(0)("ControlName") Is System.DBNull.Value Then
m_sControlName = SqlString.Null
Else
m_sControlName = New SqlString(CType(dtToReturn.Rows(0)("ControlName"), String))
End If
If dtToReturn.Rows(0)("ToolTip") Is System.DBNull.Value Then
m_sToolTip = SqlString.Null
Else
m_sToolTip = New SqlString(CType(dtToReturn.Rows(0)("ToolTip"), 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("clsToolTip::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_ToolTip_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("ToolTip")
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_ToolTip_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("clsToolTip::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 [iToolTipNr]() As SqlInt32
Get
Return m_iToolTipNr
End Get
Set(ByVal Value As SqlInt32)
Dim iToolTipNrTmp As SqlInt32 = Value
If iToolTipNrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iToolTipNr", "iToolTipNr can't be NULL")
End If
m_iToolTipNr = Value
End Set
End Property
Public Property [sFormularName]() As SqlString
Get
Return m_sFormularName
End Get
Set(ByVal Value As SqlString)
m_sFormularName = Value
End Set
End Property
Public Property [sControlName]() As SqlString
Get
Return m_sControlName
End Get
Set(ByVal Value As SqlString)
m_sControlName = Value
End Set
End Property
Public Property [sToolTip]() As SqlString
Get
Return m_sToolTip
End Get
Set(ByVal Value As SqlString)
m_sToolTip = 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

View File

@@ -0,0 +1,407 @@
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace DB
Public Class clsVerwaltung_durch
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iSequenz, m_iParentID, m_iVerwaltung_durchNr As SqlInt32
Private m_sBeschreibung, m_sBezeichnung As SqlString
#End Region
Public Sub New()
' // Nothing for now.
End Sub
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Verwaltung_durch_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iVerwaltung_durchNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iVerwaltung_durchNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParentID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSequenz", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSequenz))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Verwaltung_durch_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("clsVerwaltung_durch::Insert::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Verwaltung_durch_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iVerwaltung_durchNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iVerwaltung_durchNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParentID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSequenz", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSequenz))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Verwaltung_durch_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("clsVerwaltung_durch::Update::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function Delete() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Verwaltung_durch_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iVerwaltung_durchNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iVerwaltung_durchNr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Verwaltung_durch_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("clsVerwaltung_durch::Delete::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Verwaltung_durch_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Verwaltung_durch")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iVerwaltung_durchNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iVerwaltung_durchNr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_Verwaltung_durch_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iVerwaltung_durchNr = New SqlInt32(CType(dtToReturn.Rows(0)("Verwaltung_durchNr"), Integer))
If dtToReturn.Rows(0)("ParentID") Is System.DBNull.Value Then
m_iParentID = SqlInt32.Null
Else
m_iParentID = New SqlInt32(CType(dtToReturn.Rows(0)("ParentID"), Integer))
End If
If dtToReturn.Rows(0)("Bezeichnung") Is System.DBNull.Value Then
m_sBezeichnung = SqlString.Null
Else
m_sBezeichnung = New SqlString(CType(dtToReturn.Rows(0)("Bezeichnung"), String))
End If
If dtToReturn.Rows(0)("Beschreibung") Is System.DBNull.Value Then
m_sBeschreibung = SqlString.Null
Else
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("Beschreibung"), String))
End If
If dtToReturn.Rows(0)("Sequenz") Is System.DBNull.Value Then
m_iSequenz = SqlInt32.Null
Else
m_iSequenz = New SqlInt32(CType(dtToReturn.Rows(0)("Sequenz"), 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("clsVerwaltung_durch::SelectOne::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
Overrides Public Function SelectAll() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Verwaltung_durch_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Verwaltung_durch")
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_Verwaltung_durch_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("clsVerwaltung_durch::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 [iVerwaltung_durchNr]() As SqlInt32
Get
Return m_iVerwaltung_durchNr
End Get
Set(ByVal Value As SqlInt32)
Dim iVerwaltung_durchNrTmp As SqlInt32 = Value
If iVerwaltung_durchNrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iVerwaltung_durchNr", "iVerwaltung_durchNr can't be NULL")
End If
m_iVerwaltung_durchNr = Value
End Set
End Property
Public Property [iParentID]() As SqlInt32
Get
Return m_iParentID
End Get
Set(ByVal Value As SqlInt32)
m_iParentID = Value
End Set
End Property
Public Property [sBezeichnung]() As SqlString
Get
Return m_sBezeichnung
End Get
Set(ByVal Value As SqlString)
m_sBezeichnung = Value
End Set
End Property
Public Property [sBeschreibung]() As SqlString
Get
Return m_sBeschreibung
End Get
Set(ByVal Value As SqlString)
m_sBeschreibung = Value
End Set
End Property
Public Property [iSequenz]() As SqlInt32
Get
Return m_iSequenz
End Get
Set(ByVal Value As SqlInt32)
m_iSequenz = 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

View File

@@ -0,0 +1,407 @@
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace DB
Public Class clsVerwaltung_mit
Inherits clsDBInteractionBase
#Region " Class Member Declarations "
Private m_bAktiv As SqlBoolean
Private m_daErstellt_am, m_daMutiert_am As SqlDateTime
Private m_iMutierer, m_iSequenz, m_iParentID, m_iVerwaltung_mitNr As SqlInt32
Private m_sBeschreibung, m_sBezeichnung As SqlString
#End Region
Public Sub New()
' // Nothing for now.
End Sub
Overrides Public Function Insert() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Verwaltung_mit_Insert]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iVerwaltung_mitNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iVerwaltung_mitNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParentID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSequenz", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSequenz))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Verwaltung_mit_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("clsVerwaltung_mit::Insert::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function Update() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Verwaltung_mit_Update]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iVerwaltung_mitNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iVerwaltung_mitNr))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iParentID", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iParentID))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBezeichnung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBezeichnung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@sBeschreibung", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_sBeschreibung))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iSequenz", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, m_iSequenz))
scmCmdToExecute.Parameters.Add(New SqlParameter("@bAktiv", SqlDbType.Bit, 1, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, m_bAktiv))
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("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Verwaltung_mit_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("clsVerwaltung_mit::Update::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function Delete() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Verwaltung_mit_Delete]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@iVerwaltung_mitNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iVerwaltung_mitNr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
m_iRowsAffected = scmCmdToExecute.ExecuteNonQuery()
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_Verwaltung_mit_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("clsVerwaltung_mit::Delete::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
Overrides Public Function SelectOne() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Verwaltung_mit_SelectOne]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Verwaltung_mit")
Dim sdaAdapter As SqlDataAdapter = new SqlDataAdapter(scmCmdToExecute)
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(new SqlParameter("@iVerwaltung_mitNr", SqlDbType.Int, 4, ParameterDirection.Input, False, 10, 0, "", DataRowVersion.Proposed, m_iVerwaltung_mitNr))
scmCmdToExecute.Parameters.Add(new SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_Verwaltung_mit_SelectOne' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
If dtToReturn.Rows.Count > 0 Then
m_iVerwaltung_mitNr = New SqlInt32(CType(dtToReturn.Rows(0)("Verwaltung_mitNr"), Integer))
If dtToReturn.Rows(0)("ParentID") Is System.DBNull.Value Then
m_iParentID = SqlInt32.Null
Else
m_iParentID = New SqlInt32(CType(dtToReturn.Rows(0)("ParentID"), Integer))
End If
If dtToReturn.Rows(0)("Bezeichnung") Is System.DBNull.Value Then
m_sBezeichnung = SqlString.Null
Else
m_sBezeichnung = New SqlString(CType(dtToReturn.Rows(0)("Bezeichnung"), String))
End If
If dtToReturn.Rows(0)("Beschreibung") Is System.DBNull.Value Then
m_sBeschreibung = SqlString.Null
Else
m_sBeschreibung = New SqlString(CType(dtToReturn.Rows(0)("Beschreibung"), String))
End If
If dtToReturn.Rows(0)("Sequenz") Is System.DBNull.Value Then
m_iSequenz = SqlInt32.Null
Else
m_iSequenz = New SqlInt32(CType(dtToReturn.Rows(0)("Sequenz"), 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("clsVerwaltung_mit::SelectOne::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
Overrides Public Function SelectAll() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_Verwaltung_mit_SelectAll]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = new DataTable("Verwaltung_mit")
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_Verwaltung_mit_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("clsVerwaltung_mit::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 [iVerwaltung_mitNr]() As SqlInt32
Get
Return m_iVerwaltung_mitNr
End Get
Set(ByVal Value As SqlInt32)
Dim iVerwaltung_mitNrTmp As SqlInt32 = Value
If iVerwaltung_mitNrTmp.IsNull Then
Throw New ArgumentOutOfRangeException("iVerwaltung_mitNr", "iVerwaltung_mitNr can't be NULL")
End If
m_iVerwaltung_mitNr = Value
End Set
End Property
Public Property [iParentID]() As SqlInt32
Get
Return m_iParentID
End Get
Set(ByVal Value As SqlInt32)
m_iParentID = Value
End Set
End Property
Public Property [sBezeichnung]() As SqlString
Get
Return m_sBezeichnung
End Get
Set(ByVal Value As SqlString)
m_sBezeichnung = Value
End Set
End Property
Public Property [sBeschreibung]() As SqlString
Get
Return m_sBeschreibung
End Get
Set(ByVal Value As SqlString)
m_sBeschreibung = Value
End Set
End Property
Public Property [iSequenz]() As SqlInt32
Get
Return m_iSequenz
End Get
Set(ByVal Value As SqlInt32)
m_iSequenz = 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

View File

@@ -0,0 +1,130 @@
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Imports System.Security.Principal
Namespace DB
Public Class MyMitarbeiter
Inherits DB.clsMitarbeiter
''' <summary>
''' Alle Mitarbeiter inkl. vollständigem Name (Fullname) auslesen
''' </summary>
''' <returns>Datatable</returns>
''' <remarks></remarks>
Public Function SelectAllwithFullname() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[my_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 = 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_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
''' <summary>
''' Mitarbeiter mittels TGNummer auslesen
''' </summary>
''' <returns>Datatable</returns>
''' <remarks></remarks>
Public Function SelectWithTGNummer() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[my_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, Me.Get_Username))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_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_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
''' <summary>
''' Security-Deklaration zum Auslesen der UserID vom Windows-User
''' </summary>
''' <remarks></remarks>
Dim ouser As New WindowsPrincipal(WindowsIdentity.GetCurrent)
''' <summary>
''' Windows-User auslesen
''' </summary>
''' <returns></returns>
''' <remarks></remarks>
Private Function Get_Username() As String
With ouser.Identity.Name
Return (.Substring(.IndexOf("\") + 1))
End With
End Function
End Class
End Namespace

View File

@@ -0,0 +1,61 @@
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace DB
Public Class clsMyKey_Tabelle
Inherits db.clsKey_tabelle
Public Function get_dbkey(ByVal Tablename As String) As Long
Dim m_dbkey As Long
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[sp_get_dbkey]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
' // Use base class' connection object
scmCmdToExecute.Connection = m_scoMainConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@Tablename", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, Tablename))
scmCmdToExecute.Parameters.Add(New SqlParameter("@dbkey", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_dbkey))
scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
If m_bMainConnectionIsCreatedLocal Then
' // Open connection.
m_scoMainConnection.Open()
Else
If m_cpMainConnectionProvider.bIsTransactionPending Then
scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
End If
End If
' // Execute query.
Try
scmCmdToExecute.Connection.Open()
Catch ex As Exception
Finally
End Try
scmCmdToExecute.ExecuteNonQuery()
m_dbkey = scmCmdToExecute.Parameters.Item("@dbkey").Value
m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
scmCmdToExecute.Connection.Close()
If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'sp_get_dbkey' reported the ErrorCode: " & m_iErrorCode.ToString())
End If
Return m_dbkey
Catch ex As Exception
' // some error occured. Bubble it to caller and encapsulate Exception object
Throw New Exception("clsKey_tabelle::get_dbkey::Error occured." + ex.Message, ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
End Try
End Function
End Class
End Namespace

View File

@@ -0,0 +1,59 @@
Imports System.IO
Namespace DB
''' <summary>
''' Dynamische Datenbank-Verbindung aufbauen. Verwendet wird standardmässig Vertragsverwaltung.cfg.
''' Sollen Datenbank-Verbindungen zur Auswahl angezeigt werden, werden sämntliche Datenbank-Verbindungsdateien
''' mit dem Namen "Vertragsverwaltung....cfg" berücksichtigt
''' </summary>
''' <remarks></remarks>
Public Class DB_Connection
''' <summary>
''' Liest sämtlcihe CFG-Dateien mit dem Namen "Vertragsverwaltung...". Sind meherere Dateien vorhanden,
''' wird ein Auswahldialog zur Datenbank-Selektion angezeigt.
''' Standardmässig wird Vertragsverwaltung.cfg als CFG-Datei benutzt.
'''
''' Die CFG-Datei ist verschlüsselt und wird über die Crypto-Funktionen entschlüsselt.
''' </summary>
''' <remarks></remarks>
Shared Sub New()
Dim fc As Integer = 0
If Globals.ConnectionFileName.Length = 0 Then
Dim Dir As DirectoryInfo = New DirectoryInfo(Application.StartupPath)
Try
Dim f As New frmDatenbankauswahl()
Dim ChildFile As FileInfo
For Each ChildFile In Dir.GetFiles()
If UCase(Left(ChildFile.Name, 3)) = "BEA" And UCase(ChildFile.Extension) = ".CFG" Then
f.ListBox1.Items.Add(ChildFile.Name)
fc = fc + 1
End If
Next
If fc > 1 Then
f.ListBox1.SelectedIndex = 0
f.ListBox1.Select()
f.ShowDialog()
Globals.ConnectionFileName = f.ListBox1.SelectedItem
f.Dispose()
End If
Catch except As Exception
fc = 0
Exit Sub
End Try
End If
If fc < 2 Then Globals.ConnectionFileName = Application.StartupPath + "\" + "BEA.CFG" Else Globals.ConnectionFileName = Application.StartupPath + "\" + Globals.ConnectionFileName
Dim ofile As System.IO.File
Dim oread As System.IO.StreamReader
oread = ofile.OpenText(Globals.ConnectionFileName)
sConnectionString = oread.ReadLine
sConnectionString = Crypto.DecryptText(sConnectionString, "HutterundMueller")
sConnectionString = Left(sConnectionString, Len(sConnectionString) - 1)
Globals.sConnectionString = sConnectionString
Globals.conn.sConnectionString = sConnectionString
oread.Close()
End Sub
End Class
End Namespace

View File

@@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
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">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<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" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</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>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAEAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAzd3d3MzMzAAAAAAAAAAAAM3d3dzMzMwAAAAAAAAAAM3eIiIi7MzMzAAAAAAAA
ADN3iIiIuzMzMwAAAAAAAAB3u4iIiLu7MzMAAAAAAAAAd7uIiIi7uzMzAAAAAAAAAHe7iIiIu7szMwAA
AAAAAAB3u4iIiLu7MzMAAAAAAAAAd7uIiIi7uzMzAAAAAAAAAHe7iIiIu7szMwAAAAAAAAB3u4iIiLu7
MzMAAAAAAAAAd7uIiIi7uzMzAAAAAAAAAHe7iIiIu7szMwAAAAAAAAB3u4iIiLu7MzMAAAAAAAAAd7uI
iIi7uzMzAAAAAAAAAHe7iIiIu7szMwAAAAAAAAB3u4iIiLu7MzMAAAAAAAAAd7uIiIi7uzMzAAAAAAAA
AHe7iIiIiIi7dwAAAAAAAAB3u4iIiIiIu3cAAAAAAAAAiIj//////4h3AAAAAAAAAIiI//////+IdwAA
AAAAAAAzd3d3d3d3dzMAAAAAAAAAM3d3d3d3d3czAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//////////////////////AAA//wA
AP/8AAD//AAA//wAAP/8AAD//AAA//wAAP/8AAD//AAA//wAAP/8AAD//AAA//wAAP/8AAD//AAA//wA
AP/8AAD//AAA//wAAP/8AAD//AAA//wAAP/8AAD//////////////////////w==
</value>
</data>
</root>

View File

@@ -0,0 +1,95 @@
''' <summary>
''' Form für die Datenbankauswahl
''' </summary>
''' <remarks></remarks>
Public Class frmDatenbankauswahl
Inherits System.Windows.Forms.Form
#Region " Vom Windows Form Designer generierter Code "
Public Sub New()
MyBase.New()
' Dieser Aufruf ist für den Windows Form-Designer erforderlich.
InitializeComponent()
' Initialisierungen nach dem Aufruf InitializeComponent() hinzufügen
End Sub
' Die Form überschreibt den Löschvorgang der Basisklasse, um Komponenten zu bereinigen.
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 Windows Form-Designer erforderlich
Private components As System.ComponentModel.IContainer
'HINWEIS: Die folgende Prozedur ist für den Windows Form-Designer erforderlich
'Sie kann mit dem Windows Form-Designer modifiziert werden.
'Verwenden Sie nicht den Code-Editor zur Bearbeitung.
Friend WithEvents ListBox1 As System.Windows.Forms.ListBox
Friend WithEvents Button1 As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmDatenbankauswahl))
Me.ListBox1 = New System.Windows.Forms.ListBox
Me.Button1 = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'ListBox1
'
Me.ListBox1.Location = New System.Drawing.Point(16, 16)
Me.ListBox1.Name = "ListBox1"
Me.ListBox1.Size = New System.Drawing.Size(232, 95)
Me.ListBox1.TabIndex = 0
'
'Button1
'
Me.Button1.DialogResult = System.Windows.Forms.DialogResult.OK
Me.Button1.Location = New System.Drawing.Point(88, 128)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(75, 23)
Me.Button1.TabIndex = 1
Me.Button1.Text = "&OK"
'
'frmDatenbankauswahl
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(258, 165)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.ListBox1)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "frmDatenbankauswahl"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Vertragsverwaltung: Datebbankauswahl"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Close()
End Sub
Private Sub frmDatenbankauswahl_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub ListBox1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.DoubleClick
Me.Close()
End Sub
Private Sub ListBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles ListBox1.KeyDown
If e.KeyCode = Keys.Enter Then Me.Close()
End Sub
End Class

View File

@@ -0,0 +1,138 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmAbout
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAbout))
Me.btnOK = New System.Windows.Forms.Button()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
Me.lblversiondatum = New System.Windows.Forms.Label()
Me.PictureBox2 = New System.Windows.Forms.PictureBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.lblVersion = New System.Windows.Forms.Label()
Me.Panel1.SuspendLayout()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'btnOK
'
Me.btnOK.Location = New System.Drawing.Point(117, 335)
Me.btnOK.Name = "btnOK"
Me.btnOK.Size = New System.Drawing.Size(75, 23)
Me.btnOK.TabIndex = 2
Me.btnOK.Text = "OK"
Me.btnOK.UseVisualStyleBackColor = True
'
'Panel1
'
Me.Panel1.BackColor = System.Drawing.Color.White
Me.Panel1.Controls.Add(Me.PictureBox1)
Me.Panel1.Controls.Add(Me.lblversiondatum)
Me.Panel1.Controls.Add(Me.PictureBox2)
Me.Panel1.Controls.Add(Me.Label1)
Me.Panel1.Controls.Add(Me.lblVersion)
Me.Panel1.Location = New System.Drawing.Point(3, 5)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(301, 324)
Me.Panel1.TabIndex = 6
'
'PictureBox1
'
Me.PictureBox1.ErrorImage = CType(resources.GetObject("PictureBox1.ErrorImage"), System.Drawing.Image)
Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image)
Me.PictureBox1.Location = New System.Drawing.Point(7, 3)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(286, 44)
Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
Me.PictureBox1.TabIndex = 3
Me.PictureBox1.TabStop = False
'
'lblversiondatum
'
Me.lblversiondatum.BackColor = System.Drawing.Color.White
Me.lblversiondatum.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblversiondatum.Location = New System.Drawing.Point(44, 299)
Me.lblversiondatum.Name = "lblversiondatum"
Me.lblversiondatum.Size = New System.Drawing.Size(200, 24)
Me.lblversiondatum.TabIndex = 2
Me.lblversiondatum.Text = "Version "
Me.lblversiondatum.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'PictureBox2
'
Me.PictureBox2.ErrorImage = CType(resources.GetObject("PictureBox2.ErrorImage"), System.Drawing.Image)
Me.PictureBox2.Image = CType(resources.GetObject("PictureBox2.Image"), System.Drawing.Image)
Me.PictureBox2.Location = New System.Drawing.Point(7, 53)
Me.PictureBox2.Name = "PictureBox2"
Me.PictureBox2.Size = New System.Drawing.Size(286, 195)
Me.PictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
Me.PictureBox2.TabIndex = 4
Me.PictureBox2.TabStop = False
'
'Label1
'
Me.Label1.BackColor = System.Drawing.Color.White
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.Location = New System.Drawing.Point(6, 251)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(287, 24)
Me.Label1.TabIndex = 3
Me.Label1.Text = "Berechtigungs-Administration"
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'lblVersion
'
Me.lblVersion.BackColor = System.Drawing.Color.White
Me.lblVersion.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblVersion.Location = New System.Drawing.Point(47, 275)
Me.lblVersion.Name = "lblVersion"
Me.lblVersion.Size = New System.Drawing.Size(197, 24)
Me.lblVersion.TabIndex = 1
Me.lblVersion.Text = "Version "
Me.lblVersion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'frmAbout
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(307, 364)
Me.Controls.Add(Me.Panel1)
Me.Controls.Add(Me.btnOK)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Name = "frmAbout"
Me.Text = "Über..."
Me.Panel1.ResumeLayout(False)
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
Friend WithEvents btnOK As System.Windows.Forms.Button
Friend WithEvents Panel1 As System.Windows.Forms.Panel
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
Friend WithEvents lblversiondatum As System.Windows.Forms.Label
Friend WithEvents PictureBox2 As System.Windows.Forms.PictureBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents lblVersion As System.Windows.Forms.Label
End Class

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
Public Class frmAbout
Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
Me.Close()
End Sub
Private Sub frmAbout_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.lblVersion.Text = "Version " & Globals.clsapplication.sVersion.Value
Me.lblversiondatum.Text = Globals.Versionsdatum
End Sub
End Class

View File

@@ -0,0 +1,129 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmExportContainer
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmExportContainer))
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
Me.TSBtnQuit = New System.Windows.Forms.ToolStripButton()
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
Me.ToolStripButton1 = New System.Windows.Forms.ToolStripButton()
Me.ToolStripButton2 = New System.Windows.Forms.ToolStripButton()
Me.ListView1 = New System.Windows.Forms.ListView()
Me.Typ = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
Me.Bezeichnung = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
Me.Key = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
Me.ToolStrip1.SuspendLayout()
Me.SuspendLayout()
'
'ToolStrip1
'
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TSBtnQuit, Me.ToolStripSeparator1, Me.ToolStripButton1, Me.ToolStripButton2})
Me.ToolStrip1.Location = New System.Drawing.Point(0, 0)
Me.ToolStrip1.Name = "ToolStrip1"
Me.ToolStrip1.Size = New System.Drawing.Size(296, 25)
Me.ToolStrip1.TabIndex = 6
Me.ToolStrip1.Text = "ToolStrip1"
'
'TSBtnQuit
'
Me.TSBtnQuit.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
Me.TSBtnQuit.Image = CType(resources.GetObject("TSBtnQuit.Image"), System.Drawing.Image)
Me.TSBtnQuit.ImageTransparentColor = System.Drawing.Color.Magenta
Me.TSBtnQuit.Name = "TSBtnQuit"
Me.TSBtnQuit.Size = New System.Drawing.Size(23, 22)
Me.TSBtnQuit.Text = "ToolStripButton1"
Me.TSBtnQuit.ToolTipText = "Anwendung beenden"
'
'ToolStripSeparator1
'
Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
Me.ToolStripSeparator1.Size = New System.Drawing.Size(6, 25)
'
'ToolStripButton1
'
Me.ToolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
Me.ToolStripButton1.Image = CType(resources.GetObject("ToolStripButton1.Image"), System.Drawing.Image)
Me.ToolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta
Me.ToolStripButton1.Name = "ToolStripButton1"
Me.ToolStripButton1.Size = New System.Drawing.Size(23, 22)
Me.ToolStripButton1.Text = "Daten aufbereiten"
'
'ToolStripButton2
'
Me.ToolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
Me.ToolStripButton2.Image = CType(resources.GetObject("ToolStripButton2.Image"), System.Drawing.Image)
Me.ToolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta
Me.ToolStripButton2.Name = "ToolStripButton2"
Me.ToolStripButton2.Size = New System.Drawing.Size(23, 22)
Me.ToolStripButton2.Text = "Inhalt löschen"
'
'ListView1
'
Me.ListView1.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.Typ, Me.Bezeichnung, Me.Key})
Me.ListView1.Dock = System.Windows.Forms.DockStyle.Fill
Me.ListView1.Location = New System.Drawing.Point(0, 25)
Me.ListView1.Name = "ListView1"
Me.ListView1.Size = New System.Drawing.Size(296, 567)
Me.ListView1.TabIndex = 7
Me.ListView1.UseCompatibleStateImageBehavior = False
Me.ListView1.View = System.Windows.Forms.View.Details
'
'Typ
'
Me.Typ.Text = "Typ"
'
'Bezeichnung
'
Me.Bezeichnung.Text = "Bezeichnung"
'
'Key
'
Me.Key.Text = "KeyValue"
'
'frmExportContainer
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(296, 592)
Me.Controls.Add(Me.ListView1)
Me.Controls.Add(Me.ToolStrip1)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Name = "frmExportContainer"
Me.Text = "ExportContainer"
Me.TopMost = True
Me.ToolStrip1.ResumeLayout(False)
Me.ToolStrip1.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents ToolStrip1 As System.Windows.Forms.ToolStrip
Friend WithEvents ToolStripSeparator1 As System.Windows.Forms.ToolStripSeparator
Friend WithEvents TSBtnQuit As System.Windows.Forms.ToolStripButton
Friend WithEvents ToolStripButton1 As System.Windows.Forms.ToolStripButton
Friend WithEvents ListView1 As System.Windows.Forms.ListView
Friend WithEvents Typ As System.Windows.Forms.ColumnHeader
Friend WithEvents Bezeichnung As System.Windows.Forms.ColumnHeader
Friend WithEvents Key As System.Windows.Forms.ColumnHeader
Friend WithEvents ToolStripButton2 As System.Windows.Forms.ToolStripButton
End Class

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,67 @@
Public Class frmExportContainer
Dim WithEvents evh As _Generic_Event_Handler.Generic_Event_Handler = Globals.Generic_Event_Handler
Private Sub frmExportContainer_Load(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub
Private Sub evh_Export_Vorbereiten_Clicked(Type As String, Bezeichnung As String, Keyvalue As String) Handles evh.Export_Vorbereiten_Clicked
Dim arr(3) As String
arr(0) = Type
arr(1) = Bezeichnung
arr(2) = Keyvalue
Dim li As New ListViewItem(arr)
Me.ListView1.Items.Add(li)
End Sub
Private Sub frmExportContainer_SizeChanged(sender As Object, e As EventArgs) Handles Me.SizeChanged
Me.ListView1.Columns(0).Width = Me.ListView1.Width / 3
Me.ListView1.Columns(1).Width = Me.ListView1.Width / 3
Me.ListView1.Columns(2).Width = Me.ListView1.Width / 3
End Sub
Private Sub TSBtnQuit_Click(sender As Object, e As EventArgs) Handles TSBtnQuit.Click
Globals.ExcelExport_Form_exists = False
Me.Close()
End Sub
Private Sub ToolStripButton1_Click(sender As Object, e As EventArgs) Handles ToolStripButton1.Click
Dim frmf As New frmFortschritt
frmf.Show()
frmf.ProgressBar1.Value = 0
frmf.ProgressBar1.Maximum = Me.ListView1.Items.Count
Dim ds As New DataSet
Dim dc As New _DataClass.DataClass
ds.Tables.Clear()
Dim i As Integer = 1
For Each lvi As ListViewItem In Me.ListView1.Items
frmf.ProgressBar1.Value = frmf.ProgressBar1.Value + 1
Application.DoEvents()
Dim dt As New DataTable
dt = dc.Get_Data_for_ExcelExport(lvi.SubItems(0).Text, lvi.SubItems(2).Text)
If i = 1 Then
ds.Tables.Add(dt.Copy)
Else
For Each r As DataRow In dt.Rows
ds.Tables(0).ImportRow(r)
Next
End If
i = i + 1
Next
Dim rpt As New _FRReporting.frmAuswertung("ExcelExport", ds, Globals.clsapplication.sTmp_filepath.Value)
rpt.MdiParent = Me.MdiParent
rpt.Show()
frmf.Close()
frmf.Dispose()
End Sub
Private Sub ToolStripButton2_Click(sender As Object, e As EventArgs) Handles ToolStripButton2.Click
Me.ListView1.Items.Clear()
End Sub
End Class

View File

@@ -0,0 +1,49 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmFortschritt
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmFortschritt))
Me.ProgressBar1 = New System.Windows.Forms.ProgressBar()
Me.SuspendLayout()
'
'ProgressBar1
'
Me.ProgressBar1.Location = New System.Drawing.Point(12, 12)
Me.ProgressBar1.Name = "ProgressBar1"
Me.ProgressBar1.Size = New System.Drawing.Size(481, 23)
Me.ProgressBar1.TabIndex = 0
'
'frmFortschritt
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(505, 51)
Me.Controls.Add(Me.ProgressBar1)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Name = "frmFortschritt"
Me.Text = "Fortschritt"
Me.ResumeLayout(False)
End Sub
Friend WithEvents ProgressBar1 As System.Windows.Forms.ProgressBar
End Class

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
Public Class frmFortschritt
Private Sub frmFortschritt_Load(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub
End Class

View File

@@ -0,0 +1,89 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmLogin
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmLogin))
Me.lblBitteAnmelden = New System.Windows.Forms.Label()
Me.cbMitarbeiter = New System.Windows.Forms.ComboBox()
Me.btnAbbruch = New System.Windows.Forms.Button()
Me.btnAnmelden = New System.Windows.Forms.Button()
Me.SuspendLayout()
'
'lblBitteAnmelden
'
Me.lblBitteAnmelden.Location = New System.Drawing.Point(12, 9)
Me.lblBitteAnmelden.Name = "lblBitteAnmelden"
Me.lblBitteAnmelden.Size = New System.Drawing.Size(136, 23)
Me.lblBitteAnmelden.TabIndex = 3
Me.lblBitteAnmelden.Text = "Bitte melden Sie sich an"
'
'cbMitarbeiter
'
Me.cbMitarbeiter.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append
Me.cbMitarbeiter.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems
Me.cbMitarbeiter.FormattingEnabled = True
Me.cbMitarbeiter.Location = New System.Drawing.Point(15, 35)
Me.cbMitarbeiter.Name = "cbMitarbeiter"
Me.cbMitarbeiter.Size = New System.Drawing.Size(257, 21)
Me.cbMitarbeiter.TabIndex = 4
'
'btnAbbruch
'
Me.btnAbbruch.DialogResult = System.Windows.Forms.DialogResult.OK
Me.btnAbbruch.Location = New System.Drawing.Point(158, 76)
Me.btnAbbruch.Name = "btnAbbruch"
Me.btnAbbruch.Size = New System.Drawing.Size(104, 24)
Me.btnAbbruch.TabIndex = 6
Me.btnAbbruch.Text = "&Abbruch"
'
'btnAnmelden
'
Me.btnAnmelden.DialogResult = System.Windows.Forms.DialogResult.OK
Me.btnAnmelden.Location = New System.Drawing.Point(14, 76)
Me.btnAnmelden.Name = "btnAnmelden"
Me.btnAnmelden.Size = New System.Drawing.Size(104, 24)
Me.btnAnmelden.TabIndex = 5
Me.btnAnmelden.Text = "&Anmelden"
'
'frmLogin
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(308, 129)
Me.Controls.Add(Me.btnAbbruch)
Me.Controls.Add(Me.btnAnmelden)
Me.Controls.Add(Me.cbMitarbeiter)
Me.Controls.Add(Me.lblBitteAnmelden)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Name = "frmLogin"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Benutzerauswahl"
Me.TopMost = True
Me.ResumeLayout(False)
End Sub
Friend WithEvents lblBitteAnmelden As System.Windows.Forms.Label
Friend WithEvents cbMitarbeiter As System.Windows.Forms.ComboBox
Friend WithEvents btnAbbruch As System.Windows.Forms.Button
Friend WithEvents btnAnmelden As System.Windows.Forms.Button
End Class

View File

@@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
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">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<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" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</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>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAEAAAAAADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACIiIAAAAAAAAAAAAAIi
IiJyIiIiIAAAAAAAACIndyInd3ciIiIAAAAAAAIid3cvJ3d3ciIiAAAAAAACJ3d3f4J3d3ciIgAAAAAA
Ind3co/3d3d3ciIAAAAAACJ3d3L//yd3d3IgAAAAAAACd3dy//+Cd3dyIAAAAAAAAnd3cv//9yd3cgAA
AAAAAAIneHf///9ndyAAAAAAAAAAInh3hzM3giIAAAAAAAAAAAAiIzMzMzMgAAAAAAAAAAAAAAMzMzMz
MAAAAAAAAAAAAAAzu7u7uzMAAAAAAAAAAAABO7u7u7uzAAAAAAAAAAAAA7u7u7u7uzAAAAAAAAAAAAO7
u7u7u7swAAAAAAAAAAATu7u7u7u7sQAAAAAAAAAAE7u7u7u7u7MAAAAAAAAAADu7u7u7u7uzAAAAAAAA
AAAbu7u7u7u7swAAAAAAAAAAG7u7u7u7u7MAAAAAAAAAABO7Mzu7u7szAAAAAAAAAAADMzMzMzMzMwAA
AAAAAAAAAzM3eIdzMzMAAAAAAAAAAAAzeIiIiHMxAAAAAAAAAAAAM4iIiIdzMAAAAAAAAAAAAAM4iIiI
MwAAAAAAAAAAAAAAM4iIczAAAAAAAAAAAAAAAAATMxAAAAAAAAD/4AAf/gAAD/gAAA/wAAAP8AAAD/AA
AA/wAAAP8AAAD/AAAA/wAAAf8AAAH/gAAD/4AAB//gAA//+AAH//gAB//wAAP/8AAD//AAA//wAAP/8A
AB//AAAf/wAAH/8AAB//AAAf/wAAP/+AAD//gAA//8AAP//AAH//4AD///gD/w==
</value>
</data>
</root>

View File

@@ -0,0 +1,41 @@
''' <summary>
''' Form für den Login. Wird nur angezeigt, sofern in der Tabelle Application Show-Login = true
''' </summary>
''' <remarks></remarks>
Public Class frmLogin
Dim m_mitarbeiternr As Integer
Property Mitarbeiternr() As Integer
Get
Return m_mitarbeiternr
End Get
Set(ByVal value As Integer)
m_mitarbeiternr = value
End Set
End Property
Dim tmp_madaten As New DataTable
Dim tmp_clsmitarbeiter As New DB.MyMitarbeiter
Dim conn As New DB.clsConnectionProvider
Private Sub frmLogin_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
conn = Globals.conn
tmp_clsmitarbeiter.cpMainConnectionProvider = conn
conn.OpenConnection()
tmp_madaten = tmp_clsmitarbeiter.SelectAllwithFullname
Me.cbMitarbeiter.DataSource = tmp_madaten
Me.cbMitarbeiter.DisplayMember = "Fullname"
Me.cbMitarbeiter.ValueMember = "Mitarbeiternr"
conn.CloseConnection(True)
End Sub
Private Sub btnAnmelden_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAnmelden.Click
Me.Mitarbeiternr = Me.cbMitarbeiter.SelectedValue
Me.DialogResult = Windows.Forms.DialogResult.OK
End Sub
Private Sub btnAbbruch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAbbruch.Click
Me.Mitarbeiternr = -1
Me.DialogResult = Windows.Forms.DialogResult.Cancel
End Sub
End Class

View File

@@ -0,0 +1,181 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmMsgBox
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMsgBox))
Me.btnYes = New System.Windows.Forms.Button()
Me.btnno = New System.Windows.Forms.Button()
Me.btnAbbruch = New System.Windows.Forms.Button()
Me.txtmsg = New System.Windows.Forms.TextBox()
Me.btnOK = New System.Windows.Forms.Button()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.imgQuestion = New System.Windows.Forms.PictureBox()
Me.imgInformation = New System.Windows.Forms.PictureBox()
Me.imgExclamation = New System.Windows.Forms.PictureBox()
Me.imgCritical = New System.Windows.Forms.PictureBox()
Me.Panel1.SuspendLayout()
CType(Me.imgQuestion, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.imgInformation, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.imgExclamation, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.imgCritical, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'btnYes
'
Me.btnYes.Location = New System.Drawing.Point(71, 84)
Me.btnYes.Name = "btnYes"
Me.btnYes.Size = New System.Drawing.Size(75, 23)
Me.btnYes.TabIndex = 0
Me.btnYes.Text = "&Ja"
Me.btnYes.UseVisualStyleBackColor = True
'
'btnno
'
Me.btnno.Location = New System.Drawing.Point(162, 84)
Me.btnno.Name = "btnno"
Me.btnno.Size = New System.Drawing.Size(75, 23)
Me.btnno.TabIndex = 1
Me.btnno.Text = "&Nein"
Me.btnno.UseVisualStyleBackColor = True
'
'btnAbbruch
'
Me.btnAbbruch.Location = New System.Drawing.Point(254, 84)
Me.btnAbbruch.Name = "btnAbbruch"
Me.btnAbbruch.Size = New System.Drawing.Size(75, 23)
Me.btnAbbruch.TabIndex = 2
Me.btnAbbruch.Text = "&Abbrechen"
Me.btnAbbruch.UseVisualStyleBackColor = True
'
'txtmsg
'
Me.txtmsg.BackColor = System.Drawing.Color.White
Me.txtmsg.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.txtmsg.Location = New System.Drawing.Point(67, 20)
Me.txtmsg.Multiline = True
Me.txtmsg.Name = "txtmsg"
Me.txtmsg.ReadOnly = True
Me.txtmsg.Size = New System.Drawing.Size(258, 44)
Me.txtmsg.TabIndex = 3
Me.txtmsg.TabStop = False
'
'btnOK
'
Me.btnOK.Location = New System.Drawing.Point(133, 84)
Me.btnOK.Name = "btnOK"
Me.btnOK.Size = New System.Drawing.Size(75, 23)
Me.btnOK.TabIndex = 5
Me.btnOK.Text = "&OK"
Me.btnOK.UseVisualStyleBackColor = True
'
'Panel1
'
Me.Panel1.BackColor = System.Drawing.Color.White
Me.Panel1.Controls.Add(Me.imgQuestion)
Me.Panel1.Controls.Add(Me.imgInformation)
Me.Panel1.Controls.Add(Me.imgExclamation)
Me.Panel1.Controls.Add(Me.txtmsg)
Me.Panel1.Controls.Add(Me.imgCritical)
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top
Me.Panel1.Location = New System.Drawing.Point(0, 0)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(337, 78)
Me.Panel1.TabIndex = 6
'
'imgQuestion
'
Me.imgQuestion.Image = CType(resources.GetObject("imgQuestion.Image"), System.Drawing.Image)
Me.imgQuestion.InitialImage = CType(resources.GetObject("imgQuestion.InitialImage"), System.Drawing.Image)
Me.imgQuestion.Location = New System.Drawing.Point(12, 20)
Me.imgQuestion.Name = "imgQuestion"
Me.imgQuestion.Size = New System.Drawing.Size(39, 36)
Me.imgQuestion.TabIndex = 7
Me.imgQuestion.TabStop = False
'
'imgInformation
'
Me.imgInformation.Image = CType(resources.GetObject("imgInformation.Image"), System.Drawing.Image)
Me.imgInformation.InitialImage = CType(resources.GetObject("imgInformation.InitialImage"), System.Drawing.Image)
Me.imgInformation.Location = New System.Drawing.Point(12, 20)
Me.imgInformation.Name = "imgInformation"
Me.imgInformation.Size = New System.Drawing.Size(39, 36)
Me.imgInformation.TabIndex = 6
Me.imgInformation.TabStop = False
'
'imgExclamation
'
Me.imgExclamation.Image = CType(resources.GetObject("imgExclamation.Image"), System.Drawing.Image)
Me.imgExclamation.InitialImage = CType(resources.GetObject("imgExclamation.InitialImage"), System.Drawing.Image)
Me.imgExclamation.Location = New System.Drawing.Point(12, 20)
Me.imgExclamation.Name = "imgExclamation"
Me.imgExclamation.Size = New System.Drawing.Size(39, 36)
Me.imgExclamation.TabIndex = 5
Me.imgExclamation.TabStop = False
'
'imgCritical
'
Me.imgCritical.Image = CType(resources.GetObject("imgCritical.Image"), System.Drawing.Image)
Me.imgCritical.InitialImage = CType(resources.GetObject("imgCritical.InitialImage"), System.Drawing.Image)
Me.imgCritical.Location = New System.Drawing.Point(12, 20)
Me.imgCritical.Name = "imgCritical"
Me.imgCritical.Size = New System.Drawing.Size(39, 36)
Me.imgCritical.TabIndex = 4
Me.imgCritical.TabStop = False
'
'frmMsgBox
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(337, 116)
Me.Controls.Add(Me.Panel1)
Me.Controls.Add(Me.btnOK)
Me.Controls.Add(Me.btnAbbruch)
Me.Controls.Add(Me.btnno)
Me.Controls.Add(Me.btnYes)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "frmMsgBox"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
Me.Text = "BEA"
Me.Panel1.ResumeLayout(False)
Me.Panel1.PerformLayout()
CType(Me.imgQuestion, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.imgInformation, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.imgExclamation, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.imgCritical, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
Friend WithEvents btnYes As System.Windows.Forms.Button
Friend WithEvents btnno As System.Windows.Forms.Button
Friend WithEvents btnAbbruch As System.Windows.Forms.Button
Friend WithEvents txtmsg As System.Windows.Forms.TextBox
Friend WithEvents imgCritical As System.Windows.Forms.PictureBox
Friend WithEvents btnOK As System.Windows.Forms.Button
Friend WithEvents Panel1 As System.Windows.Forms.Panel
Friend WithEvents imgExclamation As System.Windows.Forms.PictureBox
Friend WithEvents imgQuestion As System.Windows.Forms.PictureBox
Friend WithEvents imgInformation As System.Windows.Forms.PictureBox
End Class

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,26 @@
Public Class frmMsgBox
Private Sub btnYes_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnYes.Click
Me.DialogResult = Windows.Forms.DialogResult.Yes
Me.Close()
End Sub
Private Sub btnno_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnno.Click
Me.DialogResult = Windows.Forms.DialogResult.No
Me.Close()
End Sub
Private Sub btnAbbruch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAbbruch.Click
Me.DialogResult = Windows.Forms.DialogResult.Cancel
Me.Close()
End Sub
Private Sub frmMsgBox_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
Me.DialogResult = Windows.Forms.DialogResult.OK
Me.Close()
End Sub
End Class

View File

@@ -0,0 +1,136 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmSplash
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmSplash))
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
Me.lblVersion = New System.Windows.Forms.Label()
Me.lblversiondatum = New System.Windows.Forms.Label()
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
Me.PictureBox2 = New System.Windows.Forms.PictureBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.Panel1 = New System.Windows.Forms.Panel()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Panel1.SuspendLayout()
Me.SuspendLayout()
'
'Timer1
'
Me.Timer1.Enabled = True
Me.Timer1.Interval = 3000
'
'lblVersion
'
Me.lblVersion.BackColor = System.Drawing.Color.White
Me.lblVersion.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblVersion.Location = New System.Drawing.Point(47, 275)
Me.lblVersion.Name = "lblVersion"
Me.lblVersion.Size = New System.Drawing.Size(197, 24)
Me.lblVersion.TabIndex = 1
Me.lblVersion.Text = "Version "
Me.lblVersion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'lblversiondatum
'
Me.lblversiondatum.BackColor = System.Drawing.Color.White
Me.lblversiondatum.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblversiondatum.Location = New System.Drawing.Point(44, 299)
Me.lblversiondatum.Name = "lblversiondatum"
Me.lblversiondatum.Size = New System.Drawing.Size(200, 24)
Me.lblversiondatum.TabIndex = 2
Me.lblversiondatum.Text = "Version "
Me.lblversiondatum.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'PictureBox1
'
Me.PictureBox1.ErrorImage = CType(resources.GetObject("PictureBox1.ErrorImage"), System.Drawing.Image)
Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image)
Me.PictureBox1.Location = New System.Drawing.Point(7, 3)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(286, 44)
Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
Me.PictureBox1.TabIndex = 3
Me.PictureBox1.TabStop = False
'
'PictureBox2
'
Me.PictureBox2.ErrorImage = CType(resources.GetObject("PictureBox2.ErrorImage"), System.Drawing.Image)
Me.PictureBox2.Image = CType(resources.GetObject("PictureBox2.Image"), System.Drawing.Image)
Me.PictureBox2.Location = New System.Drawing.Point(7, 53)
Me.PictureBox2.Name = "PictureBox2"
Me.PictureBox2.Size = New System.Drawing.Size(286, 195)
Me.PictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
Me.PictureBox2.TabIndex = 4
Me.PictureBox2.TabStop = False
'
'Label1
'
Me.Label1.BackColor = System.Drawing.Color.White
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.Location = New System.Drawing.Point(6, 251)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(287, 24)
Me.Label1.TabIndex = 3
Me.Label1.Text = "Berechtigungs-Administration"
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'Panel1
'
Me.Panel1.BackColor = System.Drawing.Color.White
Me.Panel1.Controls.Add(Me.PictureBox1)
Me.Panel1.Controls.Add(Me.lblversiondatum)
Me.Panel1.Controls.Add(Me.PictureBox2)
Me.Panel1.Controls.Add(Me.Label1)
Me.Panel1.Controls.Add(Me.lblVersion)
Me.Panel1.Location = New System.Drawing.Point(5, 4)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(301, 324)
Me.Panel1.TabIndex = 5
'
'frmSplash
'
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None
Me.BackColor = System.Drawing.SystemColors.Control
Me.ClientSize = New System.Drawing.Size(310, 334)
Me.ControlBox = False
Me.Controls.Add(Me.Panel1)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
Me.Name = "frmSplash"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "frmSplash"
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).EndInit()
Me.Panel1.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
Friend WithEvents Timer1 As System.Windows.Forms.Timer
Friend WithEvents lblVersion As System.Windows.Forms.Label
Friend WithEvents lblversiondatum As System.Windows.Forms.Label
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
Friend WithEvents PictureBox2 As System.Windows.Forms.PictureBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Panel1 As System.Windows.Forms.Panel
End Class

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,15 @@
Public Class frmSplash
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Me.Close()
End Sub
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub frmSplash_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.lblVersion.Text = "Version " & Globals.clsapplication.sVersion.Value
Me.lblVersiondatum.text = Globals.Versionsdatum
End Sub
End Class

View File

@@ -0,0 +1,195 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmTempBerechtigung
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmTempBerechtigung))
Me.MenuStrip1 = New System.Windows.Forms.MenuStrip()
Me.DateiToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.SchliessenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
Me.TSBtnQuit = New System.Windows.Forms.ToolStripButton()
Me.ToolStripButton1 = New System.Windows.Forms.ToolStripButton()
Me.C1Daten = New C1.Win.C1TrueDBGrid.C1TrueDBGrid()
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.InaktivierenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.PerosnAnzeigenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.FunktionstelleAnzeigenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.BerechtigungAnzeigenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.PlattformAnzeigenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog()
Me.MenuStrip1.SuspendLayout()
Me.ToolStrip1.SuspendLayout()
CType(Me.C1Daten, System.ComponentModel.ISupportInitialize).BeginInit()
Me.ContextMenuStrip1.SuspendLayout()
Me.SuspendLayout()
'
'MenuStrip1
'
Me.MenuStrip1.AllowMerge = False
Me.MenuStrip1.ImageScalingSize = New System.Drawing.Size(20, 20)
Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DateiToolStripMenuItem})
Me.MenuStrip1.Location = New System.Drawing.Point(0, 0)
Me.MenuStrip1.Name = "MenuStrip1"
Me.MenuStrip1.Size = New System.Drawing.Size(957, 24)
Me.MenuStrip1.TabIndex = 5
Me.MenuStrip1.Text = "MenuStrip1"
'
'DateiToolStripMenuItem
'
Me.DateiToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.SchliessenToolStripMenuItem})
Me.DateiToolStripMenuItem.MergeAction = System.Windows.Forms.MergeAction.MatchOnly
Me.DateiToolStripMenuItem.Name = "DateiToolStripMenuItem"
Me.DateiToolStripMenuItem.Size = New System.Drawing.Size(46, 20)
Me.DateiToolStripMenuItem.Text = "&Datei"
'
'SchliessenToolStripMenuItem
'
Me.SchliessenToolStripMenuItem.Name = "SchliessenToolStripMenuItem"
Me.SchliessenToolStripMenuItem.Size = New System.Drawing.Size(128, 22)
Me.SchliessenToolStripMenuItem.Text = "&Schliessen"
'
'ToolStrip1
'
Me.ToolStrip1.ImageScalingSize = New System.Drawing.Size(20, 20)
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TSBtnQuit, Me.ToolStripButton1})
Me.ToolStrip1.Location = New System.Drawing.Point(0, 24)
Me.ToolStrip1.Name = "ToolStrip1"
Me.ToolStrip1.Size = New System.Drawing.Size(957, 27)
Me.ToolStrip1.TabIndex = 6
Me.ToolStrip1.Text = "ToolStrip1"
'
'TSBtnQuit
'
Me.TSBtnQuit.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
Me.TSBtnQuit.Image = CType(resources.GetObject("TSBtnQuit.Image"), System.Drawing.Image)
Me.TSBtnQuit.ImageTransparentColor = System.Drawing.Color.Magenta
Me.TSBtnQuit.Name = "TSBtnQuit"
Me.TSBtnQuit.Size = New System.Drawing.Size(24, 24)
Me.TSBtnQuit.Text = "ToolStripButton1"
Me.TSBtnQuit.ToolTipText = "Fenster schliessen"
'
'ToolStripButton1
'
Me.ToolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
Me.ToolStripButton1.Image = CType(resources.GetObject("ToolStripButton1.Image"), System.Drawing.Image)
Me.ToolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta
Me.ToolStripButton1.Name = "ToolStripButton1"
Me.ToolStripButton1.Size = New System.Drawing.Size(24, 24)
Me.ToolStripButton1.Text = "Excel-Export"
'
'C1Daten
'
Me.C1Daten.AlternatingRows = True
Me.C1Daten.CellTips = C1.Win.C1TrueDBGrid.CellTipEnum.Floating
Me.C1Daten.ContextMenuStrip = Me.ContextMenuStrip1
Me.C1Daten.Dock = System.Windows.Forms.DockStyle.Fill
Me.C1Daten.FetchRowStyles = True
Me.C1Daten.FilterBar = True
Me.C1Daten.GroupByCaption = "Drag a column header here to group by that column"
Me.C1Daten.Images.Add(CType(resources.GetObject("C1Daten.Images"), System.Drawing.Image))
Me.C1Daten.Location = New System.Drawing.Point(0, 51)
Me.C1Daten.Name = "C1Daten"
Me.C1Daten.PreviewInfo.Location = New System.Drawing.Point(0, 0)
Me.C1Daten.PreviewInfo.Size = New System.Drawing.Size(0, 0)
Me.C1Daten.PreviewInfo.ZoomFactor = 75.0R
Me.C1Daten.PrintInfo.PageSettings = CType(resources.GetObject("C1Daten.PrintInfo.PageSettings"), System.Drawing.Printing.PageSettings)
Me.C1Daten.Size = New System.Drawing.Size(957, 389)
Me.C1Daten.TabAction = C1.Win.C1TrueDBGrid.TabActionEnum.ColumnNavigation
Me.C1Daten.TabIndex = 7
Me.C1Daten.Text = "C1TrueDBGrid1"
Me.C1Daten.PropBag = resources.GetString("C1Daten.PropBag")
'
'ContextMenuStrip1
'
Me.ContextMenuStrip1.ImageScalingSize = New System.Drawing.Size(20, 20)
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.InaktivierenToolStripMenuItem, Me.PerosnAnzeigenToolStripMenuItem, Me.FunktionstelleAnzeigenToolStripMenuItem, Me.BerechtigungAnzeigenToolStripMenuItem, Me.PlattformAnzeigenToolStripMenuItem})
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
Me.ContextMenuStrip1.Size = New System.Drawing.Size(199, 114)
'
'InaktivierenToolStripMenuItem
'
Me.InaktivierenToolStripMenuItem.Name = "InaktivierenToolStripMenuItem"
Me.InaktivierenToolStripMenuItem.Size = New System.Drawing.Size(198, 22)
Me.InaktivierenToolStripMenuItem.Text = "Inaktivieren"
'
'PerosnAnzeigenToolStripMenuItem
'
Me.PerosnAnzeigenToolStripMenuItem.Name = "PerosnAnzeigenToolStripMenuItem"
Me.PerosnAnzeigenToolStripMenuItem.Size = New System.Drawing.Size(198, 22)
Me.PerosnAnzeigenToolStripMenuItem.Text = "Person anzeigen"
'
'FunktionstelleAnzeigenToolStripMenuItem
'
Me.FunktionstelleAnzeigenToolStripMenuItem.Name = "FunktionstelleAnzeigenToolStripMenuItem"
Me.FunktionstelleAnzeigenToolStripMenuItem.Size = New System.Drawing.Size(198, 22)
Me.FunktionstelleAnzeigenToolStripMenuItem.Text = "Funktionstelle anzeigen"
'
'BerechtigungAnzeigenToolStripMenuItem
'
Me.BerechtigungAnzeigenToolStripMenuItem.Name = "BerechtigungAnzeigenToolStripMenuItem"
Me.BerechtigungAnzeigenToolStripMenuItem.Size = New System.Drawing.Size(198, 22)
Me.BerechtigungAnzeigenToolStripMenuItem.Text = "Berechtigung anzeigen"
'
'PlattformAnzeigenToolStripMenuItem
'
Me.PlattformAnzeigenToolStripMenuItem.Name = "PlattformAnzeigenToolStripMenuItem"
Me.PlattformAnzeigenToolStripMenuItem.Size = New System.Drawing.Size(198, 22)
Me.PlattformAnzeigenToolStripMenuItem.Text = "Plattform anzeigen"
'
'frmTempBerechtigung
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(957, 440)
Me.Controls.Add(Me.C1Daten)
Me.Controls.Add(Me.ToolStrip1)
Me.Controls.Add(Me.MenuStrip1)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Name = "frmTempBerechtigung"
Me.Text = "Temporäre Berechtigungen"
Me.MenuStrip1.ResumeLayout(False)
Me.MenuStrip1.PerformLayout()
Me.ToolStrip1.ResumeLayout(False)
Me.ToolStrip1.PerformLayout()
CType(Me.C1Daten, System.ComponentModel.ISupportInitialize).EndInit()
Me.ContextMenuStrip1.ResumeLayout(False)
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents MenuStrip1 As System.Windows.Forms.MenuStrip
Friend WithEvents DateiToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents SchliessenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStrip1 As System.Windows.Forms.ToolStrip
Friend WithEvents TSBtnQuit As System.Windows.Forms.ToolStripButton
Friend WithEvents ToolStripButton1 As System.Windows.Forms.ToolStripButton
Friend WithEvents C1Daten As C1.Win.C1TrueDBGrid.C1TrueDBGrid
Friend WithEvents SaveFileDialog1 As System.Windows.Forms.SaveFileDialog
Friend WithEvents ContextMenuStrip1 As System.Windows.Forms.ContextMenuStrip
Friend WithEvents InaktivierenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents PerosnAnzeigenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents FunktionstelleAnzeigenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents BerechtigungAnzeigenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents PlattformAnzeigenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
End Class

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,207 @@
Public Class frmTempBerechtigung
Dim dc As New _DataClass.DataClass
Dim SpaltenTitel As New Utils.Tabellenspalte
Dim sec As New Utils.MySecurity
Private Sub frmTempBerechtigung_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Refresh_Data()
sec.Set_Form_Security(Me)
End Sub
Sub Refresh_Data()
Dim dt As New DataTable
dt = dc.Get_Temp_Berechtgungen()
Me.C1Daten.DataSource = Nothing
Me.C1Daten.DataSource = dt
Me.C1Daten.DataMember = dt.TableName
Me.SpaltenTitel.Spaltentitel_aktualisieren(Me.C1Daten, "TempBerechtigung", dt)
End Sub
Private Sub SchliessenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles SchliessenToolStripMenuItem.Click
Me.Close()
End Sub
Private Sub TSBtnQuit_Click(sender As Object, e As EventArgs) Handles TSBtnQuit.Click
Me.Close()
End Sub
Private Sub ToolStripButton1_Click(sender As Object, e As EventArgs) Handles ToolStripButton1.Click
Me.SaveFileDialog1.AddExtension = True
Me.SaveFileDialog1.DefaultExt.Insert(0, "*.xlsx")
Me.SaveFileDialog1.Filter = "Excel-Dateien|*.xlsx"
Me.SaveFileDialog1.ShowDialog()
If Me.SaveFileDialog1.FileName <> "" Then
Dim tdt As New DataTable
tdt = Me.C1Daten.DataSource.Copy
tdt.Rows.Clear()
For i As Integer = 0 To Me.C1Daten.Splits(0).Rows.Count - 1
If C1Daten.Splits(0).Rows(i).Visible = True Then
Dim dr As DataRow = tdt.NewRow
For ii As Integer = 0 To C1Daten.Splits(0).DisplayColumns.Count - 1
C1Daten.Bookmark = i
dr.Item(ii) = C1Daten.Columns(ii).Value
Next ii
tdt.Rows.Add(dr)
End If
Next i
Try
Me.C1Daten.Bookmark = 0
Catch
End Try
If Me.SaveFileDialog1.FileName.EndsWith(".xlsx") Or Me.SaveFileDialog1.FileName.EndsWith("XLSX") Then
Me.DatatableToExcel(tdt, Me.SaveFileDialog1.FileName)
'Me.DatatableToExcel(Me.C1Daten.DataSource, Me.SaveFileDialog1.FileName)
Else
Me.C1Daten.ExportToDelimitedFile(Me.SaveFileDialog1.FileName, C1.Win.C1TrueDBGrid.RowSelectorEnum.AllRows, ";", "", "", True, System.Text.Encoding.Default.BodyName)
End If
End If
Exit Sub
End Sub
Public Shared Function DatatableToExcel(ByVal aDataTable As DataTable, ByVal aOutputFilename As String) As Boolean
Application.DoEvents()
Dim f As New FrmFortschritt
Dim app As New Object
Dim wb As New Object
Dim ws As New Object
Try
f.Show()
Application.DoEvents()
f.ProgressBar1.Minimum = 0
f.ProgressBar1.Maximum = aDataTable.Rows.Count
f.ProgressBar1.Step = 1
f.ProgressBar1.Value = 0
app = CreateObject("Excel.application")
'Dim wb As Object
'Dim ws As Object
' Dim app As New Excel.ApplicationClass
' Dim wb As Excel.Workbook
' Dim ws As Excel.Worksheet
wb = app.Workbooks.add()
'wb = app.Workbooks.Add()
ws = wb.ActiveSheet()
Dim dc As DataColumn
Dim dr As DataRow
Dim colIndex As Integer
Dim rowIndex As Integer
' Columns erstellen
For Each dc In aDataTable.Columns
colIndex += 1
app.Cells(1, colIndex) = dc.ColumnName
Next
' Rows hinzufügen
For Each dr In aDataTable.Rows
f.ProgressBar1.Value = rowIndex
rowIndex += 1
colIndex = 0
For Each dc In aDataTable.Columns
colIndex += 1
app.Cells(rowIndex + 1, colIndex) = dr(dc.ColumnName)
Next
Next
ws.Columns.AutoFit()
wb.SaveAs(aOutputFilename)
app.Workbooks.Open(aOutputFilename)
' Excel anzeigen wenn fertig exportiert
app.Visible = True
ws = Nothing
wb = Nothing
app = Nothing
f.Close()
Return True
Catch ex As Exception
f.Close()
MsgBox(ex.Message)
End Try
End Function
Private Sub PerosnAnzeigenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles PerosnAnzeigenToolStripMenuItem.Click
Dim f As New frmUebersichtRE(C1Daten.Columns("Personalnr").Value)
f.MdiParent = Me.MdiParent
f.Show()
End Sub
Private Sub FunktionstelleAnzeigenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles FunktionstelleAnzeigenToolStripMenuItem.Click
Dim f As New frmUebersichtRE(C1Daten.Columns("Funktionstellenr").Value)
f.MdiParent = Me.MdiParent
f.Show()
End Sub
Private Sub InaktivierenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles InaktivierenToolStripMenuItem.Click
If MsgBox("Temporäre Berechtigung inaktivieren?", vbYesNo) = MsgBoxResult.Yes Then
dc.Delete_temp_Berechtigung(C1Daten.Columns("NrTempBerechtigung").Value, Globals.clsmitarbeiter.iMitarbeiternr.Value)
Me.Refresh_Data()
End If
End Sub
Private Sub ContextMenuStrip1_Opening(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles ContextMenuStrip1.Opening
FunktionstelleAnzeigenToolStripMenuItem.Enabled = False
BerechtigungAnzeigenToolStripMenuItem.Enabled = False
PlattformAnzeigenToolStripMenuItem.Enabled = False
If C1Daten.Columns("Datatype").Value = "Funktionstelle" Then
FunktionstelleAnzeigenToolStripMenuItem.Enabled = True
End If
If C1Daten.Columns("Datatype").Value = "Berechtigung" Then
BerechtigungAnzeigenToolStripMenuItem.Enabled = True
End If
If C1Daten.Columns("Datatype").Value = "Plattform" Then
PlattformAnzeigenToolStripMenuItem.Enabled = True
End If
End Sub
Private Sub BerechtigungAnzeigenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles BerechtigungAnzeigenToolStripMenuItem.Click
Dim f As New frmUebersichtRE(C1Daten.Columns("Funktionstellenr").Value)
f.MdiParent = Me.MdiParent
f.Show()
End Sub
Private Sub PlattformAnzeigenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles PlattformAnzeigenToolStripMenuItem.Click
Dim f As New frmUebersichtRE(C1Daten.Columns("Funktionstellenr").Value)
f.MdiParent = Me.MdiParent
f.Show()
End Sub
Private Sub C1Daten_Click(sender As Object, e As EventArgs) Handles C1Daten.Click
End Sub
Private Sub C1Daten_MouseDown(sender As Object, e As MouseEventArgs) Handles C1Daten.MouseDown
Me.C1Daten.Bookmark = Me.C1Daten.RowContaining(e.Y)
End Sub
Private Sub C1Daten_FetchRowStyle(sender As Object, e As C1.Win.C1TrueDBGrid.FetchRowStyleEventArgs) Handles C1Daten.FetchRowStyle
Try
Dim d As DateTime = Me.C1Daten.Columns("Termin").CellValue(e.Row)
Dim tage As Integer = DateDiff(DateInterval.Day, d, Now) * -1
If tage > My.Settings.Tage Then
If My.Settings.Foreground_gueltig <> "" Then e.CellStyle.ForeColor = ColorTranslator.FromHtml(My.Settings.Foreground_gueltig)
End If
If tage >= 0 And tage <= My.Settings.Tage Then
If My.Settings.Foreground_vor_ablauf <> "" Then e.CellStyle.ForeColor = ColorTranslator.FromHtml(My.Settings.Foreground_vor_ablauf)
If My.Settings.Background_vor_ablauf <> "" Then e.CellStyle.BackColor = ColorTranslator.FromHtml(My.Settings.Background_vor_ablauf)
End If
If tage < 0 Then
If My.Settings.Foreground_abgelaufen <> "" Then e.CellStyle.ForeColor = ColorTranslator.FromHtml(My.Settings.Foreground_abgelaufen)
If My.Settings.Background_abgelaufen <> "" Then e.CellStyle.BackColor = ColorTranslator.FromHtml(My.Settings.Background_abgelaufen)
End If
If d < Now Then
If My.Settings.Foreground_abgelaufen <> "" Then e.CellStyle.ForeColor = ColorTranslator.FromHtml(My.Settings.Foreground_abgelaufen)
If My.Settings.Background_abgelaufen <> "" Then e.CellStyle.BackColor = ColorTranslator.FromHtml(My.Settings.Background_abgelaufen)
End If
Catch ex As Exception
End Try
End Sub
End Class

View File

@@ -0,0 +1,323 @@
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Imports System.IO
Imports System.Data.OleDb
Public Class clsExcelImport
Dim ofd As New OpenFileDialog
Dim MyMsg As New Utils.MyMessage
Dim Importdata As New DataSet
Public Function Import_Excel() As Boolean
ofd.Filter = "Excel-Dateien (*.xlsx)|*.xlsx|Excel-Dateien (*.xls)|*.xls|CSV-Dateien (*.csv)|*.csv|Text-Dateien (*.txt)|*.txt|Alle Dateien (*.*)|*.*"
If ofd.ShowDialog() = DialogResult.Cancel Then
Return False
End If
If ofd.FileName = "" Then Return False
FillDataTableFromText(ofd.FileName)
If Importdata.Tables.Count = 0 Then Return False
Return True
End Function
Private Function FillDataTableFromText(ByVal file As String) As DataTable
Select Case UCase(Microsoft.VisualBasic.Right(file, 3))
Case "CSV"
Dim csv As New MyNameSpace.CSVDataAdapter(file, True, ";")
csv.Fill(Importdata)
Importdata.Tables(0).TableName = "ImportData"
Case "TXT"
Dim csv As New MyNameSpace.CSVDataAdapter(file, True, ";")
csv.Fill(Importdata)
'Rel 4.03 3: Wenn die erste Spalte <> "Parternr" dann Meldung ausgeben und alle Rows löchen
If Importdata.Tables(0).Columns(0).ColumnName <> "Partnernr" Then
Importdata.Tables(0).Rows.Clear()
End If
Importdata.Tables(0).TableName = "ImportData"
Case "XLS"
If oledbimport(file, "XLS") Then
Importdata.Tables(0).TableName = "ImportData"
End If
Case "XLSX"
If oledbimport(file, "XLSX") Then
Importdata.Tables(0).TableName = "ImportData"
End If
End Select
If UCase(Microsoft.VisualBasic.Right(file, 5)) = ".XLSX" Then
If oledbimport(file, "XLSX") Then
Importdata.Tables(0).TableName = "ImportData"
End If
End If
Dim dv As DataRow
End Function
Private Function oledbimport(ByVal file As String, ByVal filetype As String) As Boolean
Dim dt As New DataTable()
Dim conn As OleDbConnection
Dim sql As String
Dim FileConnection As String
Dim oda As New OleDbDataAdapter()
Dim msg As String
Select Case filetype
Case "XLS"
Try
Dim xls As New XLSLib.clsXLSLib
dt = xls.Get_Excel(file)
Importdata.Tables.Add(dt)
Return True
Catch ex As Exception
'MsgBox(ex.Message)
End Try
Case "XLSX"
Try
Dim xls As New XLSLib.clsXLSLib
dt = xls.Get_Excel(file)
Importdata.Tables.Add(dt)
Return True
Catch ex As Exception
'MsgBox(ex.Message)
End Try
End Select
Try
Try
conn = New OleDbConnection()
conn.ConnectionString = FileConnection
conn.Open()
Catch ex As Exception
msg = ex.Message
End Try
oda = New OleDbDataAdapter(sql, conn)
oda.Fill(dt)
Importdata.Tables.Add(dt)
Return True
Catch ex As Exception
Return False
Finally
oda.Dispose()
conn.Dispose()
End Try
End Function
Private Function Get_Sheetname(ByVal excelfile As String) As String
Dim f As New frmExcelSheets
f.ExcelFile = excelfile
f.ShowDialog()
If f.DialogResult = Windows.Forms.DialogResult.OK Then
Return f.ExcelSheet
Else
Return ""
End If
End Function
Public Function Update_Data()
Dim f As New frmDatenverarbeitung
f.Show()
'f.TopMost = True
f.ProgressBar1.Minimum = 0
f.ProgressBar1.Maximum = Importdata.Tables(0).Rows.Count
f.ProgressBar1.Value = 0
f.txtResult.Text = "Personaldaten-Verarbeitung vom " + Now.ToShortDateString
f.txtResult.AppendText(vbCrLf + "Start: " + Now.ToShortTimeString)
f.txtResult.AppendText(vbCrLf + "----------------------")
f.txtResult.AppendText(vbCrLf)
Dim connection As New SqlConnection()
connection.ConnectionString = Globals.sConnectionString
Dim sqlcmd As New SqlCommand
sqlcmd.CommandText = "dbo.update_personal_from_excel"
sqlcmd.CommandType = CommandType.StoredProcedure
Dim ErrorsExist As Boolean = False
For Each dr As DataRow In Me.Importdata.Tables(0).Rows
sqlcmd.Parameters.Clear()
sqlcmd.Parameters.Add("@tgnummer", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@funktionstelle", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@Mutart", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@Name", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@Mutierer", SqlDbType.Int)
sqlcmd.Parameters.Add("@resultat", SqlDbType.VarChar)
sqlcmd.Parameters(0).Value = dr.Item(0)
sqlcmd.Parameters(1).Value = dr.Item(2)
sqlcmd.Parameters(2).Value = dr.Item(4)
sqlcmd.Parameters(3).Value = dr.Item(1)
sqlcmd.Parameters(4).Value = Globals.clsmitarbeiter.iMitarbeiternr.Value
sqlcmd.Parameters(5).Value = ""
sqlcmd.Parameters(5).Direction = ParameterDirection.Output
sqlcmd.Parameters(5).Size = 1024
sqlcmd.Connection = connection
connection.Open()
Try
sqlcmd.ExecuteNonQuery()
Dim s As String = sqlcmd.Parameters(5).Value
If s.IndexOf("Multiple::") > -1 Then
f.txtResult.AppendText(Update_Manually(dr, s))
Else
f.txtResult.AppendText(vbCrLf + sqlcmd.Parameters(5).Value)
If Microsoft.VisualBasic.Left(sqlcmd.Parameters(5).Value, 1) = "N" Then ErrorsExist = True
End If
Catch ex As Exception
f.txtResult.AppendText(vbCrLf + "Fehler: " + ex.Message)
Finally
connection.Close()
End Try
f.ProgressBar1.Value = f.ProgressBar1.Value + 1
Application.DoEvents()
Next
connection.Close()
sqlcmd.Dispose()
f.txtResult.AppendText(vbCrLf + "----------------------")
f.txtResult.AppendText(vbCrLf + "Ende: " + Now.ToShortTimeString)
f.ShowMessage(ErrorsExist)
End Function
Public Function Update_MassenData()
Dim f As New frmDatenverarbeitung
f.Show()
'f.TopMost = True
f.ProgressBar1.Minimum = 0
f.ProgressBar1.Maximum = Importdata.Tables(0).Rows.Count
f.ProgressBar1.Value = 0
f.txtResult.Text = "Massendaten-Verarbeitung vom " + Now.ToShortDateString
f.txtResult.AppendText(vbCrLf + "Start: " + Now.ToShortTimeString)
f.txtResult.AppendText(vbCrLf + "----------------------")
f.txtResult.AppendText(vbCrLf)
Dim connection As New SqlConnection()
connection.ConnectionString = Globals.sConnectionString
Dim sqlcmd As New SqlCommand
sqlcmd.CommandText = "dbo.update_massendaten"
sqlcmd.CommandType = CommandType.StoredProcedure
Dim ErrorsExist As Boolean = False
If Me.Importdata.Tables(0).Columns.Count < 21 Then
For i = Me.Importdata.Tables(0).Columns.Count + 1 To 21
Me.Importdata.Tables(0).Columns.Add("F" + i.ToString)
Next
End If
For Each dr As DataRow In Me.Importdata.Tables(0).Rows
sqlcmd.Parameters.Clear()
sqlcmd.Parameters.Add("@cmd", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@f1", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@f2", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@f3", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@f4", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@f5", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@f6", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@f7", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@f8", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@f9", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@f10", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@f11", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@f12", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@f13", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@f14", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@f15", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@f16", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@f17", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@f18", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@f19", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@f20", SqlDbType.VarChar)
sqlcmd.Parameters.Add("@Mutierer", SqlDbType.Int)
sqlcmd.Parameters.Add("@resultat", SqlDbType.VarChar)
sqlcmd.Parameters(0).Value = dr.Item(0).ToString
sqlcmd.Parameters(1).Value = dr.Item(1).ToString
sqlcmd.Parameters(2).Value = dr.Item(2).ToString
sqlcmd.Parameters(3).Value = dr.Item(3).ToString
sqlcmd.Parameters(4).Value = dr.Item(4).ToString
sqlcmd.Parameters(5).Value = dr.Item(5).ToString
sqlcmd.Parameters(6).Value = dr.Item(6).ToString
sqlcmd.Parameters(7).Value = dr.Item(7).ToString
sqlcmd.Parameters(8).Value = dr.Item(8).ToString
sqlcmd.Parameters(9).Value = dr.Item(9).ToString
sqlcmd.Parameters(10).Value = dr.Item(10).ToString
sqlcmd.Parameters(11).Value = dr.Item(11).ToString
sqlcmd.Parameters(12).Value = dr.Item(12).ToString
sqlcmd.Parameters(13).Value = dr.Item(13).ToString
sqlcmd.Parameters(14).Value = dr.Item(14).ToString
sqlcmd.Parameters(15).Value = dr.Item(15).ToString
sqlcmd.Parameters(16).Value = dr.Item(16).ToString
sqlcmd.Parameters(17).Value = dr.Item(17).ToString
sqlcmd.Parameters(18).Value = dr.Item(18).ToString
sqlcmd.Parameters(19).Value = dr.Item(19).ToString
sqlcmd.Parameters(20).Value = dr.Item(20).ToString
sqlcmd.Parameters(21).Value = Globals.clsmitarbeiter.iMitarbeiternr.Value
sqlcmd.Parameters(22).Value = ""
sqlcmd.Parameters(22).Direction = ParameterDirection.Output
sqlcmd.Parameters(22).Size = 1024
sqlcmd.Connection = connection
connection.Open()
Try
sqlcmd.ExecuteNonQuery()
Dim s As String = sqlcmd.Parameters(22).Value
f.txtResult.AppendText(vbCrLf + sqlcmd.Parameters(22).Value)
If Microsoft.VisualBasic.Left(sqlcmd.Parameters(22).Value, 1) = "N" Then ErrorsExist = True
Catch ex As Exception
f.txtResult.AppendText(vbCrLf + "Fehler: " + ex.Message)
ErrorsExist = True
Finally
connection.Close()
End Try
f.ProgressBar1.Value = f.ProgressBar1.Value + 1
Application.DoEvents()
Next
connection.Close()
sqlcmd.Dispose()
f.txtResult.AppendText(vbCrLf + "----------------------")
f.txtResult.AppendText(vbCrLf + "Ende: " + Now.ToShortTimeString)
f.ShowMessage(ErrorsExist)
End Function
Private Function Update_Manually(ByRef dr As DataRow, ByVal Resultattext As String) As String
Resultattext = Resultattext.Substring(10, Len(Resultattext) - 10)
Dim ma As String
Dim Fs As String
Dim dbc As New _DataClass.db.Personal
dbc.sConnectionString = Globals.sConnectionString
Dim dbf As New _DataClass.db.Funktionstelle
dbf.sConnectionString = Globals.sConnectionString
If dbc.get_mitarbeiter_by_tgnummer(dr.Item(0)) = True Then
ma = dbc.sTGNummer.Value + " " + dbc.sName.Value
End If
Dim dt As New DataTable
dt = dbc.get_funktionsbeziehungen(dbc.iPersonalnr)
dt.Columns.Add("Sel", System.Type.GetType("System.Int32"))
For Each r As DataRow In dt.Rows
r.Item(4) = 1
Next
If dbf.get_FunktionStelle_by_Funktionstelle(dr.Item(2)) Then
Dim r As DataRow = dt.NewRow
r.Item(0) = -1
r.Item(1) = dbf.iFunktionstelleNr.Value
r.Item(2) = dbf.sFunktionsstelle.Value
r.Item(3) = dbf.sBezeichnung.Value
r.Item(4) = 0
dt.Rows.Add(r)
End If
Dim f As New frmUpdate(ma, dt)
f.ShowDialog()
If f.DialogResult = DialogResult.Abort Then
Resultattext = vbCrLf + "NOK: " + Resultattext + "Manueller Abgleich durch Benutzer abgebrochen"
Else
Dim dbpf As New _DataClass.db.Personal_Funktionstelle
dbpf.sConnectionString = Globals.sConnectionString
For i = 0 To f.clb.Items.Count - 1
dbpf.Update_Data(dt.Rows(i).Item(0), dbc.iPersonalnr.Value, dt.Rows(i).Item(1), f.clb.GetItemCheckState(i))
Next
Resultattext = vbCrLf + "OK: " + Resultattext + "Manueller Abgleich durchgeführt"
End If
Return Resultattext
End Function
End Class

View File

@@ -0,0 +1,121 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmDatenverarbeitung
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmDatenverarbeitung))
Me.ProgressBar1 = New System.Windows.Forms.ProgressBar()
Me.txtResult = New System.Windows.Forms.TextBox()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.GroupBox2 = New System.Windows.Forms.GroupBox()
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
Me.TSBtnQuit = New System.Windows.Forms.ToolStripButton()
Me.GroupBox1.SuspendLayout()
Me.GroupBox2.SuspendLayout()
Me.ToolStrip1.SuspendLayout()
Me.SuspendLayout()
'
'ProgressBar1
'
Me.ProgressBar1.Location = New System.Drawing.Point(6, 19)
Me.ProgressBar1.Name = "ProgressBar1"
Me.ProgressBar1.Size = New System.Drawing.Size(656, 23)
Me.ProgressBar1.TabIndex = 0
'
'txtResult
'
Me.txtResult.Dock = System.Windows.Forms.DockStyle.Fill
Me.txtResult.Font = New System.Drawing.Font("Courier New", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtResult.Location = New System.Drawing.Point(3, 16)
Me.txtResult.Multiline = True
Me.txtResult.Name = "txtResult"
Me.txtResult.Size = New System.Drawing.Size(662, 197)
Me.txtResult.TabIndex = 1
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.ProgressBar1)
Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Top
Me.GroupBox1.Location = New System.Drawing.Point(0, 25)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(668, 57)
Me.GroupBox1.TabIndex = 2
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Fortschritt"
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.txtResult)
Me.GroupBox2.Dock = System.Windows.Forms.DockStyle.Fill
Me.GroupBox2.Location = New System.Drawing.Point(0, 82)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(668, 216)
Me.GroupBox2.TabIndex = 3
Me.GroupBox2.TabStop = False
Me.GroupBox2.Text = "Resultat"
'
'ToolStrip1
'
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TSBtnQuit})
Me.ToolStrip1.Location = New System.Drawing.Point(0, 0)
Me.ToolStrip1.Name = "ToolStrip1"
Me.ToolStrip1.Size = New System.Drawing.Size(668, 25)
Me.ToolStrip1.TabIndex = 4
Me.ToolStrip1.Text = "ToolStrip1"
'
'TSBtnQuit
'
Me.TSBtnQuit.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
Me.TSBtnQuit.Image = CType(resources.GetObject("TSBtnQuit.Image"), System.Drawing.Image)
Me.TSBtnQuit.ImageTransparentColor = System.Drawing.Color.Magenta
Me.TSBtnQuit.Name = "TSBtnQuit"
Me.TSBtnQuit.Size = New System.Drawing.Size(23, 22)
Me.TSBtnQuit.Text = "ToolStripButton1"
Me.TSBtnQuit.ToolTipText = "Anwendung beenden"
'
'frmDatenverarbeitung
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(668, 298)
Me.Controls.Add(Me.GroupBox2)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.ToolStrip1)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Name = "frmDatenverarbeitung"
Me.Text = "Verarbeitung"
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox2.ResumeLayout(False)
Me.GroupBox2.PerformLayout()
Me.ToolStrip1.ResumeLayout(False)
Me.ToolStrip1.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents ProgressBar1 As System.Windows.Forms.ProgressBar
Friend WithEvents txtResult As System.Windows.Forms.TextBox
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
Friend WithEvents ToolStrip1 As System.Windows.Forms.ToolStrip
Friend WithEvents TSBtnQuit As System.Windows.Forms.ToolStripButton
End Class

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,37 @@
Public Class frmDatenverarbeitung
Private Sub TSBtnQuit_Click(sender As Object, e As EventArgs) Handles TSBtnQuit.Click
Me.Close()
End Sub
Public Sub ShowMessage(ByVal ErrorsExist As Boolean)
If ErrorsExist = True Then
MsgBox("Verarbeitung mit Fehlern durchgeführt.", MsgBoxStyle.Exclamation)
Else
MsgBox("Verarbeitung fehlerfrei durchgeführt.", MsgBoxStyle.Information)
End If
End Sub
Private Sub frmDatenverarbeitung_Load(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub
Private Sub txtResult_KeyDown(sender As Object, e As KeyEventArgs) Handles txtResult.KeyDown
Select Case e.KeyCode
Case Keys.A : If e.Control Then Me.txtResult.SelectAll()
Case Keys.C : If e.Control Then
Me.txtResult.Copy()
End If
' Case 65 : If e.Control Then e.SuppressKeyPress = False Else e.SuppressKeyPress = True 'STRG+S
' Case 67 : If e.Control Then e.SuppressKeyPress = False Else e.SuppressKeyPress = True 'STRG+C
' Case 86 : If e.Control Then e.SuppressKeyPress = False Else e.SuppressKeyPress = True 'STRG+V
' Case Else : e.SuppressKeyPress = True
End Select
End Sub
Private Sub txtResult_TextChanged(sender As Object, e As EventArgs) Handles txtResult.TextChanged
End Sub
End Class

View File

@@ -0,0 +1,72 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmExcelSheets
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.lstSheets = New System.Windows.Forms.ListBox
Me.BtnOK = New System.Windows.Forms.Button
Me.BtnAbbruch = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'lstSheets
'
Me.lstSheets.FormattingEnabled = True
Me.lstSheets.Location = New System.Drawing.Point(12, 32)
Me.lstSheets.Name = "lstSheets"
Me.lstSheets.Size = New System.Drawing.Size(220, 134)
Me.lstSheets.TabIndex = 0
'
'BtnOK
'
Me.BtnOK.Location = New System.Drawing.Point(12, 193)
Me.BtnOK.Name = "BtnOK"
Me.BtnOK.Size = New System.Drawing.Size(75, 23)
Me.BtnOK.TabIndex = 1
Me.BtnOK.Text = "Auswählen"
Me.BtnOK.UseVisualStyleBackColor = True
'
'BtnAbbruch
'
Me.BtnAbbruch.Location = New System.Drawing.Point(157, 193)
Me.BtnAbbruch.Name = "BtnAbbruch"
Me.BtnAbbruch.Size = New System.Drawing.Size(75, 23)
Me.BtnAbbruch.TabIndex = 2
Me.BtnAbbruch.Text = "Abbruch"
Me.BtnAbbruch.UseVisualStyleBackColor = True
'
'frmExcelSheets
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(254, 228)
Me.Controls.Add(Me.BtnAbbruch)
Me.Controls.Add(Me.BtnOK)
Me.Controls.Add(Me.lstSheets)
Me.Name = "frmExcelSheets"
Me.Text = "Auswahl Excel-Blatt"
Me.ResumeLayout(False)
End Sub
Friend WithEvents lstSheets As System.Windows.Forms.ListBox
Friend WithEvents BtnOK As System.Windows.Forms.Button
Friend WithEvents BtnAbbruch As System.Windows.Forms.Button
End Class

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
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">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<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" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</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>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,47 @@
Public Class frmExcelSheets
Dim m_excelsheet As String
Property ExcelSheet() As String
Get
Return m_excelsheet
End Get
Set(ByVal value As String)
m_excelsheet = value
End Set
End Property
Dim m_excelfile As String
Property ExcelFile() As String
Get
Return m_excelfile
End Get
Set(ByVal value As String)
m_excelfile = value
End Set
End Property
Private Sub frmExcelSheets_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim intxls As New Microsoft.Office.Interop.Excel.Application
intxls.Workbooks.Open(ExcelFile)
For Each s As Microsoft.Office.Interop.Excel.Worksheet In intxls.ActiveWorkbook.Sheets
Me.lstSheets.Items.Add(s.Name)
Next
intxls.ActiveWorkbook.Close(False)
intxls.Quit()
intxls = Nothing
End Sub
Private Sub BtnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnOK.Click
Me.ExcelSheet = "[" & Me.lstSheets.SelectedItem & "$]"
Me.DialogResult = Windows.Forms.DialogResult.OK
Me.Close()
End Sub
Private Sub BtnAbbruch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnAbbruch.Click
Me.DialogResult = Windows.Forms.DialogResult.Cancel
Me.Close()
End Sub
Private Sub lstSheets_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstSheets.DoubleClick
BtnOK_Click(sender, e)
End Sub
End Class

View File

@@ -0,0 +1,109 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmUpdate
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.lblMitarbeiter = New System.Windows.Forms.Label()
Me.txtMitarbeiter = New System.Windows.Forms.Label()
Me.clb = New System.Windows.Forms.CheckedListBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.btnSave = New System.Windows.Forms.Button()
Me.btnCancel = New System.Windows.Forms.Button()
Me.SuspendLayout()
'
'lblMitarbeiter
'
Me.lblMitarbeiter.AutoSize = True
Me.lblMitarbeiter.Location = New System.Drawing.Point(12, 36)
Me.lblMitarbeiter.Name = "lblMitarbeiter"
Me.lblMitarbeiter.Size = New System.Drawing.Size(59, 13)
Me.lblMitarbeiter.TabIndex = 0
Me.lblMitarbeiter.Text = "Mitarbeiter:"
'
'txtMitarbeiter
'
Me.txtMitarbeiter.AutoSize = True
Me.txtMitarbeiter.Location = New System.Drawing.Point(77, 36)
Me.txtMitarbeiter.Name = "txtMitarbeiter"
Me.txtMitarbeiter.Size = New System.Drawing.Size(39, 13)
Me.txtMitarbeiter.TabIndex = 1
Me.txtMitarbeiter.Text = "Label2"
'
'clb
'
Me.clb.FormattingEnabled = True
Me.clb.Location = New System.Drawing.Point(12, 82)
Me.clb.Name = "clb"
Me.clb.Size = New System.Drawing.Size(279, 94)
Me.clb.TabIndex = 2
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(12, 9)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(244, 13)
Me.Label1.TabIndex = 3
Me.Label1.Text = "Mitarbeiter mit mehreren Berechtigungszuteilungen"
'
'btnSave
'
Me.btnSave.Location = New System.Drawing.Point(12, 191)
Me.btnSave.Name = "btnSave"
Me.btnSave.Size = New System.Drawing.Size(75, 23)
Me.btnSave.TabIndex = 4
Me.btnSave.Text = "&Speichern"
Me.btnSave.UseVisualStyleBackColor = True
'
'btnCancel
'
Me.btnCancel.Location = New System.Drawing.Point(216, 191)
Me.btnCancel.Name = "btnCancel"
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
Me.btnCancel.TabIndex = 5
Me.btnCancel.Text = "&Abbruch"
Me.btnCancel.UseVisualStyleBackColor = True
'
'frmUpdate
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(302, 230)
Me.Controls.Add(Me.btnCancel)
Me.Controls.Add(Me.btnSave)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.clb)
Me.Controls.Add(Me.txtMitarbeiter)
Me.Controls.Add(Me.lblMitarbeiter)
Me.Name = "frmUpdate"
Me.Text = "Datenupdate"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents lblMitarbeiter As System.Windows.Forms.Label
Friend WithEvents txtMitarbeiter As System.Windows.Forms.Label
Friend WithEvents clb As System.Windows.Forms.CheckedListBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents btnSave As System.Windows.Forms.Button
Friend WithEvents btnCancel As System.Windows.Forms.Button
End Class

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
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">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<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" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</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>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,45 @@
Public Class frmUpdate
Dim ma As String
Dim dt As DataTable
Sub New()
' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
End Sub
Sub New(ByVal Mitarbeiter As String, ByVal dt As DataTable)
InitializeComponent()
Me.ma = Mitarbeiter
Me.dt = dt
End Sub
Private Sub frmUpdate_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.txtMitarbeiter.Text = ma
For Each r In dt.Rows
Dim s As String
If r.item(4) = 1 Then
s = Str(r.item(2)) + " - " + r.item(3)
clb.Items.Add(s, True)
Else
s = r.item(2) + " - " + r.item(3)
clb.Items.Add(s, False)
End If
Next
End Sub
Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
Me.DialogResult = Windows.Forms.DialogResult.Abort
Me.Close()
End Sub
Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
Me.DialogResult = Windows.Forms.DialogResult.OK
Me.Close()
End Sub
End Class

105
BEA - Kopie (2)/Form1.Designer.vb generated Normal file
View File

@@ -0,0 +1,105 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.TreeViewAdv1 = New Aga.Controls.Tree.TreeViewAdv()
Me.AdvTree2 = New DevComponents.AdvTree.AdvTree()
Me.Node2 = New DevComponents.AdvTree.Node()
Me.NodeConnector2 = New DevComponents.AdvTree.NodeConnector()
Me.ElementStyle2 = New DevComponents.DotNetBar.ElementStyle()
CType(Me.AdvTree2, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'TreeViewAdv1
'
Me.TreeViewAdv1.BackColor = System.Drawing.SystemColors.Window
Me.TreeViewAdv1.Cursor = System.Windows.Forms.Cursors.Default
Me.TreeViewAdv1.DragDropMarkColor = System.Drawing.Color.Black
Me.TreeViewAdv1.LineColor = System.Drawing.SystemColors.ControlDark
Me.TreeViewAdv1.Location = New System.Drawing.Point(-16, 12)
Me.TreeViewAdv1.Model = Nothing
Me.TreeViewAdv1.Name = "TreeViewAdv1"
Me.TreeViewAdv1.SelectedNode = Nothing
Me.TreeViewAdv1.Size = New System.Drawing.Size(229, 169)
Me.TreeViewAdv1.TabIndex = 0
Me.TreeViewAdv1.Text = "TreeViewAdv1"
'
'AdvTree2
'
Me.AdvTree2.AccessibleRole = System.Windows.Forms.AccessibleRole.Outline
Me.AdvTree2.AllowDrop = True
Me.AdvTree2.BackColor = System.Drawing.SystemColors.Window
'
'
'
Me.AdvTree2.BackgroundStyle.Class = "TreeBorderKey"
Me.AdvTree2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square
Me.AdvTree2.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F"
Me.AdvTree2.Location = New System.Drawing.Point(52, 188)
Me.AdvTree2.Name = "AdvTree2"
Me.AdvTree2.Nodes.AddRange(New DevComponents.AdvTree.Node() {Me.Node2})
Me.AdvTree2.NodesConnector = Me.NodeConnector2
Me.AdvTree2.NodeStyle = Me.ElementStyle2
Me.AdvTree2.PathSeparator = ";"
Me.AdvTree2.Size = New System.Drawing.Size(100, 100)
Me.AdvTree2.Styles.Add(Me.ElementStyle2)
Me.AdvTree2.TabIndex = 1
Me.AdvTree2.Text = "AdvTree2"
'
'Node2
'
Me.Node2.Expanded = True
Me.Node2.Name = "Node2"
Me.Node2.Text = "Node2"
'
'NodeConnector2
'
Me.NodeConnector2.LineColor = System.Drawing.SystemColors.ControlText
'
'ElementStyle2
'
Me.ElementStyle2.CornerType = DevComponents.DotNetBar.eCornerType.Square
Me.ElementStyle2.Name = "ElementStyle2"
Me.ElementStyle2.TextColor = System.Drawing.SystemColors.ControlText
'
'Form1
'
Me.ClientSize = New System.Drawing.Size(284, 261)
Me.Controls.Add(Me.AdvTree2)
Me.Controls.Add(Me.TreeViewAdv1)
Me.Name = "Form1"
CType(Me.AdvTree2, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
Friend WithEvents AdvTree1 As DevComponents.AdvTree.AdvTree
Friend WithEvents Node1 As DevComponents.AdvTree.Node
Friend WithEvents NodeConnector1 As DevComponents.AdvTree.NodeConnector
Friend WithEvents ElementStyle1 As DevComponents.DotNetBar.ElementStyle
Friend WithEvents ComboBoxEx1 As DevComponents.DotNetBar.Controls.ComboBoxEx
Friend WithEvents TreeViewAdv1 As Aga.Controls.Tree.TreeViewAdv
Friend WithEvents AdvTree2 As DevComponents.AdvTree.AdvTree
Friend WithEvents Node2 As DevComponents.AdvTree.Node
Friend WithEvents NodeConnector2 As DevComponents.AdvTree.NodeConnector
Friend WithEvents ElementStyle2 As DevComponents.DotNetBar.ElementStyle
End Class

120
BEA - Kopie (2)/Form1.resx Normal file
View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
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">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<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" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</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>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

3
BEA - Kopie (2)/Form1.vb Normal file
View File

@@ -0,0 +1,3 @@
Public Class Form1
End Class

View File

@@ -0,0 +1,37 @@
Public Class FilterClass
Dim m_columname As String
Dim m_filtervalue As String
Property Columname() As String
Get
Return m_columname
End Get
Set(ByVal value As String)
m_columname = value
End Set
End Property
Property FilterValue() As String
Get
Return m_filtervalue
End Get
Set(ByVal value As String)
m_filtervalue = value
End Set
End Property
Sub New(ByVal columname As String, ByVal filtervalue As String)
MyBase.New()
Me.Columname = columname
Me.FilterValue = filtervalue
End Sub
Sub New()
MyBase.New()
End Sub
Public Sub add(ByVal columname As String, ByVal filtervalue As String)
Me.Columname = columname
Me.FilterValue = filtervalue
End Sub
End Class

View File

@@ -0,0 +1,427 @@
Imports C1.Win.C1TrueDBGrid
Imports System
Imports System.IO
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Imports System.Diagnostics
''' <summary>
''' Namesace TKB.VV.Utils fasst die Utility-Klassen für die Vertragsverwaltung
''' zusammen.
''' </summary>
''' <includesource>yes</includesource>
''' <seealso cref="T:Vertragsverwaltung.TKB.VV.Utils.clsMyTabControl"></seealso>
''' <seealso cref="T:Vertragsverwaltung.TKB.VV.Utils.clsProfile"></seealso>
''' <seealso cref="T:Vertragsverwaltung.TKB.VV.Utils.MyDocMgmt"></seealso>
''' <seealso cref="T:Vertragsverwaltung.TKB.VV.Utils.MyFormControls"></seealso>
''' <seealso cref="T:Vertragsverwaltung.TKB.VV.Utils.MyMessage"></seealso>
''' <seealso cref="T:Vertragsverwaltung.TKB.VV.Utils.MySecurity"></seealso>
''' <seealso cref="T:Vertragsverwaltung.TKB.VV.Utils.MySpaltenTitel"></seealso>
''' <seealso cref="T:Vertragsverwaltung.TKB.VV.Utils.Tabellenspalte"></seealso>
Namespace TKB.VV.Utils
''' <summary>
''' Klasse für das Speichern bzw. Auslesen von Image-Dateien in der Datenbank
''' </summary>
''' <remarks>
''' Es werden folgende Datebanktabellen berücksichtigt:
''' <list type="bullet">
''' <item>
''' <description>Dokument Attribut DocImage</description></item>
''' <item>
''' <description>Profile Attribut V_Uebersicht (Profillayout des C1TrueDBGrids der
''' Vertragsübersicht|Vertragselemente</description></item></list>
''' </remarks>
''' <includesource>yes</includesource>
Public Class MyDocMgmt
''' <summary>
''' Grid-Layoutfile speichern
''' </summary>
''' <param name="c1data">C1Truedbgrind, von welchem das Layout gespeichert werden soll</param>
''' <param name="GriddNo">Nummer des Grids: 1=Vertragsübersicht...</param>
''' <returns></returns>
''' <remarks></remarks>
Public Function Save_LayoutFile(ByRef c1data As C1TrueDBGrid, ByVal GridNo As Integer, ByVal Profilnr As Integer) As Boolean
Dim filename As String = Globals.clsapplication.sTmp_filepath + Trim(Str(Profilnr)) + Trim(Str(GridNo)) + ".lyt"
c1data.SaveLayout(filename)
Dim Connection As New SqlConnection()
Dim DA As New SqlDataAdapter("select * from profil where profilnr = " & Str(Profilnr), Connection)
'mitarbeiternr=" + Str(Globals.clsmitarbeiter.iMitarbeiternr.Value)
Dim cb As SqlCommandBuilder = New SqlCommandBuilder(DA)
Dim ds As New DataSet()
Dim fs As New FileStream(filename, FileMode.OpenOrCreate, FileAccess.Read)
Dim mydata(fs.Length) As Byte
fs.Read(mydata, 0, fs.Length)
fs.Close()
Try
Connection.ConnectionString = Globals.sConnectionString
Connection.Open()
DA.Fill(ds, "profil")
Dim myRow As DataRow
If ds.Tables(0).Rows.Count = 0 Then
' Neues Profil sepeichern
myRow = ds.Tables(0).NewRow
myRow.Item(1) = Globals.clsmitarbeiter.iMitarbeiternr.Value
myRow.Item(2) = ""
Select Case GridNo
Case 1
myRow.Item(3) = mydata
End Select
ds.Tables(0).Rows.Add(myRow)
DA.Update(ds, "profil")
Else
myRow = ds.Tables(0).Rows(0)
Select Case GridNo
Case 1
myRow.Item(3) = mydata
End Select
DA.Update(ds, "profil")
End If
Catch ex As Exception
MsgBox(ex.Message)
Return False
End Try
fs = Nothing
cb = Nothing
ds = Nothing
DA = Nothing
Connection.Close()
Connection = Nothing
Return True
End Function
Private Function Get_Layoutfile_from_db(ByVal filename As String, ByVal GridNo As Integer, ByVal Profilnr As Integer) As Boolean
'Exit Function
Dim connection As New SqlConnection()
Dim da As New SqlDataAdapter("Select * From profil where profilnr=" & Str(Profilnr), connection)
'mitarbeiternr=" + Str(Globals.clsmitarbeiter.iMitarbeiternr.Value)
Dim CB As SqlCommandBuilder = New SqlCommandBuilder(da)
Dim ds As New DataSet()
Try
connection.ConnectionString = Globals.sConnectionString
connection.Open()
da.Fill(ds, "docs")
Dim myRow As DataRow
myRow = ds.Tables(0).Rows(0)
Dim MyData() As Byte
Select Case GridNo
Case 1
MyData = myRow.Item(3)
End Select
Dim K As Long
K = UBound(MyData)
Dim fs As New FileStream(filename, FileMode.OpenOrCreate, FileAccess.Write)
fs.Write(MyData, 0, K)
fs.Close()
fs = Nothing
Return True
Catch ex As Exception
Return False
End Try
CB = Nothing
ds = Nothing
da = Nothing
connection.Close()
connection = Nothing
Return True
End Function
Public Function Get_Layout(ByRef c1data As C1TrueDBGrid, ByVal GridNo As Integer, ByVal Profilnr As Integer) As Boolean
Dim filename As String = Globals.clsapplication.sTmp_filepath + Trim(Str(Profilnr)) + Trim(Str(GridNo)) + ".lyt"
If File.Exists(filename) Then
c1data.LoadLayout(filename)
Return True
End If
If Get_Layoutfile_from_db(filename, GridNo, Profilnr) Then
c1data.LoadLayout(filename)
Return True
End If
Return False
End Function
''' <summary>
''' Dokument in der Tabelle Dokument speichern
''' </summary>
''' <param name="Dokumentnr">Nummer des Dokument-Datensatzes</param>
''' <param name="Filename">Zu speichender Dateiname</param>
''' <returns></returns>
''' <remarks></remarks>
Public Function Save_Document(ByVal Dokumentnr As Integer, ByVal Filename As String) As Boolean
Dim Connection As New SqlConnection()
Dim DA As New SqlDataAdapter("select * from dokument where dokumentnr =" + Str(dokumentnr), Connection)
Dim cb As SqlCommandBuilder = New SqlCommandBuilder(DA)
Dim ds As New DataSet()
Dim fs As New FileStream(filename, FileMode.OpenOrCreate, FileAccess.Read)
Dim mydata(fs.Length) As Byte
fs.Read(mydata, 0, fs.Length)
fs.Close()
Try
Connection.ConnectionString = Globals.sConnectionString
Connection.Open()
DA.Fill(ds, "Dokument")
Dim myRow As DataRow
If ds.Tables(0).Rows.Count = 0 Then
Return False
Else
myRow = ds.Tables(0).Rows(0)
myRow.Item(16) = mydata
DA.Update(ds, "Dokument")
End If
Catch ex As Exception
MsgBox(ex.Message)
Return False
End Try
fs = Nothing
cb = Nothing
ds = Nothing
DA = Nothing
Connection.Close()
Connection = Nothing
Return True
End Function
''' <summary>
''' Liest das Dokument aus der DB und speichert dieses unter einem temporären Filenamen ab
''' </summary>
''' <param name="DokumentNr"></param>
''' <returns></returns>
''' <remarks></remarks>
Public Function Get_Dokument(ByVal DokumentNr As Integer) As String
Dim Filename As String = Globals.clsapplication.sTmp_filepath
If Right(Filename, 1) <> "\" Then Filename = Filename + "\"
Dim connection As New SqlConnection()
Dim da As New SqlDataAdapter("Select * From Dokument where DokumentNr=" + Str(DokumentNr), connection)
Dim CB As SqlCommandBuilder = New SqlCommandBuilder(da)
Dim ds As New DataSet()
Try
connection.ConnectionString = Globals.sConnectionString
connection.Open()
da.Fill(ds, "Dokument")
Dim myRow As DataRow
myRow = ds.Tables(0).Rows(0)
Dim MyData() As Byte
MyData = myRow.Item(16)
Dim K As Long
K = UBound(MyData)
Filename = Filename + myRow.Item(6)
Dim fs As New FileStream(Filename, FileMode.OpenOrCreate, FileAccess.Write)
fs.Write(MyData, 0, K)
fs.Close()
fs = Nothing
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical)
Return ""
Finally
connection.Close()
connection = Nothing
End Try
CB = Nothing
ds = Nothing
da = Nothing
Return Filename
End Function
Public Function Show_Document(ByVal Dokumentnr As Integer) As Boolean
Dim tmpfilename As String = Me.Get_Dokument(Dokumentnr)
If tmpfilename <> "" Then
OpenSystemFile(tmpfilename)
Return True
End If
Return False
End Function
Public Function OpenSystemFile(ByVal sFileName As String) As Boolean
If Len(sFileName) > 0 Then
System.Diagnostics.Process.Start(sFileName)
'
' ShellExecute(GetDesktopWindow(), vbNullString, sFileName, vbNullString, vbNullString, vbNormalFocus)
Return True
End If
End Function
Public Function Save_RptDatei(ByVal Auswertungnr As Integer, ByVal AuswertungName As String) As String
Dim filename As String = AuswertungName
Dim Connection As New SqlConnection()
Dim DA As New SqlDataAdapter("select * from AuswertungRptDatei where AuswertungDateiNr = " & Str(Auswertungnr), Connection)
Dim cb As SqlCommandBuilder = New SqlCommandBuilder(DA)
Dim ds As New DataSet()
Dim fs As New FileStream(filename, FileMode.OpenOrCreate, FileAccess.Read)
Dim mydata(fs.Length) As Byte
fs.Read(mydata, 0, fs.Length)
fs.Close()
Try
Connection.ConnectionString = Globals.sConnectionString
Connection.Open()
DA.Fill(ds, "RptFile")
Dim myRow As DataRow
If ds.Tables(0).Rows.Count = 0 Then
' Neues Datei speichern
myRow = ds.Tables(0).NewRow
myRow.Item(0) = Auswertungnr
myRow.Item(1) = AuswertungName
myRow.Item(2) = RptName(AuswertungName)
myRow.Item(3) = mydata
myRow.Item(4) = Now
myRow.Item(5) = Now
myRow.Item(6) = Globals.clsmitarbeiter.iMitarbeiternr.Value
ds.Tables(0).Rows.Add(myRow)
DA.Update(ds, "RptFile")
Else
myRow = ds.Tables(0).Rows(0)
myRow.Item(1) = AuswertungName
myRow.Item(2) = RptName(AuswertungName)
myRow.Item(3) = mydata
myRow.Item(5) = Now
myRow.Item(6) = Globals.clsmitarbeiter.iMitarbeiternr.Value
DA.Update(ds, "RptFile")
End If
Catch ex As Exception
MsgBox(ex.Message)
Return False
End Try
fs = Nothing
cb = Nothing
ds = Nothing
DA = Nothing
Connection.Close()
Connection = Nothing
Return RptName(AuswertungName)
End Function
Public Function RptName(ByVal path As String) As String
Dim i As Integer
Dim file As String = path
i = InStrRev(file.Trim, "\")
If i = 0 Then
Return file.Trim
Else
Return Right(file.Trim, Len(file.Trim) - i)
End If
End Function
Public Function Get_RptDatei(ByVal Auswertungnr As String, Optional ByVal fname As String = "") As String
Dim connection As New SqlConnection()
Dim DA As New SqlDataAdapter("select * from AuswertungRptDatei where AuswertungDateiNr = " & Str(Auswertungnr), connection)
Dim CB As SqlCommandBuilder = New SqlCommandBuilder(DA)
Dim ds As New DataSet()
Dim Filename As String = ""
Try
connection.ConnectionString = Globals.sConnectionString
connection.Open()
DA.Fill(ds, "RptFile")
Dim myRow As DataRow
myRow = ds.Tables(0).Rows(0)
Dim MyData() As Byte
Filename = Globals.clsapplication.sTmp_filepath + "\" + myRow.Item(2).ToString
If fname <> "" Then
Filename = fname
End If
MyData = myRow.Item(3)
Dim K As Long
K = UBound(MyData)
Dim fs As New FileStream(Filename, FileMode.OpenOrCreate, FileAccess.Write)
fs.Write(MyData, 0, K)
fs.Close()
fs = Nothing
Catch ex As Exception
Return ""
End Try
CB = Nothing
ds = Nothing
DA = Nothing
connection.Close()
connection = Nothing
Return filename
End Function
Public Function Save_Architekturfile(ByVal Applikationnr As Integer, ByVal iFilename As String)
Dim filename As String = iFilename
Dim Connection As New SqlConnection()
Dim DA As New SqlDataAdapter("select * from ApplikationArchitektur where applikationnr = " & Str(Applikationnr), Connection)
Dim cb As SqlCommandBuilder = New SqlCommandBuilder(DA)
Dim ds As New DataSet()
Dim fs As New FileStream(filename, FileMode.OpenOrCreate, FileAccess.Read)
Dim mydata(fs.Length) As Byte
fs.Read(mydata, 0, fs.Length)
fs.Close()
Try
Connection.ConnectionString = Globals.sConnectionString
Connection.Open()
DA.Fill(ds, "RptFile")
Dim myRow As DataRow
If ds.Tables(0).Rows.Count = 0 Then
' Neues Datei speichern
myRow = ds.Tables(0).NewRow
myRow.Item(0) = Applikationnr
myRow.Item(1) = mydata
' myRow.Item(4) = Now
' myRow.Item(5) = Now
' myRow.Item(6) = Globals.clsmitarbeiter.iMitarbeiternr.Value
ds.Tables(0).Rows.Add(myRow)
DA.Update(ds, "RptFile")
Else
myRow = ds.Tables(0).Rows(0)
myRow.Item(1) = mydata
' myRow.Item(2) = RptName(AuswertungName)
' myRow.Item(3) = mydata
' myRow.Item(5) = Now
' myRow.Item(6) = Globals.clsmitarbeiter.iMitarbeiternr.Value
DA.Update(ds, "RptFile")
End If
Catch ex As Exception
MsgBox(ex.Message)
Return False
End Try
fs = Nothing
cb = Nothing
ds = Nothing
DA = Nothing
Connection.Close()
Connection = Nothing
End Function
Public Function Get_Architekturfile(ByVal Applikationnr As String, Optional ByVal fname As String = "") As String
Dim connection As New SqlConnection()
Dim DA As New SqlDataAdapter("select * from ApplikationArchitektur where applikationnr = " & Str(Applikationnr), connection)
Dim CB As SqlCommandBuilder = New SqlCommandBuilder(DA)
Dim ds As New DataSet()
Dim Filename As String = ""
Try
connection.ConnectionString = Globals.sConnectionString
connection.Open()
DA.Fill(ds, "RptFile")
Dim myRow As DataRow
myRow = ds.Tables(0).Rows(0)
Dim MyData() As Byte
Filename = Globals.clsapplication.sTmp_filepath + "\architekturfile.xml"
If fname <> "" Then
Filename = fname
End If
MyData = myRow.Item(1)
Dim K As Long
K = UBound(MyData)
Dim fs As New FileStream(Filename, FileMode.OpenOrCreate, FileAccess.Write)
fs.Write(MyData, 0, K)
fs.Close()
fs = Nothing
Catch ex As Exception
Return ""
End Try
CB = Nothing
ds = Nothing
DA = Nothing
connection.Close()
connection = Nothing
Return Filename
End Function
End Class
End Namespace

View File

@@ -0,0 +1,228 @@
Imports System.IO
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace Utils
''' <summary>
''' Standard-Messages in div. Formatenm
''' </summary>
''' <remarks></remarks>
Public Class MyMessage
#Region "Deklarationen"
''' <summary>
''' Dataview Meldungstexte um Textelemente für die Ausgabe zu suchen
''' </summary>
''' <remarks></remarks>
Private meldungstexte As New DataView()
#End Region
#Region "Dispose"
Sub dispose()
meldungstexte.Dispose()
End Sub
#End Region
#Region "DBZugriffe"
''' <summary>
''' Meldungen aus der Datenbanklesen, sofern diese noch nicht ausgelesen worden sind. Nach dem ersten Lesen werden
''' die Daten aus der Tabelle Meldungstexte ohne erneutem DB-Zugriff verwendet
''' </summary>
''' <param name="i"></param>
''' <returns></returns>
''' <remarks></remarks>
Public Function Get_Meldungstext(ByVal i As Integer) As String
Dim meldungen As New DB.clsMeldungstexte
Dim res As Integer
meldungen.cpMainConnectionProvider = conn
If Me.meldungstexte.Count = 0 Then
Me.meldungstexte.Table = meldungen.SelectAll
End If
meldungstexte.Sort = "meldungstextnr"
res = meldungstexte.Find(i)
Try
Get_Meldungstext = Me.meldungstexte(res).Item(2)
Catch
Get_Meldungstext = ""
End Try
meldungen.Dispose()
End Function
#End Region
#Region "Meldungen"
''' <summary>
''' Standardmessage
''' </summary>
''' <param name="i">Messagenr</param>
''' <param name="typ">Messagetyp</param>
''' <returns></returns>
''' <remarks></remarks>
Public Function show_standardmessage(ByVal i As Integer, ByVal typ As MsgBoxStyle) As Integer
Me.ShowMyDialog(Get_Meldungstext(i), typ, MsgBoxStyle.OkOnly)
'MsgBox(Get_Meldungstext(i), typ)
End Function
''' <summary>
''' Yes-No-Meldung
''' </summary>
''' <param name="i">Meldungsnr</param>
''' <returns>MsgboxResult</returns>
''' <remarks></remarks>
Public Function Show_MessageYesNo(ByVal i As Integer) As MsgBoxResult
Return Me.ShowMyDialog(Get_Meldungstext(i), MsgBoxStyle.Question, MsgBoxStyle.YesNo)
'Show_MessageYesNo = MsgBox(Get_Meldungstext(i), MsgBoxStyle.YesNo + MsgBoxStyle.Question)
End Function
''' <summary>
''' Standard-Meldung, welcher 2 Strings als Parameter übergeben werden, damit diese im Meldungstext ersetzt werden können.
''' Parameter im Meldungstext #1 oder #2
''' </summary>
''' <param name="i"></param>
''' <param name="typ"></param>
''' <param name="Text1"></param>
''' <param name="Text2"></param>
''' <returns></returns>
''' <remarks></remarks>
Public Function show_standardmessage_ReplaceText(ByVal i As Integer, ByVal typ As MsgBoxStyle, ByVal Text1 As String, ByVal Text2 As String) As Integer
Dim s As String
s = Get_Meldungstext(i)
s = s.Replace("#1", Text1)
s = s.Replace("#2", Text2)
Return Me.ShowMyDialog(s, typ, MsgBoxStyle.OkOnly)
' MsgBox(s, typ)
End Function
''' <summary>
''' Yes-No-Meldung, welcher 2 Strings als Parameter übergeben werden, damit diese im Meldungstext ersetzt werden können.
''' Parameter im Meldungstext #1 oder #2
''' </summary>
''' <param name="i">MeldungsNr</param>
''' <param name="Text1">erster Text zum ersetzen</param>
''' <param name="Text2">zweiter Text zum ersetzen</param>
''' <returns></returns>
''' <remarks></remarks>
Public Function show_MessageYesNo_ReplaceText(ByVal i As Integer, ByVal Text1 As String, ByVal Text2 As String) As MsgBoxResult
Dim s As String
s = Get_Meldungstext(i)
s = s.Replace("#1", Text1)
s = s.Replace("#2", Text2)
Return Me.ShowMyDialog(s, MsgBoxStyle.Question, MsgBoxStyle.YesNo)
'show_MessageYesNo_ReplaceText = MsgBox(s, MsgBoxStyle.YesNo + MsgBoxStyle.Question)
End Function
''' <summary>
''' Ausgabe der Meldung, welche übergeben wird. Als Option können 2 Texte zum Ersetzen übergeben werden.
''' Parameter im Meldungstext #1 oder #2
''' </summary>
''' <param name="OrgText">Meldungstext</param>
''' <param name="Text1">erster Text zum ersetzen</param>
''' <param name="Text2">zweiter Text zum ersetzen</param>
''' <returns></returns>
''' <remarks></remarks>
Public Function ReplaceTextinMSG(ByVal OrgText As String, ByVal Text1 As String, ByVal Text2 As String) As String
OrgText = OrgText.Replace("#1", Text1)
OrgText = OrgText.Replace("#2", Text2)
ReplaceTextinMSG = OrgText
End Function
''' <summary>
''' Meldung Yes-No-Cancel
''' </summary>
''' <param name="i"></param>
''' <returns></returns>
''' <remarks></remarks>
Public Function Show_MessageYesNoCancel(ByVal i As Integer) As MsgBoxResult
Return Me.ShowMyDialog(Get_Meldungstext(i), MsgBoxStyle.Question, MsgBoxStyle.YesNoCancel)
'Show_MessageYesNoCancel = MsgBox(Get_Meldungstext(i), MsgBoxStyle.YesNoCancel + MsgBoxStyle.Question)
End Function
'Private Function ShowMessage(ByVal profilnr As Integer, ByVal messagenr As Integer, ByVal fnkt As Integer, ByVal style As Integer) As Boolean
' Dim scmCmdToExecute As SqlCommand = New SqlCommand()
' Dim i As Integer
' Dim dtToReturn As DataTable = New DataTable()
' Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
' scmCmdToExecute.CommandText = "dbo.sp_show_hinweismeldung"
' scmCmdToExecute.CommandType = CommandType.StoredProcedure
' scmCmdToExecute.Connection = conn.scoDBConnection
' Try
' scmCmdToExecute.Parameters.Add(New SqlParameter("@profilnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, profilnr))
' scmCmdToExecute.Parameters.Add(New SqlParameter("@hinweisnr", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, messagenr))
' scmCmdToExecute.Parameters.Add(New SqlParameter("@fnkt", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, fnkt))
' scmCmdToExecute.Parameters.Add(New SqlParameter("@showit", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, 0))
' sdaAdapter.Fill(dtToReturn)
' i = scmCmdToExecute.Parameters.Item("@showit").Value
' If i <> 0 Then
' ShowMessage = True
' Else
' ShowMessage = False
' End If
' Catch ex As Exception
' ' // some error occured. Bubble it to caller and encapsulate Exception object
' Throw New Exception("Dokument_Information_Wert::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
' Finally
' scmCmdToExecute.Dispose()
' sdaAdapter.Dispose()
' End Try
'End Function
''' <summary>
''' Zeig den eigenen Messagebox-Dialog
''' </summary>
''' <param name="msgtext"></param>
''' <param name="cancelvisible"></param>
''' <returns></returns>
''' <remarks></remarks>
Public Function ShowMyDialog(ByVal msgtext As String, ByVal ImageStyle As MsgBoxStyle, ByVal Buttons As MsgBoxStyle) As MsgBoxResult
Dim f As New frmMsgBox
f.btnno.Visible = False
f.btnAbbruch.Visible = False
f.btnYes.Visible = False
f.btnOK.Visible = False
Select Case Buttons
Case MsgBoxStyle.OkCancel
f.btnYes.Visible = True
f.btnAbbruch.Visible = True
Case MsgBoxStyle.YesNo
f.btnYes.Visible = True
f.btnno.Visible = True
Case MsgBoxStyle.YesNoCancel
f.btnYes.Visible = True
f.btnno.Visible = True
f.btnAbbruch.Visible = True
Case MsgBoxStyle.OkOnly
f.btnOK.Visible = True
End Select
f.imgCritical.Visible = False
f.imgExclamation.Visible = False
f.imgInformation.Visible = False
f.imgQuestion.Visible = False
Select Case ImageStyle
Case MsgBoxStyle.Critical
f.imgCritical.Visible = True
Case MsgBoxStyle.Exclamation
f.imgExclamation.Visible = True
Case MsgBoxStyle.Information
f.imgInformation.Visible = True
Case MsgBoxStyle.Question
f.imgQuestion.Visible = True
End Select
f.txtmsg.Text = msgtext
'f.btnYes.Visible = True
'f.btnno.Visible = True
f.ShowDialog()
Select Case f.DialogResult
Case DialogResult.Abort, DialogResult.Cancel
Return MsgBoxResult.Cancel
Case DialogResult.No
Return MsgBoxResult.No
Case DialogResult.Yes
Return MsgBoxResult.Yes
Case Else
End Select
End Function
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,831 @@
Imports C1.Win.C1TrueDBGrid
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace Utils
''' <summary>
''' Formular-Security-Objekte auslesen und auf DB schreiben bzw. Formular-Security zur Laufzeit setzen
''' </summary>
''' <remarks></remarks>
Public Class MySecurity
Dim tt As New TKB.VV.Utils.clsToolTips
Dim SecurityData As DataSet = Globals.SecurityDaten
Dim connection As New SqlConnection()
Dim da As New SqlDataAdapter("", connection)
Dim IntForm As Form
Dim ctlcol As New Collection
Dim formname As String = ""
''' <summary>
''' Formularsecurity setzen
''' </summary>
''' <param name="f">Aktuelles Formular</param>
''' <returns></returns>
''' <remarks></remarks>
Public Function Set_Form_Security(ByRef f As Form)
IntForm = f
formname = f.Name
'Load form DB
Load_Data(f.Name)
'Load FormObjects
Me.ctlcol.Clear()
formname = f.Name
For Each ctl As Control In f.Controls
Objectanalysis(ctl)
' AddHandler ctl.HelpRequested, AddressOf Object_MouseDown
'ctl.ContextMenuStrip = Globals.TTContextMenuStrip
'AddHandler ctl.KeyDown, AddressOf Object_MouseDown
Next
Set_Security()
If Globals.Set_ToolTips = True Then
tt.Edit_ToolTips(f, ctlcol)
Else
tt.Set_ToolTips(f)
End If
End Function
Public Function Set_Menu_Security(ByRef f As Form, ByRef menu As ToolStripMenuItem, ByVal Menuname As String)
IntForm = f
formname = f.Name
Load_Data(f.Name)
Me.ctlcol.Clear()
formname = f.Name
Dim ctl As Object = menu
Dim typ As System.Type = ctl.GetType
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, Menuname, ctl.Name))
Set_Security()
'If Globals.Set_ToolTips = True Then
' tt.Edit_ToolTips(f, ctlcol)
'Else
' tt.Set_ToolTips(f)
'End If
End Function
Public Function Set_Form_Readonly(ByRef f As Form)
IntForm = f
Me.formname = f.Name
Load_Data(f.Name)
Me.ctlcol.Clear()
For Each ctl As Control In f.Controls
Objectanalysis_readonly(ctl)
Next
End Function
Public Function Set_Form_Default(ByRef f As Form)
IntForm = f
Me.formname = f.Name
Load_Data(f.Name)
Me.ctlcol.Clear()
For Each ctl As Control In f.Controls
Objectanalysis_default(ctl)
Next
End Function
Private Function Objectanalysis_readonly(ByRef ctl As Object) As String
Dim typ As System.Type = ctl.GetType
Select Case LCase(typ.Name)
Case "splitcontainer"
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, ctl.Name, ""))
Dim tmpsplit As SplitContainer = ctl
For Each ctrl As Object In tmpsplit.Panel1.Controls
Objectanalysis_readonly(ctrl)
Next
For Each ctrl As Object In tmpsplit.Panel2.Controls
Objectanalysis_readonly(ctrl)
Next
Case "tabcontrol", "clsmytabcontrol"
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, ctl.Name, ""))
Dim tmptabcontrol As TabControl = ctl
For Each ctl In tmptabcontrol.TabPages
Objectanalysis_readonly(ctl)
Next
Case "tabpage"
Dim tmptabpage As TabPage = ctl
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, ctl.Name, tmptabpage.Parent.Name, 1))
For Each ctl In tmptabpage.Controls
Objectanalysis_readonly(ctl)
Next
Case "groupbox"
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, ctl.Name, ""))
Dim tmptabpage As GroupBox = ctl
For Each ctl In tmptabpage.Controls
Objectanalysis_readonly(ctl)
Next
Case "panel"
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, ctl.Name, ""))
Dim tmppanel As Panel = ctl
For Each ctl In tmppanel.Controls
Objectanalysis_readonly(ctl)
Next
Case "textbox"
Dim x As TextBox = ctl
x.BackColor = Color.LightGray
x.ForeColor = Color.Black
x.ReadOnly = True
Case "maskedtextbox"
Dim x As MaskedTextBox = ctl
x.BackColor = Color.LightGray
x.ForeColor = Color.Black
x.ReadOnly = True
Case "combobox"
Dim x As ComboBox = ctl
x.Enabled = False
x.BackColor = Color.LightGray
x.ForeColor = Color.Black
Case "checkbox"
Dim x As CheckBox = ctl
x.Enabled = False
Case "radiobutton"
Dim x As RadioButton = ctl
x.Enabled = False
Case "comboboxtree"
Dim x As Object = ctl
x.enabled = False
x.BackColor = Color.LightGray
x.ForeColor = Color.Black
Case "richtextbox"
Dim x As Object = ctl
x.BackColor = Color.LightGray
x.ForeColor = Color.Black
x.ReadOnly = True
Case "button"
Dim x As Button = ctl
x.Enabled = False
Case "listbox"
Dim x As Object = ctl
ctl.enabled = False
Case "checkedlistbox"
Dim x As Object = ctl
ctl.enabled = False
Case "datetimepicker"
Dim x As Object = ctl
ctl.enabled = False
Case Else
End Select
End Function
Private Function Objectanalysis_default(ByRef ctl As Object) As String
Dim typ As System.Type = ctl.GetType
Select Case LCase(typ.Name)
Case "splitcontainer"
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, ctl.Name, ""))
Dim tmpsplit As SplitContainer = ctl
For Each ctrl As Object In tmpsplit.Panel1.Controls
Objectanalysis_default(ctrl)
Next
For Each ctrl As Object In tmpsplit.Panel2.Controls
Objectanalysis_default(ctrl)
Next
Case "tabcontrol", "clsmytabcontrol"
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, ctl.Name, ""))
Dim tmptabcontrol As TabControl = ctl
For Each ctl In tmptabcontrol.TabPages
Objectanalysis_default(ctl)
Next
Case "tabpage"
Dim tmptabpage As TabPage = ctl
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, ctl.Name, tmptabpage.Parent.Name, 1))
For Each ctl In tmptabpage.Controls
Objectanalysis_default(ctl)
Next
Case "groupbox"
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, ctl.Name, ""))
Dim tmptabpage As GroupBox = ctl
For Each ctl In tmptabpage.Controls
Objectanalysis_default(ctl)
Next
Case "panel"
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, ctl.Name, ""))
Dim tmppanel As Panel = ctl
For Each ctl In tmppanel.Controls
Objectanalysis_default(ctl)
Next
Case "textbox"
Dim x As TextBox = ctl
x.BackColor = Color.White
x.ForeColor = Color.Black
x.Enabled = True
Case "maskedtextbox"
Dim x As MaskedTextBox = ctl
x.BackColor = Color.White
x.ForeColor = Color.Black
x.Enabled = True
Case "combobox"
Dim x As ComboBox = ctl
x.Enabled = True
x.BackColor = Color.White
x.ForeColor = Color.Black
Case "checkbox"
Dim x As CheckBox = ctl
x.Enabled = True
Case "radiobutton"
Dim x As RadioButton = ctl
x.Enabled = True
Case "comboboxtree"
Dim x As Object = ctl
x.enabled = True
x.BackColor = Color.White
x.ForeColor = Color.Black
Case "richtextbox"
Dim x As Object = ctl
x.BackColor = Color.White
x.ForeColor = Color.Black
x.readonly = True
Case "button"
Dim x As Button = ctl
x.Enabled = True
Case "listbox"
Dim x As Object = ctl
ctl.enabled = True
Case "checkedlistbox"
Dim x As Object = ctl
ctl.enabled = True
Case "datetimepicker"
Dim x As Object = ctl
ctl.enabled = True
Case Else
End Select
End Function
''' <summary>
''' Daten ab Datenbank laden
''' </summary>
''' <remarks></remarks>
Private Sub Load_Data(ByVal Formname As String)
Try
'xxx
If SecurityData.Tables.Count > 0 Then
SecurityData.Tables.Clear()
End If
' Exit Sub
Catch ex As Exception
End Try
SecurityData.Tables.Clear()
Dim sqlcmd As New SqlCommand
sqlcmd.CommandText = "dbo.my_security_get_data"
sqlcmd.Parameters.Add("@FormName", SqlDbType.VarChar, 255)
sqlcmd.Parameters.Add("@Mitarbeiternr", SqlDbType.Int, 4)
sqlcmd.Parameters(0).Value = Formname
sqlcmd.Parameters(1).Value = Globals.clsmitarbeiter.iMitarbeiternr.Value
sqlcmd.CommandType = CommandType.StoredProcedure
sqlcmd.Connection = connection
Try
connection.ConnectionString = Globals.sConnectionString
connection.Open()
da.SelectCommand = sqlcmd
da.Fill(SecurityData, "SecurityTable")
Globals.SecurityDaten.Tables.Add(SecurityData.Tables(0).Copy)
Catch ex As Exception
Finally
connection.Close()
da.Dispose()
sqlcmd.Dispose()
End Try
End Sub
''' <summary>
''' Prüft die DB-Einträge mit den Formcontrols und bei Übereinstimmung werden die Security-Einstellungen gesetzt
''' </summary>
''' <remarks></remarks>
Private Sub Set_Security()
Dim i As Integer
For i = 0 To Me.SecurityData.Tables(0).Rows.Count - 1
Dim SecurityObject As String = Me.SecurityData.Tables(0).Rows(i).Item("SecurityObject")
Dim SecurityObjectitem As String = Me.SecurityData.Tables(0).Rows(i).Item("SecurityObjectItem")
Dim read_only As Boolean = Me.SecurityData.Tables(0).Rows(i).Item("readonly")
Dim invisible As Boolean = Me.SecurityData.Tables(0).Rows(i).Item("invisible")
Dim ii As Integer
For ii = 1 To ctlcol.Count
Dim secobj As MyFormControls = ctlcol(ii)
If secobj.MySecurityObject = SecurityObject And secobj.MySecurityObjectItem = SecurityObjectitem Then
Set_Preferences(secobj.MyControl, read_only, invisible, SecurityObjectitem)
End If
Next
Next
End Sub
''' <summary>
''' Security-Einstellungen setzen
''' </summary>
''' <param name="obj">Betroffenes Objeckt (Menuitem, Conrol usw.)</param>
''' <param name="read_only">Readonly ja/nein</param>
''' <param name="invisible">Sichtbar ja/nein</param>
''' <param name="SecurityObjectItem">Name des Unterobjektes - wird für die Spalteneinstellungen von C1TruedbGrids verwendet</param>
''' <remarks></remarks>
Private Sub Set_Preferences(ByRef obj As Object, ByVal read_only As Boolean, ByVal invisible As Boolean, ByVal SecurityObjectItem As String)
Dim objtype As System.Type = obj.GetType
Select Case LCase(objtype.Name)
Case "button"
Dim ctl As Button = obj
If read_only Then ctl.Enabled = False
If invisible Then
ctl.Visible = False
ctl.Enabled = False
End If
Case "toolstripmenuitem"
Dim ctl As ToolStripMenuItem = obj
If read_only Then ctl.Enabled = False
If invisible Then
ctl.Visible = False
ctl.Enabled = False
End If
Case "textbox", "label", "combobox", "checkbox", "toolstripbutton", "panel", "datetimepicker"
If read_only Then obj.Enabled = False
If invisible Then obj.Visible = False
Case "richtextbox"
If read_only Then obj.Enabled = False
Try
obj.readonly = True
obj.enabled = True
Catch ex As Exception
End Try
If invisible Then obj.Visible = False
Case "tabpage"
If invisible Then
Dim tbp As TabPage = obj
For Each x As MyFormControls In Me.ctlcol
If x.MySecurityObject = tbp.Parent.Name Then
Dim tb As TabControl = x.MyControl
tb.TabPages.Remove(tbp)
Exit Sub
End If
Next
End If
'20100406 - TabPageHandling
If read_only Then
'obj.enabled = False
For Each CTLX As Control In obj.CONTROLS
Me.Objectanalysis_readonly(CTLX)
Next
End If
Case "c1truedbgrid"
Dim ctl As C1TrueDBGrid = obj
If SecurityObjectItem = "" Then
If read_only Then ctl.Enabled = False
If invisible Then obj.Visible = False
Else
If read_only Then ctl.Splits(0).DisplayColumns(SecurityObjectItem).Locked = True
If invisible Then ctl.Splits(0).DisplayColumns(SecurityObjectItem).Visible = False
End If
End Select
End Sub
#Region "Read Objects from Form and save to Database"
Dim tmpmenuname As String
''' <summary>
''' Alle Controls des Formulars zusammensuchen und auf der DB speichern
''' </summary>
''' <param name="f">Betroffenes Formular</param>
''' <returns></returns>
''' <remarks></remarks>
Public Function List_Form_Controls(ByRef f As Form)
Me.ctlcol.Clear()
formname = f.Name
For Each ctl As Control In f.Controls
Objectanalysis(ctl)
Next
Dim i As Integer
For i = 1 To ctlcol.Count
Dim secobj As MyFormControls = ctlcol(i)
secobj.Write_Object_to_DB()
Next
End Function
''' <summary>
''' Sämtliche Controls vom Formular auslesen
''' </summary>
''' <param name="ctl"></param>
''' <returns></returns>
''' <remarks></remarks>
Private Function Objectanalysis(ByRef ctl As Object) As String
Dim typ As System.Type = ctl.GetType
Select Case LCase(typ.Name)
Case "menustrip"
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, ctl.Name, ""))
tmpmenuname = ctl.name
ReadMenu(ctl)
Case "contextmenustrip"
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, ctl.Name, ""))
tmpmenuname = ctl.name
ReadContextMenu(ctl)
Case "toolstrip"
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, ctl.Name, ""))
Dim tmptoolstrop As ToolStrip = ctl
Try
Dim ic As Integer
For ic = 0 To tmptoolstrop.Items.Count - 1
Try
Dim subobj As ToolStripButton
subobj = tmptoolstrop.Items(ic)
ctlcol.Add(New MyFormControls(subobj, formname, typ.Name, ctl.Name, subobj.Name, 1))
Catch ex As Exception
End Try
Next
'For Each subobj As ToolStripButton In tmptoolstrop.Items
'ctlcol.Add(New MyFormControls(subobj, formname, typ.Name, ctl.Name, subobj.Name, 1))
'Next
Catch
End Try
Case "splitcontainer"
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, ctl.Name, ""))
Dim tmpsplit As SplitContainer = ctl
For Each ctrl As Object In tmpsplit.Panel1.Controls
Objectanalysis(ctrl)
Next
For Each ctrl As Object In tmpsplit.Panel2.Controls
Objectanalysis(ctrl)
Next
Case "tabcontrol", "clsmytabcontrol"
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, ctl.Name, ""))
Dim tmptabcontrol As TabControl = ctl
For Each ctl In tmptabcontrol.TabPages
Objectanalysis(ctl)
Next
Case "tabpage"
Dim tmptabpage As TabPage = ctl
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, ctl.Name, tmptabpage.Parent.Name, 1))
For Each ctl In tmptabpage.Controls
Objectanalysis(ctl)
Next
Case "groupbox"
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, ctl.Name, ""))
Dim tmptabpage As GroupBox = ctl
For Each ctl In tmptabpage.Controls
Objectanalysis(ctl)
Next
Case "panel"
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, ctl.Name, ""))
Dim tmppanel As Panel = ctl
For Each ctl In tmppanel.Controls
Objectanalysis(ctl)
Next
Case "c1truedbgrid"
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, ctl.Name, ""))
Dim ctrl As C1TrueDBGrid = ctl
Dim i As Integer
For i = 0 To ctrl.Columns.Count - 1
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, ctl.Name, ctrl.Columns(i).Caption, 0, ctrl.Columns(i).Caption))
Next
Try
If ctrl.ContextMenuStrip.Name <> "" Then
Dim x As ContextMenuStrip = ctrl.ContextMenuStrip
Objectanalysis(x)
End If
Catch ex As Exception
End Try
For Each xctl As Object In ctrl.Controls
Objectanalysis(xctl)
Next
Case "treeview"
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, ctl.Name, ""))
Dim ctrl As TreeView = ctl
Try
If ctrl.ContextMenuStrip.Name <> "" Then
Dim x As ContextMenuStrip = ctrl.ContextMenuStrip
Objectanalysis(x)
End If
Catch ex As Exception
End Try
Case Else
If ctl.name = "TreeStruktur" Then
End If
ctlcol.Add(New MyFormControls(ctl, formname, typ.Name, ctl.Name, ""))
End Select
End Function
''' <summary>
''' Auslesen von MenuItems
''' </summary>
''' <param name="x"></param>
''' <returns></returns>
''' <remarks></remarks>
'''
Dim level As Integer = 0
Private Function ReadMenu(ByRef x As Object)
Dim tmpmnu As MenuStrip = x
level = 0
For Each xx As Object In tmpmnu.Items
Dim objtype As System.Type = xx.GetType
If LCase(objtype.Name) = "toolstripmenuitem" Then
ctlcol.Add(New MyFormControls(xx, formname, "menustrip", tmpmenuname, xx.Name, level))
get_all_menus(xx)
End If
Next
End Function
''' <summary>
''' Auslesen von ContextMenuItems
''' </summary>
''' <param name="x"></param>
''' <returns></returns>
''' <remarks></remarks>
'''
Private Function ReadContextMenu(ByRef x As Object)
Dim tmpmnu As ContextMenuStrip = x
level = 0
Try
For Each xx As Object In tmpmnu.Items
Dim objtype As System.Type = xx.GetType
If LCase(objtype.Name) = "toolstripmenuitem" Then
ctlcol.Add(New MyFormControls(xx, formname, "menustrip", tmpmenuname, xx.Name, level))
get_all_menus(xx)
End If
' ctlcol.Add(New MyFormControls(xx, formname, "contextmenustrip", tmpmenuname, xx.Name, level))
' get_all_menus(xx)
Next
Catch ex As Exception
End Try
End Function
''' <summary>
''' Auslesen von Menu-Subitems
''' </summary>
''' <param name="xx"></param>
''' <returns></returns>
''' <remarks></remarks>
Private Function get_all_menus(ByRef xx As ToolStripMenuItem)
level = level + 1
For Each subobj As Object In xx.DropDownItems
If LCase(subobj.GetType.Name) = "toolstripmenuitem" Then
ctlcol.Add(New MyFormControls(subobj, formname, "menustrip", tmpmenuname, subobj.Name, level))
get_all_menus(subobj)
End If
Next
level = level - 1
End Function
''' <summary>
''' Prüft, ob das Security-Objekt bereits auf der DB vorhanden ist
''' </summary>
''' <param name="securityform">Formular</param>
''' <param name="securityobjecttype">Objekttyp</param>
''' <param name="securityobject">Objektname</param>
''' <param name="securityobjectitem">Objektitem</param>
''' <returns></returns>
''' <remarks></remarks>
Private Function Objexists(ByVal securityform As String, ByVal securityobjecttype As String, ByVal securityobject As String, ByVal securityobjectitem As String) As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[my_security_check_entry]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
scmCmdToExecute.Connection = conn.scoDBConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@form", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, securityform))
scmCmdToExecute.Parameters.Add(New SqlParameter("@objecttype", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, securityobjecttype))
scmCmdToExecute.Parameters.Add(New SqlParameter("@object", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, securityobject))
scmCmdToExecute.Parameters.Add(New SqlParameter("@objectitem", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, securityobjectitem))
scmCmdToExecute.Parameters.Add(New SqlParameter("@objexists", SqlDbType.Int, 4, ParameterDirection.Output, True, 0, 0, "", DataRowVersion.Proposed, 0))
scmCmdToExecute.Connection.Open()
scmCmdToExecute.ExecuteNonQuery()
If scmCmdToExecute.Parameters("@objexists").Value > 0 Then
Return True
Else
Return False
End If
Catch ex As Exception
Finally
scmCmdToExecute.Connection.Close()
End Try
End Function
#End Region
#Region "ScreenDoku"
Public Function Print_Screen(ByRef ctl As Control)
saveasbitmap(ctl, ctl.Name)
End Function
Public Function Generate_HTML()
saveasbitmap(Me.IntForm, "testform")
'Exit Function
'Dim x As MyFormControls
'For Each x In ctlcol
' Try
' saveasbitmap(x.MyControl, x.MyFormname & "_" & x.MySecurityObject & "_" & x.MySecurityObjectItem)
' If x.MySecurityObjecttype = "ToolStrip" And x.MySecurityObjectItem = "" Then
' Dim gaga As ToolStrip = x.MyControl
' For Each c As ToolStripButton In gaga.Items
' Dim xxx As Control = CType(c, Control)
' xxx = CType(c, Control)
' saveasbitmap(xxx, "xxx")
' Next
' End If
' Catch ex As Exception
' MsgBox(ex.Message)
' End Try
'Next
End Function
Public Function saveasbitmap(ByRef ctl As Control, ByVal filename As String)
Dim g As Graphics = ctl.CreateGraphics
Dim b As New Bitmap(ctl.Width, ctl.Height)
ctl.DrawToBitmap(b, New Rectangle(0, 0, ctl.Width, ctl.Height))
'b.Save("E:\Software-Projekte\Vertragsverwaltung\Screens\" & filename & ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
End Function
#End Region
#Region "Dataobject"
Function Check_DataObjectReadonly(Objectname) As Boolean
Dim i As Integer = 0
Load_Data("DataObject")
Dim dv As New DataView(SecurityData.Tables(0), "SecurityForm='DataObject' and SecurityObjectType='" + Objectname + "'", "", DataViewRowState.CurrentRows)
For Each row As DataRowView In dv
i = i + 1
Next
If i > 0 Then Return True Else Return False
End Function
#End Region
End Class
''' <summary>
''' Klasse für ein Control-Objekt
''' </summary>
''' <remarks></remarks>
Public Class MyFormControls
Public MyControl As Object
Public MyFormname As String
Public MySecurityObjecttype As String
Public MySecurityObject As String
Public MySecurityObjectItem As String
Public MyDescription As String
Public MyLevel As Integer
''' <summary>
''' Neue Instanz erstellen
''' </summary>
''' <param name="ctl">Control-Objekt</param>
''' <param name="Formname">Betroffenes Formular</param>
''' <param name="securityobjecttype">Objekttyp</param>
''' <param name="Securityobject">Objektname</param>
''' <param name="SecurityObjectItem">Unterobjekt (z.B. bei Menus, Spalten von C1TrueDBGrids)</param>
''' <remarks></remarks>
Sub New(ByVal ctl As Object, ByVal Formname As String, ByVal securityobjecttype As String, ByVal Securityobject As String, ByVal SecurityObjectItem As String, Optional ByVal level As Integer = 0, Optional ByVal desc As String = "")
MyControl = ctl
MySecurityObjecttype = securityobjecttype
MyFormname = Formname
MySecurityObject = Securityobject
MySecurityObjectItem = SecurityObjectItem
If desc = "" Then
MyDescription = Get_Description(ctl)
Else
MyDescription = desc
End If
Try
MyDescription = MyDescription.Replace("&", "")
Catch ex As Exception
End Try
MyLevel = level
End Sub
Private Function Get_Description(ByRef ctl As Object) As String
Dim typ As System.Type = ctl.GetType
Select Case LCase(typ.Name)
Case "menustrip", "toolstripmenuitem", "toolstrip", "toolstripbutton", "contextmenustrip", "tabpage", "c1truedbgrid", "label"
Return ctl.Text
Case Else
Return ctl.Name
End Select
End Function
''' <summary>
''' Schreibt einen Datnsatz in die Tabelle SecurityObjects
''' </summary>
''' <returns></returns>
''' <remarks></remarks>
Public Function Write_Object_to_DB()
If Objexists() Then Exit Function
Dim sectbl As New DB.clsSecurityObject
Dim dbkey As New DB.clsMyKey_Tabelle
dbkey.cpMainConnectionProvider = Globals.conn
Dim newkey As Integer = dbkey.get_dbkey("SecurityObject")
sectbl.cpMainConnectionProvider = Globals.conn
conn.OpenConnection()
sectbl.iSecurityObjectNr = New SqlInt32(CType(newkey, Int32))
sectbl.sSecurityForm = New SqlString(CType(MyFormname, String))
sectbl.sSecurityObjectType = New SqlString(CType(Me.MySecurityObjecttype, String))
sectbl.sSecurityObject = New SqlString(CType(Me.MySecurityObject, String))
sectbl.sSecurityObjectItem = New SqlString(CType(Me.MySecurityObjectItem, String))
sectbl.bAktiv = New SqlBoolean(CType(True, Boolean))
sectbl.daErstellt_am = New SqlDateTime(CType(Now, DateTime))
sectbl.daMutiert_am = New SqlDateTime(CType(Now, DateTime))
sectbl.sSecurityObjectDescriotion = New SqlString(CType(Me.MyDescription, String))
sectbl.iLevel = New SqlInt32(CType(Me.MyLevel, Int32))
sectbl.iMutierer = New SqlInt32(CType(Globals.clsmitarbeiter.iMitarbeiternr.Value, Int32))
sectbl.iMandantnr = New SqlInt32(CType(Globals.clsmitarbeiter.iMandantnr.Value, Int32))
sectbl.Insert()
conn.CloseConnection(True)
sectbl.Dispose()
dbkey.Dispose()
End Function
''' <summary>
'''Prüft, ob das Security-Objekt bereits auf der DB vorhanden ist
''' </summary>
''' <returns></returns>
''' <remarks></remarks>
Private Function Objexists() As Boolean
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[my_security_check_entry]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
scmCmdToExecute.Connection = conn.scoDBConnection
Try
scmCmdToExecute.Parameters.Add(New SqlParameter("@form", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, Me.MyFormname))
scmCmdToExecute.Parameters.Add(New SqlParameter("@objecttype", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, Me.MySecurityObjecttype))
scmCmdToExecute.Parameters.Add(New SqlParameter("@object", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, Me.MySecurityObject))
scmCmdToExecute.Parameters.Add(New SqlParameter("@objectitem", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, Me.MySecurityObjectItem))
scmCmdToExecute.Parameters.Add(New SqlParameter("@objexists", SqlDbType.Int, 4, ParameterDirection.Output, True, 0, 0, "", DataRowVersion.Proposed, 0))
scmCmdToExecute.Connection.Open()
scmCmdToExecute.ExecuteNonQuery()
If scmCmdToExecute.Parameters("@objexists").Value > 0 Then
Return True
Else
Return False
End If
Catch ex As Exception
Finally
scmCmdToExecute.Connection.Close()
End Try
End Function
End Class
Public Class ControlsCollection
Private Shared m_controls As Collection
Public Sub New(ByVal myForm As Form)
m_controls = New Collection
'create a control walker to get
'all controls on the form
Dim aControlWalker As New ControlWalker(myForm)
End Sub
'This property returns the collection of all controls
'on the form
ReadOnly Property Controls() As Collection
Get
Return m_controls
End Get
End Property
Public Function FindControl(ByVal ctlname As String) As Boolean
Dim i As Integer
For i = 1 To Me.m_controls.Count
Dim ctl As Control = m_controls(i)
If UCase(ctl.Name) = UCase(ctlname) Then MsgBox("found")
Next
End Function
Private Class ControlWalker
' This class recursively walks through all controls
' in a container, and all containers contained in
' this container, visiting all controls throughout
' the hierarchy
Private mContainer As Object
Public Sub New(ByVal Container As Object)
Dim cControl As Control
If Container.haschildren Then
For Each cControl In Container.controls
'add this control to the controls collection
m_controls.Add(cControl)
If cControl.HasChildren Then
'This control has children, create another
'ControlWalk go visit each of them
Dim cWalker As New ControlWalker(cControl)
End If
Next cControl
End If
End Sub
End Class
End Class
End Namespace

View File

@@ -0,0 +1,432 @@
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
'*
' Object MyspaltenTitel
'
' Dieses Objekt liest die Daten aus der Tabelle Spalten und speichert diese in spaltendaten
' Die Daten werden für die Spaltenbezeichnung der C1Datagrids verwendet
'
' Autor: Stefan Hutter
' Datum: 2.12.2002
'*
Imports C1.Win.C1TrueDBGrid
Namespace Utils
Public Class Tabellenspalte
Private m_table As String
Private m_field As String
Private m_spaltenname As String
Private m_locked As Boolean
Private m_Width As Integer
Private m_Order As Integer
Private m_alsHacken As Boolean
Private m_tiptext As String
Private m_numberformat As String
Property ColWith() As Integer
Get
Return m_Width
End Get
Set(ByVal Value As Integer)
m_Width = Value
End Set
End Property
Property Order() As Integer
Get
Return m_Order
End Get
Set(ByVal Value As Integer)
m_Order = Value
End Set
End Property
Property Tabelle() As String
Get
Return m_table
End Get
Set(ByVal Value As String)
m_table = Value
End Set
End Property
Property Feld() As String
Get
Return m_field
End Get
Set(ByVal Value As String)
m_field = Value
End Set
End Property
Property spaltenname() As String
Get
Return m_spaltenname
End Get
Set(ByVal Value As String)
m_spaltenname = Value
End Set
End Property
Property locked() As Boolean
Get
Return m_locked
End Get
Set(ByVal Value As Boolean)
m_locked = Value
End Set
End Property
Property AlsHacken() As Boolean
Get
Return m_alsHacken
End Get
Set(ByVal Value As Boolean)
m_alsHacken = Value
End Set
End Property
Property TipText() As String
Get
Return m_tiptext
End Get
Set(ByVal Value As String)
m_tiptext = Value
End Set
End Property
Property Numberformat() As String
Get
Return m_numberformat
End Get
Set(ByVal value As String)
m_numberformat = value
End Set
End Property
Public Sub New()
End Sub
Public Sub New(ByRef daten As Object, ByRef tablename As String, ByRef ds As DataSet)
Spaltentitel_aktualisieren(daten, tablename, ds)
End Sub
Public Function getspalte()
Try
Dim myspalten As New MySpaltenTitel()
myspalten.getspalte(Me.Tabelle, Me.Feld, Me.spaltenname, Me.locked, Me.ColWith, Me.Order, Me.AlsHacken, Me.TipText, Me.Numberformat)
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Function
Public Function Spaltentitel_aktualisieren(ByRef daten As Object, ByRef tablename As String, ByRef ds As DataSet)
Dim anzcols As Integer
Dim i As Integer
Dim s As String
anzcols = daten.Splits(0).DisplayColumns.Count
Me.Tabelle = tablename
For i = 0 To daten.Columns.Count - 1
s = daten.Columns(i).DataField
Me.Feld = s
Me.getspalte()
daten.Columns(i).Caption = Me.spaltenname
If Me.ColWith = 0 Then
daten.Splits(0).DisplayColumns(i).Width = 0
daten.Splits(0).DisplayColumns(i).Visible = False
Else
daten.Splits(0).DisplayColumns(i).Width = Me.ColWith
End If
If Me.locked Then
daten.Splits(0).DisplayColumns(i).Locked = True
End If
If Me.AlsHacken Then
daten.Columns(i).ValueItems.Presentation = C1.Win.C1TrueDBGrid.PresentationEnum.CheckBox
End If
'Präsentation von aktiv
If LCase(daten.Columns(i).DataField) = "aktiv" Then
daten.Columns(i).ValueItems.Presentation = C1.Win.C1TrueDBGrid.PresentationEnum.CheckBox
daten.Columns(i).ValueItems.DefaultItem = True
daten.Columns(i).DefaultValue = True
daten.Columns(i).FilterText = True
'Dim items As C1.Win.C1TrueDBGrid.ValueItems = daten.Columns("aktiv").ValueItems
'items.Values.Clear()
'items.Values.Add(New C1.Win.C1TrueDBGrid.ValueItem("False", False)) ' unchecked
'items.Values.Add(New C1.Win.C1TrueDBGrid.ValueItem("True", True)) ' checked
'items.Values.Add(New C1.Win.C1TrueDBGrid.ValueItem("", "INDETERMINATE")) ' indeterminate state
End If
Select Case LCase(daten.Columns(i).DataField)
Case "erstellt_am", "erstelltam"
daten.Columns(i).DefaultValue = Now
End Select
If daten.Columns(i).DataType.Name = "DateTime" Then
daten.Columns(i).NumberFormat = "dd.MM.yyyy HH:mm:ss"
End If
If Me.Numberformat <> "" Then
daten.columns(i).numberformat = Me.Numberformat
End If
Next
ColumnOrder(tablename, daten)
daten.HeadingStyle.WrapText = False
End Function
Public Function Spaltentitel_aktualisieren(ByRef daten As Object, ByRef tablename As String, ByRef dt As DataTable, Optional ByVal Aktiv_Spalte_True_Setzen As Boolean = True)
Dim anzcols As Integer
Dim i As Integer
Dim t As New DataTable()
Dim s As String
anzcols = daten.Splits(0).DisplayColumns.Count
t = dt
Me.Tabelle = tablename
For i = 0 To daten.Columns.Count - 1
s = daten.Columns(i).DataField
'If s = "ApplikationNr" Then
' MsgBox("Hallo")
'End If
Me.Feld = s
Me.getspalte()
daten.Columns(i).Caption = Me.spaltenname
If Me.ColWith = 0 Then
daten.Splits(0).DisplayColumns(i).Width = 0
daten.Splits(0).DisplayColumns(i).Visible = False
Else
daten.Splits(0).DisplayColumns(i).Width = Me.ColWith
End If
If Me.locked Then
daten.Splits(0).DisplayColumns(i).Locked = True
End If
If Me.AlsHacken Then
daten.Columns(i).ValueItems.Presentation = C1.Win.C1TrueDBGrid.PresentationEnum.CheckBox
End If
'Präsentation von aktiv
If LCase(daten.Columns(i).DataField) = "aktiv" And Aktiv_Spalte_True_Setzen = True Then
daten.Columns(i).ValueItems.Presentation = C1.Win.C1TrueDBGrid.PresentationEnum.CheckBox
daten.Columns(i).ValueItems.DefaultItem = True
daten.Columns(i).DefaultValue = True
daten.Columns(i).FilterText = True
End If
Select Case LCase(daten.Columns(i).DataField)
Case "erstellt_am", "erstelltam"
daten.Columns(i).DefaultValue = Now
End Select
If daten.Columns(i).DataType.Name = "DateTime" Then
daten.Columns(i).NumberFormat = "dd.MM.yyyy HH:mm:ss"
End If
If Me.Numberformat <> "" Then
daten.columns(i).numberformat = Me.Numberformat
End If
Next
ColumnOrder(tablename, daten)
daten.HeadingStyle.WrapText = False
End Function
Public Function Spaltentitel_aktualisieren_Optionaler_Aktiv_Filer(ByRef daten As Object, ByRef tablename As String, ByRef dt As DataTable, Optional ByVal Aktiv_Filter As String = "")
Dim anzcols As Integer
Dim i As Integer
Dim t As New DataTable()
Dim s As String
anzcols = daten.Splits(0).DisplayColumns.Count
t = dt
Me.Tabelle = tablename
For i = 0 To daten.Columns.Count - 1
s = daten.Columns(i).DataField
Me.Feld = s
Me.getspalte()
If Me.spaltenname = "" Then
daten.Splits(0).DisplayColumns(i).Width = 0
Else
daten.Columns(i).Caption = Me.spaltenname
If Me.ColWith = 0 Then
daten.Splits(0).DisplayColumns(i).Width = 0
daten.Splits(0).DisplayColumns(i).Visible = False
Else
daten.Splits(0).DisplayColumns(i).Width = Me.ColWith
End If
If Me.locked Then
daten.Splits(0).DisplayColumns(i).Locked = True
End If
If Me.AlsHacken Then
daten.Columns(i).ValueItems.Presentation = C1.Win.C1TrueDBGrid.PresentationEnum.CheckBox
End If
'Präsentation von aktiv
If LCase(daten.Columns(i).DataField) = "aktiv" And Aktiv_Filter <> "" Then
daten.Columns(i).ValueItems.Presentation = C1.Win.C1TrueDBGrid.PresentationEnum.CheckBox
daten.Columns(i).ValueItems.DefaultItem = True
daten.Columns(i).DefaultValue = True
daten.Columns(i).FilterText = Aktiv_Filter
End If
Select Case LCase(daten.Columns(i).DataField)
Case "erstellt_am", "erstelltam"
daten.Columns(i).DefaultValue = Now
End Select
If daten.Columns(i).DataType.Name = "DateTime" Then
daten.Columns(i).NumberFormat = "dd.MM.yyyy HH:mm:ss"
End If
If Me.Numberformat <> "" Then
daten.columns(i).numberformat = Me.Numberformat
End If
End If
Next
ColumnOrder(tablename, daten)
daten.HeadingStyle.WrapText = False
End Function
''' <summary>
''' Sortierung der in der DB-Tabelle Spalaten festgelegten Reihenfolge
''' </summary>
''' <param name="Tablename"></param>
''' <param name="Data"></param>
''' <returns></returns>
''' <remarks></remarks>
Public Function ColumnOrder(ByVal Tablename As String, ByRef Data As C1TrueDBGrid)
Dim spaltendata As DataTable = Globals.Spaltendaten
Dim dv() As DataRow
Dim dr As DataRow
Dim dc As New Collection
dv = spaltendata.Select("Tabelle='" & Tablename & "'", "Reihenfolge desc, Eintragnr")
For Each c As C1DisplayColumn In Data.Splits(0).DisplayColumns
dc.Add(c)
Next
While Data.Splits(0).DisplayColumns.Count > 0
Data.Splits(0).DisplayColumns.RemoveAt(0)
End While
For Each dr In dv
For Each e As C1DisplayColumn In dc
If e.Name = dr.Item(3) Then
Data.Splits(0).DisplayColumns.Insert(0, e)
End If
Next
Next
End Function
End Class
Public Class MySpaltenTitel
Private spaltendata As DataTable = Globals.Spaltendaten
Sub New()
load_data()
End Sub
Sub dispose()
spaltendata.Dispose()
Me.dispose()
End Sub
Public Function getspalte(ByVal tabelle As String, ByVal feld As String, ByRef spaltenname As String, ByRef locked As Boolean, _
ByRef colwidth As Integer, ByRef order As Integer, ByRef alshacken As Boolean, ByRef tiptext As String, ByRef numberformat As String)
If spaltendata.Rows.Count = 0 Then load_data()
Dim dv() As DataRow
Dim dr As DataRow
dv = spaltendata.Select("Tabelle='" & tabelle & "' and tabellenspalte='" & feld & "'", "Reihenfolge, Eintragnr")
If dv.Length = 0 Then
spaltenname = ""
locked = True
colwidth = 0
order = 0
alshacken = False
tiptext = ""
numberformat = ""
End If
For Each dr In dv
spaltenname = dr.Item(3)
locked = dr.Item(4)
colwidth = dr.Item(6)
order = dr.Item(7)
alshacken = dr.Item(5)
tiptext = dr.Item(8)
numberformat = dr.Item(14).ToString
Next
'Dim i As Integer
'For i = 0 To spaltendata.Rows.Count - 1
' If UCase(spaltendata.Rows(i).Item(1)) = UCase(tabelle) And UCase(spaltendata.Rows(i).Item(2)) = UCase(feld) Then
' spaltenname = spaltendata.Rows(i).Item(3)
' locked = spaltendata.Rows(i).Item(4)
' colwidth = spaltendata.Rows(i).Item(6)
' order = spaltendata.Rows(i).Item(7)
' alshacken = spaltendata.Rows(i).Item(5)
' tiptext = spaltendata.Rows(i).Item(8)
' Exit Function
' End If
'Next
End Function
Public Sub load_data()
If Me.spaltendata.Rows.Count > 0 Then Exit Sub
Dim spalten As New Utils.clsSpalten()
spaltendata.Rows.Clear()
spalten.cpMainConnectionProvider = conn
spaltendata = spalten.Select_All_Aktiv
Globals.Spaltendaten = spaltendata
End Sub
End Class
Public Class clsSpalten
Inherits DB.clsSpalten
''' <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 Function Select_All_Aktiv() As DataTable
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
scmCmdToExecute.CommandText = "dbo.[pr_spalten_SelectAll_Aktiv]"
scmCmdToExecute.CommandType = CommandType.StoredProcedure
Dim dtToReturn As DataTable = New DataTable("spalten")
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(0)) Then
' // Throw error.
Throw New Exception("Stored Procedure 'pr_spalten_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("clsSpalten::SelectAll::Error occured.", ex)
Finally
If m_bMainConnectionIsCreatedLocal Then
' // Close connection.
m_scoMainConnection.Close()
End If
scmCmdToExecute.Dispose()
sdaAdapter.Dispose()
End Try
End Function
End Class
End Namespace

View File

@@ -0,0 +1,3 @@
Public Class clsReporting
End Class

View File

@@ -0,0 +1,159 @@
Imports C1.Win.C1TrueDBGrid
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Namespace TKB.VV.Utils
Public Class clsToolTips
Public WithEvents MyTooltip As New ToolTip
Dim ToolTipData As DataSet = Globals.ToolTipDaten
Dim connection As New SqlConnection()
Dim da As New SqlDataAdapter("", connection)
Dim l As New List(Of Control)
Dim WithEvents evh As _Generic_Event_Handler.Generic_Event_Handler = Globals.Generic_Event_Handler
Public Function Edit_ToolTips(ByRef frm As Form, ByRef ctlcol As Collection)
Me.Load_Data()
l.Clear()
Me.GetControl(frm, "*", l)
For Each s As Control In l
Try
MyTooltip.SetToolTip(s, frm.Name + "|" + s.Name)
MyTooltip.Tag = frm.Name
Catch ex As Exception
MsgBox(ex.Message)
End Try
Next
'For Each ctl As Control In ctlcol
' Try
' MyTooltip.SetToolTip(ctl, "SetToolTip")
' MyTooltip.Tag = frm.Name + "|" + ctl.Name
' Catch ex As Exception
' End Try
'Next
End Function
Private Sub MyTooltip_Popup(ByVal sender As Object, ByVal e As System.Windows.Forms.PopupEventArgs) Handles MyTooltip.Popup
'MsgBox(e.AssociatedControl.Name)
evh.Edit_Tooltip(MyTooltip.Tag, e.AssociatedControl.Name)
'Dim s As String = MyTooltip.Tag
'Dim sp() As String
'sp = s.Split("|")
'evh.Edit_Tooltip(sp(0), sp(1))
End Sub
Public Function Set_ToolTips(ByRef frm As Form)
Me.Load_Data()
'MyTooltip.ToolTipIcon = ToolTipIcon.Info
MyTooltip.IsBalloon = True
MyTooltip.UseFading = True
MyTooltip.UseAnimation = True
Dim dv As New DataView(ToolTipData.Tables(0), "Aktiv = 1 and (Formularname='" & frm.Name & "' or Formularname='Allgemein')", "", DataViewRowState.CurrentRows)
For Each dr As DataRowView In dv
l.Clear()
Me.GetControl(frm, dr.Item("Controlname"), l)
Try
For Each ctl As Control In l
Try
MyTooltip.SetToolTip(ctl, dr.Item("ToolTip"))
Catch
End Try
Next
Catch ex As Exception
End Try
Next
End Function
''' <summary>
''' Daten ab Datenbank laden
''' </summary>
''' <remarks></remarks>
Private Sub Load_Data()
Try
If ToolTipData.Tables.Count < 1 Then
ToolTipData.Tables.Clear()
Else
Exit Sub
End If
Catch ex As Exception
End Try
ToolTipData.Tables.Clear()
Dim sqlcmd As New SqlCommand
sqlcmd.CommandText = "dbo.my_tooltip_get_data"
'sqlcmd.Parameters(1).Value = Globals.clsmitarbeiter.iMitarbeiternr.Value
sqlcmd.CommandType = CommandType.StoredProcedure
sqlcmd.Connection = connection
Try
connection.ConnectionString = Globals.sConnectionString
connection.Open()
da.SelectCommand = sqlcmd
da.Fill(ToolTipData, "Tooltips")
Globals.SecurityDaten.Tables.Add(ToolTipData.Tables(0).Copy)
Catch ex As Exception
Finally
connection.Close()
da.Dispose()
sqlcmd.Dispose()
End Try
End Sub
#Region "Utils"
''' <summary>
''' Sucht in den Base-Controls sämtliche Controls mit dem Namen in "Key" (Wildcards * möglich) und listet
''' die gefundnen Controls in der Liste L zur weiteren Bearbeitung
''' </summary>
''' <param name="BaseControl">Base-Contrlo (z.B. aktuelles Formular</param>
''' <param name="Key">Schlüssel welcher gesucht werden soll</param>
''' <param name="L">Liste der gefundenen Objekte</param>
''' <returns>True wenn eines oder mehr Controls gefunden wurden, false wenn kein Control gefunden wurde.
''' </returns>
''' <remarks></remarks>
Private Function GetControl(ByVal BaseControl As Control, ByVal Key As String, ByRef L As List(Of Control), Optional ByVal ReturnAtFirstElement As Boolean = False) As Boolean
If L Is Nothing Then L = New List(Of Control)
Dim Gut As Boolean
Dim ReturnFlag As Boolean = False
If Key IsNot Nothing Then Key = Key.ToLower
If BaseControl.HasChildren = True Then
For Each ctl As Control In BaseControl.Controls
Gut = False
If Key Is Nothing Then
Gut = True
Else
If ctl.Name.Length >= Key.Length Then
Key = Key.ToLower
If Key.StartsWith("*") Then
If Key.Substring(1) = ctl.Name.ToLower.Substring(ctl.Name.Length - (Key.Length - 1), Key.Length - 1) Then Gut = True
ElseIf Key.EndsWith("*") Then
If Key.Substring(0, Key.Length - 1) = ctl.Name.ToLower.Substring(0, Key.Length - 1) Then Gut = True
Else
If Key = ctl.Name.ToLower Then Gut = True
End If
End If
End If
If Gut = True Then
L.Add(ctl)
If ReturnAtFirstElement = True Then ReturnFlag = True
End If
If ReturnFlag = False Then
Call GetControl(ctl, Key, L)
End If
Next
End If
If L.Count - 1 > -1 Then
Return True
Else
Return False
End If
End Function
#End Region
End Class
End Namespace

View File

@@ -0,0 +1,97 @@
Imports System
Imports System.Data
Imports System.Data.SqlTypes
Imports System.Data.SqlClient
Public Class clsWindowHandling
Dim m_width As Integer
Property Width As Integer
Get
Return m_width
End Get
Set(value As Integer)
m_width = value
End Set
End Property
Dim m_height As Integer
Property height As Integer
Get
Return m_height
End Get
Set(value As Integer)
m_height = value
End Set
End Property
Public Function get_windowsize(windowsnr As Integer)
Dim selectcommand As New SqlCommand
Dim connection As New SqlConnection()
Dim da As New SqlDataAdapter("", connection)
Dim ds As New DataSet
selectcommand.CommandText = "sp_getset_Windowsize"
selectcommand.Parameters.Add("@WindowsNr", SqlDbType.VarChar, 255)
selectcommand.Parameters.Add("@Mitarbeiternr", SqlDbType.Int, 4)
selectcommand.Parameters.Add("@fnkt", SqlDbType.Int, 4)
selectcommand.Parameters.Add("@width", SqlDbType.Int, 4)
selectcommand.Parameters.Add("@height", SqlDbType.Int, 4)
selectcommand.Parameters(0).Value = windowsnr
selectcommand.Parameters(1).Value = Globals.clsmitarbeiter.iMitarbeiternr.Value
selectcommand.Parameters(2).Value = 1
selectcommand.Parameters(3).Value = 0
selectcommand.Parameters(4).Value = 0
selectcommand.CommandType = CommandType.StoredProcedure
selectcommand.Connection = connection
Try
connection.ConnectionString = Globals.sConnectionString
connection.Open()
da.SelectCommand = selectcommand
da.Fill(ds)
Me.Width = ds.Tables(0).Rows(0).Item("Width")
Me.height = ds.Tables(0).Rows(0).Item("Height")
Catch ex As Exception
Me.Width = 0
Me.height = 0
Finally
connection.Close()
da.Dispose()
ds.Dispose()
selectcommand.Dispose()
End Try
End Function
Public Function set_Windowsize(windownr As Integer, width As Integer, height As Integer)
Dim selectcommand As New SqlCommand
Dim connection As New SqlConnection()
Dim da As New SqlDataAdapter("", connection)
Dim ds As New DataSet
selectcommand.CommandText = "sp_getset_Windowsize"
selectcommand.Parameters.Add("@WindowsNr", SqlDbType.VarChar, 255)
selectcommand.Parameters.Add("@Mitarbeiternr", SqlDbType.Int, 4)
selectcommand.Parameters.Add("@fnkt", SqlDbType.Int, 4)
selectcommand.Parameters.Add("@width", SqlDbType.Int, 4)
selectcommand.Parameters.Add("@height", SqlDbType.Int, 4)
selectcommand.Parameters(0).Value = windownr
selectcommand.Parameters(1).Value = Globals.clsmitarbeiter.iMitarbeiternr.Value
selectcommand.Parameters(2).Value = 2
selectcommand.Parameters(3).Value = width
selectcommand.Parameters(4).Value = height
selectcommand.CommandType = CommandType.StoredProcedure
selectcommand.Connection = connection
Try
connection.ConnectionString = Globals.sConnectionString
connection.Open()
da.SelectCommand = selectcommand
da.Fill(ds)
Catch ex As Exception
MsgBox(ex.Message)
Finally
connection.Close()
da.Dispose()
ds.Dispose()
selectcommand.Dispose()
End Try
End Function
End Class

View File

@@ -0,0 +1,38 @@
'------------------------------------------------------------------------------
' <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
'HINWEIS: Diese Datei wird automatisch generiert. Ändern Sie sie nicht direkt. Zum Ändern
' oder bei in dieser Datei auftretenden Buildfehlern wechseln Sie zum Projekt-Designer.
' (Wechseln Sie dazu zu den Projekteigenschaften, oder doppelklicken Sie auf den Knoten "Mein Projekt" im
' Projektmappen-Explorer). Nehmen Sie auf der Registerkarte "Anwendung" entsprechende Änderungen vor.
'
Partial Friend Class MyApplication
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Public Sub New()
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
Me.IsSingleInstance = false
Me.EnableVisualStyles = true
Me.SaveMySettingsOnExit = true
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
End Sub
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = Global.BEA.frmMain
End Sub
End Class
End Namespace

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MySubMain>true</MySubMain>
<MainForm>frmMain</MainForm>
<SingleInstance>false</SingleInstance>
<ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles>
<AuthenticationMode>0</AuthenticationMode>
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData>

View File

@@ -0,0 +1,35 @@
Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices
' Allgemeine Informationen über eine Assembly werden über die folgenden
' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
' die mit einer Assembly verknüpft sind.
' Die Werte der Assemblyattribute überprüfen
<Assembly: AssemblyTitle("BEA")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("BEA")>
<Assembly: AssemblyCopyright("Copyright © 2013")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
<Assembly: Guid("01e13083-f1fe-40b7-902b-2b7de8d7d953")>
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
'
' Hauptversion
' Nebenversion
' Buildnummer
' Revision
'
' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>

View File

@@ -0,0 +1,103 @@
'------------------------------------------------------------------------------
' <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
Imports System
Namespace My.Resources
'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
'-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
'''<summary>
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
Friend Module Resources
Private resourceMan As Global.System.Resources.ResourceManager
Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary>
''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("BEA.Resources", GetType(Resources).Assembly)
resourceMan = temp
End If
Return resourceMan
End Get
End Property
'''<summary>
''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set
resourceCulture = value
End Set
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
'''</summary>
Friend ReadOnly Property _Stop() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("Stop", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
'''</summary>
Friend ReadOnly Property CopyCursor() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("CopyCursor", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
'''</summary>
Friend ReadOnly Property MoveCursor() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("MoveCursor", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
'''</summary>
Friend ReadOnly Property Stop1() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("Stop1", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
End Get
End Property
End Module
End Namespace

View File

@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
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">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<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" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</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>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="CopyCursor" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Hands-One-Finger-icon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="MoveCursor" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Hands-One-Finger-icon1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Stop" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Hands-One-Finger-icon2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Stop1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Stop.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@@ -0,0 +1,145 @@
'------------------------------------------------------------------------------
' <auto-generated>
' Dieser Code wurde von einem Tool generiert.
' Laufzeitversion:4.0.30319.42000
'
' Ä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", "16.4.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 "Automatische My.Settings-Speicherfunktion"
#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(sender As Global.System.Object, 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("10")> _
Public Property Tage() As String
Get
Return CType(Me("Tage"),String)
End Get
Set
Me("Tage") = value
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("#FF0000")> _
Public Property Foreground_gueltig() As String
Get
Return CType(Me("Foreground_gueltig"),String)
End Get
Set
Me("Foreground_gueltig") = value
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("#FF0000")> _
Public Property Foreground_vor_ablauf() As String
Get
Return CType(Me("Foreground_vor_ablauf"),String)
End Get
Set
Me("Foreground_vor_ablauf") = value
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("#FFE5CC")> _
Public Property Background_vor_ablauf() As String
Get
Return CType(Me("Background_vor_ablauf"),String)
End Get
Set
Me("Background_vor_ablauf") = value
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("#FF0000")> _
Public Property Foreground_abgelaufen() As String
Get
Return CType(Me("Foreground_abgelaufen"),String)
End Get
Set
Me("Foreground_abgelaufen") = value
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("#FFFF00")> _
Public Property Background_abgelaufen() As String
Get
Return CType(Me("Background_abgelaufen"),String)
End Get
Set
Me("Background_abgelaufen") = 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.BEA.My.MySettings
Get
Return Global.BEA.My.MySettings.Default
End Get
End Property
End Module
End Namespace

View File

@@ -0,0 +1,24 @@
<?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="Tage" Type="System.String" Scope="User">
<Value Profile="(Default)">10</Value>
</Setting>
<Setting Name="Foreground_gueltig" Type="System.String" Scope="User">
<Value Profile="(Default)">#FF0000</Value>
</Setting>
<Setting Name="Foreground_vor_ablauf" Type="System.String" Scope="User">
<Value Profile="(Default)">#FF0000</Value>
</Setting>
<Setting Name="Background_vor_ablauf" Type="System.String" Scope="User">
<Value Profile="(Default)">#FFE5CC</Value>
</Setting>
<Setting Name="Foreground_abgelaufen" Type="System.String" Scope="User">
<Value Profile="(Default)">#FF0000</Value>
</Setting>
<Setting Name="Background_abgelaufen" Type="System.String" Scope="User">
<Value Profile="(Default)">#FFFF00</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@@ -0,0 +1 @@
C1.Win.C1TrueDBGrid.C1TrueDBGrid, C1.Win.C1TrueDBGrid.2, Version=2.0.20123.61277, Culture=neutral, PublicKeyToken=75ae3fb0e2b1e0da

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 971 B

View File

@@ -0,0 +1,178 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class FrmToolTipEditor
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmToolTipEditor))
Me.MenuStrip1 = New System.Windows.Forms.MenuStrip
Me.DateiToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.BeendenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip
Me.TSBtnQuit = New System.Windows.Forms.ToolStripButton
Me.lblFormular = New System.Windows.Forms.Label
Me.txtFormularname = New System.Windows.Forms.TextBox
Me.txtControlname = New System.Windows.Forms.TextBox
Me.lblControl = New System.Windows.Forms.Label
Me.lblToolTip = New System.Windows.Forms.Label
Me.txtToolTip = New System.Windows.Forms.TextBox
Me.btnSave = New System.Windows.Forms.Button
Me.MenuStrip1.SuspendLayout()
Me.ToolStrip1.SuspendLayout()
Me.SuspendLayout()
'
'MenuStrip1
'
Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DateiToolStripMenuItem})
Me.MenuStrip1.Location = New System.Drawing.Point(0, 0)
Me.MenuStrip1.Name = "MenuStrip1"
Me.MenuStrip1.Size = New System.Drawing.Size(587, 24)
Me.MenuStrip1.TabIndex = 1
Me.MenuStrip1.Text = "MenuStrip1"
'
'DateiToolStripMenuItem
'
Me.DateiToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.BeendenToolStripMenuItem})
Me.DateiToolStripMenuItem.Name = "DateiToolStripMenuItem"
Me.DateiToolStripMenuItem.Size = New System.Drawing.Size(44, 20)
Me.DateiToolStripMenuItem.Text = "&Datei"
'
'BeendenToolStripMenuItem
'
Me.BeendenToolStripMenuItem.Name = "BeendenToolStripMenuItem"
Me.BeendenToolStripMenuItem.Size = New System.Drawing.Size(152, 22)
Me.BeendenToolStripMenuItem.Text = "&Beenden"
'
'ToolStrip1
'
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TSBtnQuit})
Me.ToolStrip1.Location = New System.Drawing.Point(0, 24)
Me.ToolStrip1.Name = "ToolStrip1"
Me.ToolStrip1.Size = New System.Drawing.Size(587, 25)
Me.ToolStrip1.TabIndex = 2
Me.ToolStrip1.Text = "ToolStrip1"
'
'TSBtnQuit
'
Me.TSBtnQuit.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
Me.TSBtnQuit.Image = CType(resources.GetObject("TSBtnQuit.Image"), System.Drawing.Image)
Me.TSBtnQuit.ImageTransparentColor = System.Drawing.Color.Magenta
Me.TSBtnQuit.Name = "TSBtnQuit"
Me.TSBtnQuit.Size = New System.Drawing.Size(23, 22)
Me.TSBtnQuit.Text = "Fenster schliessen"
Me.TSBtnQuit.ToolTipText = "Fenster schliessen"
'
'lblFormular
'
Me.lblFormular.AutoSize = True
Me.lblFormular.Location = New System.Drawing.Point(12, 61)
Me.lblFormular.Name = "lblFormular"
Me.lblFormular.Size = New System.Drawing.Size(73, 13)
Me.lblFormular.TabIndex = 3
Me.lblFormular.Text = "Formularname"
'
'txtFormularname
'
Me.txtFormularname.Location = New System.Drawing.Point(91, 61)
Me.txtFormularname.Name = "txtFormularname"
Me.txtFormularname.Size = New System.Drawing.Size(210, 20)
Me.txtFormularname.TabIndex = 4
'
'txtControlname
'
Me.txtControlname.Location = New System.Drawing.Point(91, 87)
Me.txtControlname.Name = "txtControlname"
Me.txtControlname.Size = New System.Drawing.Size(210, 20)
Me.txtControlname.TabIndex = 5
'
'lblControl
'
Me.lblControl.AutoSize = True
Me.lblControl.Location = New System.Drawing.Point(12, 90)
Me.lblControl.Name = "lblControl"
Me.lblControl.Size = New System.Drawing.Size(40, 13)
Me.lblControl.TabIndex = 6
Me.lblControl.Text = "Control"
'
'lblToolTip
'
Me.lblToolTip.AutoSize = True
Me.lblToolTip.Location = New System.Drawing.Point(12, 126)
Me.lblToolTip.Name = "lblToolTip"
Me.lblToolTip.Size = New System.Drawing.Size(43, 13)
Me.lblToolTip.TabIndex = 7
Me.lblToolTip.Text = "ToolTip"
'
'txtToolTip
'
Me.txtToolTip.Location = New System.Drawing.Point(91, 119)
Me.txtToolTip.Multiline = True
Me.txtToolTip.Name = "txtToolTip"
Me.txtToolTip.Size = New System.Drawing.Size(474, 75)
Me.txtToolTip.TabIndex = 8
'
'btnSave
'
Me.btnSave.Location = New System.Drawing.Point(91, 220)
Me.btnSave.Name = "btnSave"
Me.btnSave.Size = New System.Drawing.Size(75, 23)
Me.btnSave.TabIndex = 9
Me.btnSave.Text = "Speichern"
Me.btnSave.UseVisualStyleBackColor = True
'
'FrmToolTipEditor
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(587, 262)
Me.Controls.Add(Me.btnSave)
Me.Controls.Add(Me.txtToolTip)
Me.Controls.Add(Me.lblToolTip)
Me.Controls.Add(Me.lblControl)
Me.Controls.Add(Me.txtControlname)
Me.Controls.Add(Me.txtFormularname)
Me.Controls.Add(Me.lblFormular)
Me.Controls.Add(Me.ToolStrip1)
Me.Controls.Add(Me.MenuStrip1)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.Name = "FrmToolTipEditor"
Me.Text = "ToolTipEditor"
Me.MenuStrip1.ResumeLayout(False)
Me.MenuStrip1.PerformLayout()
Me.ToolStrip1.ResumeLayout(False)
Me.ToolStrip1.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents MenuStrip1 As System.Windows.Forms.MenuStrip
Friend WithEvents DateiToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents BeendenToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStrip1 As System.Windows.Forms.ToolStrip
Friend WithEvents TSBtnQuit As System.Windows.Forms.ToolStripButton
Friend WithEvents lblFormular As System.Windows.Forms.Label
Friend WithEvents txtFormularname As System.Windows.Forms.TextBox
Friend WithEvents txtControlname As System.Windows.Forms.TextBox
Friend WithEvents lblControl As System.Windows.Forms.Label
Friend WithEvents lblToolTip As System.Windows.Forms.Label
Friend WithEvents txtToolTip As System.Windows.Forms.TextBox
Friend WithEvents btnSave As System.Windows.Forms.Button
End Class

Some files were not shown because too many files have changed in this diff Show More