Files
BeWoPlaner/Shared/DataContracts/ClientPartials/CostRatePeriodDC.cs
Lyndon Jetten 32e19d94af Weiterentwicklung am Quittierungsbelegfeature im Mobilklienten
Mehrtägige Buchungen werden im Mobilklienten korrekt gespeichert
2021-02-17 16:59:26 +01:00

28 lines
880 B
C#

namespace BS.Shared.DataContracts
{
public partial class CostRatePeriodDC
{
public override bool Equals(object obj)
{
if (obj is CostRatePeriodDC costRatePeriod)
{
if (CostRatePeriodOid == null && costRatePeriod.CostRatePeriodOid == null)
{
return GetHashCode() == costRatePeriod.GetHashCode();
}
if (CostRatePeriodOid != null && costRatePeriod.CostRatePeriodOid != null)
{
return CostRatePeriodOid == costRatePeriod.CostRatePeriodOid;
}
}
return false;
}
public override int GetHashCode()
{
return CostRatePeriodOid.HasValue ? GetType().Name.GetHashCode() ^ CostRatePeriodOid.GetHashCode() : base.GetHashCode();
}
}
}