private void CheckBoxIsSelected(object IsChecked) { if (SelectedItem == null) { return; } if (CellInfo.Item.ToString().Contains("NewItemPlaceholder")) { return; } bool chk = (bool)IsChecked; if (chk) { CountChecked.Add(chk); } else { if (CountChecked.Where(x => x == true).Count() > 0) { CountChecked.Remove(true); } } _PrintLblCommand.RaiseCanExecuteChanged(); RaisePropertyChanged("CollectionView"); }
private bool CanDeletePrint(object ignored) { if (ImportBtn != null) { return(false); } return((CountChecked == null && CountChecked.Count.Equals(0)) ? false : (CountChecked.Where(x => x == true).Count() > 0)); }
private bool CanPrint() { if (IsImportBtnEnabled != null) { return(false); } return((CountChecked == null && CountChecked.Count.Equals(0)) ? false : (CountChecked.Where(x => x == true).Count() > 0)); }
private bool CanPrint(object ignored) { if (SelectedItem != null && SelectedItem.Qty > MaximumValue) { return(false); } if (SelectedItem != null && !string.IsNullOrEmpty(SelectedItem.Error)) { return(false); } if (EunKGs != null && EunKGs.Any(w => w.IsChecked == true && w.ID == 0)) { return(false); } return((CountChecked == null && CountChecked.Count.Equals(0)) ? false : (CountChecked.Where(x => x == true).Count() > 0)); }
private void CheckBoxIsSelected(object IsChecked) { bool chk = (bool)IsChecked; if (chk) { CountChecked.Add(chk); } else { if (CountChecked.Where(x => x == true).Count() > 0) { CountChecked.Remove(true); } } RaisePropertyChanged("GoodReceives"); _PrintLblCommand.RaiseCanExecuteChanged(); _DeleteFGCommand.RaiseCanExecuteChanged(); }
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; }