private static Collection <IObjednaniGateway> ReadObjednavku(SqlDataReader reader) { Collection <IObjednaniGateway> Objednani = new Collection <IObjednaniGateway>(); while (reader.Read()) { IPisnickaGateway pisnicka = new PisnickaGateway(); IObjednavkaGateway objednavka = new ObjednavkaGateway(); IUzivatelGateway uzivatel = new UzivatelGateway(); IObjednaniGateway objednani = new ObjednaniGateway(); objednavka.Id = reader.GetInt32(0); pisnicka.Id = reader.GetInt32(1); pisnicka.Nazev = reader.GetString(2); uzivatel.Id = reader.GetInt32(3); uzivatel.Email = reader.GetString(4); objednavka.Uzivatel = uzivatel; objednani.Objednavka = objednavka; objednani.Pisnicka = pisnicka; Objednani.Add(objednani); } return(Objednani); }
public Collection <IPisnickaGateway> Read(SqlDataReader reader) { Collection <IPisnickaGateway> Pisnicky = new Collection <IPisnickaGateway>(); while (reader.Read()) { IPisnickaGateway p = new PisnickaGateway(); IZanrGateway z = new ZanrGateway(); IAlbumGateway a = new AlbumGateway(); IInterpretGateway i = new InterpretGateway(); p.Nazev = reader.GetString(0); p.Delka = reader.GetString(1); p.Hodnoceni = reader.GetFloat(2); i.UmeleckeJmeno = reader.GetString(3); a.Nazev = reader.GetString(4); z.Nazev = reader.GetString(5); p.Id = reader.GetInt32(6); p.Zanr = z; p.Album = a; p.Interpret = i; Pisnicky.Add(p); } return(Pisnicky); }
private Collection <IUlozeniGateway> ReadKnihovna(SqlDataReader reader) { Collection <IUlozeniGateway> uloziste = new Collection <IUlozeniGateway>(); while (reader.Read()) { IPisnickaGateway pisnicka = new PisnickaGateway(); IKnihovnaGateway knihovna = new KnihovnaGateway(); IUzivatelGateway uzivatel = new UzivatelGateway(); IUlozeniGateway ulozeni = new UlozeniGateway(); pisnicka.Id = reader.GetInt32(0); pisnicka.Nazev = reader.GetString(1); knihovna.Id = reader.GetInt32(2); uzivatel.Id = reader.GetInt32(3); knihovna.Uzivatel = uzivatel; ulozeni.Knihovna = knihovna; ulozeni.Pisnicka = pisnicka; uloziste.Add(ulozeni); } return(uloziste); }
public Collection <IPisnickaGateway> Read2(SqlDataReader reader) { Collection <IPisnickaGateway> Pisnicky = new Collection <IPisnickaGateway>(); while (reader.Read()) { IPisnickaGateway p = new PisnickaGateway(); p.Id = reader.GetInt32(0); p.Nazev = reader.GetString(1); Pisnicky.Add(p); } return(Pisnicky); }
public Collection <IPisnickaGateway> ReadFiltrAlbum(SqlDataReader reader) { Collection <IPisnickaGateway> Pisnicky = new Collection <IPisnickaGateway>(); while (reader.Read()) { IPisnickaGateway p = new PisnickaGateway(); IAlbumGateway a = new AlbumGateway(); IInterpretGateway i = new InterpretGateway(); p.Id = reader.GetInt32(0); p.Nazev = reader.GetString(1); p.Delka = reader.GetString(2); i.UmeleckeJmeno = reader.GetString(3); a.Nazev = reader.GetString(4); a.Id = reader.GetInt32(5); p.Album = a; p.Interpret = i; Pisnicky.Add(p); } return(Pisnicky); }