diff --git a/BeWo/View/Detail/MandatorView.xaml b/BeWo/View/Detail/MandatorView.xaml index 9a589b050..0bc86777e 100644 --- a/BeWo/View/Detail/MandatorView.xaml +++ b/BeWo/View/Detail/MandatorView.xaml @@ -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"> - + @@ -27,41 +28,52 @@ - - - - - - - + + + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BeWo/View/Detail/MandatorView.xaml.cs b/BeWo/View/Detail/MandatorView.xaml.cs index 24e6917b3..aed4b230c 100644 --- a/BeWo/View/Detail/MandatorView.xaml.cs +++ b/BeWo/View/Detail/MandatorView.xaml.cs @@ -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) { diff --git a/BeWo/ViewModel/MandatorVM.cs b/BeWo/ViewModel/MandatorVM.cs index 5ca6e7f45..b83eb49c0 100644 --- a/BeWo/ViewModel/MandatorVM.cs +++ b/BeWo/ViewModel/MandatorVM.cs @@ -9,597 +9,627 @@ using BS.Shared.Core; namespace BeWo.ViewModel { - public class MandatorVM : AbstractDCMapperVM - { - 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 PropertyName_TimeUntilUILock = "TimeUntilUILock"; - - public static string PropertyName_HilfeplanAuslaufAuswahl = "HilfeplanAuslaufAuswahl"; - - public static string PropertyName_AnzTageZeiterfassErfolgt = "AnzTageZeiterfassErfolgt"; - - public static string PropertyName_ZeiterfassungsSchwellwert = "ZeiterfassungsSchwellwert"; - - public static string PropertyName_IKLeistungserbringer = nameof(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 int _TimeUntilUILock; - - private int _HilfeplanAuslaufAuswahl; - - private int _AnzTageZeiterfassErfolgt; - - private int _ZeiterfassungsSchwellwert; - - private BindingList _InvoiceNumberList; - - private InvoiceNumberVM _InvoiceNumber; - - private string _Apikey; - - private string _IKLeistungserbringer; - - public MandatorVM(IList invoiceNumberList, MandatorDC pDC) : base(pDC, true) - { - _InvoiceNumberList = new BindingList(invoiceNumberList); - if (_InvoiceNumberList.Count > 0) - { - _InvoiceNumber = _InvoiceNumberList[0]; - } - } - - public BindingList InvoiceNumberList - { - get - { - return _InvoiceNumberList; - } - } - - public InvoiceNumberVM InvoiceNumber - { - get - { - return _InvoiceNumber; - } - } - - public long BeWoClientType - { - get { return this._BeWoClientType; } - - set - { - if (this.AreDifferent(this._BeWoClientType, value)) - { - this._BeWoClientType = value; - this.StoreDirtyInformation(this.AreDifferent(this.DataContract.BeWoClientType, value), PropertyName_BeWoClientType); - this.FirePropertyChanged(PropertyName_BeWoClientType); - } - } - } - - public string ClientId - { - get { return this._ClientId; } - - set - { - if (this.AreDifferent(this._ClientId, value)) - { - this._ClientId = value; - this.StoreDirtyInformation(this.AreDifferent(this.DataContract.ClientId, value), PropertyName_ClientId); - this.FirePropertyChanged(PropertyName_ClientId); - } - } - } - - public string Country - { - get { return this._Country; } - - set - { - if (this.AreDifferent(this._Country, value)) - { - this._Country = value; - this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Country, value), PropertyName_Country); - this.FirePropertyChanged(PropertyName_Country); - } - } - } - - public bool IsServiceRecordNoticeMandatory - { - get { return BeWoApp.AppSettings.IsServiceRecordNoticeMandatory; } - - set - { - if (this.AreDifferent(BeWoApp.AppSettings.IsServiceRecordNoticeMandatory, value)) - { - BeWoApp.AppSettings.IsServiceRecordNoticeMandatory = value; - - this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "IsServiceRecordNoticeMandatory", value ? "1" : "0"); - } - } - } - - public bool IsPasswordSecurityActiv - { - get { return BeWoApp.AppSettings.IsPasswordSecurityActiv; } - - set - { - if (this.AreDifferent(BeWoApp.AppSettings.IsPasswordSecurityActiv, value)) - { - BeWoApp.AppSettings.IsPasswordSecurityActiv = value; - - this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "IsPasswordSecurityActiv", value ? "1" : "0"); - } - } - } - - public bool IsEndDateVisible - { - get { return BeWoApp.AppSettings.IsEndDateVisible; } - - set - { - if (this.AreDifferent(BeWoApp.AppSettings.IsEndDateVisible, value)) - { - BeWoApp.AppSettings.IsEndDateVisible = value; - - this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "IsEndDateVisible", value ? "1" : "0"); - } - } - } - - public bool IsOnlyYearMonthVisible - { - get { return BeWoApp.AppSettings.IsOnlyYearMonthVisible; } - - set - { - if (this.AreDifferent(BeWoApp.AppSettings.IsOnlyYearMonthVisible, value)) - { - - - BeWoApp.AppSettings.IsOnlyYearMonthVisible = value; - - this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "IsOnlyYearMonthVisible", value ? "1" : "0"); - } - } - } - - public bool IsZeiterfassDateNormal - { - get - { - - //if (IsEndDateVisible == false && IsOnlyYearMonthVisible == false && BeWoApp.AppSettings.IsZeiterfassDateNormal == false) - //{ - // BeWoApp.AppSettings.IsZeiterfassDateNormal = true; - //} - - return BeWoApp.AppSettings.IsZeiterfassDateNormal; - } - - set - { - if (this.AreDifferent(BeWoApp.AppSettings.IsZeiterfassDateNormal, value)) - { - BeWoApp.AppSettings.IsZeiterfassDateNormal = value; - - this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "IsZeiterfassDateNormal", value ? "1" : "0"); - } - } - } - - public String EinheitZeiterfassung - { - get { return BeWoApp.AppSettings.EinheitZeiterfassung; } - - set - { - if (this.AreDifferent(BeWoApp.AppSettings.EinheitZeiterfassung, value)) - { - BeWoApp.AppSettings.EinheitZeiterfassung = value; - - this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, SettingsKeys.EinheitZeiterfassung, value); - } - } - } - - - public int MaxDaysEditServiceRecordsAllowed - { - get { return BeWoApp.AppSettings.MaxDaysEditServiceRecordsAllowed; } - - set - { - if (this.AreDifferent(BeWoApp.AppSettings.MaxDaysEditServiceRecordsAllowed, value)) - { - BeWoApp.AppSettings.MaxDaysEditServiceRecordsAllowed = value; - - this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "MaxDaysEditServiceRecordsAllowed", value.ToString()); - } - } - } - public bool EnableArbeitszeiterfassung - { - get { return BeWoApp.AppSettings.EnableArbeitszeiterfassung; } - - set - { - if (this.AreDifferent(BeWoApp.AppSettings.EnableArbeitszeiterfassung, value)) - { - BeWoApp.AppSettings.EnableArbeitszeiterfassung = value; - - this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "EnableArbeitszeiterfassung", value ? "1" : "0"); - } - } - } - public bool EnableAutomaticPauses - { - get { return BeWoApp.AppSettings.EnableAutomaticPauses; } - - set - { - if (this.AreDifferent(BeWoApp.AppSettings.EnableAutomaticPauses, value)) - { - BeWoApp.AppSettings.EnableAutomaticPauses = value; - - this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "EnableAutomaticPauses", value ? "1" : "0"); - } - } - } - public bool EnableRestTimeWarning - { - get { return BeWoApp.AppSettings.EnableRestTimeWarning; } - - set - { - if (this.AreDifferent(BeWoApp.AppSettings.EnableRestTimeWarning, value)) - { - BeWoApp.AppSettings.EnableRestTimeWarning = value; - - this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "EnableRestTimeWarning", value ? "1" : "0"); - } - } - } - public int MaxWorkTimeHoursBeforeWarning - { - get { return BeWoApp.AppSettings.MaxWorkTimeHoursBeforeWarning; } - - set - { - if (this.AreDifferent(BeWoApp.AppSettings.MaxWorkTimeHoursBeforeWarning, value)) - { - BeWoApp.AppSettings.MaxWorkTimeHoursBeforeWarning = value; - - this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "MaxWorkTimeHoursBeforeWarning", value.ToString()); - } - } - } - - public int TimeUntilUILock - { - get => _TimeUntilUILock; - - set - { - if(!AreDifferent(_TimeUntilUILock, value)) - { - return; - } - - _TimeUntilUILock = value; - Settings = UserSettingsUtils.CreateNewSettingValue(_Settings, SettingsKeys.TimeUntilUILock, value.ToString()); - - AutoLockUI.LockUITime = value; - AutoLockUI.StopTimer(); - AutoLockUI.StartAutoLockUIOption(); - } - } - - public int MoKSessionTimeout - { - get => BeWoApp.AppSettings.MoKSessionTimeout; - set - { - if(!AreDifferent(BeWoApp.AppSettings.MoKSessionTimeout, value)) - { - return; - } - - BeWoApp.AppSettings.MoKSessionTimeout = value; - Settings = UserSettingsUtils.CreateNewSettingValue(_Settings, SettingsKeys.MoKSessionTimeout, value.ToString()); - } - } - - public int HilfeplanAuslaufAuswahl - { - get { return BeWoApp.AppSettings.HilfeplanAuslaufAuswahl; } - - set - { - if (this.AreDifferent(BeWoApp.AppSettings.HilfeplanAuslaufAuswahl, value)) - { - BeWoApp.AppSettings.HilfeplanAuslaufAuswahl = value; - - this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "HilfeplanAuslaufAuswahl", value.ToString()); - } - } - } - - public int AnzTageZeiterfassErfolgt - { - get { return BeWoApp.AppSettings.AnzTageZeiterfassErfolgt; } - - set - { - if (this.AreDifferent(BeWoApp.AppSettings.AnzTageZeiterfassErfolgt, value)) - { - BeWoApp.AppSettings.AnzTageZeiterfassErfolgt = value; - - this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "AnzTageZeiterfassErfolgt", value.ToString()); - } - } - } - - public int ZeiterfassungsSchwellwert - { - get { return BeWoApp.AppSettings.ZeiterfassungsSchwellwert; } - - set - { - if (this.AreDifferent(BeWoApp.AppSettings.ZeiterfassungsSchwellwert, value)) - { - BeWoApp.AppSettings.ZeiterfassungsSchwellwert = value; - - this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "ZeiterfassungsSchwellwert", value.ToString()); - } - } - } - - public string Name - { - get { return this._Name; } - - set - { - if (this.AreDifferent(this._Name, value)) - { - this._Name = value; - this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Name, value), PropertyName_Name); - this.FirePropertyChanged(PropertyName_Name); - } - } - } - - public string PostalCode - { - get { return this._PostalCode; } - - set - { - if (this.AreDifferent(this._PostalCode, value)) - { - this._PostalCode = value; - this.StoreDirtyInformation(this.AreDifferent(this.DataContract.PostalCode, value), PropertyName_PostalCode); - this.FirePropertyChanged(PropertyName_PostalCode); - } - } - } - - public string Settings - { - get { return _Settings; } - - set - { - if (AreDifferent(_Settings, value)) - { - _Settings = value; - StoreDirtyInformation(AreDifferent(DataContract.Settings, value), PropertyName_Settings); - FirePropertyChanged(PropertyName_Settings); - } - } - } - - public string State - { - get { return this._State; } - - set - { - if (this.AreDifferent(this._State, value)) - { - this._State = value; - this.StoreDirtyInformation(this.AreDifferent(this.DataContract.State, value), PropertyName_State); - this.FirePropertyChanged(PropertyName_State); - } - } - } - - public string Street - { - get { return this._Street; } - - set - { - if (this.AreDifferent(this._Street, value)) - { - this._Street = value; - this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Street, value), PropertyName_Street); - this.FirePropertyChanged(PropertyName_Street); - } - } - } - - public string Town - { - get { return this._Town; } - - set - { - if (this.AreDifferent(this._Town, value)) - { - this._Town = value; - this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Town, value), PropertyName_Town); - this.FirePropertyChanged(PropertyName_Town); - } - } - } - - public override bool IsDirty - { - get - { - return (base.IsDirty || _InvoiceNumberList.Any(vm => vm.IsDirty)); - } - } - - public string Apikey - { - get { return this._Apikey; } - - set - { - if (this.AreDifferent(this._Apikey, value)) - { - this._Apikey = value; - this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Apikey, value), PropertyName_Apikey); - this.FirePropertyChanged(PropertyName_Apikey); - } - } - } - - public string IKLeistungserbringer - { - get { return this._IKLeistungserbringer; } - - set - { - if (this.AreDifferent(this._IKLeistungserbringer, value)) - { - this._IKLeistungserbringer = value; - this.StoreDirtyInformation(this.AreDifferent(this.DataContract.IKLeistungserbringer, value), nameof(IKLeistungserbringer)); - this.FirePropertyChanged(nameof(IKLeistungserbringer)); - } - } - } + public class MandatorVM : AbstractDCMapperVM + { + 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 PropertyName_TimeUntilUILock = "TimeUntilUILock"; + public static string PropertyName_HilfeplanAuslaufAuswahl = "HilfeplanAuslaufAuswahl"; + public static string PropertyName_AnzTageZeiterfassErfolgt = "AnzTageZeiterfassErfolgt"; + public static string PropertyName_ZeiterfassungsSchwellwert = "ZeiterfassungsSchwellwert"; + public static string PropertyName_IKLeistungserbringer = nameof(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 int _TimeUntilUILock; + private int _HilfeplanAuslaufAuswahl; + private int _AnzTageZeiterfassErfolgt; + private int _ZeiterfassungsSchwellwert; + private BindingList _InvoiceNumberList; + private InvoiceNumberVM _InvoiceNumber; + private string _Apikey; + private string _IKLeistungserbringer; + private string _AccountNumber; + private string _BankName; + private string _BankCode; + private string _Bic; + private string _IBAN; + + public MandatorVM(IList invoiceNumberList, MandatorDC pDC) : base(pDC, true) + { + _InvoiceNumberList = new BindingList(invoiceNumberList); + if (_InvoiceNumberList.Count > 0) + { + _InvoiceNumber = _InvoiceNumberList[0]; + } + } + + public BindingList InvoiceNumberList + { + get + { + return _InvoiceNumberList; + } + } + public InvoiceNumberVM InvoiceNumber + { + get + { + return _InvoiceNumber; + } + } + public long BeWoClientType + { + get { return this._BeWoClientType; } + + set + { + if (this.AreDifferent(this._BeWoClientType, value)) + { + this._BeWoClientType = value; + this.StoreDirtyInformation(this.AreDifferent(this.DataContract.BeWoClientType, value), PropertyName_BeWoClientType); + this.FirePropertyChanged(PropertyName_BeWoClientType); + } + } + } + public string ClientId + { + get { return this._ClientId; } + + set + { + if (this.AreDifferent(this._ClientId, value)) + { + this._ClientId = value; + this.StoreDirtyInformation(this.AreDifferent(this.DataContract.ClientId, value), PropertyName_ClientId); + this.FirePropertyChanged(PropertyName_ClientId); + } + } + } + public string Country + { + get { return this._Country; } + + set + { + if (this.AreDifferent(this._Country, value)) + { + this._Country = value; + this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Country, value), PropertyName_Country); + this.FirePropertyChanged(PropertyName_Country); + } + } + } + public bool IsServiceRecordNoticeMandatory + { + get { return BeWoApp.AppSettings.IsServiceRecordNoticeMandatory; } + + set + { + if (this.AreDifferent(BeWoApp.AppSettings.IsServiceRecordNoticeMandatory, value)) + { + BeWoApp.AppSettings.IsServiceRecordNoticeMandatory = value; + + this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "IsServiceRecordNoticeMandatory", value ? "1" : "0"); + } + } + } + public bool IsPasswordSecurityActiv + { + get { return BeWoApp.AppSettings.IsPasswordSecurityActiv; } + + set + { + if (this.AreDifferent(BeWoApp.AppSettings.IsPasswordSecurityActiv, value)) + { + BeWoApp.AppSettings.IsPasswordSecurityActiv = value; + + this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "IsPasswordSecurityActiv", value ? "1" : "0"); + } + } + } + public bool IsEndDateVisible + { + get { return BeWoApp.AppSettings.IsEndDateVisible; } + + set + { + if (this.AreDifferent(BeWoApp.AppSettings.IsEndDateVisible, value)) + { + BeWoApp.AppSettings.IsEndDateVisible = value; + + this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "IsEndDateVisible", value ? "1" : "0"); + } + } + } + public bool IsOnlyYearMonthVisible + { + get { return BeWoApp.AppSettings.IsOnlyYearMonthVisible; } + + set + { + if (this.AreDifferent(BeWoApp.AppSettings.IsOnlyYearMonthVisible, value)) + { + + + BeWoApp.AppSettings.IsOnlyYearMonthVisible = value; + + this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "IsOnlyYearMonthVisible", value ? "1" : "0"); + } + } + } + public bool IsZeiterfassDateNormal + { + get + { + + //if (IsEndDateVisible == false && IsOnlyYearMonthVisible == false && BeWoApp.AppSettings.IsZeiterfassDateNormal == false) + //{ + // BeWoApp.AppSettings.IsZeiterfassDateNormal = true; + //} + + return BeWoApp.AppSettings.IsZeiterfassDateNormal; + } + + set + { + if (this.AreDifferent(BeWoApp.AppSettings.IsZeiterfassDateNormal, value)) + { + BeWoApp.AppSettings.IsZeiterfassDateNormal = value; + + this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "IsZeiterfassDateNormal", value ? "1" : "0"); + } + } + } + public String EinheitZeiterfassung + { + get { return BeWoApp.AppSettings.EinheitZeiterfassung; } + + set + { + if (this.AreDifferent(BeWoApp.AppSettings.EinheitZeiterfassung, value)) + { + BeWoApp.AppSettings.EinheitZeiterfassung = value; + + this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, SettingsKeys.EinheitZeiterfassung, value); + } + } + } + public int MaxDaysEditServiceRecordsAllowed + { + get { return BeWoApp.AppSettings.MaxDaysEditServiceRecordsAllowed; } + + set + { + if (this.AreDifferent(BeWoApp.AppSettings.MaxDaysEditServiceRecordsAllowed, value)) + { + BeWoApp.AppSettings.MaxDaysEditServiceRecordsAllowed = value; + + this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "MaxDaysEditServiceRecordsAllowed", value.ToString()); + } + } + } + public bool EnableArbeitszeiterfassung + { + get { return BeWoApp.AppSettings.EnableArbeitszeiterfassung; } + + set + { + if (this.AreDifferent(BeWoApp.AppSettings.EnableArbeitszeiterfassung, value)) + { + BeWoApp.AppSettings.EnableArbeitszeiterfassung = value; + + this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "EnableArbeitszeiterfassung", value ? "1" : "0"); + } + } + } + public bool EnableAutomaticPauses + { + get { return BeWoApp.AppSettings.EnableAutomaticPauses; } + + set + { + if (this.AreDifferent(BeWoApp.AppSettings.EnableAutomaticPauses, value)) + { + BeWoApp.AppSettings.EnableAutomaticPauses = value; + + this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "EnableAutomaticPauses", value ? "1" : "0"); + } + } + } + public bool EnableRestTimeWarning + { + get { return BeWoApp.AppSettings.EnableRestTimeWarning; } + + set + { + if (this.AreDifferent(BeWoApp.AppSettings.EnableRestTimeWarning, value)) + { + BeWoApp.AppSettings.EnableRestTimeWarning = value; + + this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "EnableRestTimeWarning", value ? "1" : "0"); + } + } + } + public int MaxWorkTimeHoursBeforeWarning + { + get { return BeWoApp.AppSettings.MaxWorkTimeHoursBeforeWarning; } + + set + { + if (this.AreDifferent(BeWoApp.AppSettings.MaxWorkTimeHoursBeforeWarning, value)) + { + BeWoApp.AppSettings.MaxWorkTimeHoursBeforeWarning = value; + + this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "MaxWorkTimeHoursBeforeWarning", value.ToString()); + } + } + } + public int TimeUntilUILock + { + get => _TimeUntilUILock; + + set + { + if (!AreDifferent(_TimeUntilUILock, value)) + { + return; + } + + _TimeUntilUILock = value; + Settings = UserSettingsUtils.CreateNewSettingValue(_Settings, SettingsKeys.TimeUntilUILock, value.ToString()); + + AutoLockUI.LockUITime = value; + AutoLockUI.StopTimer(); + AutoLockUI.StartAutoLockUIOption(); + } + } + public int MoKSessionTimeout + { + get => BeWoApp.AppSettings.MoKSessionTimeout; + set + { + if (!AreDifferent(BeWoApp.AppSettings.MoKSessionTimeout, value)) + { + return; + } + + BeWoApp.AppSettings.MoKSessionTimeout = value; + Settings = UserSettingsUtils.CreateNewSettingValue(_Settings, SettingsKeys.MoKSessionTimeout, value.ToString()); + } + } + public int HilfeplanAuslaufAuswahl + { + get { return BeWoApp.AppSettings.HilfeplanAuslaufAuswahl; } + + set + { + if (this.AreDifferent(BeWoApp.AppSettings.HilfeplanAuslaufAuswahl, value)) + { + BeWoApp.AppSettings.HilfeplanAuslaufAuswahl = value; + + this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "HilfeplanAuslaufAuswahl", value.ToString()); + } + } + } + public int AnzTageZeiterfassErfolgt + { + get { return BeWoApp.AppSettings.AnzTageZeiterfassErfolgt; } + + set + { + if (this.AreDifferent(BeWoApp.AppSettings.AnzTageZeiterfassErfolgt, value)) + { + BeWoApp.AppSettings.AnzTageZeiterfassErfolgt = value; + + this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "AnzTageZeiterfassErfolgt", value.ToString()); + } + } + } + public int ZeiterfassungsSchwellwert + { + get { return BeWoApp.AppSettings.ZeiterfassungsSchwellwert; } + + set + { + if (this.AreDifferent(BeWoApp.AppSettings.ZeiterfassungsSchwellwert, value)) + { + BeWoApp.AppSettings.ZeiterfassungsSchwellwert = value; + + this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "ZeiterfassungsSchwellwert", value.ToString()); + } + } + } + public string Name + { + get { return this._Name; } + + set + { + if (this.AreDifferent(this._Name, value)) + { + this._Name = value; + this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Name, value), PropertyName_Name); + this.FirePropertyChanged(PropertyName_Name); + } + } + } + public string PostalCode + { + get { return this._PostalCode; } + + set + { + if (this.AreDifferent(this._PostalCode, value)) + { + this._PostalCode = value; + this.StoreDirtyInformation(this.AreDifferent(this.DataContract.PostalCode, value), PropertyName_PostalCode); + this.FirePropertyChanged(PropertyName_PostalCode); + } + } + } + public string Settings + { + get { return _Settings; } + + set + { + if (AreDifferent(_Settings, value)) + { + _Settings = value; + StoreDirtyInformation(AreDifferent(DataContract.Settings, value), PropertyName_Settings); + FirePropertyChanged(PropertyName_Settings); + } + } + } + public string State + { + get { return this._State; } + + set + { + if (this.AreDifferent(this._State, value)) + { + this._State = value; + this.StoreDirtyInformation(this.AreDifferent(this.DataContract.State, value), PropertyName_State); + this.FirePropertyChanged(PropertyName_State); + } + } + } + public string Street + { + get { return this._Street; } + + set + { + if (this.AreDifferent(this._Street, value)) + { + this._Street = value; + this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Street, value), PropertyName_Street); + this.FirePropertyChanged(PropertyName_Street); + } + } + } + public string Town + { + get { return this._Town; } + + set + { + if (this.AreDifferent(this._Town, value)) + { + this._Town = value; + this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Town, value), PropertyName_Town); + this.FirePropertyChanged(PropertyName_Town); + } + } + } + public override bool IsDirty + { + get + { + return (base.IsDirty || _InvoiceNumberList.Any(vm => vm.IsDirty)); + } + } + public string Apikey + { + get { return this._Apikey; } + + set + { + if (this.AreDifferent(this._Apikey, value)) + { + this._Apikey = value; + this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Apikey, value), PropertyName_Apikey); + this.FirePropertyChanged(PropertyName_Apikey); + } + } + } + public string IKLeistungserbringer + { + get { return this._IKLeistungserbringer; } + + set + { + if (this.AreDifferent(this._IKLeistungserbringer, value)) + { + this._IKLeistungserbringer = value; + this.StoreDirtyInformation(this.AreDifferent(this.DataContract.IKLeistungserbringer, value), nameof(IKLeistungserbringer)); + this.FirePropertyChanged(nameof(IKLeistungserbringer)); + } + } + } + public string AccountNumber + { + get { return _AccountNumber; } + + set + { + if (!AreDifferent(_AccountNumber, value)) + return; + + _AccountNumber = value; + StoreDirtyInformation(AreDifferent(DataContract.BankAccount.AccountNumber, value), nameof(AccountNumber)); + FirePropertyChanged(nameof(AccountNumber)); + } + } + public string BankCode + { + get { return _BankCode; } + + set + { + if (!AreDifferent(BankCode, value)) + return; + + _BankCode = value; + StoreDirtyInformation(AreDifferent(DataContract.BankAccount.BankCode, value), nameof(BankCode)); + FirePropertyChanged(nameof(BankCode)); + } + } + public string BankName + { + get { return _BankName; } + + set + { + if (!AreDifferent(BankName, value)) + return; + + _BankName = value; + StoreDirtyInformation(AreDifferent(DataContract.BankAccount.BankName, value), nameof(BankName)); + FirePropertyChanged(nameof(BankName)); + } + } + public string Bic + { + get { return _Bic; } + + set + { + if (!AreDifferent(Bic, value)) + return; + + _Bic = value; + StoreDirtyInformation(AreDifferent(DataContract.BankAccount.Bic, value), nameof(Bic)); + FirePropertyChanged(nameof(Bic)); + } + } + public string IBAN + { + get { return _IBAN; } + + set + { + if (!AreDifferent(IBAN, value)) + return; + + _IBAN = value; + StoreDirtyInformation(AreDifferent(DataContract.BankAccount.IBAN, value), nameof(IBAN)); + FirePropertyChanged(nameof(IBAN)); + } + } public bool CanEditIKLeistungserbringer { get; set; } public string CanEditIKLeistungserbringerTooltip { get; set; } protected override void InitByDataContract(MandatorDC pDataContract) - { - _Name = pDataContract.Name; - _ClientId = pDataContract.ClientId; - _BeWoClientType = pDataContract.BeWoClientType; - _Country = pDataContract.Country; - _State = pDataContract.State; - _Town = pDataContract.Town; - _PostalCode = pDataContract.PostalCode; - _Street = pDataContract.Street; - _Settings = pDataContract.Settings; - _Apikey = pDataContract.Apikey; - _IKLeistungserbringer = pDataContract.IKLeistungserbringer; - CanEditIKLeistungserbringer = pDataContract.CanEditIKLeistungserbringer; - CanEditIKLeistungserbringerTooltip = pDataContract.CanEditIKLeistungserbringerTooltip; + { + _Name = pDataContract.Name; + _ClientId = pDataContract.ClientId; + _BeWoClientType = pDataContract.BeWoClientType; + _Country = pDataContract.Country; + _State = pDataContract.State; + _Town = pDataContract.Town; + _PostalCode = pDataContract.PostalCode; + _Street = pDataContract.Street; + _Settings = pDataContract.Settings; + _Apikey = pDataContract.Apikey; + _IKLeistungserbringer = pDataContract.IKLeistungserbringer; + _AccountNumber = pDataContract.BankAccount.AccountNumber; + _BankCode = pDataContract.BankAccount.BankCode; + _BankName = pDataContract.BankAccount.BankName; + _Bic = pDataContract.BankAccount.Bic; + _IBAN = pDataContract.BankAccount.IBAN; + CanEditIKLeistungserbringer = pDataContract.CanEditIKLeistungserbringer; + CanEditIKLeistungserbringerTooltip = pDataContract.CanEditIKLeistungserbringerTooltip; - if (_Settings == null) - { - _TimeUntilUILock = 30; - } - if (_Settings != null && _Settings.Contains(PropertyName_TimeUntilUILock)) - { - var keyValuePairs = _Settings.SplitToKeyValuePairList(";", "="); - _TimeUntilUILock = Convert.ToInt32(keyValuePairs.First(f => f.Key.Equals(PropertyName_TimeUntilUILock)).Value); - } + if (_Settings == null) + { + _TimeUntilUILock = 30; + } + if (_Settings != null && _Settings.Contains(PropertyName_TimeUntilUILock)) + { + var keyValuePairs = _Settings.SplitToKeyValuePairList(";", "="); + _TimeUntilUILock = Convert.ToInt32(keyValuePairs.First(f => f.Key.Equals(PropertyName_TimeUntilUILock)).Value); + } - //HilfeplanAuslaufAuswahl - if (_Settings == null) - { - _HilfeplanAuslaufAuswahl = 3; - } - if (_Settings != null && _Settings.Contains(PropertyName_HilfeplanAuslaufAuswahl)) - { - var keyValuePairs = _Settings.SplitToKeyValuePairList(";", "="); - _HilfeplanAuslaufAuswahl = Convert.ToInt32(keyValuePairs.First(f => f.Key.Equals(PropertyName_HilfeplanAuslaufAuswahl)).Value); - } + //HilfeplanAuslaufAuswahl + if (_Settings == null) + { + _HilfeplanAuslaufAuswahl = 3; + } + if (_Settings != null && _Settings.Contains(PropertyName_HilfeplanAuslaufAuswahl)) + { + var keyValuePairs = _Settings.SplitToKeyValuePairList(";", "="); + _HilfeplanAuslaufAuswahl = Convert.ToInt32(keyValuePairs.First(f => f.Key.Equals(PropertyName_HilfeplanAuslaufAuswahl)).Value); + } - if (_Settings == null) - { - _AnzTageZeiterfassErfolgt = 0; - _ZeiterfassungsSchwellwert = 80; - } - if (_Settings != null && _Settings.Contains(PropertyName_AnzTageZeiterfassErfolgt)) - { - var keyValuePairs = _Settings.SplitToKeyValuePairList(";", "="); - _AnzTageZeiterfassErfolgt = Convert.ToInt32(keyValuePairs.First(f => f.Key.Equals(PropertyName_AnzTageZeiterfassErfolgt)).Value); - } - - if (_Settings != null && _Settings.Contains(PropertyName_ZeiterfassungsSchwellwert)) - { - var keyValuePairs = _Settings.SplitToKeyValuePairList(";", "="); - _ZeiterfassungsSchwellwert = Convert.ToInt32(keyValuePairs.First(f => f.Key.Equals(PropertyName_ZeiterfassungsSchwellwert)).Value); - } + if (_Settings == null) + { + _AnzTageZeiterfassErfolgt = 0; + _ZeiterfassungsSchwellwert = 80; + } + if (_Settings != null && _Settings.Contains(PropertyName_AnzTageZeiterfassErfolgt)) + { + var keyValuePairs = _Settings.SplitToKeyValuePairList(";", "="); + _AnzTageZeiterfassErfolgt = Convert.ToInt32(keyValuePairs.First(f => f.Key.Equals(PropertyName_AnzTageZeiterfassErfolgt)).Value); + } - } + if (_Settings != null && _Settings.Contains(PropertyName_ZeiterfassungsSchwellwert)) + { + var keyValuePairs = _Settings.SplitToKeyValuePairList(";", "="); + _ZeiterfassungsSchwellwert = Convert.ToInt32(keyValuePairs.First(f => f.Key.Equals(PropertyName_ZeiterfassungsSchwellwert)).Value); + } - protected override MandatorDC MapToDataContract(MandatorDC pDataContract, bool doCommit) - { - pDataContract.Name = this._Name; - pDataContract.ClientId = this._ClientId; - pDataContract.BeWoClientType = this._BeWoClientType; - pDataContract.Country = this._Country; - pDataContract.State = this._State; - pDataContract.Town = this._Town; - pDataContract.PostalCode = this._PostalCode; - pDataContract.Street = this._Street; - pDataContract.Settings = this._Settings; - pDataContract.Apikey = this._Apikey; - pDataContract.IKLeistungserbringer = this._IKLeistungserbringer; + } - return pDataContract; - } - } + protected override MandatorDC MapToDataContract(MandatorDC pDataContract, bool doCommit) + { + pDataContract.Name = _Name; + pDataContract.ClientId = _ClientId; + pDataContract.BeWoClientType = _BeWoClientType; + pDataContract.Country = _Country; + pDataContract.State = _State; + pDataContract.Town = _Town; + pDataContract.PostalCode = _PostalCode; + pDataContract.Street = _Street; + pDataContract.Settings = _Settings; + pDataContract.Apikey = _Apikey; + pDataContract.IKLeistungserbringer = _IKLeistungserbringer; + + pDataContract.BankAccount.AccountNumber = AccountNumber; + pDataContract.BankAccount.BankCode = BankCode; + pDataContract.BankAccount.BankName = BankName; + pDataContract.BankAccount.Bic = Bic; + pDataContract.BankAccount.IBAN = IBAN; + + return pDataContract; + } + } } \ No newline at end of file diff --git a/Data/Entities/Mandator.cs b/Data/Entities/Mandator.cs index 1295ad5ca..f0ccff71e 100644 --- a/Data/Entities/Mandator.cs +++ b/Data/Entities/Mandator.cs @@ -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; + } + } } \ No newline at end of file diff --git a/Data/Mappings/Mandator.hbm.xml b/Data/Mappings/Mandator.hbm.xml index b21c5295c..068bbecb6 100644 --- a/Data/Mappings/Mandator.hbm.xml +++ b/Data/Mappings/Mandator.hbm.xml @@ -28,5 +28,6 @@ + \ No newline at end of file diff --git a/Model/Changes_2024_11_25 Mandator Bank.txt b/Model/Changes_2024_11_25 Mandator Bank.txt new file mode 100644 index 000000000..0042fb115 --- /dev/null +++ b/Model/Changes_2024_11_25 Mandator Bank.txt @@ -0,0 +1,2 @@ +ALTER TABLE `mandator` +ADD COLUMN `BankAccountOid` BIGINT NULL DEFAULT NULL AFTER `IKLeistungserbringer`; \ No newline at end of file diff --git a/ReportImp/DiakonieKKKleve/BeWo.Report.ReportObjects.GkvAbrechnungRO.datasource b/ReportImp/DiakonieKKKleve/BeWo.Report.ReportObjects.GkvAbrechnungRO.datasource deleted file mode 100644 index ee7801d6f..000000000 --- a/ReportImp/DiakonieKKKleve/BeWo.Report.ReportObjects.GkvAbrechnungRO.datasource +++ /dev/null @@ -1,10 +0,0 @@ - - - - BeWo.Report.ReportObjects.GkvAbrechnungRO, BeWo.Report, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null - \ No newline at end of file diff --git a/Service/DCEntityMapper/AbstractIDCEntityMapper.cs b/Service/DCEntityMapper/AbstractIDCEntityMapper.cs index 3e11dbf3d..aba334de8 100644 --- a/Service/DCEntityMapper/AbstractIDCEntityMapper.cs +++ b/Service/DCEntityMapper/AbstractIDCEntityMapper.cs @@ -17,6 +17,64 @@ namespace BeWo.Service.DCEntityMapper return ServiceLogic.ConcurrencyCheck(pDataContractVersion, pEntity); } + public virtual List MapToNewDCs(IEnumerable pEntitys) + { + List lResult = new List(); + 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 MapToNewEntities(IEnumerable pDataContracts) + { + List lResult = new List(); + 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 pDataContractList, IList 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 MapToNewDCs(IEnumerable pEntitys) - { - List lResult = new List(); - 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 MapToNewEntities(IEnumerable pDataContracts) - { - List lResult = new List(); - 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); diff --git a/Service/DCEntityMapper/BankAccountDC_BankAccount.cs b/Service/DCEntityMapper/BankAccountDC_BankAccount.cs new file mode 100644 index 000000000..c54bfe857 --- /dev/null +++ b/Service/DCEntityMapper/BankAccountDC_BankAccount.cs @@ -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 + { + 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; + } + } +} diff --git a/Service/DCEntityMapper/MandatorDC_Mandator.cs b/Service/DCEntityMapper/MandatorDC_Mandator.cs index 0378ea482..9760594fc 100644 --- a/Service/DCEntityMapper/MandatorDC_Mandator.cs +++ b/Service/DCEntityMapper/MandatorDC_Mandator.cs @@ -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; } diff --git a/Service/DCEntityMapper/MapperFactory.cs b/Service/DCEntityMapper/MapperFactory.cs index f46281d7e..1f709c4cc 100644 --- a/Service/DCEntityMapper/MapperFactory.cs +++ b/Service/DCEntityMapper/MapperFactory.cs @@ -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(); } } \ No newline at end of file diff --git a/Service/Service.csproj b/Service/Service.csproj index 44790515c..afb041a13 100644 --- a/Service/Service.csproj +++ b/Service/Service.csproj @@ -225,6 +225,7 @@ + diff --git a/Shared/DataContracts/BeWoDataContract.cs b/Shared/DataContracts/BeWoDataContract.cs index c87da7c49..bb68c201c 100644 --- a/Shared/DataContracts/BeWoDataContract.cs +++ b/Shared/DataContracts/BeWoDataContract.cs @@ -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; } } } diff --git a/Shared/DataContracts/Invoicing/BankAccountDC.cs b/Shared/DataContracts/Invoicing/BankAccountDC.cs new file mode 100644 index 000000000..6bb2a12c6 --- /dev/null +++ b/Shared/DataContracts/Invoicing/BankAccountDC.cs @@ -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); + } + } +} diff --git a/Shared/DataContracts/MandatorDC.cs b/Shared/DataContracts/MandatorDC.cs index 1c9e00c80..051a6750a 100644 --- a/Shared/DataContracts/MandatorDC.cs +++ b/Shared/DataContracts/MandatorDC.cs @@ -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; } + } } \ No newline at end of file diff --git a/Shared/DataContracts/OrganisationDC.cs b/Shared/DataContracts/OrganisationDC.cs index 1bfc16c73..a54d0a81c 100644 --- a/Shared/DataContracts/OrganisationDC.cs +++ b/Shared/DataContracts/OrganisationDC.cs @@ -5,192 +5,101 @@ using BS.Shared.Core; namespace BS.Shared.DataContracts { - [DataContract] - public partial class OrganisationDC : IDataContract - { - // Contacts - private List _ContactInformations; + [DataContract] + public partial class OrganisationDC : IDataContract + { + // Contacts + private List _ContactInformations; + private List _CostRatePeriods; - private List _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 ContactInformations - { - get - { - return this._ContactInformations ?? (this._ContactInformations = new List()); - } - - set - { - this._ContactInformations = value; - } - } - - [DataMember] - public long? CostBearerOid { get; set; } - - [DataMember] - public long? CostBearerVersion { get; set; } - - [DataMember] - public List CostRatePeriods - { - get - { - return this._CostRatePeriods ?? (this._CostRatePeriods = new List()); - } - - 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 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 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 VarFields { get; set; } + [DataMember] public ValueListEntryDC Function { get; set; } + [DataMember] public List Arbeitszeiten { get; set; } + [DataMember] public List 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 VarFields { get; set; } + public List ContactInformations + { + get + { + return this._ContactInformations ?? (this._ContactInformations = new List()); + } - [DataMember] - public ValueListEntryDC Function { get; set; } + set + { + this._ContactInformations = value; + } + } - [DataMember] - public List Arbeitszeiten { get; set; } + [DataMember] + public List CostRatePeriods + { + get + { + return this._CostRatePeriods ?? (this._CostRatePeriods = new List()); + } - [DataMember] - public List 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); + } + } } \ No newline at end of file diff --git a/Shared/Shared.csproj b/Shared/Shared.csproj index 7b9ad6104..bd5669242 100644 --- a/Shared/Shared.csproj +++ b/Shared/Shared.csproj @@ -187,6 +187,7 @@ +