protected void Page_Load(object sender, EventArgs e) { PokemonNegocio negocio = new PokemonNegocio(); dgvPOKEMONS.DataSource = negocio.listar(); dgvPOKEMONS.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { //txtNombre.Text = "Jeronimoooo"; PokemonNegocio negocio = new PokemonNegocio(); dgvPokemones.DataSource = negocio.listar(); dgvPokemones.DataBind(); }
private void cargar() { PokemonNegocio negocio = new PokemonNegocio(); listaOriginal = negocio.listar(); dgvLista.DataSource = listaOriginal; dgvLista.Columns[0].Visible = false; dgvLista.Columns[3].Visible = false; }
protected void Page_Load(object sender, EventArgs e) { PokemonNegocio negocio = new PokemonNegocio(); try { listaPokemon = negocio.listar(); Session.Add("listado", listaPokemon); } catch (Exception ex) { Session.Add("errorEncontrado", ex.ToString()); Response.Redirect("Error.aspx"); } }
private void cargarGrilla() { try { PokemonNegocio negocio = new PokemonNegocio(); dgvPokemons.DataSource = negocio.listar(); dgvPokemons.Columns[0].Visible = false; dgvPokemons.Columns[3].Visible = false; dgvPokemons.Columns[4].Visible = false; } catch (NoMeGustaException ex) { MessageBox.Show(ex.Message); } }
protected void Page_Load(object sender, EventArgs e) { PokemonNegocio negocio = new PokemonNegocio(); List <Pokemon> listaPokemon; try { listaPokemon = negocio.listar(); // // int numeroPokemon = Convert.ToInt32(Session["NumeroPokemon" + Session.SessionID]); var pokeSeleccionado = Convert.ToInt32(Request.QueryString["idpkm"]); pokemon = listaPokemon.Find(J => J.Id == pokeSeleccionado); } catch (Exception ex) { Session["Error" + Session.SessionID] = ex; Response.Redirect("Error.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { PokemonNegocio negocio = new PokemonNegocio(); try { if (!IsPostBack) { ddlPokemon.DataSource = negocio.listar(); ddlPokemon.DataTextField = "Nombre"; ddlPokemon.DataValueField = "Id"; ddlPokemon.DataBind(); } } catch (Exception) { throw; } }