public void CheckAllArticlesToImport() { if (!LoadSelectedCatalogItemsWorker.IsBusy) { int importCount = SelectedCatalogItems.Count(result => result.AR_IsCheckedImport && !result.Exist); bool toImport = ((SelectedCatalogItems.Count - importCount) >= importCount); Parallel.ForEach(SelectedCatalogItems.Where(a => !a.Exist), a => a.AR_IsCheckedImport = toImport); } }
public List <int> GetToImportSelectedCatalogItems() { return(SelectedCatalogItems.Where(a => a.AR_IsCheckedImport).Select(a => a.cbMarq).ToList()); }