public virtual Boolean isModified(dtoLiteMapActivity activity, ModifyPolicy policy) { switch (policy) { case ModifyPolicy.FullFields: return(isEqualTo(activity)); case ModifyPolicy.DateCalculationFields: return(Id == activity.IdActivity && ((activity.IdParent == 0 && Parent == null) || (Parent != null && activity.IdParent > 0 && Parent.Id == activity.IdParent)) && (IsSummary == activity.IsSummary) && (activity.Previous.EarlyStartDate == EarlyStartDate) && (activity.Previous.Duration.Value == Duration && activity.Previous.Duration.IsEstimated == IsDurationEstimated) && ( ( String.IsNullOrEmpty(activity.Previous.Predecessors) && (PredecessorLinks == null || (PredecessorLinks != null && PredecessorLinks.Where(p => p.Deleted == Core.DomainModel.BaseStatusDeleted.None).Any()) ) || (PredecessorLinks != null && PredecessorsToIdString() == activity.Previous.PredecessorsIdString) ))); } return(false); }
public virtual Boolean isEqualTo(dtoLiteMapActivity activity) { return(Id == activity.IdActivity && ((activity.IdParent == 0 && Parent == null) || (Parent != null && activity.IdParent > 0 && Parent.Id == activity.IdParent)) && (DisplayOrder == activity.RowNumber) && (IsSummary == activity.IsSummary) && (activity.Previous.Name == Name) && (activity.Previous.EarlyStartDate == EarlyStartDate) && (activity.Previous.Duration.Value == Duration && activity.Previous.Duration.IsEstimated == IsDurationEstimated) && ( ( String.IsNullOrEmpty(activity.Previous.Predecessors) && (PredecessorLinks == null || (PredecessorLinks != null && PredecessorLinks.Where(p => p.Deleted == Core.DomainModel.BaseStatusDeleted.None).Any()) ) || (PredecessorLinks != null && PredecessorsToIdString() == activity.Previous.PredecessorsIdString) ))); }