Пример #1
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     //insertar
     Jugador jugador = new Jugador();
     jugador.nombre= txtnombre.Text;
     jugador.apellido = txtapellido.Text;
     jugador.idseleccion = DropDownList2.SelectedIndex;
     jugador.edad = Convert.ToInt32(txted.Text);
     ctx.Jugador.AddObject(jugador);
     ctx.SaveChanges();
     Label2.Text = "Cargado correctamente";
 }
Пример #2
0
 /// <summary>
 /// Crear un nuevo objeto Jugador.
 /// </summary>
 /// <param name="id">Valor inicial de la propiedad id.</param>
 /// <param name="idseleccion">Valor inicial de la propiedad idseleccion.</param>
 public static Jugador CreateJugador(global::System.Int32 id, global::System.Int32 idseleccion)
 {
     Jugador jugador = new Jugador();
     jugador.id = id;
     jugador.idseleccion = idseleccion;
     return jugador;
 }
Пример #3
0
 /// <summary>
 /// Método desusado para agregar un nuevo objeto al EntitySet Jugador. Considere la posibilidad de usar el método .Add de la propiedad ObjectSet&lt;T&gt; asociada.
 /// </summary>
 public void AddToJugador(Jugador jugador)
 {
     base.AddObject("Jugador", jugador);
 }
Пример #4
0
 /// <summary>
 /// Método desusado para agregar un nuevo objeto al EntitySet Jugador. Considere la posibilidad de usar el método .Add de la propiedad ObjectSet&lt;T&gt; asociada.
 /// </summary>
 public void AddToJugador(Jugador jugador)
 {
     base.AddObject("Jugador", jugador);
 }