Пример #1
0
        public void PdfInitTest()
        {
           var consignment = this.fixture.Create<ConsignmentBusinessModel>();
            var item = this.fixture.Create<BookBusinessModel>();
            var pdfGenerator = new PdfGenerator();
            pdfGenerator.PdfInit(item, consignment);
            Assert.IsTrue(true);

        }
Пример #2
0
 public void PdfInitFinishTest()
 {
     var consignment = this.fixture.Create<ConsignmentBusinessModel>();
     var item = this.fixture.Create<BookBusinessModel>();
     var pdfGenerator = new PdfGenerator();
     pdfGenerator.PdfInit(item, consignment);
     var result = pdfGenerator.PdfFinish();
     Assert.IsNotNull(result);
 }
Пример #3
0
        public MemoryStream GetPdfByInventoryNumber(string number)
        {
            var inventory = this.inventoryFacade.GetInventoryByNumber(number);
            if (inventory == null)
            {
                return null;
            }

            var pdfGenerator = new PdfGenerator();
            pdfGenerator.PdfInit(inventory.Item, inventory.Consignment);
            pdfGenerator.BarCodeGenerate(inventory.Number);


            return pdfGenerator.PdfFinish();
        }
Пример #4
0
        public MemoryStream GetPdfByConsignmentNumber(int number)
        {
            var consignment = this.consignmentFacade.GetConsignmentByNumber(number);
            if (consignment == null)
            {
                return null;
            }

            var pdfGenerator = new PdfGenerator();
            pdfGenerator.PdfInit(consignment.Item, consignment);
            foreach (var inv in consignment.Inventories)
            {
                pdfGenerator.BarCodeGenerate(inv.Number);
            }

            return pdfGenerator.PdfFinish();
        }