Ejemplo n.º 1
0
        private void ExcecuteDeleteGoal()
        {
            foreach (var goal in Goals)
            {
                goal.RelatesGoals.Remove(SelectedGoal.Id);
            }
            Goals.Remove(SelectedGoal);

            _repo.SaveGoals(Goals);
            Goals = _repo.GetAllGoals();
        }
Ejemplo n.º 2
0
        private void ExcecuteAddRelatedDepartment()
        {
            //Goals.Single(x => x.Id == SelectedGoal.Id).RelatesGoals.Add(SelectedRelatedGoal.Id);
            //_repo.SaveGoals(Goals);
            ////SelectedRelatedGoal = new Goal();
            //UpdateGoals();
            //UpdateAllRelatedGoals();
            //UpdateCanvas();

            Goals.Single(x => x.Id == SelectedGoal.Id).RelatedDepartments.Add(SelectedDepartment.Id);
            _repo.SaveGoals(Goals);
            UpdateGoals();
            UpdateDepartments();
            UpdateAllRelatedDepartment();
            UpdateCanvas();
        }