void SetValues() { apiHelper = new ProjectAPIHelper(); teamAPIHelper = new TeamAPIHelper(); statusAPIHelper = new ProjectStatusAPIHelper(); typeAPIHelper = new ProjectTypeAPIHelper(); contractorAPIHelper = new ContractorAPIHelper(); supplierAPIHelper = new SupplierAPIHelper(); projectContractorsAPIHelper = new ProjectContractorsAPIHelper(); projectSuppliersAPIHelper = new ProjectSuppliersAPIHelper(); firmAPIHelper = new FirmAPIHelper(); ToggleOperationCommand = new RelayCommand(OpenCloseOperations); new Action(async() => await GetProjects())(); new Action(async() => await GetTypes())(); new Action(async() => await GetStatuses())(); new Action(async() => await GetTeams())(); new Action(async() => await GetFirms())(); new Action(async() => await GetContractors())(); new Action(async() => await GetSuppliers())(); SaveCommand = new RelayCommand(async delegate { await Task.Run(() => CreateProject()); }, () => CanSaveProject); DeleteCommand = new RelayCommand(async delegate { await Task.Run(() => DeleteProject()); }, () => CanDeleteProject); CheckContractorCommand = new RelayCommand(SetContractorsCheckedText); CheckSupplierCommand = new RelayCommand(SetSuppliersCheckedText); }
void SetValues() { apiHelper = new TeamAPIHelper(); linkageApiHelper = new TeamSiteManagersAPIHelper(); ToggleOperationCommand = new RelayCommand(OpenCloseOperations); new Action(async() => await GetTeams())(); new Action(async() => await GetSiteManagers())(); SaveCommand = new RelayCommand(async delegate { await Task.Run(() => CreateTeam()); }, () => CanSaveTeam); DeleteCommand = new RelayCommand(async delegate { await Task.Run(() => DeleteTeam()); }, () => CanDeleteTeam); CheckCommand = new RelayCommand(SetCheckedText); }