Exemple #1
0
        public ActivityGoal AddNewGoal(string goalName)
        {
            var goal = new ActivityGoal(goalName);

            this.SetOfGoals.Add(goal);
            return(goal);
        }
Exemple #2
0
        public void RemoveGoal(ActivityGoal goal)
        {
            if (this.SetOfGoals.Contains(goal))
            {
                IEnumerable <Activity> affectedActivities = this.UnfilteredActivities
                                                            .Where(activity => activity.GoalGuid == goal.Guid);
                foreach (Activity activity in affectedActivities)
                {
                    activity.GoalGuid = null;
                }

                this.SetOfGoals.Remove(goal);
            }
        }