Exemple #1
0
    protected void grvListadoLibros_SelectedIndexChanged(object sender, EventArgs e)
    {
        DataSet ds = new DataSet();

        objEntLibro.Mfn = grvListadoLibros.DataKeys[grvListadoLibros.SelectedIndex].Value.ToString();

        ds = objNegLibro.seleccionaLibro(objEntLibro.Mfn);
        if (ds.Tables[0].Rows.Count > 0)
        {
            ObjetoATextBoxReserva(ds);
        }
    }
Exemple #2
0
    protected void grvLibro_SelectedIndexChanged(object sender, EventArgs e)
    {
        btnGrabarLibro.Enabled     = false;
        btnCancelarLibro.Enabled   = true;
        btn_ModificarLibro.Enabled = true;
        btn_BorrarLibro.Enabled    = true;
        txt_mfnLibro.Visible       = false;
        lbMfn.Visible     = false;
        txt_autor.Visible = false;
        lbAutor.Visible   = false;

        DataSet ds = new DataSet();

        objEntLibro.Mfn = grvLibro.DataKeys[grvLibro.SelectedIndex].Value.ToString();
        ds = objNegLibro.seleccionaLibro(objEntLibro.Mfn);
        if (ds.Tables[0].Rows.Count > 0)
        {
            ObjetoATextBoxLibro(ds);
            GridViewRow row = grvLibro.SelectedRow;
            txt_autor.Text = row.Cells[1].Text;
            HabilitarTexBoxProducto();
        }
    }