Пример #1
0
        public static void Init(IQueryAdapter dbClient)
        {
            dbClient.setQuery("SELECT * FROM pets_racesoncatalogue");
            DataTable Table = dbClient.getTable();

            Races = new List <PetRace>();
            foreach (DataRow Race in Table.Rows)
            {
                PetRace R = new PetRace();
                R.RaceId    = (int)Race["raceid"];
                R.Color1    = (int)Race["color1"];
                R.Color2    = (int)Race["color2"];
                R.Has1Color = ((string)Race["has1color"] == "1");
                R.Has2Color = ((string)Race["has2color"] == "1");
                Races.Add(R);
            }
        }
Пример #2
0
        public static void Init(IQueryAdapter dbClient)
        {
            dbClient.setQuery("SELECT * FROM pets_racesoncatalogue");
            DataTable Table = dbClient.getTable();

            Races = new List<PetRace>();
            foreach (DataRow Race in Table.Rows)
            {
                PetRace R = new PetRace();
                R.RaceId = (int)Race["raceid"];
                R.Color1 = (int)Race["color1"];
                R.Color2 = (int)Race["color2"];
                R.Has1Color = ((string)Race["has1color"] == "1");
                R.Has2Color = ((string)Race["has2color"] == "1");
                Races.Add(R);
            }
        }