コード例 #1
0
        public List <Pet> listPets()
        {
            PetDB     petDB = new PetDB();
            DataTable data  = petDB.GetFullPetInfo();

            return(GetPets(data).OrderBy(p => p.name).ToList());
        }
コード例 #2
0
        public MainWindow()
        {
            InitializeComponent();
            string    line;
            PetDB     pet   = new PetDB();
            DataTable table = pet.GetFullPetInfo();

            foreach (DataRow row in table.Rows)
            {
                line = "";
                foreach (object item in row.ItemArray)
                {
                    line += item.ToString() + " ";
                }
                listData.Items.Add(line);
            }
        }