/// <summary> /// Manda a imprimir el boleto /// </summary> private void DoPrint() { // Obtenemos los datos del boleto this.Boleto = Entities.BoletoVenta.Get(Servicio.Servicio_ID); // Inicializamos los documentos PrintDoc = new PrintDocument(); PrintDoc2 = new PrintDocument(); PrintDoc3 = new PrintDocument(); // Connfiguramos la impresión PrintDoc.PrintPage += this.DibujaDocumento; PrintDoc2.PrintPage += this.DibujaDocumento2; PrintDoc3.PrintPage += this.DibujaDocumento3; // Mandamos la impresión VistaPrevia(); }
private void DoPrint() { string servicio_id = dgv.SelectedRows[0].Cells[0].Value.ToString(); Entities.Servicios s = Entities.Servicios.Read(servicio_id); // Obtenemos los datos del boleto Boleto = Entities.BoletoVenta.Get(s.Servicio_ID); // Inicializamos los documentos PrintDoc = new PrintDocument(); PrintDoc2 = new PrintDocument(); PrintDoc3 = new PrintDocument(); // Connfiguramos la impresión PrintDoc.PrintPage += this.DibujaDocumento; PrintDoc2.PrintPage += this.DibujaDocumento2; PrintDoc3.PrintPage += this.DibujaDocumento3; // Mandamos la impresión VistaPrevia(); }