Beispiel #1
0
        private void GetData()
        {
            RepositoryContext db = new RepositoryContext("RepositoryContext");

            AnimalRepository animalRepo = new AnimalRepository(db);
            OwnerRepository  ownerRepo  = new OwnerRepository(db);
            VetRepository    vetRepo    = new VetRepository(db);
            VisitRepository  visitRepo  = new VisitRepository(db);

            var animalList = animalRepo.All().ToList();

            dataGridViewAnimals.DataSource = animalList;
            //comboBoxAnimals.DataSource = animalList;


            var ownerList = ownerRepo.All().ToList();

            dataGridViewOwners.DataSource      = ownerList;
            comboBoxOwnerList.DataSource       = ownerList;
            comboBoxOwnersFromVisit.DataSource = ownerList;


            var vetList = vetRepo.All().ToList();

            dataGridViewVets.DataSource = vetList;
            comboBoxVets.DataSource     = vetList;

            var visitList = visitRepo.All().ToList();

            dataGridViewVisits.DataSource = visitList;
        }