Exemplo n.º 1
0
    // Permite filtrar la información de soportes bancario dependiendo de los filtros que se ingresan
    protected void btnBuscar_Click(object sender, EventArgs e)
    {
        string   banco    = "";
        string   cuenta   = "";
        DateTime fecha    = Convert.ToDateTime("01/01/1900");
        string   recibido = "";
        string   estado   = "";

        if (txtBuscarBanco.Text != "")
        {
            banco = txtBuscarBanco.Text;
        }

        if (txtBuscarCuenta.Text != "")
        {
            cuenta = txtBuscarCuenta.Text;
        }

        if (txtBuscarFecha.Text != "")
        {
            fecha = DateTime.Parse(txtBuscarFecha.Text);
        }

        if (txtBuscarRecibido.Text != "")
        {
            recibido = txtBuscarRecibido.Text;
        }

        if (txtBuscarEstado.Text != "")
        {
            estado = txtBuscarEstado.Text;
        }

        DataTable dt = AdministrarSoportesBancarios.BuscarEncabezadoSoporteBancario(banco, cuenta, fecha, recibido, estado);

        grvListSop.DataSource = dt;
        grvListSop.DataBind();
    }