diff --git a/Service/Plugins/TranslationDictionary.cs b/Service/Plugins/TranslationDictionary.cs index f0bda2c9f..782034d4a 100644 --- a/Service/Plugins/TranslationDictionary.cs +++ b/Service/Plugins/TranslationDictionary.cs @@ -72,8 +72,6 @@ namespace BeWo.Service.Plugins AddOrReplaceTranslation(dict, "CustomerNotizen", "Notizen"); AddOrReplaceTranslation(dict, "EmployeeNotizen", "Notizen"); - - AddOrReplaceTranslation(dict, "OrganisationStundenplan", "Betreuungszeiten"); AddOrReplaceTranslation(dict, "CustomerStundenplan", "Betreuungszeiten"); @@ -137,6 +135,8 @@ namespace BeWo.Service.Plugins AddOrReplaceTranslation(dict, "ContextMenu_Items_Appointment_Actions_Open", "Belegung bearbeiten"); AddOrReplaceTranslation(dict, "ContextMenu_Items_Appointment_Actions_Delete", "Belegung löschen"); + AddOrReplaceTranslation(dict, "Module_DisplayName_Wohnhilfe", "Wohnhilfe"); + return dict; } diff --git a/Shared/Core/AbstractIDSpecificDefaultClass.cs b/Shared/Core/AbstractIDSpecificDefaultClass.cs index dcc24fedb..2a235e033 100644 --- a/Shared/Core/AbstractIDSpecificDefaultClass.cs +++ b/Shared/Core/AbstractIDSpecificDefaultClass.cs @@ -6,25 +6,15 @@ namespace BS.Shared.Core { public class AbstractIDSpecificDefaultClass where T : AbstractIDSpecificDefaultClass, new() { - #region Constants and Fields - protected string _SpecificID = string.Empty; private static readonly Dictionary _InstanceCache = new Dictionary(); - #endregion - - #region Constructors and Destructors - - protected AbstractIDSpecificDefaultClass() {} - - #endregion - - #region Public Methods + protected AbstractIDSpecificDefaultClass() { } public static T GetInstance(string specificId, string tenant = null) { - if (specificId == null) + if (specificId == null) { specificId = tenant; } @@ -40,14 +30,14 @@ namespace BS.Shared.Core var assignableForms = allemblyTypes.Where(i => typeof(T).IsAssignableFrom(i)); var x = assignableForms.FirstOrDefault(t => t.GetCustomAttributes(typeof(IDSpecificClassAttribute), true).ToList().Exists(i => { - if(i is IDSpecificClassAttribute attribute) + if (i is IDSpecificClassAttribute attribute) { - if(attribute.Identifiers != null) + if (attribute.Identifiers != null) { return attribute.Identifiers.Contains(specificId); } - if(!string.IsNullOrEmpty(attribute.Identifier)) + if (!string.IsNullOrEmpty(attribute.Identifier)) { return attribute.Identifier.Equals(specificId); } @@ -61,15 +51,15 @@ namespace BS.Shared.Core .FirstOrDefault(t => t.GetCustomAttributes(typeof(IDSpecificClassAttribute), true) .ToList() .Exists(i => - { - var attr = (IDSpecificClassAttribute)i; - if (attr.Identifiers != null) - return attr.Identifiers.Contains(specificId); - if (!String.IsNullOrEmpty(attr.Identifier)) - return attr.Identifier.Equals(specificId); - return false; + { + var attr = (IDSpecificClassAttribute)i; + if (attr.Identifiers != null) + return attr.Identifiers.Contains(specificId); + if (!String.IsNullOrEmpty(attr.Identifier)) + return attr.Identifier.Equals(specificId); + return false; - })); + })); if (cbSpecific != null) { var instance = Activator.CreateInstance(cbSpecific) as T; @@ -81,7 +71,7 @@ namespace BS.Shared.Core if (!_InstanceCache.ContainsKey(string.Empty)) { - _InstanceCache.Add(string.Empty, + _InstanceCache.Add(string.Empty, new T { _SpecificID = specificId @@ -90,7 +80,5 @@ namespace BS.Shared.Core return _InstanceCache[string.Empty]; } - - #endregion } } \ No newline at end of file diff --git a/Shared/DataContracts/DataContract.cs b/Shared/DataContracts/BeWoDataContract.cs similarity index 100% rename from Shared/DataContracts/DataContract.cs rename to Shared/DataContracts/BeWoDataContract.cs diff --git a/Shared/DataContracts/WohneinheitBelegungDC.cs b/Shared/DataContracts/WohneinheitBelegungDC.cs index c16f2d5ed..1ab1d4b1f 100644 --- a/Shared/DataContracts/WohneinheitBelegungDC.cs +++ b/Shared/DataContracts/WohneinheitBelegungDC.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; namespace BS.Shared.DataContracts { - public class WohneinheitBelegungDC : DataContract + public class WohneinheitBelegungDC : BeWoDataContract { [DataMember] public CompactCustomerDC Customer { get; set; } [DataMember] public DateTime StartDate { get; set; } diff --git a/Shared/DataContracts/WohneinheitDC.cs b/Shared/DataContracts/WohneinheitDC.cs index 91963e38c..23a52f2b6 100644 --- a/Shared/DataContracts/WohneinheitDC.cs +++ b/Shared/DataContracts/WohneinheitDC.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; namespace BS.Shared.DataContracts { - public class WohneinheitDC : DataContract + public class WohneinheitDC : BeWoDataContract { [DataMember] public string Wohnname { get; set; } [DataMember] public string Zimmername { get; set; } diff --git a/Shared/DataContracts/Wohnhilfe/BereichEinkommenUndArbeitDC.cs b/Shared/DataContracts/Wohnhilfe/BereichEinkommenUndArbeitDC.cs new file mode 100644 index 000000000..510faad51 --- /dev/null +++ b/Shared/DataContracts/Wohnhilfe/BereichEinkommenUndArbeitDC.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Threading.Tasks; + +namespace BS.Shared.DataContracts.Wohnhilfe +{ + [DataContract] + public class BereichEinkommenUndArbeitDC : IDataContract + { + } +} diff --git a/Shared/Shared.csproj b/Shared/Shared.csproj index 36dd05d87..7cdc8325e 100644 --- a/Shared/Shared.csproj +++ b/Shared/Shared.csproj @@ -171,6 +171,7 @@ +