Ejemplo n.º 1
0
        private void BtnPrintClick(object sender, EventArgs e)
        {
            if (_depositList == null)
            {
                return;
            }

            if (_depositList.Count == 0)
            {
                return;
            }

            if (dgvDeposit.CurrentRow == null)
            {
                return;
            }

            _deposit = _depositList[dgvDeposit.CurrentRow.Index];
            if (_deposit == null)
            {
                return;
            }

            _depositItemList = _depositService.GetDepositItems(_deposit.DepositId);
            var saleItemList = _saleOrderService.GetSaleItems(_depositItemList);

            var printInvoice = new PrintInvoice();

            printInvoice.ExcelInvoicePrintingHandler(
                AppContext.Counter.ReceiptPrinter,
                Application.StartupPath + @"\" + Resources.ConstDepositExcelFile,
                string.Empty,
                _deposit.FkCustomer.CustomerName,
                _deposit.FkCustomer.CustomerName,
                _deposit.DepositNumber,
                (DateTime)_deposit.DepositDate,
                _deposit.Discount,
                _deposit.AmountPaidInt,
                0,
                saleItemList,
                true);
        }