Esempio n. 1
0
 protected void listPokemons_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (listPokemons.SelectedIndex != -1)
     {
         Hashtable ht = new Hashtable();
         ht = (Hashtable)Session["listPokemonId"];
         DALPokegotchi dALpokegotchi          = new DALPokegotchi();
         Pokegotchi    pokegotchiSeleccionado = dALpokegotchi.RecuperaPokegotchiPorId((int)ht[listPokemons.SelectedIndex]);
         Image1.ImageUrl = "https://pokeres.bastionbot.org/images/pokemon/" + pokegotchiSeleccionado.Pokemon.IdApi + ".png";
         Image1.DataBind();
     }
 }
Esempio n. 2
0
 protected string construirTextoPokemon(Pokegotchi pokegotchi)
 {
     return(pokegotchi.Pokemon.NombrePokemon.ToUpper() + " | Es de tipo  " + pokegotchi.Pokemon.Tipo.ToUpper() + " | Su estado de salud es  " + obtenerSaludString(pokegotchi.Salud) + " | Nivel de felicidad : " + pokegotchi.Felicidad);
 }