public static void PrintToPdf(
            PdfDocument document,
            ESolutions.Web.UI.Page parentPage,
            Invoice invoice,
            DocumentTypes documentType,
            Boolean isCopy)
        {
            String url = PageUrlAttribute.GetAbsolute <Invoices.Print>(parentPage, new Invoices.Print.Query()
            {
                Invoice      = invoice,
                DocumentType = documentType,
                IsCopy       = isCopy
            });

            HtmlToPdf.Options.PageSize   = EO.Pdf.PdfPageSizes.A4;
            HtmlToPdf.Options.OutputArea = new RectangleF(0.0f, 0.0f, HtmlToPdf.Options.PageSize.Width, HtmlToPdf.Options.PageSize.Height);
            HtmlToPdf.Options.UserName   = ShopperConfiguration.Default.Printing.User;
            HtmlToPdf.Options.Password   = ShopperConfiguration.Default.Printing.Password;
            HtmlToPdf.ConvertUrl(url, document);

            FileInfo invoicePdfFile = invoice.CreateArchiveFileFullname();

#if !DEBUG
            if (!invoicePdfFile.Exists && documentType == DocumentTypes.Invoice)
            {
                invoice.Printed = true;
                MyDataContext.Default.SaveChanges();
                Print.WriteToDisk(document, invoicePdfFile);
            }
#endif
        }
        public static void PrintPickingList(IEnumerable <Mailing> selectedMailings, ESolutions.Web.UI.Page page)
        {
            PdfDocument result = new PdfDocument();

            Mailings.PickingPrint.PrintToPdf(result, page, selectedMailings);
            page.Response.SendPdfFile("Kommissionierungsbeleg", result);
        }
 private static void MailingViaDpd(IEnumerable <Mailing> selectedMailings, ESolutions.Web.UI.Page page)
 {
     foreach (var runner in selectedMailings)
     {
         runner.ShippingMethod = ShippingMethods.DPD;
     }
     MyDataContext.Default.SaveChanges();
 }
 private static void MarkAsSent(IEnumerable <Mailing> selectedMailings, ESolutions.Web.UI.Page page)
 {
     foreach (var runner in selectedMailings)
     {
         runner.DateOfShipping = DateTime.Now;
     }
     MyDataContext.Default.SaveChanges();
 }
Пример #5
0
 //Methods
 #region MarkForSync
 public static void MarkForSync(IEnumerable <Article> selectedArticles, ESolutions.Web.UI.Page page)
 {
     foreach (var runner in selectedArticles)
     {
         runner.MustSyncStockAmount = true;
     }
     MyDataContext.Default.SaveChanges();
 }
Пример #6
0
        public static void PrintToPdf(PdfDocument document, ESolutions.Web.UI.Page parentPage)
        {
            String url = PageUrlAttribute.GetAbsolute <Articles.PrintInventory>(parentPage);

            HtmlToPdf.Options.PageSize   = EO.Pdf.PdfPageSizes.A4;
            HtmlToPdf.Options.OutputArea = new RectangleF(0.4f, 0.2f, HtmlToPdf.Options.PageSize.Width - 0.8f, HtmlToPdf.Options.PageSize.Height - 0.4f);
            HtmlToPdf.Options.UserName   = ShopperConfiguration.Default.Printing.User;
            HtmlToPdf.Options.Password   = ShopperConfiguration.Default.Printing.Password;
            HtmlToPdf.ConvertUrl(url, document);
        }
Пример #7
0
        //Methods
        #region Print
        public static void Print(IEnumerable <Invoice> selectedMailings, ESolutions.Web.UI.Page page)
        {
            PdfDocument result = new PdfDocument();

            foreach (var runner in selectedMailings)
            {
                InvoiceTableActions.Print(result, page, runner, Invoices.Print.DocumentTypes.Invoice);
            }

            page.Response.SendPdfFile("Invoices", result);
        }
Пример #8
0
        private static void Print(IEnumerable <Sale> selectedMailings, ESolutions.Web.UI.Page page)
        {
            PdfDocument result = new PdfDocument();

            foreach (var runner in selectedMailings)
            {
                Sales.Print.PrintToPdf(result, page, runner);
            }

            page.Response.SendPdfFile(StringTable.Assignments, result);
        }
Пример #9
0
        public static void Print(
            PdfDocument document,
            ESolutions.Web.UI.Page page,
            Invoice invoice,
            Print.DocumentTypes printType)
        {
            Invoices.Print.PrintToPdf(document, page, invoice, printType, false);

            if (invoice.HideNetPrices)
            {
                Invoices.Print.PrintToPdf(document, page, invoice, printType, true);
            }
        }
Пример #10
0
        public static void PrintToPdf(PdfDocument document, ESolutions.Web.UI.Page parentPage, IEnumerable <Mailing> selectedMailings)
        {
            String url = PageUrlAttribute.GetAbsolute <Mailings.PickingPrint>(parentPage, new Mailings.PickingPrint.Query()
            {
                MailingIds = selectedMailings.Select(runner => runner.Id).ToList()
            });

            HtmlToPdf.Options.PageSize   = EO.Pdf.PdfPageSizes.A4;
            HtmlToPdf.Options.OutputArea = new RectangleF(0.25f, 0.25f, HtmlToPdf.Options.PageSize.Width - 0.5f, HtmlToPdf.Options.PageSize.Height - 0.5f);

            HtmlToPdf.Options.UserName = ShopperConfiguration.Default.Printing.User;
            HtmlToPdf.Options.Password = ShopperConfiguration.Default.Printing.Password;
            HtmlToPdf.ConvertUrl(url, document);
        }
Пример #11
0
        public static void PrintToPdf(
            PdfDocument document,
            ESolutions.Web.UI.Page parentPage,
            Sale sale)
        {
            String url = PageUrlAttribute.GetAbsolute <Sales.Print>(parentPage, new Sales.Print.Query()
            {
                Sale = sale,
            });

            HtmlToPdf.Options.PageSize   = EO.Pdf.PdfPageSizes.A4;
            HtmlToPdf.Options.OutputArea = new RectangleF(0.0f, 0.0f, HtmlToPdf.Options.PageSize.Width, HtmlToPdf.Options.PageSize.Height);
            HtmlToPdf.Options.UserName   = ShopperConfiguration.Default.Printing.User;
            HtmlToPdf.Options.Password   = ShopperConfiguration.Default.Printing.Password;
            HtmlToPdf.ConvertUrl(url, document);
        }
        public static void PrintToPdf(
            PdfDocument document,
            ESolutions.Web.UI.Page parentPage,
            Mailing mailing)
        {
            String url = PageUrlAttribute.GetAbsolute <Mailings.Print>(parentPage, new Mailings.Print.Query()
            {
                Mailing = mailing
            });

            HtmlToPdf.Options.PageSize   = new SizeF(5.51f, 3.54f);
            HtmlToPdf.Options.OutputArea = new RectangleF(0f, 0f, 5.51f, 3.54f);
            HtmlToPdf.Options.UserName   = ShopperConfiguration.Default.Printing.User;
            HtmlToPdf.Options.Password   = ShopperConfiguration.Default.Printing.Password;
            HtmlToPdf.ConvertUrl(url, document);
        }
        private static void PrintMailingLabel(IEnumerable <Mailing> selectedMailings, ESolutions.Web.UI.Page page)
        {
            PdfDocument result = new PdfDocument();

            foreach (var runner in selectedMailings)
            {
                Mailings.Print.PrintToPdf(result, page, runner);
            }
            page.Response.SendPdfFile("Versandetikett", result);
        }