Ejemplo n.º 1
0
 private void ExcecuteAddRelatedGoal()
 {
     Goals.Single(x => x.Id == SelectedGoal.Id).RelatesGoals.Add(SelectedRelatedGoal.Id);
     _repo.SaveGoals(Goals);
     //SelectedRelatedGoal = new Goal();
     UpdateGoals();
     UpdateAllRelatedGoals();
     UpdateCanvas();
 }
Ejemplo n.º 2
0
 private void ExcecuteRemoveRelatedDepartment()
 {
     Goals.Single(x => x.Id == SelectedGoal.Id).RelatedDepartments.Remove(SelectedRelatedDepartment.Id);
     _repo.SaveGoals(Goals);
     UpdateGoals();
     UpdateDepartments();
     UpdateAllRelatedDepartment();
     UpdateCanvas();
 }
Ejemplo n.º 3
0
 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();
 }
Ejemplo n.º 4
0
        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();
        }
Ejemplo n.º 5
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();
        }