Exemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            TicketVenta rpt = new TicketVenta();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemplo n.º 2
0
        private void btnVender_Click(object sender, EventArgs e)
        {
            List <Producto> listaProductos;

            if (this.listaProductosVenta.Count > 0)
            {
                string resp = clsVenta.vender(this.listaProductosVenta, this.idSucursal, int.Parse(clsConexion.IdEmpleado), out listaProductos);
                if (resp != "")
                {
                    MessageBox.Show(resp, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else
                {
                    TicketVenta ticket = new TicketVenta();
                    ticket.SetDataSource(listaProductos);
                    ticket.SetParameterValue("Pago", nudPago.Value);
                    ticket.SetParameterValue("IdSucursal", this.idSucursal.ToString());
                    ticket.SetParameterValue("NumeroVenta", this.nroVenta.ToString());
                    ticket.SetParameterValue("NombreSucursal", clsConexion.NombreSucursal);
                    ticket.SetParameterValue("CUIT", clsConexion.CUIT);
                    frmTicketVenta frmTicket = new frmTicketVenta(ticket);
                    frmTicket.ShowDialog();
                    limpiar();
                }
            }
            else
            {
                MessageBox.Show("No sea han seleccionado productos para vender", "Error", MessageBoxButtons.OK);
            }
        }