subo cambiosvineconsefe1
This commit is contained in:
Generated
+2
-2
@@ -98,9 +98,9 @@
|
||||
this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.pictureBox1.Image = global::compabetov2.Properties.Resources.cancel1;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(746, 101);
|
||||
this.pictureBox1.Location = new System.Drawing.Point(3, 2);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(100, 69);
|
||||
this.pictureBox1.Size = new System.Drawing.Size(112, 77);
|
||||
this.pictureBox1.TabIndex = 23;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
|
||||
+11
-3
@@ -98,7 +98,7 @@ namespace compabetov2.Ventas
|
||||
}
|
||||
|
||||
|
||||
private void ImprimirContenidoEnvio(PrintPageEventArgs e)
|
||||
private void ImprimirContenidoEnvio(PrintPageEventArgs e, int paginasImpresas)
|
||||
{
|
||||
|
||||
string responsable = envio.responsable;
|
||||
@@ -163,11 +163,19 @@ namespace compabetov2.Ventas
|
||||
return direccion; // Devuelve la dirección sin cambios si no es necesario ajustarla
|
||||
}
|
||||
|
||||
public void ImprimirTicketEnvio()
|
||||
private void ImprimirTicketEnvio()
|
||||
{
|
||||
using (PrintDocument documentoImpresion = new PrintDocument())
|
||||
{
|
||||
documentoImpresion.PrintPage += (sender, e) => ImprimirContenidoEnvio(e);
|
||||
int paginasImpresas = 0;
|
||||
|
||||
documentoImpresion.PrintPage += (sender, e) =>
|
||||
{
|
||||
ImprimirContenidoEnvio(e, paginasImpresas);
|
||||
paginasImpresas++;
|
||||
e.HasMorePages = paginasImpresas < 2; // Indica que hay más páginas por imprimir
|
||||
};
|
||||
|
||||
using (PrintDialog printDialog = new PrintDialog())
|
||||
{
|
||||
printDialog.Document = documentoImpresion;
|
||||
|
||||
+2
-2
@@ -661,8 +661,8 @@ namespace compabetov2
|
||||
// Incrementa el número de página
|
||||
numeroPagina++;
|
||||
|
||||
// Imprime solo dos páginas
|
||||
if (numeroPagina <= 2)
|
||||
// Imprime solo 1 página
|
||||
if (numeroPagina <= 1)
|
||||
{
|
||||
e.HasMorePages = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user