2024-12-30 16:12:47 +01:00
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
|
using System.Windows.Media;
|
2024-11-12 18:37:23 +01:00
|
|
|
|
using BS.Shared.DataContracts.ClientPartials;
|
2016-06-27 01:45:38 +02:00
|
|
|
|
using BS.Shared.Extensions;
|
|
|
|
|
|
|
|
|
|
|
|
namespace BS.Shared.DataContracts.Compact
|
|
|
|
|
|
{
|
2024-12-30 16:12:47 +01:00
|
|
|
|
[DebuggerDisplay("{SimpleDescription}")]
|
|
|
|
|
|
|
2024-11-12 18:37:23 +01:00
|
|
|
|
public partial class CompactOrganisationDC : IFilterableDC, IMoKSearchableDC
|
2016-06-27 01:45:38 +02:00
|
|
|
|
{
|
2024-11-12 18:37:23 +01:00
|
|
|
|
public long EntityOid => OrganisationOid;
|
2016-06-27 01:45:38 +02:00
|
|
|
|
|
2024-11-12 18:37:23 +01:00
|
|
|
|
public bool IsArchived => ActivationType == ActivationTypeId.Archived;
|
2016-06-27 01:45:38 +02:00
|
|
|
|
|
2024-11-12 18:37:23 +01:00
|
|
|
|
public bool IsDeleted => ActivationType == ActivationTypeId.Deleted;
|
2016-06-27 01:45:38 +02:00
|
|
|
|
|
|
|
|
|
|
public string AddressString
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
2024-11-12 18:37:23 +01:00
|
|
|
|
var address = Street;
|
|
|
|
|
|
if(!string.IsNullOrEmpty(address))
|
2016-06-27 01:45:38 +02:00
|
|
|
|
{
|
|
|
|
|
|
address += ", ";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-11-12 18:37:23 +01:00
|
|
|
|
return address + PostalCode + " " + Town;
|
2016-06-27 01:45:38 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-11-12 18:37:23 +01:00
|
|
|
|
public SolidColorBrush FilterableBrush => new SolidColorBrush(Colors.Transparent);
|
2016-06-27 01:45:38 +02:00
|
|
|
|
|
|
|
|
|
|
public string AddressSummaryInfo
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
2024-11-12 18:37:23 +01:00
|
|
|
|
var address = Street;
|
|
|
|
|
|
if(!string.IsNullOrEmpty(address))
|
2016-06-27 01:45:38 +02:00
|
|
|
|
{
|
|
|
|
|
|
address += "\n";
|
|
|
|
|
|
}
|
2024-11-12 18:37:23 +01:00
|
|
|
|
|
|
|
|
|
|
if(address is null)
|
2016-06-27 01:45:38 +02:00
|
|
|
|
{
|
|
|
|
|
|
address = string.Empty;
|
|
|
|
|
|
}
|
2024-11-12 18:37:23 +01:00
|
|
|
|
|
|
|
|
|
|
address += PostalCode + " " + Town;
|
2016-06-27 01:45:38 +02:00
|
|
|
|
|
|
|
|
|
|
return address;
|
|
|
|
|
|
}
|
2024-11-12 18:37:23 +01:00
|
|
|
|
|
2016-06-27 01:45:38 +02:00
|
|
|
|
set { }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public string ContactSummaryInfo
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
2024-11-12 18:37:23 +01:00
|
|
|
|
var info = string.Empty;
|
|
|
|
|
|
|
|
|
|
|
|
if(!string.IsNullOrEmpty(Communication1))
|
|
|
|
|
|
{
|
|
|
|
|
|
info = "Tel.: " + Communication1;
|
|
|
|
|
|
}
|
2016-06-27 01:45:38 +02:00
|
|
|
|
|
2024-11-12 18:37:23 +01:00
|
|
|
|
if(!string.IsNullOrEmpty(Communication2))
|
2016-06-27 01:45:38 +02:00
|
|
|
|
{
|
|
|
|
|
|
if (info.Length > 0)
|
|
|
|
|
|
info += "\n";
|
2024-11-12 18:37:23 +01:00
|
|
|
|
info += "Fax: " + Communication2;
|
2016-06-27 01:45:38 +02:00
|
|
|
|
}
|
2024-11-12 18:37:23 +01:00
|
|
|
|
|
|
|
|
|
|
if(!string.IsNullOrEmpty(Communication3))
|
2016-06-27 01:45:38 +02:00
|
|
|
|
{
|
|
|
|
|
|
if (info.Length > 0)
|
|
|
|
|
|
info += "\n";
|
2024-11-12 18:37:23 +01:00
|
|
|
|
info += "E-Mail: " + Communication3;
|
2016-06-27 01:45:38 +02:00
|
|
|
|
}
|
2024-11-12 18:37:23 +01:00
|
|
|
|
|
|
|
|
|
|
if(!string.IsNullOrEmpty(Communication4))
|
2016-06-27 01:45:38 +02:00
|
|
|
|
{
|
2024-11-12 18:37:23 +01:00
|
|
|
|
if(info.Length > 0)
|
|
|
|
|
|
{
|
2016-06-27 01:45:38 +02:00
|
|
|
|
info += "\n";
|
2024-11-12 18:37:23 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
info += "Internet: " + Communication4;
|
2016-06-27 01:45:38 +02:00
|
|
|
|
}
|
2024-11-12 18:37:23 +01:00
|
|
|
|
|
2016-06-27 01:45:38 +02:00
|
|
|
|
return info;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-11-12 18:37:23 +01:00
|
|
|
|
set { }
|
2016-06-27 01:45:38 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-11-12 18:37:23 +01:00
|
|
|
|
public string DetailDescription => Name;
|
2016-06-27 01:45:38 +02:00
|
|
|
|
|
2024-12-20 12:58:11 +01:00
|
|
|
|
public string FilterRelevants => $"{Name} {Function} {AddressSummaryInfo} {IKKrankenkasse} {IKKostentrager} {IKDatenannahmestelle}";
|
2016-06-27 01:45:38 +02:00
|
|
|
|
|
2024-11-12 18:37:23 +01:00
|
|
|
|
public string IconPath => @"..\..\Ressources\Icons\OfficeBulidingBlackDisabled.png";
|
2016-06-27 01:45:38 +02:00
|
|
|
|
|
2024-11-12 18:37:23 +01:00
|
|
|
|
public string ServiceUnitName => CostRatePeriods != null ? CostRatePeriods.GetCurrentlyValidRate(CostRatePeriodType.MinutesPerServiceUnit).UnitName : "Stunden";
|
2016-06-27 01:45:38 +02:00
|
|
|
|
|
2024-11-12 18:37:23 +01:00
|
|
|
|
public string SimpleDescription => Name;
|
2016-06-27 01:45:38 +02:00
|
|
|
|
|
2024-11-12 18:37:23 +01:00
|
|
|
|
public bool SupportsActivationType => false;
|
2016-06-27 01:45:38 +02:00
|
|
|
|
|
|
|
|
|
|
public long Version
|
|
|
|
|
|
{
|
2024-11-12 18:37:23 +01:00
|
|
|
|
get => OrganisationVersion;
|
2016-06-27 01:45:38 +02:00
|
|
|
|
|
2024-11-12 18:37:23 +01:00
|
|
|
|
set => OrganisationVersion = value;
|
2016-06-27 01:45:38 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override bool Equals(object obj)
|
|
|
|
|
|
{
|
2024-11-12 18:37:23 +01:00
|
|
|
|
if(obj is CompactOrganisationDC compactOrganisation)
|
2016-06-27 01:45:38 +02:00
|
|
|
|
{
|
2021-02-17 16:59:26 +01:00
|
|
|
|
return OrganisationOid == compactOrganisation.OrganisationOid;
|
2016-06-27 01:45:38 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override int GetHashCode()
|
|
|
|
|
|
{
|
2024-11-12 18:37:23 +01:00
|
|
|
|
return GetType().Name.GetHashCode() ^ OrganisationOid.GetHashCode();
|
2016-06-27 01:45:38 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
|
|
{
|
2024-11-12 18:37:23 +01:00
|
|
|
|
return Name;
|
2016-06-27 01:45:38 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|