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); }
public void BorrarIsbn(Isbn i) { ListaIsb.Remove(i); }
public void AgregarIsbn(Isbn i) { ListaIsb.Add(i); }