Пример #1
0
        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);
        }
Пример #2
0
 public IEnumerable <AffiliateObjective> GetAffiliateObjectives(int id)
 {
     return(_affiliateService.GetObjectives(id));
 }