private void Uloha4Vyhladaj_Click(object sender, RoutedEventArgs e) { try { var idKat = int.Parse(InputUloha4KatCis.Text); var idList = int.Parse(InputUloha4ListCis.Text); Uloha4List.ItemsSource = AfrikaKataster.Uloha4(idKat, idList); } catch (Exception) { MessageBox.Show("Zle zadane parametre", "ERR"); } }