Files
BeWoPlaner/Shared/DataContracts/Compact/ClientPartials/CompactEmployeeDC.cs

50 lines
1.5 KiB
C#
Raw Normal View History

2016-06-27 01:45:38 +02:00
using System.Windows.Media;
namespace BS.Shared.DataContracts.Compact
{
public partial class CompactEmployeeDC : IFilterableDC
{
public string DetailDescription => LastName + ", " + FirstName;
2016-06-27 01:45:38 +02:00
public string FilterRelevants => FirstName + " " + LastName + " " + PersonnelNumber;
2016-06-27 01:45:38 +02:00
public string IconPath => @"..\..\Ressources\Icons\UserBusinessMaleDisabled.png";
2016-06-27 01:45:38 +02:00
public string SimpleDescription => LastName + ", " + FirstName;
2016-06-27 01:45:38 +02:00
public bool SupportsActivationType => true;
2016-06-27 01:45:38 +02:00
public long Version
{
get => EmployeeVersion;
2016-06-27 01:45:38 +02:00
set => EmployeeVersion = value;
2016-06-27 01:45:38 +02:00
}
public override bool Equals(object obj)
{
if(obj is CompactEmployeeDC employee)
2016-06-27 01:45:38 +02:00
{
return EmployeeOid == employee.EmployeeOid;
}
return false;
}
public override int GetHashCode()
{
return GetType().Name.GetHashCode() ^ EmployeeOid.GetHashCode();
}
public override string ToString()
{
return LastName + ", " + FirstName;
2016-06-27 01:45:38 +02:00
}
public SolidColorBrush FilterableBrush => new SolidColorBrush((Color) ColorConverter.ConvertFromString(EmployeeColor ?? Colors.Transparent.ToString()));
public bool IsArchived => ActivationType == ActivationTypeId.Archived;
public bool IsDeleted => ActivationType == ActivationTypeId.Deleted;
2016-06-27 01:45:38 +02:00
}
}