BankAccount zu Mandator hinzugefügt.

This commit is contained in:
2024-11-25 16:33:22 +01:00
parent cceebd66cf
commit 6c5a488f92
17 changed files with 1376 additions and 1339 deletions

View File

@@ -2,6 +2,7 @@
x:Class="BeWo.View.Detail.MandatorView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:localView="clr-namespace:BeWo.View"
@@ -11,7 +12,7 @@
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Focusable="True">
<Grid x:Name="root">
<Grid x:Name="root" IsSharedSizeScope="True">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
@@ -27,41 +28,52 @@
<ColumnDefinition Width="Auto" SharedSizeGroup="g1" />
<ColumnDefinition Width="*" MaxWidth="420" />
</Grid.ColumnDefinitions>
<Label
Grid.Row="0"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center">
Name
</Label>
<TextBox
Grid.Row="0"
Grid.Column="1"
Height="23"
Margin="3"
Text="{Binding Path=Name, UpdateSourceTrigger=PropertyChanged}" />
<Label
Grid.Row="1"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center">
IK Nummer (Leistungserbringer)
</Label>
<TextBox
Grid.Row="1"
Grid.Column="1"
Height="23"
Margin="3"
IsEnabled="{Binding Path=CanEditIKLeistungserbringer}"
Text="{Binding Path=IKLeistungserbringer, UpdateSourceTrigger=PropertyChanged}"
TextChanged="TextBox_TextChanged"
ToolTip="{Binding Path=CanEditIKLeistungserbringerTooltip}"
ToolTipService.ShowOnDisabled="True" />
<GroupBox
Grid.Row="2"
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="2"
Margin="3"
Header="Allgemeine Informationen"
Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="g1" />
<ColumnDefinition Width="*" MaxWidth="420" />
</Grid.ColumnDefinitions>
<Label Margin="3" VerticalAlignment="Center">
Name
</Label>
<TextBox
Grid.Row="0"
Grid.Column="1"
Height="23"
Margin="3"
Text="{Binding Path=Name, UpdateSourceTrigger=PropertyChanged}" />
<Label
Grid.Row="1"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center">
IK Nummer (Leistungserbringer)
</Label>
<TextBox
Grid.Row="1"
Grid.Column="1"
Height="23"
Margin="3"
IsEnabled="{Binding Path=CanEditIKLeistungserbringer}"
Text="{Binding Path=IKLeistungserbringer, UpdateSourceTrigger=PropertyChanged}"
TextChanged="TextBox_TextChanged"
ToolTip="{Binding Path=CanEditIKLeistungserbringerTooltip}"
ToolTipService.ShowOnDisabled="True" />
</Grid>
</GroupBox>
<GroupBox
Grid.Row="1"
Grid.ColumnSpan="2"
Margin="3,20,3,3"
Header="Adresse"
@@ -74,7 +86,7 @@
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="g1" />
<ColumnDefinition Width="150" />
<ColumnDefinition Width="200" />
</Grid.ColumnDefinitions>
<Label
@@ -120,12 +132,96 @@
</Grid>
</GroupBox>
<GroupBox
Grid.Row="2"
Grid.ColumnSpan="2"
Margin="3,20,3,3"
Header="Finanzen"
Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="g1" />
<ColumnDefinition Width="200" />
</Grid.ColumnDefinitions>
<Label
Grid.Row="0"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center">
Konto
</Label>
<TextBox
Grid.Row="0"
Grid.Column="1"
Height="23"
Margin="3"
Text="{Binding Path=AccountNumber, UpdateSourceTrigger=PropertyChanged}" />
<Label
Grid.Row="1"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center">
BLZ
</Label>
<Label
Grid.Row="2"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center">
Bankname
</Label>
<Label
Grid.Row="3"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center">
BIC
</Label>
<Label
Grid.Row="4"
Grid.Column="0"
Margin="3"
VerticalAlignment="Center">
IBAN
</Label>
<TextBox
Grid.Row="1"
Grid.Column="1"
Height="23"
Margin="3"
Text="{Binding Path=BankCode, UpdateSourceTrigger=PropertyChanged}" />
<TextBox
Grid.Row="2"
Grid.Column="1"
Height="23"
Margin="3"
Text="{Binding Path=BankName, UpdateSourceTrigger=PropertyChanged}" />
<TextBox
Grid.Row="3"
Grid.Column="1"
Height="23"
Margin="3"
Text="{Binding Path=Bic, UpdateSourceTrigger=PropertyChanged}" />
<TextBox
Grid.Row="4"
Grid.Column="1"
Height="23"
Margin="3"
Text="{Binding Path=IBAN, UpdateSourceTrigger=PropertyChanged}" />
</Grid>
</GroupBox>
<GroupBox
Grid.Row="3"
Grid.ColumnSpan="2"
Margin="3,20,3,3"
Header="Einstellungen"
Header="Anwendungseinstellungen"
Style="{StaticResource ObjectEditGroupBox}">
<Grid x:Name="EinstellungenGrid">
<Grid.RowDefinitions>

View File

