public Boolean IsEqual(PopulationServiceEventThreshold compareEvent) { Boolean isEqual = true; if (this.relativeDateValue != compareEvent.RelativeDateValue) { isEqual = false; } if (this.relativeDateQualifier != compareEvent.RelativeDateQualifier) { isEqual = false; } if (this.status != compareEvent.Status) { isEqual = false; } if (isEqual) { isEqual = isEqual && action.IsEqual(compareEvent.action); } return(isEqual); }
public PopulationServiceEventThreshold Copy() { Server.Application.PopulationServiceEventThreshold serverObject = (Server.Application.PopulationServiceEventThreshold)ToServerObject(); PopulationServiceEventThreshold copiedObject = new PopulationServiceEventThreshold(application, serverObject); return(copiedObject); }
public PopulationServiceEventThreshold GetNewThreshold() { PopulationServiceEventThreshold threshold = new PopulationServiceEventThreshold(application); threshold.PopulationServiceEventId = Id; threshold.PopulationId = populationId; threshold.RelativeDateValue = 0; threshold.RelativeDateQualifier = Mercury.Server.Application.DateQualifier.Months; return(threshold); }
public Boolean HasThreshold(PopulationServiceEventThreshold forThreshold) { Boolean hasThreshold = false; foreach (PopulationServiceEventThreshold currentThreshold in thresholds) { if (currentThreshold.IsEqual(forThreshold)) { hasThreshold = true; break; } } return(hasThreshold); }