Intervallfinder überarbeitet & Bug gefixt, der zu einem Fehler beim Suchen nach freien Intervallen über mehrere Tage geführt hatte, wenn die Enduhrzeit vor der Startuhrzeit lag. Berichte mit Parametern. Verbesserte Mitarbeiter-, Klienten-, Team-, und Organisationsdropdowns mit Suche. Quittierungsbelegresultate (zum Unterschreiben) wird wie die Zeiterfassung paginiert. FaC: neuer Kalender noch nicht fertig.
134 lines
3.6 KiB
C#
134 lines
3.6 KiB
C#
using System.Windows.Media;
|
|
using BS.Shared.DataContracts.ClientPartials;
|
|
using BS.Shared.Extensions;
|
|
|
|
namespace BS.Shared.DataContracts.Compact
|
|
{
|
|
public partial class CompactOrganisationDC : IFilterableDC, IMoKSearchableDC
|
|
{
|
|
public long EntityOid => OrganisationOid;
|
|
|
|
public bool IsArchived => ActivationType == ActivationTypeId.Archived;
|
|
|
|
public bool IsDeleted => ActivationType == ActivationTypeId.Deleted;
|
|
|
|
public string AddressString
|
|
{
|
|
get
|
|
{
|
|
var address = Street;
|
|
if(!string.IsNullOrEmpty(address))
|
|
{
|
|
address += ", ";
|
|
}
|
|
|
|
return address + PostalCode + " " + Town;
|
|
}
|
|
}
|
|
|
|
public SolidColorBrush FilterableBrush => new SolidColorBrush(Colors.Transparent);
|
|
|
|
public string AddressSummaryInfo
|
|
{
|
|
get
|
|
{
|
|
var address = Street;
|
|
if(!string.IsNullOrEmpty(address))
|
|
{
|
|
address += "\n";
|
|
}
|
|
|
|
if(address is null)
|
|
{
|
|
address = string.Empty;
|
|
}
|
|
|
|
address += PostalCode + " " + Town;
|
|
|
|
return address;
|
|
}
|
|
|
|
set { }
|
|
}
|
|
|
|
public string ContactSummaryInfo
|
|
{
|
|
get
|
|
{
|
|
var info = string.Empty;
|
|
|
|
if(!string.IsNullOrEmpty(Communication1))
|
|
{
|
|
info = "Tel.: " + Communication1;
|
|
}
|
|
|
|
if(!string.IsNullOrEmpty(Communication2))
|
|
{
|
|
if (info.Length > 0)
|
|
info += "\n";
|
|
info += "Fax: " + Communication2;
|
|
}
|
|
|
|
if(!string.IsNullOrEmpty(Communication3))
|
|
{
|
|
if (info.Length > 0)
|
|
info += "\n";
|
|
info += "E-Mail: " + Communication3;
|
|
}
|
|
|
|
if(!string.IsNullOrEmpty(Communication4))
|
|
{
|
|
if(info.Length > 0)
|
|
{
|
|
info += "\n";
|
|
}
|
|
|
|
info += "Internet: " + Communication4;
|
|
}
|
|
|
|
return info;
|
|
}
|
|
|
|
set { }
|
|
}
|
|
|
|
public string DetailDescription => Name;
|
|
|
|
public string FilterRelevants => Name + " " + Function + " " + AddressSummaryInfo;
|
|
|
|
public string IconPath => @"..\..\Ressources\Icons\OfficeBulidingBlackDisabled.png";
|
|
|
|
public string ServiceUnitName => CostRatePeriods != null ? CostRatePeriods.GetCurrentlyValidRate(CostRatePeriodType.MinutesPerServiceUnit).UnitName : "Stunden";
|
|
|
|
public string SimpleDescription => Name;
|
|
|
|
public bool SupportsActivationType => false;
|
|
|
|
public long Version
|
|
{
|
|
get => OrganisationVersion;
|
|
|
|
set => OrganisationVersion = value;
|
|
}
|
|
|
|
public override bool Equals(object obj)
|
|
{
|
|
if(obj is CompactOrganisationDC compactOrganisation)
|
|
{
|
|
return OrganisationOid == compactOrganisation.OrganisationOid;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return GetType().Name.GetHashCode() ^ OrganisationOid.GetHashCode();
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return Name;
|
|
}
|
|
}
|
|
} |