Пример #1
0
        private void ShowReceipt()
        {
            string error = ValidateFields();

            if (error != null)
            {
                MessageBox.Show(error);
                return;
            }
            List <LineReceiptDTO> lineInvoices = _receiptsManager.GetReceipt();
        }
        /// <summary>
        /// Get and show receipt
        /// </summary>
        private void ShowReceipt()
        {
            string error = ValidateFields();

            if (error != null)
            {
                MessageBox.Show(error);
                return;
            }
            if (_receiptsManager.GetReceipt(CustomerId, SelectedYear, SelectedMonth))
            {
                Receipts     = new ObservableCollection <LineReceiptDTO>(_receiptsManager._receipts);
                TotalPayment = Receipts.Sum(x => x.LineTotalPrice);
                CustomerName = Receipts.Last().CustomerName;
                _navigationService.NavigateTo("Receipts");
            }
        }