예제 #1
0
 private void OnRemoveCommand()
 {
     BackupCashVoucher();
     ((CashVoucher <ICashVoucherItem>)ResultCashVoucher.SourceCollection).Remove(SelectedVoucherItem);
     SelectedVoucherItem = _selectedPreviewVoucherItem;
     CalculateTotal();
     ResultCashVoucher.Refresh();
 }
예제 #2
0
        private void OnAcceptCommand()
        {
            BackupCashVoucher();

            // ReSharper disable PossibleInvalidOperationException
            SelectedVoucherItem.Count = NewCount.Value;
            // ReSharper restore PossibleInvalidOperationException

            CalculateTotal();
            ResultCashVoucher.Refresh();
        }
예제 #3
0
        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();
        }