private void ExcecuteDeleteGoal() { foreach (var goal in Goals) { goal.RelatesGoals.Remove(SelectedGoal.Id); } Goals.Remove(SelectedGoal); _repo.SaveGoals(Goals); Goals = _repo.GetAllGoals(); }
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(); }