@@ -83,13 +83,13 @@ namespace BeWo.View.Detail
{
get
{
return this._Viewmodel;
return _Viewmodel;
}
set
{
this.DataContext = value;
this._Viewmodel = value;
DataContext = value;
_Viewmodel = value;
if (ViewModel.InvoiceNumberList.Count > 1)
{

File diff suppressed because it is too large Load Diff

View File

@@ -4,371 +4,318 @@ using BS.Shared;
namespace BeWo.Data.Entities
{
public class Mandator : BeWoEntityBase
{
public static string PropertyName_BeWoClientType = "BeWoClientType";
public static string PropertyName_ClientId = "ClientId";
public static string PropertyName_Country = "Country";
public static string PropertyName_Name = "Name";
public static string PropertyName_PostalCode = "PostalCode";
public static string PropertyName_Settings = "Settings";
public static string PropertyName_State = "State";
public static string PropertyName_Street = "Street";
public static string PropertyName_Town = "Town";
public static string PropertyName_Apikey = "Apikey";
public static string Setting_IsServiceRecordNoticeMandatory = "IsServiceRecordNoticeMandatory";
public static string Setting_IsPasswordSecurityActiv = "IsPasswordSecurityActiv";
public static string Setting_IsEndDateVisible = "IsEndDateVisible";
public static string Setting_IsOnlyYearMonthVisible = "IsOnlyYearMonthVisible";
public static string Setting_IsZeiterfassDateNormal = "IsZeiterfassDateNormal";
public static string Setting_IsZeiterfassungInStdMin = "IsZeiterfassungInStdMin";
public static string Setting_MaxDaysEditServiceRecordsAllowed = "MaxDaysEditServiceRecordsAllowed";
public static string Setting_HilfeplanAuslaufAuswahl = "HilfeplanAuslaufAuswahl";
public static string Setting_AnzTageZeiterfassErfolgt = "AnzTageZeiterfassErfolgt";
public static string Setting_ZeiterfassungsSchwellwert = "ZeiterfassungsSchwellwert";
public static string Setting_IKLeistungserbringer = "IKLeistungserbringer";
private long _BeWoClientType;
private string _ClientId;
private string _Country;
private string _Name;
private string _PostalCode;
private string _Settings;
private string _State;
private string _Street;
private string _Town;
public class Mandator : BeWoEntityBase
{
public static string PropertyName_BeWoClientType = "BeWoClientType";
public static string PropertyName_ClientId = "ClientId";
public static string PropertyName_Country = "Country";
public static string PropertyName_Name = "Name";
public static string PropertyName_PostalCode = "PostalCode";
public static string PropertyName_Settings = "Settings";
public static string PropertyName_State = "State";
public static string PropertyName_Street = "Street";
public static string PropertyName_Town = "Town";
public static string PropertyName_Apikey = "Apikey";
public static string Setting_IsServiceRecordNoticeMandatory = "IsServiceRecordNoticeMandatory";
public static string Setting_IsPasswordSecurityActiv = "IsPasswordSecurityActiv";
public static string Setting_IsEndDateVisible = "IsEndDateVisible";
public static string Setting_IsOnlyYearMonthVisible = "IsOnlyYearMonthVisible";
public static string Setting_IsZeiterfassDateNormal = "IsZeiterfassDateNormal";
public static string Setting_IsZeiterfassungInStdMin = "IsZeiterfassungInStdMin";
public static string Setting_MaxDaysEditServiceRecordsAllowed = "MaxDaysEditServiceRecordsAllowed";
public static string Setting_HilfeplanAuslaufAuswahl = "HilfeplanAuslaufAuswahl";
public static string Setting_AnzTageZeiterfassErfolgt = "AnzTageZeiterfassErfolgt";
public static string Setting_ZeiterfassungsSchwellwert = "ZeiterfassungsSchwellwert";
public static string Setting_IKLeistungserbringer = "IKLeistungserbringer";
private long _BeWoClientType;
private string _ClientId;
private string _Country;
private string _Name;
private string _PostalCode;
private string _Settings;
private string _State;
private string _Street;
private string _Town;
private string _RssFeedUrl;
private string _Apikey;
private string _IKLeistungserbringer;
private string _Apikey;
private string _IKLeistungserbringer;
public Mandator()
{
this._Tid = TableID.Mandator;
}
public Mandator()
{
this._Tid = TableID.Mandator;
}
public virtual long BeWoClientType
{
get
{
return this._BeWoClientType;
}
public virtual long BeWoClientType
{
get
{
return this._BeWoClientType;
}
set
{
if (this.AreDifferent(this._BeWoClientType, value))
{
this._BeWoClientType = value;
}
}
}
set
{
if (this.AreDifferent(this._BeWoClientType, value))
{
this._BeWoClientType = value;
}
}
}
public virtual string ClientId
{
get
{
return this._ClientId;
}
public virtual string ClientId
{
get
{
return this._ClientId;
}
set
{
if (this.AreDifferent(this._ClientId, value))
{
this._ClientId = value;
}
}
}
public virtual string Country
{
get
{
return this._Country;
}
set
{
if (this.AreDifferent(this._ClientId, value))
{
this._ClientId = value;
}
}
}
set
{
if (this.AreDifferent(this._Country, value))
{
this._Country = value;
}
}
}
public virtual bool IsServiceRecordNoticeMandatory
{
get
{
var val = this.GetSettingValue(Setting_IsServiceRecordNoticeMandatory);
if (val != null && val.Equals("0"))
{
return false;
}
public virtual string Country
{
get
{
return this._Country;
}
return true;
}
}
public virtual bool IsPasswordSecurityActiv
{
get
{
var val = this.GetSettingValue(Setting_IsPasswordSecurityActiv);
if (val != null && val.Equals("0"))
{
return false;
}
set
{
if (this.AreDifferent(this._Country, value))
{
this._Country = value;
}
}
}
return true;
}
}
public virtual bool IsEndDateVisible
{
get
{
var val = this.GetSettingValue(Setting_IsEndDateVisible);
if (val != null && val.Equals("0"))
{
return false;
}
public virtual bool IsServiceRecordNoticeMandatory
{
get
{
var val = this.GetSettingValue(Setting_IsServiceRecordNoticeMandatory);
if (val != null && val.Equals("0"))
{
return false;
}
return true;
}
}
public virtual bool IsOnlyYearMonthVisible
{
get
{
var val = this.GetSettingValue(Setting_IsOnlyYearMonthVisible);
if (val != null && val.Equals("0"))
{
return false;
}
return true;
}
}
return true;
}
}
public virtual bool IsZeiterfassDateNormal
{
get
{
var val = this.GetSettingValue(Setting_IsZeiterfassDateNormal);
if (val != null && val.Equals("0"))
{
return false;
}
public virtual bool IsPasswordSecurityActiv
{
get
{
var val = this.GetSettingValue(Setting_IsPasswordSecurityActiv);
if (val != null && val.Equals("0"))
{
return false;
}
return true;
}
}
public virtual bool IsZeiterfassungInStdMin
{
get
{
var val = this.GetSettingValue(Setting_IsZeiterfassungInStdMin);
if (val != null && val.Equals("0"))
{
return false;
}
return true;
}
}
return true;
}
}
public virtual int? MaxDaysEditServiceRecordsAllowed
{
get
{
var val = this.GetSettingValue(Setting_MaxDaysEditServiceRecordsAllowed);
int result;
if (Int32.TryParse(val, out result))
{
return result;
}
public virtual bool IsEndDateVisible
{
get
{
var val = this.GetSettingValue(Setting_IsEndDateVisible);
if (val != null && val.Equals("0"))
{
return false;
}
return null;
}
}
public virtual int? HilfeplanAuslaufAuswahl
{
get
{
var val = this.GetSettingValue(Setting_HilfeplanAuslaufAuswahl);
int result;
if (Int32.TryParse(val, out result))
{
return result;
}
return true;
}
}
return null;
}
}
public virtual int? AnzTageZeiterfassErfolgt
{
get
{
var val = this.GetSettingValue(Setting_AnzTageZeiterfassErfolgt);
int result;
if (Int32.TryParse(val, out result))
{
return result;
}
public virtual bool IsOnlyYearMonthVisible
{
get
{
var val = this.GetSettingValue(Setting_IsOnlyYearMonthVisible);
if (val != null && val.Equals("0"))
{
return false;
}
return null;
}
}
public virtual int? ZeiterfassungsSchwellwert
{
get
{
var val = this.GetSettingValue(Setting_ZeiterfassungsSchwellwert);
int result;
if (Int32.TryParse(val, out result))
{
return result;
}
return true;
}
}
return null;
}
}
public virtual string Name
{
get
{
return this._Name;
}
public virtual bool IsZeiterfassDateNormal
{
get
{
var val = this.GetSettingValue(Setting_IsZeiterfassDateNormal);
if (val != null && val.Equals("0"))
{
return false;
}
set
{
if (this.AreDifferent(this._Name, value))
{
this._Name = value;
}
}
}
public virtual string PostalCode
{
get
{
return this._PostalCode;
}
return true;
}
}
set
{
if (this.AreDifferent(this._PostalCode, value))
{
this._PostalCode = value;
}
}
}
public virtual string Settings
{
get
{
return this._Settings;
}
public virtual bool IsZeiterfassungInStdMin
{
get
{
var val = this.GetSettingValue(Setting_IsZeiterfassungInStdMin);
if (val != null && val.Equals("0"))
{
return false;
}
set
{
if (this.AreDifferent(this._Settings, value))
{
this._Settings = value;
}
}
}
public virtual string State
{
get
{
return this._State;
}
return true;
}
}
set
{
if (this.AreDifferent(this._State, value))
{
this._State = value;
}
}
}
public virtual string Street
{
get
{
return this._Street;
}
public virtual int? MaxDaysEditServiceRecordsAllowed
{
get
{
var val = this.GetSettingValue(Setting_MaxDaysEditServiceRecordsAllowed);
int result;
if (Int32.TryParse(val, out result))
{
return result;
}
return null;
}
}
public virtual int? HilfeplanAuslaufAuswahl
{
get
{
var val = this.GetSettingValue(Setting_HilfeplanAuslaufAuswahl);
int result;
if (Int32.TryParse(val, out result))
{
return result;
}
return null;
}
}
public virtual int? AnzTageZeiterfassErfolgt
{
get
{
var val = this.GetSettingValue(Setting_AnzTageZeiterfassErfolgt);
int result;
if (Int32.TryParse(val, out result))
{
return result;
}
return null;
}
}
public virtual int? ZeiterfassungsSchwellwert
{
get
{
var val = this.GetSettingValue(Setting_ZeiterfassungsSchwellwert);
int result;
if (Int32.TryParse(val, out result))
{
return result;
}
return null;
}
}
public virtual string Name
{
get
{
return this._Name;
}
set
{
if (this.AreDifferent(this._Name, value))
{
this._Name = value;
}
}
}
public virtual string PostalCode
{
get
{
return this._PostalCode;
}
set
{
if (this.AreDifferent(this._PostalCode, value))
{
this._PostalCode = value;
}
}
}
public virtual string Settings
{
get
{
return this._Settings;
}
set
{
if (this.AreDifferent(this._Settings, value))
{
this._Settings = value;
}
}
}
public virtual string State
{
get
{
return this._State;
}
set
{
if (this.AreDifferent(this._State, value))
{
this._State = value;
}
}
}
public virtual string Street
{
get
{
return this._Street;
}
set
{
if (this.AreDifferent(this._Street, value))
{
this._Street = value;
}
}
}
public virtual string Town
{
get
{
return this._Town;
}
set
{
if (this.AreDifferent(this._Town, value))
{
this._Town = value;
}
}
}
set
{
if (this.AreDifferent(this._Street, value))
{
this._Street = value;
}
}
}
public virtual string Town
{
get
{
return this._Town;
}
set
{
if (this.AreDifferent(this._Town, value))
{
this._Town = value;
}
}
}
public virtual string RssFeedUrl
{
get
@@ -384,73 +331,68 @@ namespace BeWo.Data.Entities
}
}
}
protected virtual string GetSettingValue(string key)
{
if (!String.IsNullOrEmpty(this.Settings))
{
if (this.Settings.IndexOf(";") == -1 && this.Settings.IndexOf("=") == -1)
{
return this.Settings;
}
else
{
string[] keyValuePairs = this.Settings.Split(';');
foreach (string pair in keyValuePairs)
{
string[] keyValuePair = pair.Split('=');
if (keyValuePair.Length == 2)
{
if (keyValuePair[0] == key)
{
return keyValuePair[1];
}
}
}
}
}
return null;
}
public virtual bool IsSchedulerAllowed { get; set; }
public virtual bool IsMedicationAllowed { get; set; }
public virtual string LastModules { get; set; }
public virtual string Apikey
{
get
{
return this._Apikey;
}
public virtual string LastModules { get; set; }
set
{
if (this.AreDifferent(this._Apikey, value))
{
this._Apikey = value;
}
}
}
public virtual string IKLeistungserbringer
{
get
{
return this._IKLeistungserbringer;
}
public virtual string Apikey
{
get
{
return this._Apikey;
}
set
{
if (this.AreDifferent(this._IKLeistungserbringer, value))
{
this._IKLeistungserbringer = value;
}
}
}
public virtual BankAccount BankAccount { get; set; }
set
{
if (this.AreDifferent(this._Apikey, value))
{
this._Apikey = value;
}
}
}
protected virtual string GetSettingValue(string key)
{
if (!String.IsNullOrEmpty(this.Settings))
{
if (this.Settings.IndexOf(";") == -1 && this.Settings.IndexOf("=") == -1)
{
return this.Settings;
}
else
{
string[] keyValuePairs = this.Settings.Split(';');
public virtual string IKLeistungserbringer
{
get
{
return this._IKLeistungserbringer;
}
foreach (string pair in keyValuePairs)
{
string[] keyValuePair = pair.Split('=');
if (keyValuePair.Length == 2)
{
if (keyValuePair[0] == key)
{
return keyValuePair[1];
}
}
}
}
}
set
{
if (this.AreDifferent(this._IKLeistungserbringer, value))
{
this._IKLeistungserbringer = value;
}
}
}
}
return null;
}
}
}

View File

@@ -28,5 +28,6 @@
<property name="LastModules" />
<property column="ApiKey" type="String" name="Apikey" length="256" />
<property column="IKLeistungserbringer" type="String" name="IKLeistungserbringer" length="16" />
<many-to-one name="BankAccount" column="BankAccountOid" class="BeWo.Data.Entities.BankAccount,BeWo.Data" cascade="all-delete-orphan" fetch="join"/>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,2 @@
ALTER TABLE `mandator`
ADD COLUMN `BankAccountOid` BIGINT NULL DEFAULT NULL AFTER `IKLeistungserbringer`;

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is automatically generated by Visual Studio .Net. It is
used to store generic object data source configuration information.
Renaming the file extension or editing the content of this file may
cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="GkvAbrechnungRO" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<TypeInfo>BeWo.Report.ReportObjects.GkvAbrechnungRO, BeWo.Report, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>

View File

@@ -17,6 +17,64 @@ namespace BeWo.Service.DCEntityMapper
return ServiceLogic.ConcurrencyCheck(pDataContractVersion, pEntity);
}
public virtual List<TDC> MapToNewDCs(IEnumerable<TEntity> pEntitys)
{
List<TDC> lResult = new List<TDC>();
if (pEntitys != null)
{
foreach (TEntity iEntity in pEntitys)
{
lResult.Add(this.MergeWithDC(iEntity, CreateNewDC()));
}
}
return lResult;
}
public virtual TDC MapToNewDC(TEntity pEntity, bool ignoreNullEntity)
{
if (ignoreNullEntity || pEntity is object)
return MapToNewDC(pEntity);
return CreateNewDC();
}
public virtual TDC MapToNewDC(TEntity pEntity)
{
return MergeWithDC(pEntity, CreateNewDC());
}
public virtual TDC CreateNewDC()
{
return new TDC();
}
public virtual List<TEntity> MapToNewEntities(IEnumerable<TDC> pDataContracts)
{
List<TEntity> lResult = new List<TEntity>();
if (pDataContracts != null)
{
foreach (TDC iDataContract in pDataContracts)
{
lResult.Add(this.MergeWithEntity(iDataContract, new TEntity()));
}
}
return lResult;
}
public virtual TEntity MapToNewEntity(TDC pDataContract, bool ignoreNullDC)
{
if (ignoreNullDC || pDataContract is object)
return MergeWithEntity(pDataContract, new TEntity());
return CreateNewEntity();
}
public virtual TEntity MapToNewEntity(TDC pDataContract)
{
return MergeWithEntity(pDataContract, new TEntity());
}
public virtual TEntity CreateNewEntity()
{
return new TEntity();
}
public abstract TDC MergeWithDC(TEntity pEntity, TDC pDataContract);
public virtual void MergeWithEntitys(IList<TDC> pDataContractList, IList<TEntity> pEntityList)
{
if (pEntityList.Count == 0 && pDataContractList != null && pDataContractList.Count > 0)
@@ -69,52 +127,20 @@ namespace BeWo.Service.DCEntityMapper
// .Where(dc => pEntityList
// .Count(entity => AreDCAndEntityEqual(dc, entity)) == 0)
// .Select(dc => MapToNewEntity(dc)));
}
public virtual TEntity MergeWithEntity(TDC pDataContract, TEntity pEntity, bool ignoreNullDC)
{
if (ignoreNullDC || pDataContract is object)
{
if (pEntity is null)
pEntity = CreateNewEntity();
public virtual TDC MapToNewDC(TEntity pEntity)
{
return this.MergeWithDC(pEntity, CreateNewDC());
}
public virtual List<TDC> MapToNewDCs(IEnumerable<TEntity> pEntitys)
{
List<TDC> lResult = new List<TDC>();
if (pEntitys != null)
{
foreach (TEntity iEntity in pEntitys)
{
lResult.Add(this.MergeWithDC(iEntity, CreateNewDC()));
}
}
return lResult;
}
public virtual TDC CreateNewDC()
{
return new TDC();
}
public virtual List<TEntity> MapToNewEntities(IEnumerable<TDC> pDataContracts)
{
List<TEntity> lResult = new List<TEntity>();
if (pDataContracts != null)
{
foreach (TDC iDataContract in pDataContracts)
{
lResult.Add(this.MergeWithEntity(iDataContract, new TEntity()));
}
}
return lResult;
}
public virtual TEntity MapToNewEntity(TDC pDataContract)
{
return this.MergeWithEntity(pDataContract, new TEntity());
}
public abstract TDC MergeWithDC(TEntity pEntity, TDC pDataContract);
return MergeWithEntity(pDataContract, pEntity);
}
return null;
}
public abstract TEntity MergeWithEntity(TDC pDataContract, TEntity pEntity);
protected abstract bool AreDCAndEntityEqual(TDC pDC, TEntity pEntity);

