Exemplo n.º 1
0
        private void PrintPageEventHandler(object sender, PrintPageEventArgs e)
        {
            string InformacionDelError = string.Empty;

            ClsImpresionTickets.PlatosRecienCocinados(ref e, ref InformacionDelError, ID_PedidoImprimir);

            if (InformacionDelError != string.Empty)
            {
                MessageBox.Show(InformacionDelError, "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
        private void PrintPageEventHandler(object sender, PrintPageEventArgs e)
        {
            string InformacionDelError = string.Empty;

            ClsImpresionTickets.TicketDePrueba(ref e, ref InformacionDelError);

            if (InformacionDelError != string.Empty)
            {
                MessageBox.Show(InformacionDelError, "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                FrmPrincipal.ObtenerInstancia().MensajeAdvertencia("Ocurrio un error al intentar impimir el ticket");
            }
        }
Exemplo n.º 3
0
        private void PrintPageEventHandler(object sender, PrintPageEventArgs e)
        {
            string InformacionDelError = string.Empty;

            string[,] DatosPedido = new string[dgvArticulosPedido.Rows.Count, 3];

            int TotalDeFilas = dgvArticulosPedido.Rows.Count;

            for (int Indice = 0; Indice < TotalDeFilas; Indice++)
            {
                DatosPedido[Indice, 0] = Convert.ToString(dgvArticulosPedido.Rows[Indice].Cells[(int)ENumColDGVResumenPedido.Articulo].Value);
                DatosPedido[Indice, 1] = Convert.ToString(dgvArticulosPedido.Rows[Indice].Cells[(int)ENumColDGVResumenPedido.Cantidad].Value);
                DatosPedido[Indice, 2] = Convert.ToString($"${Math.Round(Convert.ToDouble(dgvArticulosPedido.Rows[Indice].Cells[(int)ENumColDGVResumenPedido.Subtotal].Value), 2)}");
            }

            ClsImpresionTickets.TicketResumenPedido(ref e, ID_Pedido, EsDelivery, DatosPedido, rbnDescuento.Checked, rbnAumento.Checked, lblMostratTotal.Text, lblMostrarTotalAumento.Text, lblMostrarTotalDescuento.Text, Convert.ToString(nudPorcentaje.Value), ref InformacionDelError);

            if (InformacionDelError != string.Empty)
            {
                MessageBox.Show(InformacionDelError, "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }