protected void DDL_autor_SelectedIndexChanged(object sender, EventArgs e) { //obtenemos el id del autor string id = DDL_autor.SelectedValue.ToString(); //consultamos todos los datos del autor L_Consultar_autor datos = new L_Consultar_autor(); DataTable informacion = datos.consultar_autor_datos(id); //llenamos los componentes con los datos Image1_autor.ImageUrl = informacion.Rows[0]["foto"].ToString(); L_nombre_autor.Text = informacion.Rows[0]["nombre_autor"].ToString(); L_pais_autor.Text = informacion.Rows[0]["pais"].ToString(); L_birth_autor.Text = informacion.Rows[0]["fecha_nacimiento"].ToString(); L_death_autor.Text = informacion.Rows[0]["fecha_muerte"].ToString(); TB_descripcion_autor.Text = informacion.Rows[0]["descripcion_autor"].ToString(); //mostramos los componentes Image1_autor.Visible = true; L_nombre_autor.Visible = true; L_pais_autor.Visible = true; Label5.Visible = true; L_birth_autor.Visible = true; Label2.Visible = true; L_death_autor.Visible = true; Label3.Visible = true; TB_descripcion_autor.Visible = true; Label4.Visible = true; //llenamos el gridview llenar_grilla(id); }//DDL
protected void Page_Load(object sender, EventArgs e) { Response.Cache.SetNoStore(); L_Consultar_autor oper = new L_Consultar_autor(); Int64 idioma; //preguntamos si la session idioma viene vacio if (Session["idioma"] == null) { //idioma por defecto idioma = Int64.Parse("1"); datos_idioma = oper.idioma(idioma, 17); llenar_componentes(datos_idioma); } else if (Session["idioma"] != null) { //idioma seleccionado idioma = Int64.Parse(Session["idioma"].ToString()); datos_idioma = oper.idioma(idioma, 17); llenar_componentes(datos_idioma); } //ocultamos los componentes Image1_autor.Visible = false; L_nombre_autor.Visible = false; L_pais_autor.Visible = false; Label5.Visible = false; L_birth_autor.Visible = false; Label2.Visible = false; L_death_autor.Visible = false; Label3.Visible = false; TB_descripcion_autor.Visible = false; Label4.Visible = false; }//page_load
}//DDL protected void llenar_grilla(string id) { //obtenemos los archivos asociados al autor L_Consultar_autor archivos_autor = new L_Consultar_autor(); DataTable datos = archivos_autor.consultar_autor_archivos(id); GV_archivo_autor.DataSource = datos; GV_archivo_autor.DataBind(); }//llenar_grilla