Files
BeWoPlaner/BeWo/Core/Comparer.cs
2016-06-27 01:45:38 +02:00

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.TypeDescription == null ? 1 : x.TypeDescription.CompareTo(y.TypeDescription);
}
}
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); }
}
}
}