Пример #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id.GetHashCode();
         hashCode = (hashCode * 397) ^ Date.GetHashCode();
         hashCode = (hashCode * 397) ^ Bonus.GetHashCode();
         hashCode = (hashCode * 397) ^ Price.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)Type;
         hashCode = (hashCode * 397) ^ (Description != null ? Description.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Value != null ? Value.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (GetRecordType != null ? GetRecordType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ WorkTimeFrom.GetHashCode();
         hashCode = (hashCode * 397) ^ WorkTimeTo.GetHashCode();
         hashCode = (hashCode * 397) ^ (Time != null ? Time.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (BreakTime != null ? BreakTime.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (OverTime != null ? OverTime.GetHashCode() : 0);
         return(hashCode);
     }
 }
Пример #2
0
 protected bool Equals(HoursRecord other)
 {
     return(Id.Equals(other.Id) && Date.Equals(other.Date) && Bonus.Equals(other.Bonus) && Price.Equals(other.Price) && Type == other.Type && string.Equals(Description, other.Description) && string.Equals(Value, other.Value) && string.Equals(GetRecordType, other.GetRecordType) && WorkTimeFrom.Equals(other.WorkTimeFrom) && WorkTimeTo.Equals(other.WorkTimeTo) && Equals(Time, other.Time) && Equals(BreakTime, other.BreakTime) && Equals(OverTime, other.OverTime));
 }