示例#1
0
 public EnovaService(
     ICommercialDocumentRepository commercialDocumentRepository,
     IDocumentPrinterService documentPrinterService)
 {
     _commercialDocumentRepository = commercialDocumentRepository;
     _documentPrinterService       = documentPrinterService;
 }
示例#2
0
        private IEnumerable <AttachmentData> GetAttachments(ICommercialDocumentRepository documentRepository, out Customer customer)
        {
            customer = null;
            List <AttachmentData> attachments = new List <AttachmentData>();

            foreach (var row in SelectedRows)
            {
                var document = documentRepository.Get((row as DokumentHandlowy).Guid);

                if (document != null)
                {
                    if (customer == null)
                    {
                        customer = document.Customer;
                    }

                    attachments.Add(CreateDocumentPdfAttachment(document));
                }
            }

            return(attachments);
        }