Files
BeWoPlaner/Shared/DataContracts/ClientPartials/CostRatePeriodDC.cs

28 lines
880 B
C#
Raw Normal View History

2018-10-08 12:09:48 +02:00
namespace BS.Shared.DataContracts
{
public partial class CostRatePeriodDC
{
public override bool Equals(object obj)
{
if (obj is CostRatePeriodDC costRatePeriod)
2018-10-08 12:09:48 +02:00
{
if (CostRatePeriodOid == null && costRatePeriod.CostRatePeriodOid == null)
2018-10-08 12:09:48 +02:00
{
return GetHashCode() == costRatePeriod.GetHashCode();
2018-10-08 12:09:48 +02:00
}
if (CostRatePeriodOid != null && costRatePeriod.CostRatePeriodOid != null)
2018-10-08 12:09:48 +02:00
{
return CostRatePeriodOid == costRatePeriod.CostRatePeriodOid;
2018-10-08 12:09:48 +02:00
}
}
return false;
}
public override int GetHashCode()
{
return CostRatePeriodOid.HasValue ? GetType().Name.GetHashCode() ^ CostRatePeriodOid.GetHashCode() : base.GetHashCode();
2018-10-08 12:09:48 +02:00
}
}
}