Exemplo n.º 1
0
 private void Uloha12BtPridaj_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var rodCislo        = InputUloha12RodCislo.Text;
         var cisloListu      = int.Parse(InputUloha12CisloListuVlast.Text);
         var cisloKatUzem    = int.Parse(InputUloha12CisloKatUzem.Text);
         var majetkovyPodiel = double.Parse(InputUloha12MajetkovyPodiel.Text);
         var uspech          = AfrikaKataster.PridajVlastnika(rodCislo, cisloListu, cisloKatUzem, majetkovyPodiel);
         if (uspech == "OK")
         {
             Uloha12List.ItemsSource = AfrikaKataster.Uloha12(rodCislo, cisloListu, cisloKatUzem);
         }
         else
         {
             MessageBox.Show(uspech, "Err");
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Zle zadane parametre", "ERR");
     }
 }