protected void btnBuscar_Click(object sender, EventArgs e)
        {
            Business.ProjectionBusiness p = new Business.ProjectionBusiness();
            DataTable dt       = new DataTable();
            DataSet   ds       = new DataSet();
            string    pelicula = ddlPeliculas.SelectedValue;

            if (pelicula == "Seleccione una película")
            {
                pelicula = "";
            }
            int numeroFactura = 0;

            if (int.TryParse(txtNumeroFactura.Text, out numeroFactura))
            {
                dt = p.consultaFactura(numeroFactura, txtCorreoElectronico.Text, pelicula);
            }
            else
            {
                dt = p.consultaFactura(0, txtCorreoElectronico.Text, pelicula);
            }
            ds.Tables.Add(dt);
            resultado.DataSource = ds;
            resultado.DataBind();
            resultado.Visible = true;
        }
Exemplo n.º 2
0
        protected void btnBuscar_Click(object sender, EventArgs e)
        {
            Business.ProjectionBusiness p = new Business.ProjectionBusiness();
            DataTable dt = new DataTable();
            DataSet   ds = new DataSet();

            dt = p.consultaFactura(0, "", "");
            ds.Tables.Add(dt);
            resultado.DataSource = ds;
            resultado.DataBind();
            resultado.Visible = true;
        }