public static Historie_zakazek Read_historie_one(SqlDataReader reader)
        {
            Historie_zakazek historie = new Historie_zakazek();

            while (reader.Read())
            {
                int i = -1;
                historie.Idhis             = reader.GetInt32(++i);
                historie.Datumod           = reader.GetDateTime(++i);
                historie.Datumdo           = reader.GetDateTime(++i);
                historie.Zakazka_idzak     = ShowZakazka.Detail_zakazky(reader.GetInt32(++i));
                historie.Typ_zakazky_idtyp = ShowTypZakazek.Detail_typu_zakazky(reader.GetInt32(++i));
            }
            return(historie);
        }
Пример #2
0
        public static Zakazka Read_one(SqlDataReader reader)
        {
            Zakazka zakazka = new Zakazka();

            while (reader.Read())
            {
                int i = -1;
                zakazka.Idzak = reader.GetInt32(++i);
                zakazka.Datum = reader.GetDateTime(++i);
                zakazka.Objednavatel_idobj = ShowObjednavatel.Detail_objednavatele(reader.GetInt32(++i));
                zakazka.Lokalita_idlok     = ShowLokalita.Select(reader.GetInt32(++i));
                zakazka.Typ_zakazky_idtyp  = ShowTypZakazek.Detail_typu_zakazky(reader.GetInt32(++i));
                zakazka.Cena             = reader.GetInt32(++i);
                zakazka.Casova_narocnost = reader.GetInt32(++i);
                zakazka.Geodet_idgeo     = ShowGeodet.Detail_geodeta(reader.GetInt32(++i));
                zakazka.Stav             = reader.GetString(++i);
            }
            return(zakazka);
        }
        public static Collection <Historie_zakazek> Read_historie(SqlDataReader reader)
        {
            Collection <Historie_zakazek> zakazky = new Collection <Historie_zakazek>();

            //Collection<Zakazka> zak = ShowZakazka.Select_Aktualni();


            while (reader.Read())
            {
                Historie_zakazek historie = new Historie_zakazek();
                int i = -1;
                historie.Idhis             = reader.GetInt32(++i);
                historie.Datumod           = reader.GetDateTime(++i);
                historie.Datumdo           = reader.GetDateTime(++i);
                historie.Zakazka_idzak     = ShowZakazka.Detail_zakazky(reader.GetInt32(++i));
                historie.Typ_zakazky_idtyp = ShowTypZakazek.Detail_typu_zakazky(reader.GetInt32(++i));

                zakazky.Add(historie);
            }
            return(zakazky);
        }