Esempio n. 1
0
 public Obra()
 {
     estilo         = new Estilo();
     tipoObra       = new TipoObra();
     artista        = new Artista();
     fechaCreacion  = DateTime.Today.ToString("dd/MM/yy");
     disponibilidad = true;
 }
Esempio n. 2
0
        public List <Estilo> ObtenerEstilos()
        {
            string        query  = "SELECT * FROM Estilos";
            List <Estilo> listaE = new List <Estilo>();

            datos.leerTabla2(query);
            while (datos.pLector.Read())
            {
                Estilo e = new Estilo();
                if (!datos.pLector.IsDBNull(0))
                {
                    e.Id = datos.pLector.GetInt32(0);
                }
                if (!datos.pLector.IsDBNull(1))
                {
                    e.NombreEstilo = datos.pLector.GetString(1);
                }
                listaE.Add(e);
            }
            datos.desconectar();
            return(listaE);
        }