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);
        }
示例#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);
        }