Пример #1
0
        public List <Isbn> ListaIsbn()
        {
            conexion.Open();
            SqlCommand c = conexion.CreateCommand();

            c.Connection  = conexion;
            c.CommandType = CommandType.StoredProcedure;
            c.CommandText = "Listar_Isbnes";
            c.Prepare();
            SqlDataReader dn = c.ExecuteReader();

            while (dn.Read())
            {
                int      IdEditorial = dn.GetInt32(1);
                string   isbn        = dn.GetString(2);
                DateTime anio        = dn.GetDateTime(3);
                string   titulo      = dn.GetString(4);

                Isbn oIsbn = new Isbn(IdEditorial, titulo, isbn, anio);
                oIsbn.IdIsbn = dn.GetInt32(0);
                ListaIsbnes.Add(oIsbn);
            }
            dn.Close();
            conexion.Close();
            return(ListaIsbnes);
        }
Пример #2
0
 public void BorrarIsbn(Isbn i)
 {
     ListaIsb.Remove(i);
 }
Пример #3
0
 public void AgregarIsbn(Isbn i)
 {
     ListaIsb.Add(i);
 }