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 SupplierAPIHelper(); ToggleOperationCommand = new RelayCommand(OpenCloseOperations); new Action(async() => await GetSuppliers())(); SaveCommand = new RelayCommand(async delegate { await Task.Run(() => CreateSupplier()); }, () => CanSaveSupplier); DeleteCommand = new RelayCommand(async delegate { await Task.Run(() => DeleteSupplier()); }, () => CanDeleteSupplier); }
void SetValues() { apiHelper = new SupplierAPIHelper(); projectSuppliersAPIHelper = new ProjectSuppliersAPIHelper(); ToggleOperationCommand = new RelayCommand(OpenCloseOperations); new Action(async() => await GetSuppliers())(); SaveCommand = new RelayCommand(async delegate { await Task.Run(() => CreateSupplier()); }, () => CanSaveSupplier); DeleteCommand = new RelayCommand(async delegate { await Task.Run(() => DeleteSupplier()); }, () => CanDeleteSupplier); BillPopupCommand = new RelayCommand(ShowPopup); ParentLayout.PropertyChanged += ParentLayout_PropertyChanged; }