示例#1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = Id.GetHashCode();
         hashCode = (hashCode * 397) ^ (OrderNumber != null ? OrderNumber.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Location != null ? Location.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Title != null ? Title.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ NeedBy.GetHashCode();
         hashCode = (hashCode * 397) ^ (Status != null ? Status.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (City != null ? City.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (State != null ? State.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Trade != null ? Trade.GetHashCode() : 0);
         return(hashCode);
     }
 }
示例#2
0
        private bool Equals(OpenWorkOrderModel other)
        {
            if (other == null)
            {
                return(false);
            }

            return(Id.Equals(other.Id) &&
                   string.Equals(OrderNumber, other.OrderNumber) &&
                   string.Equals(Location, other.Location) &&
                   string.Equals(Title, other.Title) &&
                   string.Equals(City, other.City) &&
                   string.Equals(State, other.State) &&
                   int.Equals(Priority, other.Priority) &&
                   string.Equals(Trade, other.Trade) &&
                   NeedBy.Equals(other.NeedBy) &&
                   string.Equals(Status, other.Status));
        }