private void OnRemoveCommand() { BackupCashVoucher(); ((CashVoucher <ICashVoucherItem>)ResultCashVoucher.SourceCollection).Remove(SelectedVoucherItem); SelectedVoucherItem = _selectedPreviewVoucherItem; CalculateTotal(); ResultCashVoucher.Refresh(); }
private void OnAcceptCommand() { BackupCashVoucher(); // ReSharper disable PossibleInvalidOperationException SelectedVoucherItem.Count = NewCount.Value; // ReSharper restore PossibleInvalidOperationException CalculateTotal(); ResultCashVoucher.Refresh(); }
private void UpdateResultCashVoucher(IEnumerable cashVoucher) { var view = CollectionViewSource.GetDefaultView(cashVoucher); if (view == null) { return; } view.Filter = null; ResultCashVoucher = view; if (ResultCashVoucher.SortDescriptions.IsEmpty()) { ResultCashVoucher.SortDescriptions.Add(new SortDescription("Order", ListSortDirection.Descending)); } ResultCashVoucher.Refresh(); }