public NewProjectViewModel() { _repository = new ProjectRepository(); Project = new Project(); MainProperties = new ProjectMainPropertiesViewModel(Project); OkCommand = new Command(() => MainProperties.IsValid(), Save); CancelCommand = new Command(() => DialogResult = false); }
public ExistingProjectViewModel(Project project) { _repository = new ProjectRepository(); Project = project; var mainProperties = new ProjectMainPropertiesViewModel(project); Tabs = new List<ViewModel> { mainProperties, new ProjectEmployeeListViewModel(project) }; OkCommand = new Command(() => mainProperties.IsValid(), Save); CancelCommand = new Command(() => DialogResult = false); }
public ExistingProjectViewModel(Project project) { _repository = new ProjectRepository(); Project = project; var mainProperties = new ProjectMainPropertiesViewModel(project); Tabs = new List <ViewModel> { mainProperties, new ProjectEmployeeListViewModel(project) }; OkCommand = new Command(() => mainProperties.IsValid(), Save); CancelCommand = new Command(() => DialogResult = false); }