private List <Objective> GetPreDefinedObjectives() { var preDefinedObjectives = _businessPlanService.GetPreDefinedObjectives().ToList(); var affiliateObjectives = _affiliateService.GetObjectives(AssistedUser.AffiliateID).ToList(); foreach (var po in preDefinedObjectives) { var ao = affiliateObjectives.FirstOrDefault(o => o.ObjectiveID == po.ObjectiveID); if (ao != null) { po.AutoTrackingEnabled = ao.AutoTrackingEnabled; } } return(preDefinedObjectives); }
public IEnumerable <AffiliateObjective> GetAffiliateObjectives(int id) { return(_affiliateService.GetObjectives(id)); }