54 lines
1.5 KiB
C#
54 lines
1.5 KiB
C#
using System;
|
|
|
|
using BeWo.ViewModel;
|
|
|
|
using BS.Shared;
|
|
using BS.Shared.DataContracts;
|
|
|
|
namespace BeWo.Core
|
|
{
|
|
public static class Comparer
|
|
{
|
|
public static Comparison<ServiceCategoryVM> ServiceCategoryVMComparer
|
|
{
|
|
get
|
|
{
|
|
return (x, y) => x.Name == null ? 1 : x.Name.CompareTo(y.Name);
|
|
}
|
|
}
|
|
|
|
public static Comparison<UserRightType> UserRightTypeComparer
|
|
{
|
|
get
|
|
{
|
|
return (x, y) => Enum.GetName(typeof(UserRightType), x).CompareTo(Enum.GetName(typeof(UserRightType), y));
|
|
}
|
|
}
|
|
|
|
public static Comparison<ValueListEntryDC> ValueListEntryDCComparer
|
|
{
|
|
get
|
|
{
|
|
return (x, y) => x.DisplayName == null ? 1 : x.DisplayName.CompareTo(y.DisplayName);
|
|
}
|
|
}
|
|
|
|
public static Comparison<ServiceAccountingDC> ServiceAccountingDCComparer
|
|
{
|
|
get
|
|
{
|
|
return (x, y) => x.ServiceDescription.Name == null ? 1 : x.ServiceDescription.Name.CompareTo(y.ServiceDescription.Name);
|
|
}
|
|
}
|
|
|
|
public static Comparison<AdditionalServiceVM> AdditionalServiceVMComparer
|
|
{
|
|
get { return (x, y) => x.Name == null ? 1 : x.Name.CompareTo(y.Name); }
|
|
}
|
|
|
|
public static Comparison<AuszahlungsartVM> AuszahlungsartVMComparer
|
|
{
|
|
get { return (x, y) => x.Name == null ? 1 : x.Name.CompareTo(y.Name); }
|
|
}
|
|
}
|
|
} |