Пример #1
0
 public UserInputViewModel(IGoalRepo repo, IidService idService)
 {
     _repo             = repo;
     _idService        = idService;
     AddNewGoal        = new DelegateCommand(ExcecuteAddNewGoal, CanExcecuteAddNewGoal);
     AddRelatedGoal    = new DelegateCommand(ExcecuteAddRelatedGoal, CanExcecuteAddRelatedGoal);
     RemoveRelatedGoal = new DelegateCommand(ExcecuteRemoveRelatedGoal, CanExcecuteRemoveRelatedGoal);
     DeleteGoal        = new DelegateCommand(ExcecuteDeleteGoal, CanExcecuteDeleteGoal);
     Goals             = _repo.GetAllGoals();
 }
Пример #2
0
        public LevelOneMatrixViewModel(
            IDepartmentRepo depoRepo,
            IGoalRepo repo,
            IPersonRepo personRepo,
            ILevelMatrixService levelOneMatrixService,
            ILevelMatrixService leveltwoMatrixService,
            ILevelMatrixService levelTreeMatrixService,
            IidService idService)
        {
            SelectedmatrixLevel = "One";
            _depoRepo           = depoRepo;
            _repo                   = repo;
            _personRepo             = personRepo;
            _levelOneMatrixService  = levelOneMatrixService;
            _leveltwoMatrixService  = leveltwoMatrixService;
            _levelTreeMatrixService = levelTreeMatrixService;
            _repo.NewData          += OnNewRepoData;
            _idService              = idService;
            AddNewGoal              = new DelegateCommand(ExcecuteAddNewGoal, CanExcecuteAddNewGoal);
            AddRelatedGoal          = new DelegateCommand(ExcecuteAddRelatedGoal, CanExcecuteAddRelatedGoal);
            RemoveRelatedGoal       = new DelegateCommand(ExcecuteRemoveRelatedGoal, CanExcecuteRemoveRelatedGoal);
            DeleteGoal              = new DelegateCommand(ExcecuteDeleteGoal, CanExcecuteDeleteGoal);
            //DeletePerson = new DelegateCommand(ExcecuteDeletePerson, CanExcecuteDeletePerson);
            //AddNewPerson = new DelegateCommand(ExcecuteAddNewPerson, CanExcecuteAddNewPerson);
            //AddRelatedPerson = new DelegateCommand(ExcecuteAddRelatedPerson, CanExcecuteAddRelatedPerson);
            GetLevelOneMatrix       = new DelegateCommand(ExcecuteGetLevelOneMatrix);
            GetLevelTwoMatrix       = new DelegateCommand(ExcecuteGetLevelTwoMatrix, CanExcecuteGetLevelTwoMatrix);
            GetLevelThreeMatrix     = new DelegateCommand(ExcecuteGetLevelThreeMatrix, CanExcecuteGetLevelThreeMatrix);
            AddNewDepartment        = new DelegateCommand(ExcecuteAddNewDepartment, CanExcecuteAddNewDepartment);
            RemoveRelatedDepartment = new DelegateCommand(ExcecuteRemoveRelatedDepartment, CanExcecuteRemoveRelatedDepartment);
            AddRelatedDepartment    = new DelegateCommand(ExcecuteAddRelatedDepartment, CanExcecuteAddRelatedDepartment);
            DeleteDepartments       = new DelegateCommand(ExcecuteDeleteDepartments, CanExcecuteDeleteDepartments);
            //RemoveRelatedPerson = new DelegateCommand(ExcecuteRemoveRelatedPerson, CanExcecuteRemoveRelatedPerson);
            UpdateDepartments();
            Goals = _repo.GetAllGoals();
            UpdateGoals();

            //UpdatePeople();
            UpdateCanvas();
        }