Exemplo n.º 1
0
     public bool Equals(FareTypeDate other)
     {
         if (ReferenceEquals(null, other)) return false;
         if (ReferenceEquals(this, other)) return true;
 		if (other.Id == 0 && Id == 0)
 			return false;
 		else
 			return other.Id == Id;
     }
Exemplo n.º 2
0
     private void FixupFareTypeDate(FareTypeDate previousValue)
     {
         if (IsDeserializing)
         {
             return;
         }
 
         if (previousValue != null && previousValue.FareTypeDateMargins.Contains(this))
         {
             previousValue.FareTypeDateMargins.Remove(this);
         }
 
         if (FareTypeDate != null)
         {
             if (!FareTypeDate.FareTypeDateMargins.Contains(this))
             {
                 FareTypeDate.FareTypeDateMargins.Add(this);
             }
 
             DateId = FareTypeDate.Id;
         }
         if (ChangeTracker.ChangeTrackingEnabled)
         {
             if (ChangeTracker.OriginalValues.ContainsKey("FareTypeDate")
                 && (ChangeTracker.OriginalValues["FareTypeDate"] == FareTypeDate))
             {
                 ChangeTracker.OriginalValues.Remove("FareTypeDate");
             }
             else
             {
                 ChangeTracker.RecordOriginalValue("FareTypeDate", previousValue);
             }
             if (FareTypeDate != null && !FareTypeDate.ChangeTracker.ChangeTrackingEnabled)
             {
                 FareTypeDate.StartTracking();
             }
         }
     }