Ejemplo n.º 1
0
        public AddEmployeeViewModel(IEmployeeRepository ier, RouterViewModel router, EmployeesViewModel evm)
        {
            _repository  = ier;
            _router      = router;
            _employeesVm = evm;

            Employee = new EmployeeViewModel();

            FunctionList = _repository.GetFunctions().ToList();

            RegionList = _repository.GetRegions().ToList();

            AddEmployeeCommand = new RelayCommand(AddEmployee, CanAddEmployee);
        }
Ejemplo n.º 2
0
        public EditEmployeeViewModel(IEmployeeRepository ier, RouterViewModel router, EmployeesViewModel evm)
        {
            _repository = ier;
            _router     = router;

            SelectedEmployee = evm.SelectedEmployee;

            FunctionList = _repository.GetFunctions().ToList();

            RegionList = _repository.GetRegions().ToList();

            EditEmployeeCommand = new RelayCommand(EditEmployee, CanEdit);
        }