Esempio n. 1
0
        public List <ClasificacionDeporte> listaClasificacionDeporte()
        {
            List <ClasificacionDeporte> lista = new List <ClasificacionDeporte>();

            bd.consultarBD("select * from Deporte_Clasificacion");
            while (bd.Lector.Read())
            {
                ClasificacionDeporte tipo = new ClasificacionDeporte();
                if (!bd.Lector.IsDBNull(0))
                {
                    tipo.Id = bd.Lector.GetInt32(0);
                }
                if (!bd.Lector.IsDBNull(1))
                {
                    tipo.Nombre = bd.Lector.GetString(1);
                }
                lista.Add(tipo);
            }
            bd.Lector.Close();
            bd.desconectar();
            return(lista);
        }
Esempio n. 2
0
 public Deporte()
 {
     id            = 0;
     nombre        = "";
     clasificacion = new ClasificacionDeporte();
 }
Esempio n. 3
0
 public Deporte(int id, string nombre, ClasificacionDeporte clasificacion)
 {
     this.id            = id;
     this.nombre        = nombre;
     this.clasificacion = clasificacion;
 }