예제 #1
0
 public void Imprimir(Ticket ticket)
 {
     var report = new LocalReport { ReportPath = @"..\..\Ticket.rdlc" };
     report.DataSources.Add(new ReportDataSource("Ticket", new List<Ticket> { ticket }));
     Export(report);
     Print();
 }
예제 #2
0
        public void Printing(Ticket ticket)
        {
            try
            {
                _ticketToPrint = ticket;
                var pd = new PrintDocument();
                var paper = new PaperSize("Custom", 300, 394);
                pd.DefaultPageSettings.PaperSize = paper;
                pd.DefaultPageSettings.Margins = new Margins(10, 10, 10, 10);
                pd.PrintPage += pd_PrintPage;
                // Print the document.
                pd.Print();

            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
예제 #3
0
 public void Imprimir(Ticket ticket)
 {
     Printing(ticket);
 }