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); }
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); }