Ejemplo n.º 1
0
        public void imprimir()
        {
            DataTable midatatable = new DataTable();
            REPORT_TICKET_PROFORMA miticket;

            try
            {
                switch (NegocioConfigEmpresa.formatoimpproforma)
                {
                case "TICKET80":
                {
                    midatatable         = NegocioVenta.Reporteventa(idventa);
                    miticket            = new Reportes.REPORT_TICKET_PROFORMA();
                    miticket.DataSource = midatatable;

                    miticket.table1.DataSource = midatatable;
                    reportViewer1.Report       = miticket;

                    reportViewer1.RefreshReport();
                    break;
                }

                case "A4":
                {
                    break;
                }

                case "TICKET56":
                {
                    break;
                }

                default:
                    break;
                }



                // reportViewer1.PrintReport();

                // miticket
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 2
0
        public void imprimir()
        {
            DataTable        midatatable = new DataTable();
            REPORT_TICKET    miticket;
            REPORT_TICKETX58 miticket1;
            REPORT_VENTA_A4  miticket2;

            midatatable = NegocioVenta.Reporteventa(idventa);

            if (midatatable.Rows.Count != 0)
            {
                DataRow row = midatatable.Rows[0];
                //valorcodigobarra = UtilityFrm.calculoDigitoVerificador("012","34","5","678","90");
                valorcodigobarra = UtilityFrm.calculoDigitoVerificador(row["cuit"].ToString(), row["tipofactura"].ToString(), row["puntoventa"].ToString(), row["CAE"].ToString(), row["CAE_fechavencimiento"].ToString());
            }


            try
            {
                switch (NegocioConfigEmpresa.formatoimpfactelectronica)
                {
                case "TICKET80":
                {
                    miticket            = new Reportes.REPORT_TICKET();
                    miticket.DataSource = midatatable;

                    miticket.table1.DataSource = midatatable;
                    reportViewer1.Report       = miticket;
                    miticket.barcode1.Value    = valorcodigobarra;
                    reportViewer1.RefreshReport();
                    break;
                }

                case "TICKET56":
                {
                    miticket1                   = new REPORT_TICKETX58();
                    miticket1.DataSource        = midatatable;
                    reportViewer1.Report        = miticket1;
                    miticket1.table1.DataSource = midatatable;
                    miticket1.barcode1.Value    = valorcodigobarra;
                    reportViewer1.RefreshReport();
                    break;
                }

                case "A4":
                {
                    miticket2                   = new REPORT_VENTA_A4();
                    miticket2.DataSource        = midatatable;
                    reportViewer1.Report        = miticket2;
                    miticket2.table1.DataSource = midatatable;
                    miticket2.barcode1.Value    = valorcodigobarra;
                    reportViewer1.RefreshReport();
                    break;
                }

                default:
                    break;
                }



                // reportViewer1.PrintReport();

                // miticket
            }
            catch (Exception)
            {
                throw;
            }
        }