Initial
This commit is contained in:
77
Backup/BusinessFacade/AktuellerBenutzer.vb
Normal file
77
Backup/BusinessFacade/AktuellerBenutzer.vb
Normal file
@@ -0,0 +1,77 @@
|
||||
'''<summary>Diese klasse beinhaltet die Informationen für den aktuell angemeldeten Benutzer</summary>
|
||||
Public Class AktuellerBenutzer
|
||||
|
||||
#Region "Members"
|
||||
Private Shared _mitarbeiter As Mitarbeiter
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Constructors"
|
||||
Public Sub New()
|
||||
'erstelle dummy
|
||||
End Sub
|
||||
|
||||
Public Sub New(ByVal mitarbeiterNr As Integer)
|
||||
ContructorHelper(mitarbeiterNr)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Private Functions"
|
||||
'''<summary>Ermöglicht eine Überladung des Contrustors analog c#</summary>
|
||||
'''<param name="mitarbeiterNr"></param>
|
||||
Private Sub ContructorHelper(ByVal mitarbeiterNr As Integer)
|
||||
Try
|
||||
If _mitarbeiter Is Nothing Then
|
||||
_mitarbeiter = New BusinessFacade.Mitarbeiter(mitarbeiterNr)
|
||||
'_mitarbeiter = New Mitarbeiter(mitarbeiterNr)
|
||||
Else
|
||||
Destroy()
|
||||
_mitarbeiter = New Mitarbeiter(mitarbeiterNr)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.AktuellerBenutzer.ContructorHelper", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Public Functions"
|
||||
'''<summary>Settz die aktuelle Objekt Instanz auf Null (Nothing)</summary>
|
||||
Public Shared Sub Destroy()
|
||||
_mitarbeiter = Nothing
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
Public Shared ReadOnly Property Vorname() As String
|
||||
Get
|
||||
Return _mitarbeiter.Vorname
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared ReadOnly Property Nachname() As String
|
||||
Get
|
||||
Return _mitarbeiter.Nachname
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared ReadOnly Property MitarbeiterNr() As String
|
||||
Get
|
||||
Return _mitarbeiter.MitarbeiterNr
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared ReadOnly Property TGNummer() As String
|
||||
Get
|
||||
Return _mitarbeiter.TGNummer
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared ReadOnly Property Journalisierung() As Boolean
|
||||
Get
|
||||
Return _mitarbeiter.Journalisierung
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
169
Backup/BusinessFacade/Anwendung.vb
Normal file
169
Backup/BusinessFacade/Anwendung.vb
Normal file
@@ -0,0 +1,169 @@
|
||||
'''<summary>Diese klasse beinhaltet die Logik für Anwendungen</summary>
|
||||
Public Class Anwendung
|
||||
|
||||
#Region "Members"
|
||||
Private _anwendungsNr As Integer
|
||||
Private _bezeichnung As String
|
||||
Private _beschreibung As String
|
||||
Private _mandantNr As Integer 'wird nicht gebraucht. kein property implementiert
|
||||
Private _aktiv As Boolean
|
||||
Private _erstelltAm As DateTime
|
||||
Private _mutiertAm As DateTime
|
||||
Private _mutiererId As Integer
|
||||
#End Region
|
||||
|
||||
#Region "Constructors"
|
||||
'''<summary>default konstruktor</summary>
|
||||
Public Sub New()
|
||||
|
||||
End Sub
|
||||
|
||||
'''<summary>lädt eine anwendung aus der db</summary>
|
||||
'''<param name="anwendungsNr"></param>
|
||||
Public Sub New(ByVal anwendungsNr As Integer)
|
||||
|
||||
If anwendungsNr.ToString() <> Config.GetParameterValue("NullReplaceValue") Then
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.Anwendung.GetAnwendung(ds, anwendungsNr)
|
||||
LoadData(ds)
|
||||
Else
|
||||
'erstelle leere instanz
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'''<summary>erstellt eine neue anwendung in der db und lädt diese</summary>
|
||||
'''<param name="bezeichnung"></param>
|
||||
'''<param name="beschreibung"></param>
|
||||
'''<param name="aktiv"></param>
|
||||
Public Sub New(ByVal bezeichnung As String, ByVal beschreibung As String, ByVal aktiv As Boolean, ByVal mutiererId As Integer)
|
||||
_bezeichnung = bezeichnung
|
||||
_beschreibung = beschreibung
|
||||
_aktiv = aktiv
|
||||
Save(mutiererId)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Private Functions"
|
||||
'''<summary>Lädt alle Daten einer Anwendung aus der DB</summary>
|
||||
Private Sub LoadData(ByVal ds As DataSet)
|
||||
Try
|
||||
If Common.Tools.ValidateDS(ds) Then
|
||||
_anwendungsNr = Common.Tools.CToInt32(ds.Tables(0).Rows(0)("anwendungNr"))
|
||||
_bezeichnung = NullHandler.CToString(ds.Tables(0).Rows(0)("bezeichnung"))
|
||||
_beschreibung = NullHandler.CToString(ds.Tables(0).Rows(0)("beschreibung"))
|
||||
_mandantNr = NullHandler.CToInt32(ds.Tables(0).Rows(0)("mandantNr"))
|
||||
_aktiv = Common.Tools.CToBool(ds.Tables(0).Rows(0)("aktiv"))
|
||||
_erstelltAm = NullHandler.CToDateTime(ds.Tables(0).Rows(0)("erstellt_am"))
|
||||
_mutiertAm = NullHandler.CToDateTime(ds.Tables(0).Rows(0)("mutiert_am"))
|
||||
_mutiererId = Common.Tools.CToInt32(ds.Tables(0).Rows(0)("mutierer"))
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Anwendung.Save", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Public Functions"
|
||||
'''<summary>Speichert alle Members in die DB</summary>
|
||||
Public Sub Save(ByVal mutierer As Integer)
|
||||
Try
|
||||
Dim err As Integer
|
||||
Dim key As Integer
|
||||
|
||||
If _anwendungsNr = 0 Then 'create new
|
||||
err = DataAccess.Anwendung.Add(key, _bezeichnung, _beschreibung, _mandantNr, _aktiv, mutierer)
|
||||
If err = 0 Then
|
||||
_anwendungsNr = key
|
||||
End If
|
||||
Else 'save existing
|
||||
err = DataAccess.Anwendung.Update(_anwendungsNr, _bezeichnung, Beschreibung, _mandantNr, _aktiv, mutierer)
|
||||
End If
|
||||
|
||||
If err <> 0 Then
|
||||
Throw New DokumentartException(Meldungstext.GetInhaltById(40000))
|
||||
End If
|
||||
|
||||
'refresh data
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.Anwendung.GetAnwendung(ds, _anwendungsNr)
|
||||
LoadData(ds)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Anwendung.Save", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
'''<summary>Löscht einen Mitarbeiter aus der DB (Setzt in auf inaktiv)</summary>
|
||||
Public Sub Delete(ByVal mutierer As Integer)
|
||||
Try
|
||||
_aktiv = False
|
||||
Save(mutierer)
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Anwendung.Delete", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
Public Property AnwendungsNr() As Integer
|
||||
Get
|
||||
Return _anwendungsNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_anwendungsNr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Bezeichnung() As String
|
||||
Get
|
||||
Return _bezeichnung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_bezeichnung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Beschreibung() As String
|
||||
Get
|
||||
Return _beschreibung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_beschreibung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Aktiv() As Boolean
|
||||
Get
|
||||
Return _aktiv
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_aktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ErstelltAm() As DateTime
|
||||
Get
|
||||
Return _erstelltAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_erstelltAm = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MutiertAm() As DateTime
|
||||
Get
|
||||
Return _mutiertAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_mutiertAm = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MutiererId() As Integer
|
||||
Get
|
||||
Return _mutiererId
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mutiererId = Value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
31
Backup/BusinessFacade/AssemblyInfo.vb
Normal file
31
Backup/BusinessFacade/AssemblyInfo.vb
Normal file
@@ -0,0 +1,31 @@
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' Allgemeine Informationen über eine Assembly werden über die folgende
|
||||
' Attributgruppe gesteuert. Ändern Sie diese Attributwerte, um Informationen,
|
||||
' die mit einer Assembly verknüpft sind, zu bearbeiten.
|
||||
|
||||
' Die Werte der Assemblyattribute überprüfen
|
||||
|
||||
<Assembly: AssemblyTitle("EDOKA.BusinessFacade")>
|
||||
<Assembly: AssemblyDescription("the new part of the EDOKA-BusinessFacade")>
|
||||
<Assembly: AssemblyCompany("TKB")>
|
||||
<Assembly: AssemblyProduct("EDOKA")>
|
||||
<Assembly: AssemblyCopyright("TKB")>
|
||||
<Assembly: AssemblyTrademark("-")>
|
||||
<Assembly: CLSCompliant(True)>
|
||||
|
||||
'Die folgende GUID ist für die ID der Typbibliothek, wenn dieses Projekt in COM angezeigt wird
|
||||
<Assembly: Guid("9C9565CC-65B6-4D09-B324-850699988E7C")>
|
||||
|
||||
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
'
|
||||
' Haupversion
|
||||
' Nebenversion
|
||||
' Buildnummer
|
||||
' Revisionsnummer
|
||||
'
|
||||
' Sie können alle Werte angeben oder auf die standardmäßigen Build- und Revisionsnummern
|
||||
' zurückgreifen, indem Sie '*' wie unten angezeigt verwenden:
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.*")>
|
||||
209
Backup/BusinessFacade/BusinessFacade.vbproj
Normal file
209
Backup/BusinessFacade/BusinessFacade.vbproj
Normal file
@@ -0,0 +1,209 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{1396EF4A-9B94-4DB0-971B-78A2F0E19D55}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>EDOKALib.BusinessFacade</AssemblyName>
|
||||
<AssemblyOriginatorKeyFile>
|
||||
</AssemblyOriginatorKeyFile>
|
||||
<AssemblyOriginatorKeyMode>None</AssemblyOriginatorKeyMode>
|
||||
<DefaultClientScript>JScript</DefaultClientScript>
|
||||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Library</OutputType>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
<RootNamespace>EDOKALib.BusinessFacade</RootNamespace>
|
||||
<StartupObject>EDOKALib.BusinessFacade.%28Keine%29</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<MyType>Windows</MyType>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<OldToolsVersion>2.0</OldToolsVersion>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DocumentationFile>EDOKALib.BusinessFacade.xml</DocumentationFile>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DocumentationFile>EDOKALib.BusinessFacade.xml</DocumentationFile>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<Optimize>true</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
|
||||
<DebugType>none</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'EDOKA_DLLs|AnyCPU' ">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DocumentationFile>EDOKALib.BusinessFacade.xml</DocumentationFile>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="C1.Win.C1TrueDBGrid.2, Version=2.0.20073.61130, Culture=neutral, PublicKeyToken=75ae3fb0e2b1e0da, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\EDOKA\obj\C1.Win.C1TrueDBGrid.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System">
|
||||
<Name>System</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<Name>System.Data</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<Name>System.XML</Name>
|
||||
</Reference>
|
||||
<Reference Include="TKBLib.Errorhandling.v1, Version=1.0.2489.24501, Culture=neutral">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\proj\TKBLib\aktuellDebug\TKBLib.Errorhandling.v1.dll</HintPath>
|
||||
</Reference>
|
||||
<ProjectReference Include="..\Common\Common.vbproj">
|
||||
<Name>Common</Name>
|
||||
<Project>{67E15143-9CF6-4595-8A52-A01A16370E51}</Project>
|
||||
<Package>{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</Package>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\DataAccess\DataAccess.vbproj">
|
||||
<Name>DataAccess</Name>
|
||||
<Project>{6D3A9C4A-7025-4FD6-9BB3-B70874F0527C}</Project>
|
||||
<Package>{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</Package>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Linq" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AktuellerBenutzer.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Anwendung.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="AssemblyInfo.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Config.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Dokument.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Dokumentart.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Dokumenttyp.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Funktionsgruppe.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Klassifizierung.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Meldungstext.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Mitarbeiter.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MitarbeiterFunktionsgruppe.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="NullHandler.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="OfficeVorlage.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Parameter.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Profil.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Spalten.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Team.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="TeamMitarbeiter.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="My Project\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
78
Backup/BusinessFacade/BusinessFacade.vbproj.user
Normal file
78
Backup/BusinessFacade/BusinessFacade.vbproj.user
Normal file
@@ -0,0 +1,78 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<LastOpenVersion>7.10.3077</LastOpenVersion>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ReferencePath>C:\proj\TKBLib\aktuellDebug\</ReferencePath>
|
||||
<CopyProjectDestinationFolder>
|
||||
</CopyProjectDestinationFolder>
|
||||
<CopyProjectUncPath>
|
||||
</CopyProjectUncPath>
|
||||
<CopyProjectOption>0</CopyProjectOption>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
<ProjectTrust>0</ProjectTrust>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<EnableASPDebugging>false</EnableASPDebugging>
|
||||
<EnableASPXDebugging>false</EnableASPXDebugging>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
|
||||
<RemoteDebugEnabled>false</RemoteDebugEnabled>
|
||||
<RemoteDebugMachine>
|
||||
</RemoteDebugMachine>
|
||||
<StartAction>Project</StartAction>
|
||||
<StartArguments>
|
||||
</StartArguments>
|
||||
<StartPage>
|
||||
</StartPage>
|
||||
<StartProgram>
|
||||
</StartProgram>
|
||||
<StartURL>
|
||||
</StartURL>
|
||||
<StartWorkingDirectory>
|
||||
</StartWorkingDirectory>
|
||||
<StartWithIE>true</StartWithIE>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<EnableASPDebugging>false</EnableASPDebugging>
|
||||
<EnableASPXDebugging>false</EnableASPXDebugging>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
|
||||
<RemoteDebugEnabled>false</RemoteDebugEnabled>
|
||||
<RemoteDebugMachine>
|
||||
</RemoteDebugMachine>
|
||||
<StartAction>Project</StartAction>
|
||||
<StartArguments>
|
||||
</StartArguments>
|
||||
<StartPage>
|
||||
</StartPage>
|
||||
<StartProgram>
|
||||
</StartProgram>
|
||||
<StartURL>
|
||||
</StartURL>
|
||||
<StartWorkingDirectory>
|
||||
</StartWorkingDirectory>
|
||||
<StartWithIE>true</StartWithIE>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'EDOKA_DLLs|AnyCPU' ">
|
||||
<EnableASPDebugging>false</EnableASPDebugging>
|
||||
<EnableASPXDebugging>false</EnableASPXDebugging>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
|
||||
<RemoteDebugEnabled>false</RemoteDebugEnabled>
|
||||
<RemoteDebugMachine>
|
||||
</RemoteDebugMachine>
|
||||
<StartAction>Project</StartAction>
|
||||
<StartArguments>
|
||||
</StartArguments>
|
||||
<StartPage>
|
||||
</StartPage>
|
||||
<StartProgram>
|
||||
</StartProgram>
|
||||
<StartURL>
|
||||
</StartURL>
|
||||
<StartWorkingDirectory>
|
||||
</StartWorkingDirectory>
|
||||
<StartWithIE>true</StartWithIE>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
135
Backup/BusinessFacade/Config.vb
Normal file
135
Backup/BusinessFacade/Config.vb
Normal file
@@ -0,0 +1,135 @@
|
||||
|
||||
'''<summary>Verwaltet eine hashtable mit den parametern, damit nicht jedes mal ein dbzugriff erfolgt</summary>
|
||||
Public Class Config
|
||||
|
||||
#Region "Members"
|
||||
Private Shared _parameterList As New Hashtable() 'parameter für alle benutzer (benutzerNr = 0)
|
||||
Private Shared _userList As New Hashtable() 'liste für benutzer
|
||||
#End Region
|
||||
|
||||
#Region "Private Functions"
|
||||
'''<summary>Fügt einen neuen Parameter hinzu</summary>
|
||||
Private Shared Sub Add(ByVal p As Parameter)
|
||||
Try
|
||||
_parameterList.Add(p.Name, p)
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Config.Add", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Fügt einen neuen Parameter hinzu</summary>
|
||||
Private Shared Sub AddUserParam(ByVal p As Parameter)
|
||||
Try
|
||||
Dim h As Hashtable
|
||||
|
||||
h = _userList(p.BenutzerNr)
|
||||
If h Is Nothing Then 'noch keine param für diesen benutzer
|
||||
h = New Hashtable() 'neue param liste für benutzer erstellen
|
||||
h.Add(p.Name, p) 'parameter hinzufügen
|
||||
_userList.Add(p.BenutzerNr, h) 'parameter liste zur benutzerliste hinzufügen
|
||||
Else 'user hat eine liste
|
||||
h.Add(p.Name, p) 'parameter hinzufügen
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Config.AddUserParam", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Public Functions"
|
||||
'''<summary>Gibt den Wert eines Parameters zurück</summary>
|
||||
'''<param name="name">Name des Parameters</param>
|
||||
Public Shared Function GetParameterValue(ByVal name As String) As String
|
||||
Return GetParameter(name).Wert
|
||||
End Function
|
||||
|
||||
'''<summary>Gibt den Wert eines Benuzer spzifischen Parameters zurück</summary>
|
||||
'''<param name="name">Name des Parameters</param>
|
||||
'''<param name="benutzerNr"></param>
|
||||
Public Shared Function GetParameterValue(ByVal name As String, ByVal benutzerNr As Integer) As String
|
||||
If benutzerNr = 0 Then
|
||||
Return GetParameter(name).Wert
|
||||
Else
|
||||
Return GetUserParameter(name, benutzerNr).Wert
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function GetParameter(ByVal name As String) As Parameter
|
||||
Try
|
||||
Dim p As Parameter
|
||||
|
||||
p = _parameterList(name) 'suche nach param
|
||||
|
||||
If Not p Is Nothing Then
|
||||
Return p 'gefunden & return
|
||||
Else
|
||||
'try to load from db
|
||||
p = New Parameter(name, 0)
|
||||
If p.ParameterId <> 0 Then
|
||||
Add(p) 'zur hashtabelle hinzufügen
|
||||
Return p
|
||||
Else
|
||||
Throw New ConfigException("Parameter wurde nicht gefunden!") 'weder in der db noch in der hashtable gefunden
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Config.GetParameter", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Shared Function GetUserParameter(ByVal name As String, ByVal benutzerNr As Integer) As Parameter
|
||||
Try
|
||||
Dim p As Parameter
|
||||
Dim h As Hashtable
|
||||
|
||||
If benutzerNr = 0 Then
|
||||
Return GetParameter(name)
|
||||
End If
|
||||
|
||||
h = _userList(benutzerNr) 'benutzer parameterliste suchen
|
||||
If h Is Nothing Then
|
||||
h = New Hashtable() 'nicht gefunden neuerstellen
|
||||
End If
|
||||
p = h(name) 'nach parameter suchen
|
||||
|
||||
If Not p Is Nothing Then
|
||||
Return p 'parameter gefunden und zurückgeben
|
||||
Else
|
||||
'try to load from db
|
||||
p = New Parameter(name, benutzerNr)
|
||||
If p.ParameterId <> 0 Then
|
||||
AddUserParam(p)
|
||||
Return p
|
||||
Else
|
||||
Throw New ConfigException("Parameter wurde nicht gefunden!") 'weder in der db noch in der hashtable gefunden
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Config.GetParameter(...)", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
'''<summary>Diese Klasse behandelt eine Configuration spezifische Ausnahme</summary>
|
||||
Public Class ConfigException
|
||||
Inherits Exception
|
||||
|
||||
Dim _message As String
|
||||
|
||||
Public Sub New(ByVal message As String)
|
||||
_message = message
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property Message() As String
|
||||
Get
|
||||
Return _message
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
75
Backup/BusinessFacade/Dokument.vb
Normal file
75
Backup/BusinessFacade/Dokument.vb
Normal file
@@ -0,0 +1,75 @@
|
||||
Imports EDOKALib.Common
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für ein Dokument. Da diese Klasse vorständig sehr komplext wäre, ist diese hier NICHT vollständig und wird laufend um die benötigte Funktionalität erweitert</summary>
|
||||
Public Class Dokument
|
||||
|
||||
#Region "Members"
|
||||
|
||||
Private _dokumentId As String
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
Public Shared Function SetStatus()
|
||||
Try
|
||||
If IsNothing(Common.Action.Action) Then
|
||||
'action muss existieren
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EdokaLib.Dokument.SetStatus", "2 Static action object is nothing", TraceLevel.Warning)
|
||||
Throw New DokumentException(2, "Static action object is nothing")
|
||||
End If
|
||||
|
||||
Dim paramName, value As String
|
||||
|
||||
'nötige werte aus action xml lesen
|
||||
paramName = "OrderNr"
|
||||
value = Action.Action.GetParameterByName("fanummer3").Value
|
||||
|
||||
Dim mitarbeiter As New mitarbeiter(Action.Action.CreatorTgNr)
|
||||
|
||||
Dim result As Integer
|
||||
'effektiver status setzen
|
||||
result = DataAccess.Dokument.SetStatus(Action.Action.SourceApplication, paramName, value, mitarbeiter.MitarbeiterNr)
|
||||
|
||||
If result <> 0 Then
|
||||
Throw New DokumentException(1, "No rows have been affected")
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EdokaLib.Dokument.SetStatus", ex.Message & ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
#Region "DokumentException"
|
||||
|
||||
Public Class DokumentException
|
||||
Inherits Exception
|
||||
|
||||
Private _number As Integer
|
||||
Private _description As String
|
||||
|
||||
Public Sub New(ByVal number As Integer, ByVal description As String)
|
||||
_number = number
|
||||
_description = description
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property Message() As String
|
||||
Get
|
||||
Return _description
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Number() As Integer
|
||||
Get
|
||||
Return _number
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
|
||||
#End Region
|
||||
252
Backup/BusinessFacade/Dokumentart.vb
Normal file
252
Backup/BusinessFacade/Dokumentart.vb
Normal file
@@ -0,0 +1,252 @@
|
||||
|
||||
'''<summary>Verwaltung und logik von Dokumentarten</summary>
|
||||
Public Class Dokumentart
|
||||
|
||||
#Region "Members"
|
||||
Private _dokumentartNr As Integer
|
||||
Private _bezeichnung As String
|
||||
Private _parentId As Integer
|
||||
Private _sort As Integer
|
||||
Private _imageIndex As Integer
|
||||
Private _imageIndexOpen As Integer
|
||||
Private _beschreibung As String
|
||||
Private _mandantNr As Integer 'nicht implementiert
|
||||
Private _sprache As Integer 'nicht implementiert
|
||||
Private _aktiv As Boolean
|
||||
Private _erstelltAm As DateTime
|
||||
Private _mutiertAm As DateTime
|
||||
Private _mutiererId As Integer
|
||||
Private _coldApplication As String
|
||||
Private _coldBezeichnung As String
|
||||
#End Region
|
||||
|
||||
#Region "Constructors"
|
||||
Public Sub New()
|
||||
'leere instanz erstellen
|
||||
End Sub
|
||||
|
||||
Public Sub New(ByVal dokumentartNr As Integer)
|
||||
'instanz von db laden
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.Dokumentart.GetDokumentart(ds, dokumentartNr)
|
||||
LoadData(ds)
|
||||
End Sub
|
||||
|
||||
'''<summary>neue dokumentart in db erstellen und laden</summary>
|
||||
|
||||
Public Sub New(ByVal bezeichnung As String, ByVal parentId As Integer, ByVal sort As Integer, _
|
||||
ByVal imageIndex As Integer, ByVal imageIndexOpen As Integer, ByVal beschreibung As String, _
|
||||
ByVal aktiv As Boolean, ByVal coldApplication As String, ByVal coldBezeichnung As String, ByVal mutiererId As Integer)
|
||||
_bezeichnung = bezeichnung
|
||||
_parentId = parentId
|
||||
_sort = sort
|
||||
_imageIndex = imageIndex
|
||||
_imageIndexOpen = imageIndexOpen
|
||||
_beschreibung = beschreibung
|
||||
_aktiv = aktiv
|
||||
_coldApplication = coldApplication
|
||||
_coldBezeichnung = coldBezeichnung
|
||||
Save(mutiererId)
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Private Functions"
|
||||
|
||||
'''<summary>lädt die daten vom ds in die member der klasse</summary>
|
||||
'''<param name="ds"></param>
|
||||
|
||||
Private Sub LoadData(ByRef ds As DataSet)
|
||||
Try
|
||||
If Common.Tools.ValidateDS(ds) Then
|
||||
_dokumentartNr = NullHandler.CToInt32(ds.Tables(0).Rows(0)("dokumentartNr"))
|
||||
_bezeichnung = NullHandler.CToString(ds.Tables(0).Rows(0)("bezeichnung"))
|
||||
_parentId = NullHandler.CToInt32(ds.Tables(0).Rows(0)("parentId"))
|
||||
_sort = NullHandler.CToInt32(ds.Tables(0).Rows(0)("sort"))
|
||||
_imageIndex = NullHandler.CToInt32(ds.Tables(0).Rows(0)("imageIndex"))
|
||||
_imageIndexOpen = NullHandler.CToInt32(ds.Tables(0).Rows(0)("imageIndexOpen"))
|
||||
_beschreibung = NullHandler.CToString(ds.Tables(0).Rows(0)("beschreibung"))
|
||||
_mandantNr = NullHandler.CToInt32(ds.Tables(0).Rows(0)("mandantNr"))
|
||||
_sprache = NullHandler.CToInt32(ds.Tables(0).Rows(0)("sprache"))
|
||||
_aktiv = Common.Tools.CToBool(ds.Tables(0).Rows(0)("aktiv")) 'no null support, wird auf 0 gesetzt
|
||||
_erstelltAm = NullHandler.CToDateTime(ds.Tables(0).Rows(0)("erstellt_am"))
|
||||
_mutiertAm = NullHandler.CToDateTime(ds.Tables(0).Rows(0)("mutiert_am"))
|
||||
_mutiererId = NullHandler.CToInt32(ds.Tables(0).Rows(0)("mutierer"))
|
||||
_coldApplication = NullHandler.CToString(ds.Tables(0).Rows(0)("coldApplication"))
|
||||
_coldBezeichnung = NullHandler.CToString(ds.Tables(0).Rows(0)("coldBezeichnung"))
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Dokumentart.LoadData", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Public Functions"
|
||||
'''<summary>speichert eine dokumentart (insert und update)</summary>
|
||||
|
||||
Public Function Save(ByVal mutierer As Integer)
|
||||
Try
|
||||
Dim err As Integer
|
||||
|
||||
If _dokumentartNr = 0 Then 'create new
|
||||
err = DataAccess.Dokumentart.Add(_dokumentartNr, _bezeichnung, _parentId, _sort, _imageIndex, _
|
||||
_imageIndexOpen, _beschreibung, _mandantNr, _sprache, _aktiv, mutierer, _coldApplication, _
|
||||
_coldBezeichnung)
|
||||
|
||||
Else 'save existing
|
||||
err = DataAccess.Dokumentart.Update(_dokumentartNr, _bezeichnung, _parentId, _sort, _imageIndex, _
|
||||
_imageIndexOpen, _beschreibung, _mandantNr, _sprache, _aktiv, mutierer, _coldApplication, _
|
||||
_coldBezeichnung)
|
||||
End If
|
||||
|
||||
If err <> 0 Then
|
||||
Throw New DokumentartException(Meldungstext.GetInhaltById(40000))
|
||||
End If
|
||||
|
||||
'refresh data
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.Dokumentart.GetDokumentart(ds, _dokumentartNr)
|
||||
LoadData(ds)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Dokumentart.Save", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
Public Function Delete(ByVal mutierer As Integer)
|
||||
Try
|
||||
_aktiv = False
|
||||
Save(mutierer)
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKA", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
Public ReadOnly Property DokumentartNr() As Integer
|
||||
Get
|
||||
Return _dokumentartNr
|
||||
End Get
|
||||
End Property
|
||||
Public Property Bezeichnung() As String
|
||||
Get
|
||||
Return _bezeichnung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_bezeichnung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ParentId() As Integer
|
||||
Get
|
||||
Return ParentId
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
ParentId = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Sort() As Integer
|
||||
Get
|
||||
Return _sort
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_sort = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ImageIndex() As Integer
|
||||
Get
|
||||
Return _imageIndex
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_imageIndex = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ImageIndexOpen() As Integer
|
||||
Get
|
||||
Return _imageIndexOpen
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_imageIndexOpen = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Beschreibung() As String
|
||||
Get
|
||||
Return _beschreibung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_beschreibung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Aktiv() As Boolean
|
||||
Get
|
||||
Return _aktiv
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_aktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ErstelltAm() As DateTime
|
||||
Get
|
||||
Return _erstelltAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_erstelltAm = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MutiertAm() As DateTime
|
||||
Get
|
||||
Return _mutiertAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_mutiertAm = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MutiererId() As Integer
|
||||
Get
|
||||
Return _mutiererId
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mutiererId = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ColdApplication() As String
|
||||
Get
|
||||
Return _coldApplication
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_coldApplication = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ColdBezeichnung() As String
|
||||
Get
|
||||
Return _coldBezeichnung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_coldBezeichnung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
'''<summary>Diese Klasse behandelt eine DokumentArt spezifische Ausnahme</summary>
|
||||
Public Class DokumentartException
|
||||
Inherits Exception
|
||||
|
||||
Dim _message As String
|
||||
|
||||
Public Sub New(ByVal message As String)
|
||||
_message = message
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property Message() As String
|
||||
Get
|
||||
Return _message
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
727
Backup/BusinessFacade/Dokumenttyp.vb
Normal file
727
Backup/BusinessFacade/Dokumenttyp.vb
Normal file
@@ -0,0 +1,727 @@
|
||||
Imports EDOKALib.Common
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für die Dokumenttypen</summary>
|
||||
Public Class Dokumenttyp
|
||||
|
||||
#Region "Members"
|
||||
Private _dokumentTypNr As Integer
|
||||
Private _bezeichnung As String
|
||||
Private _beschreibung As String
|
||||
Private _zuVercolden As Boolean
|
||||
Private _isZuRetournieren As Boolean
|
||||
Private _isEingangErsetztAusgang As Boolean
|
||||
Private _isWirdImportiert As Boolean
|
||||
Private _anzahlTage As Integer
|
||||
Private _dBearbeitungsZeit As Integer
|
||||
Private _tageMutation As Integer
|
||||
Private _isPartnerSaldierungStatusAlt As Boolean
|
||||
Private _isWirdNichtGeloescht As Boolean
|
||||
Private _isVertraulichesDokument As Boolean
|
||||
Private _isUnterschriftLinks As Boolean
|
||||
Private _isUnterschriftRechts As Boolean
|
||||
Private _monateBisZurArchivierung As Integer
|
||||
Private _aufbewahrungsFristElektronisch As Integer
|
||||
Private _aufbewahrungsFristPhysisch As Integer
|
||||
Private _mandantNr As Integer 'wird nicht in den properties implemnetiert
|
||||
Private _isAktiv As Boolean
|
||||
Private _erstelltAm As DateTime
|
||||
Private _mutiertAm As DateTime
|
||||
Private _mutierer As Integer
|
||||
Private _officeVorlageNr As Integer
|
||||
Private _dokumentArtKundendossier As Integer
|
||||
Private _dokumentArtNeuerstellung As Integer
|
||||
Private _dokumentArtRetournierung As Integer
|
||||
Private _dokumentArtColdAusgang As Integer
|
||||
Private _dokumentArtColdEingang As Integer
|
||||
Private _dokumentArtHost As Integer
|
||||
Private _dokumentArtWeitere As Integer
|
||||
Private _dokumentArtNativ As Integer
|
||||
Private _prozessNr As Integer
|
||||
Private _prozessNr1 As Integer
|
||||
Private _isAmsDokument As Boolean
|
||||
Private _isHostDokument As Boolean
|
||||
Private _hostDokumenttyp As String
|
||||
Private _coldFolder As Integer
|
||||
Private _physischesArchiv As Integer
|
||||
Private _dokumentStatus As Integer
|
||||
Private _isDokumentWirdErstellt As Boolean
|
||||
Private _isDokumentWirdRetourniert As Boolean
|
||||
Private _isColdErsetzen As Boolean
|
||||
Private _isEmailVersand As Boolean
|
||||
Private _isFunktionenZuweisen As Boolean
|
||||
Private _dokumentStatusBarcode As Integer
|
||||
Private _isNurNative As Boolean
|
||||
Private _owner As Integer
|
||||
Private _isVertrag As Boolean
|
||||
Private _objektbezeichnungNr As Integer
|
||||
Private _isBedingtRetournierBar As Boolean
|
||||
Private _doktypBedingteRetournierung As Integer
|
||||
Private _tageBisVernichtungbedingteRetournierung As Integer
|
||||
Private _isAnzeigeZurDokumenterstellung As Boolean
|
||||
Private _isKundenDokument As Boolean
|
||||
Private _isSb As Boolean
|
||||
Private _isSbImport As Boolean
|
||||
Private _isSbEditUser As Boolean
|
||||
Private _isSbNur As Boolean
|
||||
Private _isBezeichnungMut As Boolean
|
||||
Private _isFarbigArchiviert As Boolean
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Constructors"
|
||||
'''<summary>default konstruktor</summary>
|
||||
|
||||
Public Sub New()
|
||||
|
||||
End Sub
|
||||
|
||||
'''<summary>lädt den dokumenttyp mit der entsprechenden dokumenttypnr</summary>
|
||||
'''<param name="dokumentTypNr"></param>
|
||||
|
||||
Public Sub New(ByVal dokumentTypNr As Integer)
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.Dokumenttyp.GetDokumenttyp(ds, dokumentTypNr)
|
||||
LoadData(ds)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Private Functions"
|
||||
|
||||
'''<summary>lädt die daten aus dem dataset in die members der klasse</summary>
|
||||
'''<param name="ds"></param>
|
||||
|
||||
Private Sub LoadData(ByRef ds As DataSet)
|
||||
Try
|
||||
If Common.Tools.ValidateDS(ds) Then
|
||||
_dokumentTypNr = Tools.CToInt32(ds.Tables(0).Rows(0)("dokumentTypNr"))
|
||||
_bezeichnung = NullHandler.CToString(ds.Tables(0).Rows(0)("bezeichnung"))
|
||||
_beschreibung = NullHandler.CToString(ds.Tables(0).Rows(0)("beschreibung"))
|
||||
_zuVercolden = Tools.CToBool(ds.Tables(0).Rows(0)("zu_vercolden"))
|
||||
_isZuRetournieren = Tools.CToBool(ds.Tables(0).Rows(0)("zu_retournieren"))
|
||||
_isEingangErsetztAusgang = Tools.CToBool(ds.Tables(0).Rows(0)("eingang_ersetzt_ausgang"))
|
||||
_isWirdImportiert = Tools.CToBool(ds.Tables(0).Rows(0)("wird_importiert"))
|
||||
_anzahlTage = Tools.CToInt32(ds.Tables(0).Rows(0)("anzahl_tage"))
|
||||
_dBearbeitungsZeit = Tools.CToInt32(ds.Tables(0).Rows(0)("dbearbeitungszeit"))
|
||||
_tageMutation = Tools.CToInt32(ds.Tables(0).Rows(0)("tage_mutation"))
|
||||
_isPartnerSaldierungStatusAlt = Tools.CToBool(ds.Tables(0).Rows(0)("partnersaldierung_statusalt"))
|
||||
_isWirdNichtGeloescht = Tools.CToBool(ds.Tables(0).Rows(0)("wird_nicht_geloescht"))
|
||||
_isVertraulichesDokument = Tools.CToBool(ds.Tables(0).Rows(0)("vertrauliches_dokument"))
|
||||
_isUnterschriftLinks = Tools.CToBool(ds.Tables(0).Rows(0)("unterschrift_links"))
|
||||
_isUnterschriftRechts = Tools.CToBool(ds.Tables(0).Rows(0)("unterschrift_rechts"))
|
||||
_monateBisZurArchivierung = Tools.CToInt32(ds.Tables(0).Rows(0)("monate_bis_zur_archivierung"))
|
||||
_aufbewahrungsFristElektronisch = Tools.CToInt32(ds.Tables(0).Rows(0)("aufbewahrungsfrist_elektronisch"))
|
||||
_aufbewahrungsFristPhysisch = Tools.CToInt32(ds.Tables(0).Rows(0)("aufbewahrungsfrist_physisch"))
|
||||
_mandantNr = NullHandler.CToInt32(ds.Tables(0).Rows(0)("mandantnr"))
|
||||
_isAktiv = Tools.CToBool(ds.Tables(0).Rows(0)("aktiv"))
|
||||
_erstelltAm = NullHandler.CToDateTime(ds.Tables(0).Rows(0)("erstellt_am"))
|
||||
_mutiertAm = NullHandler.CToDateTime(ds.Tables(0).Rows(0)("mutiert_am"))
|
||||
_mutierer = NullHandler.CToInt32(ds.Tables(0).Rows(0)("mutierer"))
|
||||
_officeVorlageNr = NullHandler.CToInt32(ds.Tables(0).Rows(0)("office_vorlagenr"))
|
||||
_dokumentArtKundendossier = NullHandler.CToInt32(ds.Tables(0).Rows(0)("dokumentart_kundendossier"))
|
||||
_dokumentArtNeuerstellung = NullHandler.CToInt32(ds.Tables(0).Rows(0)("dokumentart_neuerstellung"))
|
||||
_dokumentArtRetournierung = NullHandler.CToInt32(ds.Tables(0).Rows(0)("dokumentart_retournierung"))
|
||||
_dokumentArtColdAusgang = Tools.CToInt32(ds.Tables(0).Rows(0)("dokumentart_coldausgang"))
|
||||
_dokumentArtColdEingang = Tools.CToInt32(ds.Tables(0).Rows(0)("dokumentart_coldeingang"))
|
||||
_dokumentArtHost = NullHandler.CToInt32(ds.Tables(0).Rows(0)("dokumentart_host"))
|
||||
_dokumentArtWeitere = NullHandler.CToInt32(ds.Tables(0).Rows(0)("dokumentart_weitere"))
|
||||
_dokumentArtNativ = NullHandler.CToInt32(ds.Tables(0).Rows(0)("dokumentart_nativ"))
|
||||
_prozessNr = NullHandler.CToInt32(ds.Tables(0).Rows(0)("prozessnr"))
|
||||
_prozessNr1 = NullHandler.CToInt32(ds.Tables(0).Rows(0)("prozessnr1"))
|
||||
_isAmsDokument = Tools.CToBool(ds.Tables(0).Rows(0)("amsdokument"))
|
||||
_isHostDokument = Tools.CToBool(ds.Tables(0).Rows(0)("hostdokument"))
|
||||
_hostDokumenttyp = NullHandler.CToString(ds.Tables(0).Rows(0)("hostdokumenttyp"))
|
||||
_coldFolder = NullHandler.CToInt32(ds.Tables(0).Rows(0)("cold_folder"))
|
||||
_physischesArchiv = NullHandler.CToInt32(ds.Tables(0).Rows(0)("physisches_archiv"))
|
||||
_dokumentStatus = NullHandler.CToInt32(ds.Tables(0).Rows(0)("dokumentstatus"))
|
||||
_isDokumentWirdErstellt = Tools.CToBool(ds.Tables(0).Rows(0)("Dokument_wird_erstellt"))
|
||||
_isDokumentWirdRetourniert = Tools.CToBool(ds.Tables(0).Rows(0)("Dokument_wird_retourniert"))
|
||||
_isColdErsetzen = Tools.CToBool(ds.Tables(0).Rows(0)("cold_ersetzen"))
|
||||
_isEmailVersand = Tools.CToBool(ds.Tables(0).Rows(0)("email_versand"))
|
||||
_isFunktionenZuweisen = Tools.CToBool(ds.Tables(0).Rows(0)("funktionen_zuweisen"))
|
||||
_dokumentStatusBarcode = NullHandler.CToInt32(ds.Tables(0).Rows(0)("dokumentstatus_barcode"))
|
||||
_isNurNative = Tools.CToBool(ds.Tables(0).Rows(0)("nurnative"))
|
||||
_owner = NullHandler.CToInt32(ds.Tables(0).Rows(0)("Owner"))
|
||||
_isVertrag = Tools.CToBool(ds.Tables(0).Rows(0)("vertrag"))
|
||||
_objektbezeichnungNr = NullHandler.CToInt32(ds.Tables(0).Rows(0)("objektbezeichnungnr"))
|
||||
_isBedingtRetournierBar = Tools.CToBool(ds.Tables(0).Rows(0)("bedingtretournierbar"))
|
||||
_doktypBedingteRetournierung = NullHandler.CToInt32(ds.Tables(0).Rows(0)("doktypbedingteretournierung"))
|
||||
_tageBisVernichtungbedingteRetournierung = NullHandler.CToInt32(ds.Tables(0).Rows(0)("tagebisvernichtungbedingteretournierung"))
|
||||
_isAnzeigeZurDokumenterstellung = Tools.CToBool(ds.Tables(0).Rows(0)("AnzeigeZurDokumenterstellung"))
|
||||
_isKundenDokument = Tools.CToBool(ds.Tables(0).Rows(0)("KundenDokument"))
|
||||
_isSb = Tools.CToBool(ds.Tables(0).Rows(0)("sb"))
|
||||
_isSbImport = Tools.CToBool(ds.Tables(0).Rows(0)("sbimport"))
|
||||
_isSbEditUser = Tools.CToBool(ds.Tables(0).Rows(0)("sbedituser"))
|
||||
_isSbNur = Tools.CToBool(ds.Tables(0).Rows(0)("sbnur"))
|
||||
_isBezeichnungMut = Tools.CToBool(ds.Tables(0).Rows(0)("bezeichnungmut"))
|
||||
_isFarbigArchiviert = Tools.CToBool(ds.Tables(0).Rows(0)("istFarbigArchiviert"))
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.DokumentTyp.LoadData", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Public Functions"
|
||||
|
||||
'''<summary>speichert einen dokumenttyp(update und insert)</summary>
|
||||
|
||||
Public Function Save(ByVal mutierer As Integer)
|
||||
Try
|
||||
Dim err As Integer
|
||||
If _dokumentTypNr = 0 Then 'create new
|
||||
err = DataAccess.Dokumenttyp.Add(_dokumentTypNr, _bezeichnung, _beschreibung, _zuVercolden, _isZuRetournieren, _
|
||||
_isEingangErsetztAusgang, _isWirdImportiert, _anzahlTage, _dBearbeitungsZeit, _tageMutation, _
|
||||
_isPartnerSaldierungStatusAlt, _isWirdNichtGeloescht, _isVertraulichesDokument, _isUnterschriftLinks, _
|
||||
_isUnterschriftRechts, _monateBisZurArchivierung, _aufbewahrungsFristElektronisch, _
|
||||
_aufbewahrungsFristPhysisch, _mandantNr, _isAktiv, _erstelltAm, _mutiertAm, mutierer, _
|
||||
_officeVorlageNr, _dokumentArtKundendossier, _dokumentArtNeuerstellung, _dokumentArtRetournierung, _
|
||||
_dokumentArtColdAusgang, _dokumentArtColdEingang, _dokumentArtHost, _dokumentArtWeitere, _
|
||||
_dokumentArtNativ, _prozessNr, _prozessNr1, _isAmsDokument, _isHostDokument, _hostDokumenttyp, _
|
||||
_coldFolder, _physischesArchiv, _dokumentStatus, _isDokumentWirdErstellt, _isDokumentWirdRetourniert, _
|
||||
_isColdErsetzen, _isEmailVersand, _isFunktionenZuweisen, _dokumentStatusBarcode, _isNurNative, _
|
||||
_owner, _isVertrag, _objektbezeichnungNr, _isBedingtRetournierBar, _doktypBedingteRetournierung, _
|
||||
_tageBisVernichtungbedingteRetournierung, _isAnzeigeZurDokumenterstellung, _isKundenDokument, _
|
||||
_isSb, _isSbImport, _isSbEditUser, _isSbNur, _isBezeichnungMut, _isFarbigArchiviert)
|
||||
|
||||
Else 'save existing
|
||||
err = DataAccess.Dokumenttyp.Update(_dokumentTypNr, _bezeichnung, _beschreibung, _zuVercolden, _isZuRetournieren, _
|
||||
_isEingangErsetztAusgang, _isWirdImportiert, _anzahlTage, _dBearbeitungsZeit, _tageMutation, _
|
||||
_isPartnerSaldierungStatusAlt, _isWirdNichtGeloescht, _isVertraulichesDokument, _isUnterschriftLinks, _
|
||||
_isUnterschriftRechts, _monateBisZurArchivierung, _aufbewahrungsFristElektronisch, _
|
||||
_aufbewahrungsFristPhysisch, _mandantNr, _isAktiv, _erstelltAm, _mutiertAm, mutierer, _
|
||||
_officeVorlageNr, _dokumentArtKundendossier, _dokumentArtNeuerstellung, _dokumentArtRetournierung, _
|
||||
_dokumentArtColdAusgang, _dokumentArtColdEingang, _dokumentArtHost, _dokumentArtWeitere, _
|
||||
_dokumentArtNativ, _prozessNr, _prozessNr1, _isAmsDokument, _isHostDokument, _hostDokumenttyp, _
|
||||
_coldFolder, _physischesArchiv, _dokumentStatus, _isDokumentWirdErstellt, _isDokumentWirdRetourniert, _
|
||||
_isColdErsetzen, _isEmailVersand, _isFunktionenZuweisen, _dokumentStatusBarcode, _isNurNative, _
|
||||
_owner, _isVertrag, _objektbezeichnungNr, _isBedingtRetournierBar, _doktypBedingteRetournierung, _
|
||||
_tageBisVernichtungbedingteRetournierung, _isAnzeigeZurDokumenterstellung, _isKundenDokument, _
|
||||
_isSb, _isSbImport, _isSbEditUser, _isSbNur, _isBezeichnungMut, _isFarbigArchiviert)
|
||||
End If
|
||||
|
||||
If err <> 0 Then
|
||||
Throw New DokumentartException(Meldungstext.GetInhaltById(40000))
|
||||
End If
|
||||
|
||||
'refresh data
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.Dokumentart.GetDokumentart(ds, _dokumentTypNr)
|
||||
LoadData(ds)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Dokumentart.Save", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Delete(ByVal mutierer As Integer)
|
||||
Try
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Dokumenttyp.Delete", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Shared Function IsMitarbeiterBerechtigt(ByVal dokumentTypNr As Integer, ByVal nrPar00 As Integer, ByVal mitarbeiterNr As Integer) As Boolean
|
||||
'If Globals.EDOKAStellvertreterPruefung = False And Globals.EDOKAFremdanwendungStellvertreter = 0 Then
|
||||
'Globals.EDOKAFremdanwendungStellvertreter = Globals.MitarbeiterNr
|
||||
'End If
|
||||
Try
|
||||
Return DataAccess.Dokumenttyp.IsMitarbeiterBerechtigt(dokumentTypNr, nrPar00, mitarbeiterNr)
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EdokaLib.Dokumenttyp.IsMitarbeiterBerechtigt", ex.Message & ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Properties"
|
||||
Public ReadOnly Property DokumentTypNr() As Integer
|
||||
Get
|
||||
Return _dokumentTypNr
|
||||
End Get
|
||||
End Property
|
||||
Public Property Bezeichnung() As String
|
||||
Get
|
||||
Return _bezeichnung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_bezeichnung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Beschreibung() As String
|
||||
Get
|
||||
Return _beschreibung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_beschreibung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ZuVercolden() As Boolean
|
||||
Get
|
||||
Return _zuVercolden
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_zuVercolden = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsZuRetournieren() As Boolean
|
||||
Get
|
||||
Return _isZuRetournieren
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isZuRetournieren = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsEingangErsetztAusgang() As Boolean
|
||||
Get
|
||||
Return _isEingangErsetztAusgang
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isEingangErsetztAusgang = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsWirdImportiert() As Boolean
|
||||
Get
|
||||
Return _isWirdImportiert
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isWirdImportiert = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property AnzahlTage() As Integer
|
||||
Get
|
||||
Return _anzahlTage
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_anzahlTage = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DBearbeitungsZeit() As Integer
|
||||
Get
|
||||
Return _dBearbeitungsZeit
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_dBearbeitungsZeit = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property TageMutation() As Integer
|
||||
Get
|
||||
Return _tageMutation
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_tageMutation = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsPartnerSaldierungStatusAlt() As Boolean
|
||||
Get
|
||||
Return _isPartnerSaldierungStatusAlt
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isPartnerSaldierungStatusAlt = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsWirdNichtGeloescht() As Boolean
|
||||
Get
|
||||
Return _isWirdNichtGeloescht
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isWirdNichtGeloescht = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsVertraulichesDokument() As Boolean
|
||||
Get
|
||||
Return _isVertraulichesDokument
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isVertraulichesDokument = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsUnterschriftLinks() As Boolean
|
||||
Get
|
||||
Return _isUnterschriftLinks
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isUnterschriftLinks = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsUnterschriftRechts() As Boolean
|
||||
Get
|
||||
Return _isUnterschriftRechts
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isUnterschriftRechts = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MonateBisZurArchivierung() As Integer
|
||||
Get
|
||||
Return _monateBisZurArchivierung
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_monateBisZurArchivierung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property AufbewahrungsFristElektronisch() As Integer
|
||||
Get
|
||||
Return _aufbewahrungsFristElektronisch
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_aufbewahrungsFristElektronisch = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property AufbewahrungsFristPhysisch() As Integer
|
||||
Get
|
||||
Return _aufbewahrungsFristPhysisch
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_aufbewahrungsFristPhysisch = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsAktiv() As Boolean
|
||||
Get
|
||||
Return _isAktiv
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ErstelltAm() As DateTime
|
||||
Get
|
||||
Return _erstelltAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_erstelltAm = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MutiertAm() As DateTime
|
||||
Get
|
||||
Return _mutiertAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_mutiertAm = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Mutierer() As Integer
|
||||
Get
|
||||
Return _mutierer
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mutierer = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property OfficeVorlageNr() As Integer
|
||||
Get
|
||||
Return _officeVorlageNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_officeVorlageNr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DokumentArtKundendossier() As Integer
|
||||
Get
|
||||
Return _dokumentArtKundendossier
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_dokumentArtKundendossier = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DokumentArtNeuerstellung() As Integer
|
||||
Get
|
||||
Return _dokumentArtNeuerstellung
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_dokumentArtNeuerstellung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DokumentArtRetournierung() As Integer
|
||||
Get
|
||||
Return _dokumentArtRetournierung
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_dokumentArtRetournierung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DokumentArtColdAusgang() As Integer
|
||||
Get
|
||||
Return _dokumentArtColdAusgang
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_dokumentArtColdAusgang = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DokumentArtColdEingang() As Integer
|
||||
Get
|
||||
Return _dokumentArtColdEingang
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_dokumentArtColdEingang = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DokumentArtHost() As Integer
|
||||
Get
|
||||
Return _dokumentArtHost
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_dokumentArtHost = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DokumentArtWeitere() As Integer
|
||||
Get
|
||||
Return _dokumentArtWeitere
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_dokumentArtWeitere = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DokumentArtNativ() As Integer
|
||||
Get
|
||||
Return _dokumentArtNativ
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_dokumentArtNativ = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ProzessNr() As Integer
|
||||
Get
|
||||
Return _prozessNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_prozessNr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ProzessNr1() As Integer
|
||||
Get
|
||||
Return _prozessNr1
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_prozessNr1 = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsAmsDokument() As Boolean
|
||||
Get
|
||||
Return _isAmsDokument
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isAmsDokument = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsHostDokument() As Boolean
|
||||
Get
|
||||
Return _isHostDokument
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isHostDokument = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property HostDokumenttyp() As String
|
||||
Get
|
||||
Return _hostDokumenttyp
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_hostDokumenttyp = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ColdFolder() As Integer
|
||||
Get
|
||||
Return _coldFolder
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_coldFolder = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property PhysischesArchiv() As Integer
|
||||
Get
|
||||
Return _physischesArchiv
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_physischesArchiv = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DokumentStatus() As Integer
|
||||
Get
|
||||
Return _dokumentStatus
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_dokumentStatus = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsDokumentWirdErstellt() As Boolean
|
||||
Get
|
||||
Return _isDokumentWirdErstellt
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isDokumentWirdErstellt = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsDokumentWirdRetourniert() As Boolean
|
||||
Get
|
||||
Return _isDokumentWirdRetourniert
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isDokumentWirdRetourniert = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsColdErsetzen() As Boolean
|
||||
Get
|
||||
Return _isColdErsetzen
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isColdErsetzen = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsEmailVersand() As Boolean
|
||||
Get
|
||||
Return _isEmailVersand
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isEmailVersand = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsFunktionenZuweisen() As Boolean
|
||||
Get
|
||||
Return _isFunktionenZuweisen
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isFunktionenZuweisen = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DokumentStatusBarcode() As Integer
|
||||
Get
|
||||
Return _dokumentStatusBarcode
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_dokumentStatusBarcode = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsNurNative() As Boolean
|
||||
Get
|
||||
Return _isNurNative
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isNurNative = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Owner() As Integer
|
||||
Get
|
||||
Return _owner
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_owner = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsVertrag() As Boolean
|
||||
Get
|
||||
Return _isVertrag
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isVertrag = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ObjektbezeichnungNr() As Integer
|
||||
Get
|
||||
Return _objektbezeichnungNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_objektbezeichnungNr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsBedingtRetournierBar() As Boolean
|
||||
Get
|
||||
Return _isBedingtRetournierBar
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isBedingtRetournierBar = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DoktypBedingteRetournierung() As Integer
|
||||
Get
|
||||
Return _doktypBedingteRetournierung
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_doktypBedingteRetournierung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property TageBisVernichtungbedingteRetournierung() As Integer
|
||||
Get
|
||||
Return _tageBisVernichtungbedingteRetournierung
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_tageBisVernichtungbedingteRetournierung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsAnzeigeZurDokumenterstellung() As Boolean
|
||||
Get
|
||||
Return _isAnzeigeZurDokumenterstellung
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isAnzeigeZurDokumenterstellung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsKundenDokument() As Boolean
|
||||
Get
|
||||
Return _isKundenDokument
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isKundenDokument = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsSb() As Boolean
|
||||
Get
|
||||
Return _isSb
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isSb = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsSbImport() As Boolean
|
||||
Get
|
||||
Return _isSbImport
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isSbImport = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsSbEditUser() As Boolean
|
||||
Get
|
||||
Return _isSbEditUser
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isSbEditUser = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsSbNur() As Boolean
|
||||
Get
|
||||
Return _isSbNur
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isSbNur = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsBezeichnungMut() As Boolean
|
||||
Get
|
||||
Return _isBezeichnungMut
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isBezeichnungMut = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsFarbigArchiviert() As Boolean
|
||||
Get
|
||||
Return _isFarbigArchiviert
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isFarbigArchiviert = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
48
Backup/BusinessFacade/Funktionsgruppe.vb
Normal file
48
Backup/BusinessFacade/Funktionsgruppe.vb
Normal file
@@ -0,0 +1,48 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für die Funktionsgruppe</summary>
|
||||
Public Class Funktionsgruppe
|
||||
|
||||
#Region "Members"
|
||||
|
||||
Private _funktionsGruppeNr As Integer
|
||||
Private _bezeichnung As String
|
||||
Private _beschreibung As String
|
||||
Private _zugehoerigkeit As String
|
||||
Private _mandantNr As Integer
|
||||
Private _isAktiv As Boolean
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Constructor"
|
||||
|
||||
Public Sub New()
|
||||
End Sub
|
||||
|
||||
'Public Sub New(ByVal funktionsGruppeId As Integer)
|
||||
' Try
|
||||
|
||||
' Catch ex As Exception
|
||||
' Throw ex
|
||||
' End Try
|
||||
'End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Funktionsgruppen zurück</summary>
|
||||
'''<param name="ds">Das DataSet welches gefüllt werden soll</param>
|
||||
|
||||
Public Overloads Shared Sub GetListe(ByRef ds As DataSet)
|
||||
Try
|
||||
DataAccess.Funktionsgruppe.GetListe(ds)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
164
Backup/BusinessFacade/Klassifizierung.vb
Normal file
164
Backup/BusinessFacade/Klassifizierung.vb
Normal file
@@ -0,0 +1,164 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Imports EDOKALib.Common
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für die Klassifizierung</summary>
|
||||
Public Class Klassifizierung
|
||||
|
||||
#Region "Members"
|
||||
|
||||
Dim _klassenId As Integer
|
||||
Dim _bezeichnung As String
|
||||
Dim _beschreibung As String
|
||||
Dim _isAktiv As Boolean
|
||||
Dim _mandantNr As Integer
|
||||
Dim _erstellerMitarbeiterNr As Integer
|
||||
Dim _erstelltAm As DateTime
|
||||
Dim _mutiererMitarbeiterNr As Integer
|
||||
Dim _mutiertAm As DateTime
|
||||
Dim _isTeamZwingend As Boolean
|
||||
Dim _isFunktionsgruppeZwingend As Boolean
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Constructor"
|
||||
|
||||
'''<summary>Erstellt eine neue Instanz für einen neuen Mitarbeiter</summary>
|
||||
Public Sub New()
|
||||
Try
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Erstellt eine neue Instanz für eine bestehende Klassifizierung</summary>
|
||||
'''<param name="klassifizierungNr"></param>
|
||||
Public Sub New(ByVal klassifizierungNr As Integer)
|
||||
Try
|
||||
Dim ds As New DataSet()
|
||||
|
||||
DataAccess.Klassifizierung.GetById(klassifizierungNr, ds)
|
||||
|
||||
If ds.Tables.Count > 0 Then
|
||||
If ds.Tables(0).Rows.Count > 0 Then
|
||||
_klassenId = Common.Tools.CToInt32(ds.Tables(0).Rows(0)("klassenid"))
|
||||
_bezeichnung = Common.Tools.CToString(ds.Tables(0).Rows(0)("bezeichnung"))
|
||||
_beschreibung = Common.Tools.CToString(ds.Tables(0).Rows(0)("beschreibung"))
|
||||
_isAktiv = Common.Tools.CToBool(ds.Tables(0).Rows(0)("aktiv"))
|
||||
_mandantNr = Common.Tools.CToInt32(ds.Tables(0).Rows(0)("mandantnr"))
|
||||
_erstellerMitarbeiterNr = Common.Tools.CToInt32(ds.Tables(0).Rows(0)("ersteller"))
|
||||
_erstelltAm = Common.Tools.CToDateTime(ds.Tables(0).Rows(0)("erstellt_am"))
|
||||
_mutiertAm = Common.Tools.CToDateTime(ds.Tables(0).Rows(0)("mutiert_am"))
|
||||
_mutiererMitarbeiterNr = Common.Tools.CToInt32(ds.Tables(0).Rows(0)("mutierer"))
|
||||
_isTeamZwingend = Common.Tools.CToBool(ds.Tables(0).Rows(0)("zwingendTeam"))
|
||||
_isFunktionsgruppeZwingend = Common.Tools.CToBool(ds.Tables(0).Rows(0)("zwingendFunktion"))
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Klassifizierungen zurück</summary>
|
||||
'''<param name="ds">Das DataSet welches gefüllt werden soll</param>
|
||||
Public Overloads Shared Sub GetListe(ByRef ds As DataSet)
|
||||
Try
|
||||
DataAccess.Klassifizierung.GetListe(ds)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
|
||||
Public ReadOnly Property KlassenId() As Integer
|
||||
Get
|
||||
Return _klassenId
|
||||
End Get
|
||||
End Property
|
||||
Public Property Bezeichnung() As String
|
||||
Get
|
||||
Return _bezeichnung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_bezeichnung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Beschreibung() As String
|
||||
Get
|
||||
Return _beschreibung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_beschreibung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsAktiv() As Boolean
|
||||
Get
|
||||
Return _isAktiv
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MandantNr() As Integer
|
||||
Get
|
||||
Return _mandantNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mandantNr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public ReadOnly Property ErstellerMitarbeiterNr() As Integer
|
||||
Get
|
||||
Return _erstellerMitarbeiterNr
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ErstelltAm() As DateTime
|
||||
Get
|
||||
Return _erstelltAm
|
||||
End Get
|
||||
End Property
|
||||
Public Property MutiererMitarbeiterNr() As Integer
|
||||
Get
|
||||
Return _mutiererMitarbeiterNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mutiererMitarbeiterNr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MutiertAm() As DateTime
|
||||
Get
|
||||
Return _mutiertAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_mutiertAm = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsTeamZwingend() As Boolean
|
||||
Get
|
||||
Return _isTeamZwingend
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isTeamZwingend = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsFunktionsgruppeZwingend() As Boolean
|
||||
Get
|
||||
Return _isFunktionsgruppeZwingend
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isFunktionsgruppeZwingend = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
184
Backup/BusinessFacade/Meldungstext.vb
Normal file
184
Backup/BusinessFacade/Meldungstext.vb
Normal file
@@ -0,0 +1,184 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für die Meldungstext</summary>
|
||||
Public Class Meldungstext
|
||||
|
||||
#Region "Members"
|
||||
Private Shared _meldungstexte As New Hashtable()
|
||||
|
||||
Private _meldungsTextNr As Integer
|
||||
Private _spracheNr As Integer
|
||||
Private _inhalt As String
|
||||
Private _beschreibungs As String
|
||||
Private _isAktiv As Boolean
|
||||
Private _erstelltAm As DateTime
|
||||
Private _mutiertAm As DateTime
|
||||
Private _mutiertMitarbeiterNr As Integer
|
||||
Private _mandantNr As Integer
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Constructor"
|
||||
|
||||
'''<summary>Erstellt eine neue Instanz für einen bestehenen Meldungstext</summary>
|
||||
'''<param name="meldungsTextNr"></param>
|
||||
|
||||
Public Sub New(ByVal meldungsTextNr As Integer)
|
||||
Try
|
||||
|
||||
Select Case LoadDataFromCache(meldungsTextNr)
|
||||
Case 0
|
||||
'found in cache
|
||||
Case 1
|
||||
'caching is disabled
|
||||
LoadData(meldungsTextNr) 'from db
|
||||
Case 2
|
||||
'not found in cache
|
||||
LoadData(meldungsTextNr) 'from db
|
||||
_meldungstexte.Add(meldungsTextNr, Me) 'hinzufügen da nicht vorhanden
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Private methods"
|
||||
Private Sub LoadData(ByVal meldungsTextNr As Integer)
|
||||
Try
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.Meldungstext.GetById(meldungsTextNr, ds)
|
||||
If Common.Tools.ValidateDS(ds) Then
|
||||
_meldungsTextNr = Convert.ToInt32(ds.Tables(0).Rows(0)("meldungstextnr"))
|
||||
_spracheNr = Convert.ToInt32(ds.Tables(0).Rows(0)("Sprache"))
|
||||
_inhalt = ds.Tables(0).Rows(0)("inhalt")
|
||||
_beschreibungs = ds.Tables(0).Rows(0)("beschreibung")
|
||||
_isAktiv = Convert.ToBoolean(ds.Tables(0).Rows(0)("aktiv"))
|
||||
_erstelltAm = Convert.ToDateTime(ds.Tables(0).Rows(0)("erstellt_am"))
|
||||
_mutiertAm = Convert.ToDateTime(ds.Tables(0).Rows(0)("mutiert_am"))
|
||||
_mutiertMitarbeiterNr = Convert.ToInt32(ds.Tables(0).Rows(0)("mutierer"))
|
||||
_mandantNr = Convert.ToInt32(ds.Tables(0).Rows(0)("mandantnr"))
|
||||
End If
|
||||
|
||||
If _meldungsTextNr = 0 Then 'meldung nicht gefunden in db
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Meldungstext.New", "Achtung Meldungstext wurde nicht gefunden! MeldungstextNr: " & CStr(meldungsTextNr), TraceLevel.Warning)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.Meldungstext.LoadData", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Function LoadDataFromCache(ByVal meldungsTextNr As Integer) As Integer
|
||||
Try
|
||||
Dim source As Meldungstext
|
||||
|
||||
If Config.GetParameterValue("CacheMeldungstexte") = 1 Then 'cache is enabled
|
||||
source = _meldungstexte.Item(meldungsTextNr)
|
||||
If Not source Is Nothing Then
|
||||
_meldungsTextNr = source.MeldungsTextNr
|
||||
_spracheNr = source.SpracheNr
|
||||
_inhalt = source.Inhalt
|
||||
_beschreibungs = source.Beschreibung
|
||||
_isAktiv = source.IsAktiv
|
||||
_erstelltAm = source.ErstelltAm
|
||||
_mutiertAm = source.MutiertAm
|
||||
_mutiertMitarbeiterNr = source.MutiertMitarbeiterNr
|
||||
_mandantNr = source.MandantNr
|
||||
Return 0
|
||||
Else
|
||||
Return 2 'not found
|
||||
End If
|
||||
End If
|
||||
Return 1 'caching is disabled
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.Meldungstext.LoadDataFromCache", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gibt den Inhalt einer Melungs zurück</summary>
|
||||
'''<param name="meldungsTextNr"></param>
|
||||
|
||||
Public Overloads Shared Function GetInhaltById(ByVal meldungsTextNr As Integer) As String
|
||||
Try
|
||||
|
||||
Dim meldung As New Meldungstext(meldungsTextNr)
|
||||
|
||||
If meldung.MeldungsTextNr = 0 Then
|
||||
Return "Der MeldungsText mit der Id " + meldungsTextNr.ToString() + " wurde nicht gefunden."
|
||||
Else
|
||||
Return meldung.Inhalt
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
|
||||
Public ReadOnly Property MeldungsTextNr() As Integer
|
||||
Get
|
||||
Return _meldungsTextNr
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property SpracheNr() As String
|
||||
Get
|
||||
Return _spracheNr
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Inhalt() As String
|
||||
Get
|
||||
Return _inhalt
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Beschreibung() As String
|
||||
Get
|
||||
Return _beschreibungs
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property IsAktiv() As Boolean
|
||||
Get
|
||||
Return _isAktiv
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ErstelltAm() As DateTime
|
||||
Get
|
||||
Return _erstelltAm
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MutiertAm() As DateTime
|
||||
Get
|
||||
Return _mutiertAm
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MutiertMitarbeiterNr() As Integer
|
||||
Get
|
||||
Return _mutiertMitarbeiterNr
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MandantNr() As Integer
|
||||
Get
|
||||
Return _mandantNr
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
630
Backup/BusinessFacade/Mitarbeiter.vb
Normal file
630
Backup/BusinessFacade/Mitarbeiter.vb
Normal file
@@ -0,0 +1,630 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Imports EDOKALib.Common
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für die Mitarbeiter</summary>
|
||||
Public Class Mitarbeiter
|
||||
|
||||
#Region "Members"
|
||||
|
||||
Private _mitarbeiterNr As Integer = 0
|
||||
Private _vorname As String
|
||||
Private _nachname As String
|
||||
Private _kurzZeichen As String
|
||||
Private _anrede As String
|
||||
Private _tgNummer As String
|
||||
Private _email As String
|
||||
Private _fax As String
|
||||
Private _telefon As String
|
||||
Private _unterschriftText As String
|
||||
Private _spracheNr As Integer
|
||||
Private _fuerMandantNr As Integer 'arbeitet für diesen mandant
|
||||
Private _showTipp As Boolean 'display tipp bim startup
|
||||
Private _partnerNr As Integer
|
||||
Private _mandantNr As Integer 'zugehörigkeit des mitarbeiter
|
||||
Private _isAktiv As Boolean
|
||||
Private _erstelltAm As DateTime
|
||||
Private _mutiertAm As DateTime
|
||||
Private _mutiererMitarbeiterNr As Integer
|
||||
Private _isMailEmpfang As Boolean 'meldung via email
|
||||
Private _isEdokaMessage As Boolean 'DANGER: feld in db heisst "EdokaMesasge"
|
||||
Private _funktion As String
|
||||
Private _isMailDirektVersenden As Boolean
|
||||
Private _rang As String
|
||||
Private _isMailDokumentRueckgang As Boolean
|
||||
Private _klassifizierungNr As Integer
|
||||
Private _isEdokaMail As Boolean 'meldung via edoka empfangen
|
||||
Private _isJournalisierung As Boolean
|
||||
Private _isGebMeldung As Boolean
|
||||
Private _mail1 As String
|
||||
|
||||
Private _funktionsgruppen As BusinessFacade.Funktionsgruppe()
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Constructor"
|
||||
|
||||
'''<summary>Erstellt eine neue Instanz für einen neuen Mitarbeiter</summary>
|
||||
|
||||
Public Sub New()
|
||||
Try
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
'''<summary>Erstellt eine neue Instanz für einen bestehenden Mitarbeiter</summary>
|
||||
'''<param name="mitarbeiterNr"></param>
|
||||
|
||||
Public Sub New(ByVal mitarbeiterNr As Integer)
|
||||
Try
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.Mitarbeiter.GetById(mitarbeiterNr, ds)
|
||||
LoadData(ds)
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Erstellt eine neue Instanz für einen bestehenen Mitarbeiter</summary>
|
||||
'''<param name="tgNummer"></param>
|
||||
|
||||
Public Sub New(ByVal tgNummer As String)
|
||||
Try
|
||||
Dim ds As New DataSet()
|
||||
|
||||
DataAccess.Mitarbeiter.GetByTgNummer(tgNummer, ds)
|
||||
LoadData(ds)
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Mitarbeitern zurück</summary>
|
||||
'''<param name="dsMitarbeiter">Das DataSet welches gefüllt werden soll</param>
|
||||
|
||||
Public Overloads Shared Sub GetListe(ByRef dsMitarbeiter As DataSet)
|
||||
Try
|
||||
DataAccess.Mitarbeiter.GetListe(0, 0, dsMitarbeiter)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Mitarbeitern zurück</summary>
|
||||
'''<param name="teamNr">Nur Mitarbeiter von diesem Team</param>
|
||||
'''<param name="dsMitarbeiter">Das DataSet welches gefüllt werden soll</param>
|
||||
|
||||
Public Overloads Shared Sub GetListeByTeamNr(ByVal teamNr As Integer, ByRef dsMitarbeiter As DataSet)
|
||||
Try
|
||||
DataAccess.Mitarbeiter.GetListe(teamNr, 0, dsMitarbeiter)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Mitarbeitern zurück</summary>
|
||||
'''<param name="funktionsGruppeNr">Nur Mitarbeiter von dieser Funktionsgruppe</param>
|
||||
'''<param name="dsMitarbeiter">Das DataSet welches gefüllt werden soll</param>
|
||||
|
||||
Public Overloads Shared Sub GetListeByFunktionsGruppeNr(ByVal funktionsGruppeNr As Integer, ByRef dsMitarbeiter As DataSet)
|
||||
Try
|
||||
DataAccess.Mitarbeiter.GetListe(0, funktionsGruppeNr, dsMitarbeiter)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Erstellt ein neues Standard Profil für den angegebenen Mitarbeiter</summary>
|
||||
'''<param name="mutiererMitarbeiterNr">Die datenbank Nummer des Mutierers (ID)</param>
|
||||
|
||||
Public Function CreateNewStandardProfil(ByVal mutiererMitarbeiterNr As Integer)
|
||||
Try
|
||||
DataAccess.Mitarbeiter.CreateNewStandardProfil(_mitarbeiterNr, mutiererMitarbeiterNr)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'''<summary>Speichert die Änderungen an einem Mitarbeiter</summary>
|
||||
'''<param name="mutiererMitarbeiterNr"></param>
|
||||
Public Function Save(ByVal mutiererMitarbeiterNr As Integer)
|
||||
Try
|
||||
Save(Nothing, Nothing, mutiererMitarbeiterNr)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'''<summary>Speichert die Änderungen an einem Mitarbeiter inklusive Funktionsgruppen- und Team-Zuordnungen</summary>
|
||||
'''<param name="dsMaTeams"></param>
|
||||
'''<param name="dsMaFunktionsGruppen"></param>
|
||||
'''<param name="mutiererMitarbeiterNr"></param>
|
||||
Public Function Save(ByVal dsMaTeams As DataSet, ByVal dsMaFunktionsGruppen As DataSet, ByVal mutiererMitarbeiterNr As Integer)
|
||||
Try
|
||||
'daten des mitarbeiters speichern
|
||||
If _mitarbeiterNr <= 0 Then
|
||||
'neuer mitarbeiter
|
||||
_mitarbeiterNr = DataAccess.Mitarbeiter.Insert(_vorname, _nachname, _kurzZeichen, _anrede, _tgNummer, _
|
||||
_email, _fax, _telefon, _unterschriftText, _spracheNr, _fuerMandantNr, _showTipp, _partnerNr, _mandantNr, _
|
||||
_isAktiv, _isMailEmpfang, _isEdokaMessage, _funktion, _isMailDirektVersenden, _rang, _isMailDokumentRueckgang, _
|
||||
_klassifizierungNr, _isEdokaMail, _isJournalisierung, _isGebMeldung, _mail1, mutiererMitarbeiterNr)
|
||||
Else
|
||||
'besthender mitarbeiter
|
||||
DataAccess.Mitarbeiter.Update(_mitarbeiterNr, _vorname, _nachname, _kurzZeichen, _anrede, _tgNummer, _
|
||||
_email, _fax, _telefon, _unterschriftText, _spracheNr, _fuerMandantNr, _showTipp, _partnerNr, _mandantNr, _
|
||||
_isAktiv, _isMailEmpfang, _isEdokaMessage, _funktion, _isMailDirektVersenden, _rang, _isMailDokumentRueckgang, _
|
||||
_klassifizierungNr, _isEdokaMail, _isJournalisierung, _isGebMeldung, _mail1, mutiererMitarbeiterNr)
|
||||
End If
|
||||
|
||||
'je nach klassifizierung müssen min ein team, bzw funktionsgruppe ausgewählt werden
|
||||
Dim klassifizierung As New klassifizierung(_klassifizierungNr)
|
||||
|
||||
'checks auf ds == null finden in GetRowCountAfterSave() statt
|
||||
If klassifizierung.IsTeamZwingend Then
|
||||
If Not GetRowCountAfterSave(dsMaTeams) > 0 Then
|
||||
Throw New MitarbeiterException(String.Format(BusinessFacade.Meldungstext.GetInhaltById(310), klassifizierung.Bezeichnung))
|
||||
Return 1
|
||||
End If
|
||||
Else
|
||||
'wenn nicht zwingend darf keine zuordnung enthalten sein.
|
||||
If GetRowCountAfterSave(dsMaTeams) > 0 Then
|
||||
Throw New MitarbeiterException(String.Format(BusinessFacade.Meldungstext.GetInhaltById(317), klassifizierung.Bezeichnung))
|
||||
Return 1
|
||||
End If
|
||||
End If
|
||||
If klassifizierung.IsFunktionsgruppeZwingend Then
|
||||
If Not GetRowCountAfterSave(dsMaFunktionsGruppen) > 0 Then
|
||||
Throw New MitarbeiterException(String.Format(BusinessFacade.Meldungstext.GetInhaltById(311), klassifizierung.Bezeichnung))
|
||||
Return 1
|
||||
End If
|
||||
Else
|
||||
'wenn nicht zwingend darf keine zuordnung enthalten sein.
|
||||
If GetRowCountAfterSave(dsMaFunktionsGruppen) > 0 Then
|
||||
Throw New MitarbeiterException(String.Format(BusinessFacade.Meldungstext.GetInhaltById(318), klassifizierung.Bezeichnung))
|
||||
Return 1
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not IsNothing(dsMaTeams) Then
|
||||
'zuordnungen speichern
|
||||
Dim row As DataRow
|
||||
Dim teamMitarbeiter As BusinessFacade.TeamMitarbeiter
|
||||
For Each row In dsMaTeams.Tables(0).Rows
|
||||
Select Case row.RowState
|
||||
Case DataRowState.Added
|
||||
'neue zuordnung erstellen
|
||||
teamMitarbeiter = New BusinessFacade.TeamMitarbeiter()
|
||||
teamMitarbeiter.Anteil = Tools.CToInt32(row("anteil"))
|
||||
teamMitarbeiter.IsAktiv = row("aktiv")
|
||||
teamMitarbeiter.MandantNr = row("mandantnr")
|
||||
teamMitarbeiter.MitarbeiterNr = _mitarbeiterNr
|
||||
teamMitarbeiter.Team = New BusinessFacade.Team(Tools.CToInt32(row("teamnr")))
|
||||
|
||||
teamMitarbeiter.Save(mutiererMitarbeiterNr)
|
||||
|
||||
Case DataRowState.Modified
|
||||
'bestehende speichern
|
||||
teamMitarbeiter = New BusinessFacade.TeamMitarbeiter(Tools.CToInt32(row("teammitarbeiternr")))
|
||||
teamMitarbeiter.Anteil = row("anteil")
|
||||
teamMitarbeiter.IsAktiv = row("aktiv")
|
||||
|
||||
teamMitarbeiter.Save(mutiererMitarbeiterNr)
|
||||
|
||||
'Case DataRowState.Deleted
|
||||
'bestehende löschen -> kb310370
|
||||
'BusinessFacade.TeamMitarbeiter.Delete(Tools.CToInt32(row("teammitarbeiternr", DataRowVersion.Original)), mutiererMitarbeiterNr)
|
||||
|
||||
End Select
|
||||
Next
|
||||
End If
|
||||
|
||||
If Not IsNothing(dsMaFunktionsGruppen) Then
|
||||
'zuordnungen speichern
|
||||
Dim row As DataRow
|
||||
For Each row In dsMaFunktionsGruppen.Tables(0).Rows
|
||||
Select Case row.RowState
|
||||
Case DataRowState.Added
|
||||
If Common.Tools.CToBool(row("aktiv")) Then
|
||||
'neue verbindung herstellen
|
||||
BusinessFacade.MitarbeiterFunktionsgruppe.Insert(Tools.CToInt32(row("mitarbeiternr")), Tools.CToInt32(row("funktionsgruppenr")), mutiererMitarbeiterNr)
|
||||
End If
|
||||
|
||||
Case DataRowState.Modified
|
||||
BusinessFacade.MitarbeiterFunktionsgruppe.SetAktiv(Tools.CToInt32(row("mitarbeiter_funktionsgruppenr")), Common.Tools.CToBool(row("aktiv")), mutiererMitarbeiterNr)
|
||||
|
||||
'Case DataRowState.Deleted
|
||||
'bestehende löschen -> kb310370
|
||||
'BusinessFacade.MitarbeiterFunktionsgruppe.Delete(Tools.CToInt32(row("mitarbeiter_funktionsgruppenr", DataRowVersion.Original)), mutiererMitarbeiterNr)
|
||||
|
||||
End Select
|
||||
Next
|
||||
End If
|
||||
|
||||
'members refreshen
|
||||
Dim dsRefresh As New DataSet()
|
||||
DataAccess.Mitarbeiter.GetById(_mitarbeiterNr, dsRefresh)
|
||||
LoadData(dsRefresh)
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Private methods"
|
||||
|
||||
'''<summary>lädt die daten in die klassen member</summary>
|
||||
'''<param name="ds"></param>
|
||||
|
||||
Private Sub LoadData(ByVal ds As DataSet)
|
||||
Try
|
||||
If Not Common.Tools.ValidateDS(ds) Then
|
||||
Return
|
||||
End If
|
||||
|
||||
_mitarbeiterNr = Tools.CToInt32(ds.Tables(0).Rows(0)("mitarbeiterNr"))
|
||||
_vorname = Tools.CToString(ds.Tables(0).Rows(0)("vorname"))
|
||||
_nachname = Tools.CToString(ds.Tables(0).Rows(0)("name"))
|
||||
_kurzZeichen = Tools.CToString(ds.Tables(0).Rows(0)("kurzzeichen"))
|
||||
_anrede = Tools.CToString(ds.Tables(0).Rows(0)("anrede"))
|
||||
_tgNummer = Tools.CToString(ds.Tables(0).Rows(0)("tgnummer"))
|
||||
_email = Tools.CToString(ds.Tables(0).Rows(0)("email"))
|
||||
_fax = Tools.CToString(ds.Tables(0).Rows(0)("fax"))
|
||||
_telefon = Tools.CToString(ds.Tables(0).Rows(0)("telefon"))
|
||||
_unterschriftText = Tools.CToString(ds.Tables(0).Rows(0)("unterschrift_text"))
|
||||
_spracheNr = Tools.CToInt32(ds.Tables(0).Rows(0)("sprache"))
|
||||
_fuerMandantNr = Tools.CToInt32(ds.Tables(0).Rows(0)("fuermandant"))
|
||||
_showTipp = Common.Tools.CToBool(ds.Tables(0).Rows(0)("showtip"))
|
||||
_partnerNr = Tools.CToInt32(ds.Tables(0).Rows(0)("partnernr"))
|
||||
_mandantNr = Tools.CToInt32(ds.Tables(0).Rows(0)("mandantnr"))
|
||||
_isAktiv = Common.Tools.CToBool(ds.Tables(0).Rows(0)("aktiv"))
|
||||
_erstelltAm = Tools.CToDateTime(ds.Tables(0).Rows(0)("erstellt_am"))
|
||||
_mutiertAm = Tools.CToDateTime(ds.Tables(0).Rows(0)("mutiert_am"))
|
||||
_mutiererMitarbeiterNr = Tools.CToInt32(ds.Tables(0).Rows(0)("mutierer"))
|
||||
_isMailEmpfang = Common.Tools.CToBool(ds.Tables(0).Rows(0)("mailempfang"))
|
||||
_isEdokaMessage = Common.Tools.CToBool(ds.Tables(0).Rows(0)("EdokaMesasge"))
|
||||
_funktion = Tools.CToString(ds.Tables(0).Rows(0)("funktion"))
|
||||
_isMailDirektVersenden = Common.Tools.CToBool(ds.Tables(0).Rows(0)("MailDirektVersenden"))
|
||||
_rang = Tools.CToString(ds.Tables(0).Rows(0)("Rang"))
|
||||
_isMailDokumentRueckgang = Common.Tools.CToBool(ds.Tables(0).Rows(0)("MailDokumentrueckgang"))
|
||||
_klassifizierungNr = Tools.CToInt32(ds.Tables(0).Rows(0)("klassifizierung"))
|
||||
_isEdokaMail = Common.Tools.CToBool(ds.Tables(0).Rows(0)("edoka_mail"))
|
||||
_isJournalisierung = Common.Tools.CToBool(ds.Tables(0).Rows(0)("journalisierung"))
|
||||
_isGebMeldung = Common.Tools.CToBool(ds.Tables(0).Rows(0)("GebMeldung"))
|
||||
_mail1 = Tools.CToString(ds.Tables(0).Rows(0)("Mail_1"))
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Parameter.LoadData", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Gibt die Anzahl der Rows zurück, welche sie nach dem Speichern haben werden</summary>
|
||||
'''<param name="ds2Validate">Das zu überprüfende DataSet</param>
|
||||
'''<returns>Der neue rowCount</returns>
|
||||
Private Function GetRowCountAfterSave(ByVal ds2Validate As DataSet) As Integer
|
||||
Try
|
||||
'validierung nicht möglich, es werden keines row mehr da sein nach dem speichern
|
||||
If IsNothing(ds2Validate) Then
|
||||
Return 0
|
||||
End If
|
||||
|
||||
Dim row As DataRow
|
||||
Dim newRowCount As Integer = 0
|
||||
|
||||
'neue rows zählen
|
||||
For Each row In ds2Validate.Tables(0).Rows
|
||||
If Convert.ToBoolean(row("aktiv")) And _
|
||||
(row.RowState = DataRowState.Added Or _
|
||||
row.RowState = DataRowState.Modified Or _
|
||||
row.RowState = DataRowState.Unchanged) Then
|
||||
|
||||
newRowCount = newRowCount + 1
|
||||
End If
|
||||
Next
|
||||
|
||||
Return newRowCount
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
|
||||
Public ReadOnly Property MitarbeiterNr() As Integer
|
||||
Get
|
||||
Return _mitarbeiterNr
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property Vorname() As String
|
||||
Get
|
||||
Return _vorname
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_vorname = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Nachname() As String
|
||||
Get
|
||||
Return _nachname
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_nachname = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property AnzeigeName() As String
|
||||
Get
|
||||
Return _nachname + " " + _vorname
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property KurzZeichen() As String
|
||||
Get
|
||||
Return _kurzZeichen
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_kurzZeichen = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Anrede() As String
|
||||
Get
|
||||
Return _anrede
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_anrede = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property TGNummer() As String
|
||||
Get
|
||||
Return _tgNummer
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_tgNummer = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property EMail() As String
|
||||
Get
|
||||
Return _email
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_email = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Fax() As String
|
||||
Get
|
||||
Return _fax
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_fax = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Telefon() As String
|
||||
Get
|
||||
Return _telefon
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_telefon = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property UnterschritText() As String
|
||||
Get
|
||||
Return _unterschriftText
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_unterschriftText = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property SpracheNr() As Integer
|
||||
Get
|
||||
Return _spracheNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_spracheNr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property FuerMandantNr() As Integer
|
||||
Get
|
||||
Return _fuerMandantNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_fuerMandantNr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property ShowTipp() As Boolean
|
||||
Get
|
||||
Return _showTipp
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_showTipp = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property PartnerNr() As Integer
|
||||
Get
|
||||
Return _partnerNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_partnerNr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property MandantNr() As Integer
|
||||
Get
|
||||
Return _mandantNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mandantNr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property IsAktiv() As Boolean
|
||||
Get
|
||||
Return _isAktiv
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ErstelltAm() As DateTime
|
||||
Get
|
||||
Return _erstelltAm
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MutiertAm() As DateTime
|
||||
Get
|
||||
Return _mutiertAm
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MutiererMitarbeiterNr() As Integer
|
||||
Get
|
||||
Return _mutiererMitarbeiterNr
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property IsMailEmpfang() As Boolean
|
||||
Get
|
||||
Return _isMailEmpfang
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isMailEmpfang = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property IsEdokaMessage() As Boolean
|
||||
Get
|
||||
Return _isEdokaMessage
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isEdokaMessage = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Funktion() As String
|
||||
Get
|
||||
Return _funktion
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_funktion = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property IsMailDirektVersenden() As Boolean
|
||||
Get
|
||||
Return _isMailDirektVersenden
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isMailDirektVersenden = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Rang() As String
|
||||
Get
|
||||
Return _rang
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_rang = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property IsMailDokumentRueckgang() As Boolean
|
||||
Get
|
||||
Return _isMailDokumentRueckgang
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isMailDokumentRueckgang = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property KlassifizierungNr() As Integer
|
||||
Get
|
||||
Return _klassifizierungNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_klassifizierungNr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property IsEdokaMail() As Boolean
|
||||
Get
|
||||
Return _isEdokaMail
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isEdokaMail = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Journalisierung() As Boolean
|
||||
Get
|
||||
Return _isJournalisierung
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isJournalisierung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property IsGebMeldung() As Boolean
|
||||
Get
|
||||
Return _isGebMeldung
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isGebMeldung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Mail1() As String
|
||||
Get
|
||||
Return _mail1
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_mail1 = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
'''<summary>Diese Klasse behandelt eine Mitarbeiter spezifische Ausnahme</summary>
|
||||
Public Class MitarbeiterException
|
||||
Inherits Exception
|
||||
|
||||
Dim _message As String
|
||||
|
||||
Public Sub New(ByVal message As String)
|
||||
_message = message
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property Message() As String
|
||||
Get
|
||||
Return _message
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
56
Backup/BusinessFacade/MitarbeiterFunktionsgruppe.vb
Normal file
56
Backup/BusinessFacade/MitarbeiterFunktionsgruppe.vb
Normal file
@@ -0,0 +1,56 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Imports EDOKALib.Common
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für die Mitarbeiter-Funktionsgruppen Zuweisung</summary>
|
||||
Public Class MitarbeiterFunktionsgruppe
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Löscht eine Team-Mitarbeiter Zuordnung aus der Datenbank</summary>
|
||||
'''<param name="mitarbeiterFunktionsGruppeNr">Zu löschende Verbindung</param>
|
||||
'''<param name="mutiererMitarbeiterNr">Die Id des Benutzers, welcher die Änderungen vornimmt</param>
|
||||
Public Overloads Shared Function Delete(ByVal mitarbeiterFunktionsGruppeNr As Integer, ByVal mutiererMitarbeiterNr As Integer)
|
||||
Try
|
||||
DataAccess.MitarbeiterFunktionsgruppe.Delete(mitarbeiterFunktionsGruppeNr, mutiererMitarbeiterNr)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'''<summary>Speichert die Daten der aktuellen Instanz in die Datenbank</summary>
|
||||
'''<param name="mutiererMitarbeiterNr">Die Id des Benutzers, welcher die Änderungen vornimmt</param>
|
||||
|
||||
Public Overloads Shared Function Insert(ByVal mitarbeiterNr As Integer, ByVal funktionsGruppeNr As Integer, ByVal mutiererMitarbeiterNr As Integer)
|
||||
Try
|
||||
'neuer eintrag
|
||||
DataAccess.MitarbeiterFunktionsgruppe.Insert(mitarbeiterNr, funktionsGruppeNr, mutiererMitarbeiterNr)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Funktionsgrupppen denen ein Mitarbeiter zugewiesen ist zurück</summary>
|
||||
'''<param name="ds">Das DataSet welches gefüllt werden soll</param>
|
||||
Public Overloads Shared Sub GetListeByMitarbeiterNr(ByVal mitarbeiterNr As Integer, ByRef ds As DataSet)
|
||||
Try
|
||||
DataAccess.MitarbeiterFunktionsgruppe.GetListeByMitarbeiterNr(mitarbeiterNr, ds)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Funktionsgrupppen denen ein Mitarbeiter zugewiesen ist zurück</summary>
|
||||
|
||||
Public Overloads Shared Sub SetAktiv(ByVal mitarbeiterFunktionsGruppeNr As Integer, ByVal isAktiv As Boolean, ByVal mutiererMitarbeiterNr As Integer)
|
||||
Try
|
||||
DataAccess.MitarbeiterFunktionsgruppe.SetAktiv(mitarbeiterFunktionsGruppeNr, isAktiv, mutiererMitarbeiterNr)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
98
Backup/BusinessFacade/NullHandler.vb
Normal file
98
Backup/BusinessFacade/NullHandler.vb
Normal file
@@ -0,0 +1,98 @@
|
||||
'''<summary>diese klasse ersetzt null values durch den parameter 'NullReplaceValue' von der parameter tabelle</summary>
|
||||
'''Achtung! dies funktioniert nicht mit allen daten typen! zur zeit ist der replace wert = -5648945
|
||||
'''dies heisst, dass sämtliche unsigned, binary, Datums und boolean-Datentypen nicht unterstützt werden.
|
||||
'''gut nachdenken befor neue datentypen hier eingetragen werden!
|
||||
Public Class NullHandler
|
||||
Public Shared _nullReplacerInt As Integer
|
||||
Public Shared _nullReplacerStr As String
|
||||
|
||||
|
||||
Shared Sub New()
|
||||
_nullReplacerInt = Integer.Parse(Config.GetParameterValue("NullReplaceValue"))
|
||||
_nullReplacerStr = Config.GetParameterValue("NullReplaceValue")
|
||||
End Sub
|
||||
|
||||
Public Shared Function CToInt16(ByVal o As Object) As Int16
|
||||
If o Is System.DBNull.Value Then
|
||||
Return CShort(_nullReplacerInt)
|
||||
Else
|
||||
If TypeOf o Is Int16 Then
|
||||
Return CShort(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function CToInt32(ByVal o As Object) As Int32
|
||||
If o Is System.DBNull.Value Then
|
||||
Return _nullReplacerInt
|
||||
Else
|
||||
If TypeOf o Is Int32 Then
|
||||
Return CInt(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function CToInt64(ByVal o As Object) As Int64
|
||||
If o Is System.DBNull.Value Then
|
||||
Return CLng(_nullReplacerInt)
|
||||
Else
|
||||
If TypeOf o Is Int64 Then
|
||||
Return CLng(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function CToSingle(ByVal o As Object) As Single
|
||||
If o Is System.DBNull.Value Then
|
||||
Return CSng(_nullReplacerInt)
|
||||
Else
|
||||
If TypeOf o Is Single Then
|
||||
Return CSng(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function CToDouble(ByVal o As Object) As Double
|
||||
If o Is System.DBNull.Value Then
|
||||
Return CDbl(_nullReplacerInt)
|
||||
Else
|
||||
If TypeOf o Is Double Then
|
||||
Return CDbl(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function CToDecimal(ByVal o As Object) As Decimal
|
||||
If o Is System.DBNull.Value Then
|
||||
Return CDec(_nullReplacerInt)
|
||||
Else
|
||||
If TypeOf o Is Decimal Then
|
||||
Return CDec(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function CToString(ByVal o As Object) As String
|
||||
If o Is System.DBNull.Value Then
|
||||
Return _nullReplacerStr
|
||||
Else
|
||||
If TypeOf o Is String Then
|
||||
Return CStr(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
'''<summary>spezialfall wird auf DateTime.MinValue gesetzt</summary>
|
||||
'''<param name="o"></param>
|
||||
|
||||
Public Shared Function CToDateTime(ByVal o As Object) As DateTime
|
||||
If o Is System.DBNull.Value Then
|
||||
Return DateTime.MinValue
|
||||
Else
|
||||
If TypeOf o Is DateTime Then
|
||||
Return CDate(o)
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
End Class
|
||||
380
Backup/BusinessFacade/OfficeVorlage.vb
Normal file
380
Backup/BusinessFacade/OfficeVorlage.vb
Normal file
@@ -0,0 +1,380 @@
|
||||
Imports EDOKALib.Common
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für die Office Vorlage</summary>
|
||||
Public Class OfficeVorlage
|
||||
|
||||
#Region "Members"
|
||||
|
||||
Private _officeVorlageNr As Integer
|
||||
Private _bezeichnung As String
|
||||
Private _beschreibung As String
|
||||
Private _vorlageId As Integer
|
||||
Private _vorlageName As String
|
||||
Private _prefixDokumentName As String
|
||||
Private _isIdvVorlage As Boolean
|
||||
Private _idvId As String
|
||||
Private _officeVorlage As String
|
||||
Private _isAbsenderErsteller As Boolean 'nicht implementiert -> property not visible
|
||||
Private _isIdvNativ As Boolean
|
||||
Private _isDokumentGeschuetzt As Boolean 'nicht implementiert -> property not visible
|
||||
Private _isKopfzeileGenerieren As Boolean
|
||||
Private _klassifizierung As Boolean 'nicht implementiert -> property not visible
|
||||
Private _barcode As BarcodeTyp
|
||||
Private _mandantNr As Integer
|
||||
Private _isAktiv As Boolean
|
||||
Private _erstelltAm As DateTime
|
||||
Private _mutiertAm As DateTime
|
||||
Private _mutiererMitarbeiterNr As Integer
|
||||
Private _anwendung As Anwendung
|
||||
Private _ownerMitarbeiterNr As Integer
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Constructor"
|
||||
|
||||
Public Sub New()
|
||||
End Sub
|
||||
|
||||
'''<summary>Neue Instanz für bestehende OfficeVorlage erstellen</summary>
|
||||
'''<param name="officeVorlageNr"></param>
|
||||
Public Sub New(ByVal officeVorlageNr As Integer)
|
||||
Try
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.OfficeVorlage.GetByNr(ds, officeVorlageNr)
|
||||
LoadData(ds)
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.OfficeVorlage.New", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Structs"
|
||||
|
||||
Public Structure BarcodeTyp
|
||||
|
||||
Private _top As Integer
|
||||
Private _left As Integer
|
||||
Private _width As Integer
|
||||
Private _height As Integer
|
||||
Private _isHorizontal As Boolean
|
||||
|
||||
Public Sub New(ByVal top As Integer, ByVal left As Integer, ByVal width As Integer, ByVal height As Integer, ByVal isHorizontal As Boolean)
|
||||
Try
|
||||
_top = top
|
||||
_left = left
|
||||
_width = width
|
||||
_height = height
|
||||
_isHorizontal = isHorizontal
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.OfficeVorlage.Barcode", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property Top()
|
||||
Get
|
||||
Return _top
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property Left()
|
||||
Get
|
||||
Return _left
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property Height()
|
||||
Get
|
||||
Return _height
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property Width()
|
||||
Get
|
||||
Return _width
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property IsHorizontal()
|
||||
Get
|
||||
Return _isHorizontal
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Structure
|
||||
#End Region
|
||||
|
||||
#Region "Private Functions"
|
||||
|
||||
|
||||
'''<summary>lädt die daten in die klassen member</summary>
|
||||
'''<param name="ds"></param>
|
||||
Private Sub LoadData(ByVal ds As DataSet)
|
||||
Try
|
||||
If Not Common.Tools.ValidateDS(ds) Then
|
||||
Return
|
||||
End If
|
||||
|
||||
_officeVorlageNr = Tools.CToInt32(ds.Tables(0).Rows(0)("offfice_vorlagenr"))
|
||||
_bezeichnung = NullHandler.CToString(ds.Tables(0).Rows(0)("bezeichnung"))
|
||||
_beschreibung = NullHandler.CToString(ds.Tables(0).Rows(0)("beschreibung"))
|
||||
_vorlageId = NullHandler.CToInt32(ds.Tables(0).Rows(0)("vorlageid"))
|
||||
_vorlageName = NullHandler.CToString(ds.Tables(0).Rows(0)("vorlagename"))
|
||||
_prefixDokumentName = NullHandler.CToString(ds.Tables(0).Rows(0)("prefix_dokumentname"))
|
||||
_isIdvVorlage = Tools.CToBool(ds.Tables(0).Rows(0)("idv_vorlage"))
|
||||
_idvId = NullHandler.CToString(ds.Tables(0).Rows(0)("idv_id"))
|
||||
_officeVorlage = NullHandler.CToString(ds.Tables(0).Rows(0)("office_vorlage"))
|
||||
_isAbsenderErsteller = Tools.CToBool(ds.Tables(0).Rows(0)("absender_ersteller"))
|
||||
_isIdvNativ = Tools.CToBool(ds.Tables(0).Rows(0)("idv_nativ"))
|
||||
_isDokumentGeschuetzt = Tools.CToBool(ds.Tables(0).Rows(0)("dokument_geschuetzt"))
|
||||
_isKopfzeileGenerieren = Tools.CToBool(ds.Tables(0).Rows(0)("kopfzeile_generieren"))
|
||||
_klassifizierung = NullHandler.CToInt32(ds.Tables(0).Rows(0)("klassifizierung"))
|
||||
|
||||
_barcode = New BarcodeTyp(Tools.CToInt32(ds.Tables(0).Rows(0)("bcpt")), _
|
||||
NullHandler.CToInt32(ds.Tables(0).Rows(0)("bcpl")), _
|
||||
Tools.CToInt32(ds.Tables(0).Rows(0)("bcw")), _
|
||||
Tools.CToInt32(ds.Tables(0).Rows(0)("bch")), _
|
||||
NullHandler.CToInt32(ds.Tables(0).Rows(0)("bhorizontal")))
|
||||
|
||||
_mandantNr = NullHandler.CToInt32(ds.Tables(0).Rows(0)("mandantnr"))
|
||||
_isAktiv = Tools.CToBool(ds.Tables(0).Rows(0)("aktiv"))
|
||||
_erstelltAm = NullHandler.CToDateTime(ds.Tables(0).Rows(0)("erstellt_am"))
|
||||
_mutiertAm = NullHandler.CToDateTime(ds.Tables(0).Rows(0)("mutiert_am"))
|
||||
_mutiererMitarbeiterNr = NullHandler.CToInt32(ds.Tables(0).Rows(0)("mutierer"))
|
||||
|
||||
_anwendung = New Anwendung(NullHandler.CToInt32(ds.Tables(0).Rows(0)("anwendungnr")))
|
||||
_ownerMitarbeiterNr = NullHandler.CToInt32(ds.Tables(0).Rows(0)("owner"))
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.OfficeVorlage.ConstructorHelper", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Public Functions"
|
||||
Public Function Save(ByVal mutierer As Integer)
|
||||
Try
|
||||
Dim err As Integer
|
||||
Dim key As Integer
|
||||
If _officeVorlageNr = 0 Then 'create new
|
||||
err = DataAccess.OfficeVorlage.Add(key, _bezeichnung, _beschreibung, _vorlageId, _vorlageName, _
|
||||
_prefixDokumentName, _isIdvVorlage, _idvId, _officeVorlage, _isAbsenderErsteller, _isIdvNativ, _
|
||||
_isDokumentGeschuetzt, _isKopfzeileGenerieren, _klassifizierung, _barcode.Top, _barcode.Left, _
|
||||
_barcode.Width, _barcode.Height, _barcode.IsHorizontal, _mandantNr, _isAktiv, _erstelltAm, _
|
||||
_mutiertAm, _mutiererMitarbeiterNr, _anwendung.AnwendungsNr, _ownerMitarbeiterNr)
|
||||
|
||||
|
||||
|
||||
If err = 0 Then
|
||||
_officeVorlageNr = key
|
||||
End If
|
||||
Else 'save existing
|
||||
|
||||
End If
|
||||
|
||||
If err <> 0 Then
|
||||
Throw New DokumentartException(Meldungstext.GetInhaltById(40000))
|
||||
End If
|
||||
|
||||
'refresh data
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.OfficeVorlage.GetByNr(ds, OfficeVorlageNr)
|
||||
LoadData(ds)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.OfficeVorlage.Save", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Delete(ByVal mutierer As Integer)
|
||||
Try
|
||||
_isAktiv = False
|
||||
Save(mutierer)
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.OfficeVorlage.Delete", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
|
||||
Public Property OfficeVorlageNr() As Integer
|
||||
Get
|
||||
Return _officeVorlageNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_officeVorlageNr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Bezeichnung() As String
|
||||
Get
|
||||
Return _bezeichnung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_bezeichnung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Beschreibung() As String
|
||||
Get
|
||||
Return _beschreibung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_beschreibung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property VorlageId() As Integer
|
||||
Get
|
||||
Return _vorlageId
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_vorlageId = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property VorlageName() As String
|
||||
Get
|
||||
Return _vorlageName
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_vorlageName = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property PrefixDokumentName() As String
|
||||
Get
|
||||
Return _prefixDokumentName
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_prefixDokumentName = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsIdvVorlage() As Boolean
|
||||
Get
|
||||
Return _isIdvVorlage
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isIdvVorlage = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IdvId() As String
|
||||
Get
|
||||
Return _idvId
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_idvId = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property OfficeVorlage() As String
|
||||
Get
|
||||
Return _officeVorlage
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_officeVorlage = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsIdvNativ() As Boolean
|
||||
Get
|
||||
Return _isIdvNativ
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isIdvNativ = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsKopfzeileGenerieren() As Boolean
|
||||
Get
|
||||
Return _isKopfzeileGenerieren
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isKopfzeileGenerieren = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property BarcodeMember() As BarcodeTyp
|
||||
Get
|
||||
Return _barcode
|
||||
End Get
|
||||
Set(ByVal Value As BarcodeTyp)
|
||||
_barcode = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MandantNr() As Integer
|
||||
Get
|
||||
Return _mandantNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mandantNr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsAktiv() As Boolean
|
||||
Get
|
||||
Return _isAktiv
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ErstelltAm() As DateTime
|
||||
Get
|
||||
Return _erstelltAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_erstelltAm = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MutiertAm() As DateTime
|
||||
Get
|
||||
Return _mutiertAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_mutiertAm = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MutiererMitarbeiterNr() As Integer
|
||||
Get
|
||||
Return _mutiererMitarbeiterNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mutiererMitarbeiterNr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Anwendung() As Anwendung
|
||||
Get
|
||||
Return _anwendung
|
||||
End Get
|
||||
Set(ByVal Value As Anwendung)
|
||||
_anwendung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property OwnerMitarbeiterNr() As Integer
|
||||
Get
|
||||
Return _ownerMitarbeiterNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_ownerMitarbeiterNr = Value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
#Region "OfficeVorlageException"
|
||||
|
||||
'''<summary>Diese Klasse behandelt eine OfficeVorlage spezifische Ausnahme</summary>
|
||||
Public Class OfficeVorlageException
|
||||
Inherits Exception
|
||||
|
||||
Dim _message As String
|
||||
|
||||
Public Sub New(ByVal message As String)
|
||||
_message = message
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property Message() As String
|
||||
Get
|
||||
Return _message
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
|
||||
#End Region
|
||||
180
Backup/BusinessFacade/Parameter.vb
Normal file
180
Backup/BusinessFacade/Parameter.vb
Normal file
@@ -0,0 +1,180 @@
|
||||
|
||||
'''<summary>Applikations Parameter (verwaltet Programmeinstellungen für einzelne oder alle Benutzer in einer sql-tabelle)</summary>
|
||||
'''um auf die parameter abzufragen bitte die klasse BF.Config verwenden. diese klasse cached die parameter.
|
||||
Public Class Parameter
|
||||
|
||||
#Region "Member"
|
||||
Private _parameterId As Integer
|
||||
Private _benutzerNr As Integer
|
||||
Private _name As String
|
||||
Private _wert As String = ""
|
||||
Private _datentyp As Datentyp
|
||||
Private _beschreibung As String
|
||||
Private _aktiv As Boolean
|
||||
Private _mutiererId As Integer
|
||||
Private _mutiertAm As DateTime
|
||||
#End Region
|
||||
|
||||
#Region "Enums"
|
||||
Public Enum Datentyp
|
||||
[Integer] = 1
|
||||
[String] = 2
|
||||
[Boolean] = 3
|
||||
End Enum
|
||||
#End Region
|
||||
|
||||
#Region "Constructors"
|
||||
|
||||
Public Sub New()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
'''<summary>load the parameter for all users (benutzerNr=0)</summary>
|
||||
'''<param name="parameterName">parameterName</param>
|
||||
|
||||
Public Sub New(ByVal parameterName As String)
|
||||
ConstructorHelper(parameterName, 0)
|
||||
End Sub
|
||||
|
||||
|
||||
'''<summary>lädt einen parameter für einen bestimmten benutzer oder für alle</summary>
|
||||
'''<param name="parameterName">parameterName</param>
|
||||
'''<param name="benutzerNr">BenutzerNr oder 0 = gültig für alle benutzer</param>
|
||||
|
||||
Public Sub New(ByVal parameterName As String, ByVal benutzerNr As Integer)
|
||||
ConstructorHelper(parameterName, benutzerNr)
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Private Functions"
|
||||
|
||||
'''<summary>workaround für fehlendes konstruktor überladen</summary>
|
||||
'''<param name="parameterName"></param>
|
||||
'''<param name="benutzerNr"></param>
|
||||
|
||||
Private Sub ConstructorHelper(ByVal parameterName As String, ByVal benutzerNr As Integer)
|
||||
Try
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.Parameter.GetParameter(ds, benutzerNr, parameterName)
|
||||
LoadData(ds)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Parameter.ConstructorHelper", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
'''<summary>lädt die daten in die klassen member</summary>
|
||||
'''<param name="ds"></param>
|
||||
|
||||
Private Sub LoadData(ByVal ds As DataSet)
|
||||
Try
|
||||
If Not Common.Tools.ValidateDS(ds) Then
|
||||
Return
|
||||
End If
|
||||
|
||||
_parameterId = ds.Tables(0).Rows(0).Item("ParameterId")
|
||||
_benutzerNr = ds.Tables(0).Rows(0).Item("BenutzerNr")
|
||||
_name = ds.Tables(0).Rows(0).Item("Name")
|
||||
_wert = ds.Tables(0).Rows(0).Item("Wert")
|
||||
_datentyp = CType(ds.Tables(0).Rows(0).Item("Datentyp"), Datentyp)
|
||||
_beschreibung = ds.Tables(0).Rows(0).Item("Beschreibung")
|
||||
_aktiv = ds.Tables(0).Rows(0).Item("Aktiv")
|
||||
_mutiererId = ds.Tables(0).Rows(0).Item("MutiererId")
|
||||
_mutiertAm = ds.Tables(0).Rows(0).Item("MutiertAm")
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.BF.Parameter.LoadData", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
Public Property ParameterId() As Integer
|
||||
Get
|
||||
Return _parameterId
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_parameterId = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property BenutzerNr() As Integer
|
||||
Get
|
||||
Return _benutzerNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_benutzerNr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Name() As String
|
||||
Get
|
||||
Return _name
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_name = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Wert() As String
|
||||
Get
|
||||
Return _wert
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_wert = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Typ() As Datentyp
|
||||
Get
|
||||
Return _datentyp
|
||||
End Get
|
||||
Set(ByVal Value As Datentyp)
|
||||
_datentyp = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Beschreibung() As String
|
||||
Get
|
||||
Return _beschreibung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_beschreibung = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Aktiv() As Boolean
|
||||
Get
|
||||
Return _aktiv
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_aktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property MutiererId() As Integer
|
||||
Get
|
||||
Return _mutiererId
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mutiererId = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property MutiertAm() As DateTime
|
||||
Get
|
||||
Return _mutiertAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_mutiertAm = Value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
83
Backup/BusinessFacade/Profil.vb
Normal file
83
Backup/BusinessFacade/Profil.vb
Normal file
@@ -0,0 +1,83 @@
|
||||
Imports EDOKALib.Common
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für die Profile</summary>
|
||||
Public Class Profil
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gib eine DataTable mit allen profilen eines Benutzers zurück</summary>
|
||||
'''<param name="mitarbeiterNr"></param>
|
||||
'''<param name="dt"></param>
|
||||
|
||||
Public Shared Function GetListeByMitarbeiterNr(ByVal mitarbeiterNr As Integer, ByRef dt As DataTable)
|
||||
Try
|
||||
Dim ds As New DataSet()
|
||||
|
||||
DataAccess.Profil.GetListeByMitarbeiterNr(mitarbeiterNr, ds)
|
||||
|
||||
If ds.Tables.Count = 0 Then
|
||||
'no datatable -> no data
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EdokaLib.Profil.GetListeByMitarbeiterNr", "Der Mitarbeiter mit der Nr " & mitarbeiterNr & " hat keine Profile", TraceLevel.Info)
|
||||
Throw New ProfilException(1, "Der Mitarbeiter mit der Nr " & mitarbeiterNr & " hat keine Profile")
|
||||
End If
|
||||
|
||||
dt = ds.Tables(0)
|
||||
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EdokaLib.Profil.GetListeByMitarbeiterNr", ex.Message & ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'''<summary>Gibt die Id(Nr) des standard Profils eines Benutzers zurück</summary>
|
||||
'''<param name="mitarbeiterNr"></param>
|
||||
|
||||
Public Shared Function GetStandardProfilNr(ByVal mitarbeiterNr As Integer) As Integer
|
||||
Try
|
||||
Dim dt As New DataTable()
|
||||
Dim i As Integer
|
||||
|
||||
GetListeByMitarbeiterNr(mitarbeiterNr, dt)
|
||||
|
||||
For i = 0 To dt.Rows.Count - 1
|
||||
If dt.Rows(i).Item("standard") = True Then
|
||||
Return dt.Rows(i).Item("profilnr")
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
TKBLib.Errorhandling.TraceHelper.Msg("EdokaLib.Profil.GetStandardProfilNr", ex.Message & ex.StackTrace, TraceLevel.Error)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
#Region "ProfilException"
|
||||
|
||||
Public Class ProfilException
|
||||
Inherits Exception
|
||||
|
||||
Private _number As Integer
|
||||
Private _description As String
|
||||
|
||||
Public Sub New(ByVal number As Integer, ByVal description As String)
|
||||
_number = number
|
||||
_description = description
|
||||
End Sub
|
||||
|
||||
Public Overrides ReadOnly Property Message() As String
|
||||
Get
|
||||
Return _description
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Number() As Integer
|
||||
Get
|
||||
Return _number
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
|
||||
#End Region
|
||||
58
Backup/BusinessFacade/Spalten.vb
Normal file
58
Backup/BusinessFacade/Spalten.vb
Normal file
@@ -0,0 +1,58 @@
|
||||
Imports System.Data
|
||||
|
||||
Imports EDOKALib.Common
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für die Spalten Definitionen</summary>
|
||||
Public Class Spalten
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Füllt ein C1TrueDbGrid mit allen in der Datenbank definierten Spalten</summary>
|
||||
'''<param name="tableName">Name der Tabelle, von welcher die Spalten zurück gegeben werden sollen</param>
|
||||
|
||||
Public Overloads Shared Sub FillGridColumns(ByVal tableName As String, ByRef grid As C1.Win.C1TrueDBGrid.C1TrueDBGrid)
|
||||
Try
|
||||
Dim dsSpalten As New DataSet()
|
||||
DataAccess.Spalten.GetListe(tableName, dsSpalten)
|
||||
|
||||
If dsSpalten.Tables.Count > 0 Then
|
||||
If dsSpalten.Tables(0).Rows.Count > 0 Then
|
||||
|
||||
'bestehende löschen
|
||||
grid.Columns.Clear()
|
||||
|
||||
Dim row As DataRow
|
||||
|
||||
grid.Splits(0).DisplayColumns.Clear()
|
||||
|
||||
Dim index As Integer = 0
|
||||
Dim column As C1.Win.C1TrueDBGrid.C1DisplayColumn
|
||||
|
||||
'alle spalten in grid erstellen
|
||||
For Each row In dsSpalten.Tables(0).Rows
|
||||
index = grid.Columns.Add(New C1.Win.C1TrueDBGrid.C1DataColumn())
|
||||
|
||||
grid.Columns(index).Caption = Tools.CToString(row("spalte"))
|
||||
grid.Columns(index).DataField = Tools.CToString(row("tabellenspalte"))
|
||||
|
||||
'feld mit checkbox anzeigen
|
||||
If Common.Tools.CToBool(row("alsHacken")) Then
|
||||
grid.Columns(index).ValueItems().Presentation = C1.Win.C1TrueDBGrid.PresentationEnum.CheckBox
|
||||
End If
|
||||
|
||||
grid.Splits(0).DisplayColumns(index).Width = Common.Tools.CToInt32(row("Breite"))
|
||||
grid.Splits(0).DisplayColumns(index).Visible = True
|
||||
|
||||
index += 1
|
||||
Next
|
||||
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
135
Backup/BusinessFacade/Team.vb
Normal file
135
Backup/BusinessFacade/Team.vb
Normal file
@@ -0,0 +1,135 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Imports EDOKALib.Common
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für die Teams</summary>
|
||||
Public Class Team
|
||||
|
||||
#Region "Members"
|
||||
|
||||
Private _teamNr As Integer
|
||||
Private _bezeichnung As String
|
||||
Private _kostenstellenNr As Integer
|
||||
Private _mandantNr As Integer
|
||||
Private _isAktiv As Boolean
|
||||
Private _erstelltAm As DateTime
|
||||
Private _mutiertAm As DateTime
|
||||
Private _mutiererMitarbeiter As BusinessFacade.Mitarbeiter
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Constructor"
|
||||
|
||||
'''<summary>Erstellt eine neue Instanz für ein bestehendes Team</summary>
|
||||
'''<param name="teamNr"></param>
|
||||
|
||||
Public Sub New(ByVal teamNr As Integer)
|
||||
Try
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.Team.GetById(teamNr, ds)
|
||||
|
||||
If ds.Tables.Count > 0 Then
|
||||
If ds.Tables(0).Rows.Count > 0 Then
|
||||
_teamNr = teamNr
|
||||
_bezeichnung = Tools.CToString(ds.Tables(0).Rows(0)("bezeichnung"))
|
||||
_kostenstellenNr = Tools.CToInt32(ds.Tables(0).Rows(0)("kostenstellenr"))
|
||||
_mandantNr = Tools.CToInt32(ds.Tables(0).Rows(0)("mandantnr"))
|
||||
_isAktiv = Common.Tools.CToBool(ds.Tables(0).Rows(0)("aktiv"))
|
||||
_erstelltAm = Tools.CToDateTime(ds.Tables(0).Rows(0)("erstellt_am"))
|
||||
_mutiertAm = Tools.CToDateTime(ds.Tables(0).Rows(0)("mutiert_am"))
|
||||
_mutiererMitarbeiter = New BusinessFacade.Mitarbeiter(Tools.CToInt32(ds.Tables(0).Rows(0)("mutierer")))
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Teams zurück</summary>
|
||||
'''<param name="ds">Das DataSet welches gefüllt werden soll</param>
|
||||
|
||||
Public Overloads Shared Sub GetListe(ByRef ds As DataSet)
|
||||
Try
|
||||
DataAccess.Team.GetListe(ds)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Teams denen ein Mitarbeiter zugewiesen ist zurück</summary>
|
||||
'''<param name="ds">Das DataSet welches gefüllt werden soll</param>
|
||||
|
||||
Public Overloads Shared Sub GetListeByMitarbeiterNr(ByVal mitarbeiterNr As Integer, ByRef ds As DataSet)
|
||||
Try
|
||||
DataAccess.Team.GetListeByMitarbeiterNr(mitarbeiterNr, ds)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
Public ReadOnly Property TeamNr() As Integer
|
||||
Get
|
||||
Return _teamNr
|
||||
End Get
|
||||
End Property
|
||||
Public Property Bezeichnung() As String
|
||||
Get
|
||||
Return _bezeichnung
|
||||
End Get
|
||||
Set(ByVal Value As String)
|
||||
_bezeichnung = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property KostenstellenNr() As Integer
|
||||
Get
|
||||
Return _kostenstellenNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_kostenstellenNr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property MandantNr() As Integer
|
||||
Get
|
||||
Return _mandantNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mandantNr = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsAktiv() As Boolean
|
||||
Get
|
||||
Return _isAktiv
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
Public Property ErstelltAm() As DateTime
|
||||
Get
|
||||
Return _erstelltAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_erstelltAm = Value
|
||||
End Set
|
||||
End Property
|
||||
Public ReadOnly Property MutiertAm() As DateTime
|
||||
Get
|
||||
Return _mutiertAm
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property MutiererMitarbeiter() As BusinessFacade.Mitarbeiter
|
||||
Get
|
||||
Return _mutiererMitarbeiter
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
171
Backup/BusinessFacade/TeamMitarbeiter.vb
Normal file
171
Backup/BusinessFacade/TeamMitarbeiter.vb
Normal file
@@ -0,0 +1,171 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Imports EDOKALib.Common
|
||||
|
||||
'''<summary>Diese klasse beinhaltet die Logik für die Team-Mitarbeiter Zuordnung</summary>
|
||||
Public Class TeamMitarbeiter
|
||||
|
||||
#Region "Members"
|
||||
|
||||
Private _teamMitarbeiterNr As Integer = -1
|
||||
Private _team As BusinessFacade.Team
|
||||
Private _mitarbeiterNr As Integer
|
||||
Private _anteil As Integer
|
||||
Private _mandantNr As Integer
|
||||
Private _isAktiv As Boolean
|
||||
Private _erstelltAm As DateTime
|
||||
Private _mutiertAm As DateTime
|
||||
Private _mutiererMitarbeiter As BusinessFacade.Mitarbeiter
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Constructor"
|
||||
|
||||
Public Sub New()
|
||||
End Sub
|
||||
|
||||
Public Sub New(ByVal teamMitarbeiterNr As Integer)
|
||||
Try
|
||||
Dim ds As New DataSet()
|
||||
DataAccess.TeamMitarbeiter.GetById(teamMitarbeiterNr, ds)
|
||||
|
||||
If ds.Tables.Count > 0 Then
|
||||
If ds.Tables(0).Rows.Count > 0 Then
|
||||
_teamMitarbeiterNr = teamMitarbeiterNr
|
||||
_team = New BusinessFacade.Team(Tools.CToInt32(ds.Tables(0).Rows(0)("teamNr")))
|
||||
_mitarbeiterNr = Tools.CToInt32(ds.Tables(0).Rows(0)("mitarbeiternr"))
|
||||
_anteil = Tools.CToInt32(ds.Tables(0).Rows(0)("anteil"))
|
||||
_mandantNr = Tools.CToInt32(ds.Tables(0).Rows(0)("mandantnr"))
|
||||
_isAktiv = Common.Tools.CToBool(ds.Tables(0).Rows(0)("aktiv"))
|
||||
_erstelltAm = Tools.CToDateTime(ds.Tables(0).Rows(0)("erstellt_am"))
|
||||
_mutiertAm = Tools.CToDateTime(ds.Tables(0).Rows(0)("mutiert_am"))
|
||||
_mutiererMitarbeiter = New BusinessFacade.Mitarbeiter(Tools.CToInt32(ds.Tables(0).Rows(0)("mutierer")))
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Public methods"
|
||||
|
||||
'''<summary>Gibt eine Liste mit allen Teams für einen Mitarbeitern zurück</summary>
|
||||
'''<param name="ds">Das DataSet welches gefüllt werden soll</param>
|
||||
Public Overloads Shared Sub GetListe(ByVal mitarbeiterNr As Integer, ByRef ds As DataSet)
|
||||
Try
|
||||
DataAccess.TeamMitarbeiter.GetListByMitarbeiterNr(mitarbeiterNr, ds)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'''<summary>Löscht eine Team-Mitarbeiter Zuordnung aus der Datenbank</summary>
|
||||
'''<param name="teamMitarbeiterNr">Zu löschende Verbindung</param>
|
||||
'''<param name="mutiererMitarbeiterNr">Die Id des Benutzers, welcher die Änderungen vornimmt</param>
|
||||
Public Overloads Shared Function Delete(ByVal teamMitarbeiterNr As Integer, ByVal mutiererMitarbeiterNr As Integer)
|
||||
Try
|
||||
DataAccess.TeamMitarbeiter.Delete(teamMitarbeiterNr, mutiererMitarbeiterNr)
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'''<summary>Speichert die Daten der aktuellen Instanz in die Datenbank</summary>
|
||||
'''<param name="mutiererMitarbeiterNr">Die Id des Benutzers, welcher die Änderungen vornimmt</param>
|
||||
|
||||
Public Function Save(ByVal mutiererMitarbeiterNr As Integer)
|
||||
Try
|
||||
If _teamMitarbeiterNr < 0 Then
|
||||
'neuer eintrag
|
||||
DataAccess.TeamMitarbeiter.Insert(_team.TeamNr, _mitarbeiterNr, _anteil, _mandantNr, _isAktiv, mutiererMitarbeiterNr)
|
||||
Else
|
||||
'bestehender eintrag
|
||||
DataAccess.TeamMitarbeiter.Update(_teamMitarbeiterNr, _team.TeamNr, _mitarbeiterNr, _anteil, _mandantNr, _isAktiv, mutiererMitarbeiterNr)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
|
||||
Public ReadOnly Property TeamMitarbeiterNr() As Integer
|
||||
Get
|
||||
Return _teamMitarbeiterNr
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property Team() As BusinessFacade.Team
|
||||
Get
|
||||
Return _team
|
||||
End Get
|
||||
Set(ByVal Value As BusinessFacade.Team)
|
||||
_team = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property MitarbeiterNr() As Integer
|
||||
Get
|
||||
Return _mitarbeiterNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mitarbeiterNr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Anteil() As Integer
|
||||
Get
|
||||
Return _anteil
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_anteil = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property MandantNr() As Integer
|
||||
Get
|
||||
Return _mandantNr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
_mandantNr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property IsAktiv() As Boolean
|
||||
Get
|
||||
Return _isAktiv
|
||||
End Get
|
||||
Set(ByVal Value As Boolean)
|
||||
_isAktiv = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ErstelltAm() As DateTime
|
||||
Get
|
||||
Return _erstelltAm
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property MutiertAm() As DateTime
|
||||
Get
|
||||
Return _mutiertAm
|
||||
End Get
|
||||
Set(ByVal Value As DateTime)
|
||||
_mutiertAm = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MutiererMitarbeiter() As BusinessFacade.Mitarbeiter
|
||||
Get
|
||||
Return _mutiererMitarbeiter
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user