Files
BeWoPlaner/Shared/DataContracts/Compact/ClientPartials/CompactEmployeeDC.cs
Lyndon Jetten 23b8757ff5 FaC: Neues Scheduling-Modul hinzugefügt, aber noch lange nicht fertig.
ownChat: Neues TimeStamp-Objekt wird unterstützt und der Chat funktioniert wieder.
2024-06-05 14:45:33 +02:00

68 lines
2.0 KiB
C#

using System;
using System.Windows.Media;
namespace BS.Shared.DataContracts.Compact
{
public partial class CompactEmployeeDC : IFilterableDC
{
public string DetailDescription
{
get
{
var text = LastName + ", " + FirstName;
if (!string.IsNullOrWhiteSpace(PersonnelNumber))
{
text += String.Format(" ({0})", PersonnelNumber);
}
return text;
}
}
public string FilterRelevants => String.Format("{0} {1} {2} {3} {4} {5}", FirstName, LastName, PersonnelNumber, Details2, Details3, Teams);
public string IconPath => @"..\..\Ressources\Icons\UserBusinessMaleDisabled.png";
public string SimpleDescription => LastName + ", " + FirstName;
public string Teams => this.RelatedTeams;
public bool SupportsActivationType => true;
public long Version
{
get => EmployeeVersion;
set => EmployeeVersion = value;
}
public override bool Equals(object obj)
{
if(obj is CompactEmployeeDC employee)
{
return EmployeeOid == employee.EmployeeOid;
}
return false;
}
public override int GetHashCode()
{
return GetType().Name.GetHashCode() ^ EmployeeOid.GetHashCode();
}
public override string ToString()
{
return LastName + ", " + FirstName;
}
public SolidColorBrush FilterableBrush => new SolidColorBrush((Color) ColorConverter.ConvertFromString(EmployeeColor ?? Colors.Transparent.ToString()));
public bool IsArchived => ActivationType == ActivationTypeId.Archived;
public bool IsDeleted => ActivationType == ActivationTypeId.Deleted;
public string FirstNameLastName => $"{FirstName} {LastName}";
}
}