private void refreshDataGridView()
        {
            dgvAdress.DataSource = null;
            List <Adress> adresses = null;

            if (adressService.ShowAll().Where(a => a.OwnerId == null) != null)
            {
                adresses = adressService.ShowAll().Where(a => a.OwnerId == null).ToList();
                foreach (var adress in adresses)
                {
                    adress.Vet = vetService.GetById(adress.VetId);
                }
            }
            dgvAdress.DataSource = adresses;
        }
Ejemplo n.º 2
0
        private void refreshDataGridViewAdress()
        {
            dgvAdress.DataSource = null;
            List <Adress> adresses = null;

            if (adressService.ShowAll().Where(a => a.VetId == Convert.ToInt64(txtId.Text)) != null)
            {
                adresses = adressService.ShowAll().Where(a => a.VetId == Convert.ToInt64(txtId.Text)).ToList();
                foreach (var adress in adresses)
                {
                    adress.Vet = vetService.GetById(adress.VetId);
                }
            }
            dgvAdress.DataSource = adresses;
        }