View File

@@ -0,0 +1,54 @@
using BeWo.Data.Entities;
using BS.Shared.DataContracts.Invoicing;
using BS.Shared.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeWo.Service.DCEntityMapper
{
public class BankAccountDC_BankAccount : AbstractIDCEntityMapper<BankAccount, BankAccountDC>
{
public override BankAccountDC MergeWithDC(BankAccount from, BankAccountDC to)
{
to.AccountNumber = from.AccountNumber;
to.BankCode = from.BankCode;
to.BankName = from.BankName;
to.Bic = from.Bic;
to.IBAN = from.IBAN;
to.Notice = from.Notice;
to.Oid = from.Oid;
to.Version = from.Version;
return to;
}
public override BankAccount MergeWithEntity(BankAccountDC from, BankAccount to)
{
ConcurrencyCheck(from.Version, to);
to.AccountNumber = from.AccountNumber.ToNullIfEmpty();
to.BankCode = from.BankCode.ToNullIfEmpty();
to.BankName = from.BankName.ToNullIfEmpty();
to.Bic = from.Bic.ToNullIfEmpty();
to.IBAN = from.IBAN.ToNullIfEmpty();
to.Notice = from.Notice;
to.Oid = from.Oid;
to.Version = from.Version;
return to;
}
protected override bool AreDCAndEntityEqual(BankAccountDC pDC, BankAccount pEntity)
{
if (pDC.Oid == null)
{
return false;
}
return pDC.Oid == pEntity.Oid;
}
}
}

