private void VlozList_Click(object sender, RoutedEventArgs e) { try { var IDlistu = int.Parse(InputIDListu.Text); var NazovUzemia = InputKatasUzemieList.Text; var uspech = AfrikaKataster.PridajList(NazovUzemia, IDlistu); if (uspech == "OK") { var nazovKatastru = InputKatasUzemieList.Text; Uloha19ListKata.ItemsSource = AfrikaKataster.Uloha19NazovKat(nazovKatastru); } else { MessageBox.Show(uspech, "ERR"); } } catch (Exception) { MessageBox.Show("Zle zadane parametre", "ERR"); } }