Beispiel #1
0
        /// <summary>
        /// Prints the invoice
        /// </summary>
        /// <param name="items"></param>
        /// <returns></returns>
        public bool print(SimplePOS.Invoicing.Invoice items)
        {
            SimplePOS.Invoicing.SerializableInvoice serialinvoice = new Invoicing.SerializableInvoice(items);

            XmlInvoiceGenerator InvoiceXMLGenerator = new XmlInvoiceGenerator(serialinvoice);

            InvoiceXMLGenerator.PrintXmlInvoice();
            return(true);

            //foreach (SimplePOS.Invoicing.InvoiceItem item in items.Items)
            //{
            //    Console.WriteLine(item.Article.Name + " x" + item.Quantity);
            //}


            //PrintDialog pd = new PrintDialog();



            //if (pd.ShowDialog() == true)
            //{
            //    List<SimplePOS.Invoicing.Invoice> pages = PrintingPreprocessor.ProcessInvoices(items);
            //    foreach (SimplePOS.Invoicing.Invoice item in pages)
            //    {
            //        A4 page = new A4(item);
            //        page.Measure(new System.Windows.Size(pd.PrintableAreaWidth, pd.PrintableAreaHeight));
            //        page.Arrange(new System.Windows.Rect(new System.Windows.Point(0, 0), page.DesiredSize));
            //        pd.PrintVisual(page.getGrid(), item.PageNumber);

            //        if (PreferenceManager.DOUBLEPRINT)
            //        {
            //           pd.PrintVisual(page.getGrid(), item.PageNumber);
            //        }
            //    }

            //return true;
            //}
            //return false;
        }
Beispiel #2
0
        /// <summary>
        /// Prints the invoice
        /// </summary>
        /// <param name="items"></param>
        /// <returns></returns>
        public bool print(SimplePOS.Invoicing.Invoice items)
        {

            SimplePOS.Invoicing.SerializableInvoice serialinvoice = new Invoicing.SerializableInvoice(items);

            XmlInvoiceGenerator InvoiceXMLGenerator = new XmlInvoiceGenerator(serialinvoice);
            InvoiceXMLGenerator.PrintXmlInvoice();
            return true;

            //foreach (SimplePOS.Invoicing.InvoiceItem item in items.Items)
            //{
            //    Console.WriteLine(item.Article.Name + " x" + item.Quantity);
            //}


            //PrintDialog pd = new PrintDialog();

            

            //if (pd.ShowDialog() == true)
            //{
            //    List<SimplePOS.Invoicing.Invoice> pages = PrintingPreprocessor.ProcessInvoices(items);
            //    foreach (SimplePOS.Invoicing.Invoice item in pages)
            //    {
            //        A4 page = new A4(item);
            //        page.Measure(new System.Windows.Size(pd.PrintableAreaWidth, pd.PrintableAreaHeight));
            //        page.Arrange(new System.Windows.Rect(new System.Windows.Point(0, 0), page.DesiredSize));
            //        pd.PrintVisual(page.getGrid(), item.PageNumber);

            //        if (PreferenceManager.DOUBLEPRINT)
            //        {
            //           pd.PrintVisual(page.getGrid(), item.PageNumber);
            //        }
            //    }

            //return true;
            //}
            //return false;
        }