View File

@@ -25,6 +25,8 @@ namespace BeWo.Service.DCEntityMapper
pDataContract.IsSchedulerAllowed = pEntity.IsSchedulerAllowed;
pDataContract.IsMedicationAllowed = pEntity.IsMedicationAllowed;
pDataContract.BankAccount = MapperFactory.BankAccountDC_BankAccount.MapToNewDC(pEntity.BankAccount, false);
pDataContract.AllowSbd = !string.IsNullOrEmpty(pDataContract.ClientId) && pDataContract.ClientId == "SBD";
#if DEBUG
@@ -62,6 +64,8 @@ namespace BeWo.Service.DCEntityMapper
pEntity.Apikey = pDataContract.Apikey;
pEntity.IKLeistungserbringer = pDataContract.IKLeistungserbringer;
pEntity.BankAccount = MapperFactory.BankAccountDC_BankAccount.MergeWithEntity(pDataContract.BankAccount, pEntity.BankAccount, false);
return pEntity;
}

View File

@@ -437,7 +437,7 @@ namespace BeWo.Service.DCEntityMapper
public static CompactWohnheimDC_Wohnheim CompactWohnheimDC_Wohnheim =>
_CompactWohnheimDC_Wohnheim ?? (_CompactWohnheimDC_Wohnheim = new CompactWohnheimDC_Wohnheim());
public static WohnheimDC_Wohnheim WohnheimDC_Wohnheim =>
_WohnheimDC_Wohnheim ?? (_WohnheimDC_Wohnheim = new WohnheimDC_Wohnheim());
@@ -452,7 +452,7 @@ namespace BeWo.Service.DCEntityMapper
public static CustomerAPPCodeDC_CustomerAPPCode CustomerAPPCodeDC_CustomerAPPCode =>
_CustomerAPPCodeDC_CustomerAPPCode ?? (_CustomerAPPCodeDC_CustomerAPPCode = new CustomerAPPCodeDC_CustomerAPPCode());
public static VertretungDC_Vertretung VertretungDC_Vertretung =>
_VertretungDC_Vertretung ?? (_VertretungDC_Vertretung = new VertretungDC_Vertretung());
@@ -527,7 +527,7 @@ namespace BeWo.Service.DCEntityMapper
public static EmployeeTokenRelationDC_Employee2Token EmployeeTokenRelationDC_Employee2Token =>
_EmployeeTokenRelationDC_Employee2Token ?? (_EmployeeTokenRelationDC_Employee2Token = new EmployeeTokenRelationDC_Employee2Token());
public static CompactTokenDC_Token CompactTokenDC_Token =>
_CompactTokenDC_Token ?? (_CompactTokenDC_Token = new CompactTokenDC_Token());
@@ -745,7 +745,7 @@ namespace BeWo.Service.DCEntityMapper
public static DokumentvorlageDC_Dokumentvorlage DokumentvorlageDC_Dokumentvorlage =>
_DokumentvorlageDC_Dokumentvorlage ?? (_DokumentvorlageDC_Dokumentvorlage = new DokumentvorlageDC_Dokumentvorlage());
public static VorlagentabelleDC_Vorlagentabelle VorlagentabelleDC_Vorlagentabelle =>
_VorlagentabelleDC_Vorlagentabelle ?? (_VorlagentabelleDC_Vorlagentabelle = new VorlagentabelleDC_Vorlagentabelle());
@@ -758,7 +758,7 @@ namespace BeWo.Service.DCEntityMapper
public static AddressRouteDC_AddressRoute AddressRouteDC_AddressRoute =>
_AddressRouteDC_AddressRoute ?? (_AddressRouteDC_AddressRoute = new AddressRouteDC_AddressRoute());
public static BargeldtransaktionshistoryDC_Bargeldtransaktionshistory BargeldtransaktionshistoryDC_Bargeldtransaktionshistory =>
public static BargeldtransaktionshistoryDC_Bargeldtransaktionshistory BargeldtransaktionshistoryDC_Bargeldtransaktionshistory =>
_BargeldtransaktionshistoryDC_Bargeldtransaktionshistory ?? (_BargeldtransaktionshistoryDC_Bargeldtransaktionshistory = new BargeldtransaktionshistoryDC_Bargeldtransaktionshistory());
public static WohneinheitDC_Wohneinheit WohneinheitDC_Wohneinheit =>
@@ -769,14 +769,17 @@ namespace BeWo.Service.DCEntityMapper
public static ImageDC_Image ImageDC_Image =>
_ImageDC_Image ?? (_ImageDC_Image = new ImageDC_Image());
public static CustomerVermittlungArbeitDC_CustomerVermittlungArbeit CustomerVermittlungArbeitDC_CustomerVermittlungArbeit =>
_CustomerVermittlungArbeitDC_CustomerVermittlungArbeit ?? (_CustomerVermittlungArbeitDC_CustomerVermittlungArbeit = new CustomerVermittlungArbeitDC_CustomerVermittlungArbeit());
public static CustomerWohnhilfeDC_CustomerWohnhilfe CustomerWohnhilfeDC_CustomerWohnhilfe =>
_CustomerWohnhilfeDC_CustomerWohnhilfe ?? (_CustomerWohnhilfeDC_CustomerWohnhilfe = new CustomerWohnhilfeDC_CustomerWohnhilfe());
public static AiSettingsDC_AiSettings AiSettingsDC_AiSettings =>
_AiSettingsDC_AiSettings ?? (_AiSettingsDC_AiSettings = new AiSettingsDC_AiSettings());
public static BankAccountDC_BankAccount BankAccountDC_BankAccount { get; }
= new BankAccountDC_BankAccount();
}
}

