public ExistingEmployeeViewModel(Employee employee)
        {
            _repository = new EmployeeRepository();
            Employee = employee;

            var mainProperties = new EmployeeMainPropertiesViewModel(employee);
            var projects = new EmployeeProjectListViewModel(employee);
            Tabs = new List<ViewModel>
            {
                mainProperties,
                projects
            };

            OkCommand = new Command(() => mainProperties.IsValid(), Save);
            CancelCommand = new Command(() => DialogResult = false);
        }
Exemplo n.º 2
0
        public ExistingEmployeeViewModel(Employee employee)
        {
            _repository = new EmployeeRepository();
            Employee    = employee;

            var mainProperties = new EmployeeMainPropertiesViewModel(employee);
            var projects       = new EmployeeProjectListViewModel(employee);

            Tabs = new List <ViewModel>
            {
                mainProperties,
                projects
            };

            OkCommand     = new Command(() => mainProperties.IsValid(), Save);
            CancelCommand = new Command(() => DialogResult = false);
        }