public NewEmployeeViewModel() { _repository = new EmployeeRepository(); Employee = new Employee(); MainProperties = new EmployeeMainPropertiesViewModel(Employee); 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); }
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); }