View File

@@ -225,6 +225,7 @@
<Compile Include="Core\Utils.cs" />
<Compile Include="DCEntityMapper\AbwesenheitsInformationPrintDC_AbwesenheitsInformationPrint.cs" />
<Compile Include="DCEntityMapper\AddressRouteDC_AddressRoute.cs" />
<Compile Include="DCEntityMapper\BankAccountDC_BankAccount.cs" />
<Compile Include="DCEntityMapper\BargeldtransaktionshistoryDC_Bargeldtransaktionshistory.cs" />
<Compile Include="DCEntityMapper\ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature.cs" />
<Compile Include="DCEntityMapper\CustomerVermittlungArbeitDC_CustomerVermittlungArbeit.cs" />

View File

@@ -10,14 +10,9 @@ namespace BS.Shared.DataContracts
[DataContract]
public abstract class BeWoDataContract : IDataContract
{
[DataMember]
public long? Oid { get; set; }
[DataMember]
public string Notice { get; set; }
[DataMember]
public long? Version { get; set; }
{
[DataMember] public long? Oid { get; set; }
[DataMember] public string Notice { get; set; }
[DataMember] public long? Version { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
using BS.Shared.Core;
using System.Runtime.Serialization;
namespace BS.Shared.DataContracts.Invoicing
{
[DataContract]
public class BankAccountDC : BeWoDataContract
{
[DataMember] public string AccountNumber { get; set; }
[DataMember] public string BankCode { get; set; }
[DataMember] public string BankName { get; set; }
[DataMember] public string Bic { get; set; }
[DataMember] public string IBAN { get; set; }
public bool ContainsBankAccountData()
{
return !Utils.AreAllNullOrEmpty(BankCode, BankName, AccountNumber, IBAN, Bic);
}
}
}

View File

@@ -1,68 +1,31 @@
using BS.Shared.DataContracts.Invoicing;
using System.Runtime.Serialization;
namespace BS.Shared.DataContracts
{
[DataContract]
public class MandatorDC : IDataContract
{
[DataMember]
public long BeWoClientType { get; set; }
[DataMember]
public string ClientId { get; set; }
[DataMember]
public string Country { get; set; }
[DataMember]
public long? MandatorOid { get; set; }
[DataMember]
public long? MandatorVersion { get; set; }
[DataMember]
public string Name { get; set; }
[DataMember]
public string PostalCode { get; set; }
[DataMember]
public string Settings { get; set; }
[DataMember]
public string State { get; set; }
[DataMember]
public string Street { get; set; }
[DataMember]
public string Town { get; set; }
[DataMember]
public string RssFeedUrl { get; set; }
[DataMember]
public string SupportToolUrl { get; set; }
[DataMember]
public bool IsSchedulerAllowed { get; set; }
[DataMember]
public bool IsMedicationAllowed { get; set; }
[DataMember]
public bool AllowSbd { get; set; }
[DataMember]
public string Apikey { get; set; }
[DataMember]
public string IKLeistungserbringer { get; set; }
[DataMember]
public bool CanEditIKLeistungserbringer { get; set; }
[DataMember]
public string CanEditIKLeistungserbringerTooltip { get; set; }
}
[DataContract]
public class MandatorDC : IDataContract
{
[DataMember] public BankAccountDC BankAccount { get; set; }
[DataMember] public long BeWoClientType { get; set; }
[DataMember] public string ClientId { get; set; }
[DataMember] public string Country { get; set; }
[DataMember] public long? MandatorOid { get; set; }
[DataMember] public long? MandatorVersion { get; set; }
[DataMember] public string Name { get; set; }
[DataMember] public string PostalCode { get; set; }
[DataMember] public string Settings { get; set; }
[DataMember] public string State { get; set; }
[DataMember] public string Street { get; set; }
[DataMember] public string Town { get; set; }
[DataMember] public string RssFeedUrl { get; set; }
[DataMember] public string SupportToolUrl { get; set; }
[DataMember] public bool IsSchedulerAllowed { get; set; }
[DataMember] public bool IsMedicationAllowed { get; set; }
[DataMember] public bool AllowSbd { get; set; }
[DataMember] public string Apikey { get; set; }
[DataMember] public string IKLeistungserbringer { get; set; }
[DataMember] public bool CanEditIKLeistungserbringer { get; set; }
[DataMember] public string CanEditIKLeistungserbringerTooltip { get; set; }
}
}

View File

@@ -5,192 +5,101 @@ using BS.Shared.Core;
namespace BS.Shared.DataContracts
{
[DataContract]
public partial class OrganisationDC : IDataContract
{
// Contacts
private List<ContactDC> _ContactInformations;
[DataContract]
public partial class OrganisationDC : IDataContract
{
// Contacts
private List<ContactDC> _ContactInformations;
private List<CostRatePeriodDC> _CostRatePeriods;
private List<CostRatePeriodDC> _CostRatePeriods;
[DataMember]
public string AccountNumber { get; set; }
[DataMember]
public long? AddressOid { get; set; }
[DataMember]
public long? AddressVersion { get; set; }
[DataMember]
public long? BankAccountOid { get; set; }
[DataMember]
public long? BankAccountVersion { get; set; }
[DataMember]
public string BankCode { get; set; }
[DataMember]
public string BankName { get; set; }
[DataMember]
public string Bic { get; set; }
[DataMember]
public string IKKrankenkasse { get; set; }
[DataMember]
public string IKKostentrager { get; set; }
[DataMember]
public string IKDatenannahmestelle { get; set; }
[DataMember]
public string BezDatenannahmestelle { get; set; }
[DataMember]
public ActivationTypeId ActivationType { get; set; }
[DataMember]
public List<ContactDC> ContactInformations
{
get
{
return this._ContactInformations ?? (this._ContactInformations = new List<ContactDC>());
}
set
{
this._ContactInformations = value;
}
}
[DataMember]
public long? CostBearerOid { get; set; }
[DataMember]
public long? CostBearerVersion { get; set; }
[DataMember]
public List<CostRatePeriodDC> CostRatePeriods
{
get
{
return this._CostRatePeriods ?? (this._CostRatePeriods = new List<CostRatePeriodDC>());
}
set
{
this._CostRatePeriods = value;
}
}
[DataMember]
public string IBAN { get; set; }
[DataMember]
public long? InvoiceAddressOid { get; set; }
[DataMember]
public string InvoiceAddressPostalCode { get; set; }
[DataMember]
public string InvoiceAddressStreet { get; set; }
[DataMember]
public string InvoiceAddressTown { get; set; }
[DataMember]
public string InvoiceAddressLine1 { get; set; }
[DataMember]
public long? InvoiceAddressVersion { get; set; }
[DataMember]
public bool IsCalculatingWithFactor { get; set; }
[DataMember]
public bool IsSingleInvoicePerCustomer { get; set; }
[DataMember]
public string Name { get; set; }
[DataMember]
public string Name2 { get; set; }
[DataMember]
public string OrganisationNotice { get; set; }
[DataMember]
public long? OrganisationOid { get; set; }
[DataMember]
public long? OrganisationVersion { get; set; }
[DataMember]
public string PostalCode { get; set; }
[DataMember]
public List<OrganisationPersonRelationDC> RelatedPersons { get; set; }
[DataMember]
public string Street { get; set; }
[DataMember]
public string Town { get; set; }
[DataMember]
public string AddressLine1 { get; set; }
public bool ContainsAddressData()
{
return !Utils.AreAllNullOrEmpty(this.Street, this.PostalCode, this.Town, this.AddressLine1);
}
public bool ContainsBankAccountData()
{
return !Utils.AreAllNullOrEmpty(this.BankCode, this.BankName, this.AccountNumber, this.IBAN, this.Bic);
}
public bool ContainsCostBearerData()
{
return !Utils.AreAllNullOrEmpty(this._CostRatePeriods) || this.IsCalculatingWithFactor;
}
public bool ContainsInvoiceAddressData()
{
return !Utils.AreAllNullOrEmpty(this.InvoiceAddressStreet, this.InvoiceAddressPostalCode, this.InvoiceAddressTown, this.InvoiceAddressLine1);
}
[DataMember]
public string DebitorNumber { get; set; }
[DataMember]
public string CostCenter { get; set; }
[DataMember] public string AccountNumber { get; set; }
[DataMember] public long? AddressOid { get; set; }
[DataMember] public long? AddressVersion { get; set; }
[DataMember] public long? BankAccountOid { get; set; }
[DataMember] public long? BankAccountVersion { get; set; }
[DataMember] public string BankCode { get; set; }
[DataMember] public string BankName { get; set; }
[DataMember] public string Bic { get; set; }
[DataMember] public string IKKrankenkasse { get; set; }
[DataMember] public string IKKostentrager { get; set; }
[DataMember] public string IKDatenannahmestelle { get; set; }
[DataMember] public string BezDatenannahmestelle { get; set; }
[DataMember] public ActivationTypeId ActivationType { get; set; }
[DataMember] public long? CostBearerOid { get; set; }
[DataMember] public long? CostBearerVersion { get; set; }
[DataMember] public string IBAN { get; set; }
[DataMember] public long? InvoiceAddressOid { get; set; }
[DataMember] public string InvoiceAddressPostalCode { get; set; }
[DataMember] public string InvoiceAddressStreet { get; set; }
[DataMember] public string InvoiceAddressTown { get; set; }
[DataMember] public string InvoiceAddressLine1 { get; set; }
[DataMember] public long? InvoiceAddressVersion { get; set; }
[DataMember] public bool IsCalculatingWithFactor { get; set; }
[DataMember] public bool IsSingleInvoicePerCustomer { get; set; }
[DataMember] public string Name { get; set; }
[DataMember] public string Name2 { get; set; }
[DataMember] public string OrganisationNotice { get; set; }
[DataMember] public long? OrganisationOid { get; set; }
[DataMember] public long? OrganisationVersion { get; set; }
[DataMember] public string PostalCode { get; set; }
[DataMember] public List<OrganisationPersonRelationDC> RelatedPersons { get; set; }
[DataMember] public string Street { get; set; }
[DataMember] public string Town { get; set; }
[DataMember] public string AddressLine1 { get; set; }
[DataMember] public string DebitorNumber { get; set; }
[DataMember] public string CostCenter { get; set; }
[DataMember] public List<VarFieldDC> VarFields { get; set; }
[DataMember] public ValueListEntryDC Function { get; set; }
[DataMember] public List<ArbeitszeitDC> Arbeitszeiten { get; set; }
[DataMember] public List<FeiertagDC> Feiertage { get; set; }
[DataMember] public string Leistungserbringergruppe { get; set; }
[DataMember] public string BusinessPartnerId { get; set; }
[DataMember] public GkvVerfahrensstufe Verfahrensstufe { get; set; }
[DataMember] public bool GkvAusblenden { get; set; }
[DataMember]
public List<VarFieldDC> VarFields { get; set; }
public List<ContactDC> ContactInformations
{
get
{
return this._ContactInformations ?? (this._ContactInformations = new List<ContactDC>());
}
[DataMember]
public ValueListEntryDC Function { get; set; }
set
{
this._ContactInformations = value;
}
}
[DataMember]
public List<ArbeitszeitDC> Arbeitszeiten { get; set; }
[DataMember]
public List<CostRatePeriodDC> CostRatePeriods
{
get
{
return this._CostRatePeriods ?? (this._CostRatePeriods = new List<CostRatePeriodDC>());
}
[DataMember]
public List<FeiertagDC> Feiertage { get; set; }
set
{
this._CostRatePeriods = value;
}
}
[DataMember]
public string Leistungserbringergruppe { get; set; }
[DataMember]
public string BusinessPartnerId { get; set; }
[DataMember]
public GkvVerfahrensstufe Verfahrensstufe { get; set; }
[DataMember]
public bool GkvAusblenden { get; set; }
}
public bool ContainsAddressData()
{
return !Utils.AreAllNullOrEmpty(this.Street, this.PostalCode, this.Town, this.AddressLine1);
}
public bool ContainsBankAccountData()
{
return !Utils.AreAllNullOrEmpty(BankCode, BankName, AccountNumber, IBAN, Bic);
}
public bool ContainsCostBearerData()
{
return !Utils.AreAllNullOrEmpty(this._CostRatePeriods) || this.IsCalculatingWithFactor;
}
public bool ContainsInvoiceAddressData()
{
return !Utils.AreAllNullOrEmpty(this.InvoiceAddressStreet, this.InvoiceAddressPostalCode, this.InvoiceAddressTown, this.InvoiceAddressLine1);
}
}
}

View File

@@ -187,6 +187,7 @@
<Compile Include="DataContracts\GkvAbrechnung\GkvServerGetStatusRequestDC.cs" />
<Compile Include="DataContracts\GkvAbrechnung\GkvServerGetStatusResponseDC.cs" />
<Compile Include="DataContracts\GkvAbrechnung\GkvClientResultRequestDC.cs" />
<Compile Include="DataContracts\Invoicing\BankAccountDC.cs" />
<Compile Include="DataContracts\Wohnhilfe\CustomerWohnhilfeDC.cs" />
<Compile Include="DataContracts\ImageDC.cs" />
<Compile Include="DataContracts\Wohnhilfe\CustomerWohnhilfeBereichBundDC.cs" />