private void ExcecuteAddRelatedGoal() { Goals.Single(x => x.Id == SelectedGoal.Id).RelatesGoals.Add(SelectedRelatedGoal.Id); _repo.SaveGoals(Goals); //SelectedRelatedGoal = new Goal(); UpdateGoals(); UpdateAllRelatedGoals(); UpdateCanvas(); }
private void ExcecuteRemoveRelatedDepartment() { Goals.Single(x => x.Id == SelectedGoal.Id).RelatedDepartments.Remove(SelectedRelatedDepartment.Id); _repo.SaveGoals(Goals); UpdateGoals(); UpdateDepartments(); UpdateAllRelatedDepartment(); UpdateCanvas(); }
private void ExcecuteRemoveRelatedGoal() { //SelectedGoal.RelatesGoals.RemoveAll(x=> x == SelectedRemoveRelatedGoal.Id); Goals.Single(x => x.Id == SelectedGoal.Id).RelatesGoals.RemoveAll(x => x == SelectedRemoveRelatedGoal.Id); //SelectedRemoveRelatedGoal = new Goal(); _repo.SaveGoals(Goals); RelatedGoals = new List <Goal>(); UpdateGoals(); UpdateAllRelatedGoals(); UpdateCanvas(); }
private void ExcecuteDeleteGoal() { foreach (var goal in Goals) { goal.RelatesGoals.Remove(SelectedGoal.Id); } Goals.Single(x => x.Id == SelectedGoal.Id).Deleted = true; _repo.SaveGoals(Goals); UpdateGoals(); UpdateCanvas(); }
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(); }