private void SetIsSelectedProperty(bool isSelected) { foreach (var kg in EunKGs) { kg.IsChecked = isSelected; } switch (isSelected) { case true: CountChecked.AddRange(Enumerable.Repeat(true, EunKGs.Count)); break; case false: CountChecked = new List <bool>(); break; } _PrintLblCommand.RaiseCanExecuteChanged(); CollectionView = new ListCollectionView(EunKGs); CollectionViewSource.GetDefaultView(CollectionView).Filter = EunKGFilter; }
private void SetIsSelectedProperty(bool isSelected) { ObservableCollection <GoodsReceive> tempObj = new ObservableCollection <GoodsReceive>(); if (tempCollection != null && tempCollection.Count() > 0) { tempObj = tempCollection; } else { tempObj = grCollection; } foreach (var gr in tempObj) { gr.IsChecked = isSelected; } switch (isSelected) { case true: CountChecked.AddRange(Enumerable.Repeat(true, tempObj.Count)); break; case false: CountChecked = new List <bool>(); break; } _PrintLblCommand.RaiseCanExecuteChanged(); _DeleteFGCommand.RaiseCanExecuteChanged(); GoodReceives = new ListCollectionView(tempObj); GoodReceives.SortDescriptions.Add(new SortDescription("PurchaseOrder", ListSortDirection.Ascending)); CollectionViewSource.GetDefaultView(GoodReceives).Filter = Filter; }
private void SetIsSelectedProperty(bool isSelected) { ObservableCollection <FCU> tempObj = new ObservableCollection <FCU>(); if (tempCollection != null && tempCollection.Count() > 0) { tempObj = tempCollection; } else { tempObj = fcuCollection; } foreach (var fcu in tempObj) { fcu.IsChecked = isSelected; } switch (isSelected) { case true: CountChecked.AddRange(Enumerable.Repeat(true, tempObj.Count)); break; case false: CountChecked = new List <bool>(); break; } PrintLblCommand.RaiseCanExecuteChanged(); DeleteFGCommand.RaiseCanExecuteChanged(); FCU = new ListCollectionView(tempObj); FCU.SortDescriptions.Add(new SortDescription("Project", ListSortDirection.Ascending)); CollectionViewSource.GetDefaultView(FCU).Filter = Filter; }