private void VlozObcana_Click(object sender, RoutedEventArgs e) { var RodneCislo = InputRodneCislo.Text; if (RodneCislo.Length == 16) { if (InputDatumNarodenia.SelectedDate != null) { var meno = InputName.Text; var priezvisko = InputPriezvisko.Text; var uspech = AfrikaKataster.PridajOsobu(RodneCislo, meno, priezvisko, InputDatumNarodenia.SelectedDate.Value.Date); if (uspech == "OK") { MessageBox.Show("Osoba Uspesne preidana", "OK"); } else { MessageBox.Show(uspech, "Neuspesne pridanie osoby"); } } else { MessageBox.Show("Nezadany datum narodenia", "Zly datum"); } } else { MessageBox.Show("Zla dlzka rodneho cisla", "Zle Rodne Cislo"); } }
private void InputUloha9RodCislo_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { var rodCisloObcan = InputUloha9RodCislo.Text; Uloha9List.ItemsSource = AfrikaKataster.Uloha9(rodCisloObcan); } }
private void InputKatasUzemieList_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { var nazovKatastru = InputKatasUzemieList.Text; Uloha19ListKata.ItemsSource = AfrikaKataster.Uloha19NazovKat(nazovKatastru); } }
private void InputUloha7NazovKatastru_KeyUp(object sender, KeyEventArgs e) { var nazovKatastru = InputUloha7NazovKatastru.Text; if (e.Key == Key.Enter) { Uloha7List.ItemsSource = AfrikaKataster.Uloha7(nazovKatastru); } }
private void Generator_Click(object sender, RoutedEventArgs e) { Stopwatch time = Stopwatch.StartNew(); AfrikaKataster.Generator(); time.Stop(); var cas = time.Elapsed; MessageBox.Show("Vygenerovane cas : " + cas, "OK"); }
private void ButtonNacitaj_Click(object sender, RoutedEventArgs e) { Stopwatch time = Stopwatch.StartNew(); AfrikaKataster.Nacitaj(); time.Stop(); var cas = time.Elapsed; MessageBox.Show("Nacitane time: " + cas, "OK"); }
private void Uloha1Vyhladaj_Click(object sender, RoutedEventArgs e) { try { var idKatUzem = int.Parse(InputUloha1KatCis.Text); var supisCislo = int.Parse(InputUloha1SupisCis.Text); Uloha1List.ItemsSource = AfrikaKataster.Uloha1(supisCislo, idKatUzem); } catch (Exception) { MessageBox.Show("Zle zadane parametre", "ERR"); } }
private void Uloha6Vyhladaj_Click(object sender, RoutedEventArgs e) { try { var NazovKat = InputUloha6katNazov.Text; var idList = int.Parse(InputUloha6ListCis.Text); Uloha6List.ItemsSource = AfrikaKataster.Uloha6(NazovKat, idList); } catch (Exception) { MessageBox.Show("Zle zadane parametre", "ERR"); } }
private void Uloha5Vyhladaj_Click(object sender, RoutedEventArgs e) { try { var nazovNeh = InputUloha5NazovKat.Text; var cisNeh = int.Parse(InputUloha5CisNehnutel.Text); Uloha5List.ItemsSource = AfrikaKataster.Uloha5(nazovNeh, cisNeh); } catch (Exception) { MessageBox.Show("Zle zadane parametre", "ERR"); } }
private void Uloha22Zmaz_Click(object sender, RoutedEventArgs e) { try { var cisloKataNew = int.Parse(InputUloha22CisloKatNew.Text); var cisloKataDel = int.Parse(InputUloha22CisloKatDel.Text); Uloha22List.ItemsSource = AfrikaKataster.Uloha22(cisloKataDel, cisloKataNew); MessageBox.Show("Uspesne zmazane", "ERR"); } catch (Exception) { MessageBox.Show("Zle zadane parametre", "ERR"); } }
private void Uloha13BZmaz_Click(object sender, RoutedEventArgs e) { try { var idKatastru = int.Parse(InputUloha12CisloKatUzem.Text); var rodCislo = InputUloha12RodCislo.Text; var cisloListu = int.Parse(InputUloha12CisloListuVlast.Text); Uloha12List.ItemsSource = AfrikaKataster.Uloha13(rodCislo, cisloListu, idKatastru); } catch (Exception) { MessageBox.Show("Zle zadane parametre", "ERR"); } }
private void InputUloha22CisloKatDel_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { try { var cisloKata = int.Parse(InputUloha22CisloKatDel.Text); Uloha22List.ItemsSource = AfrikaKataster.Uloha22Info(cisloKata); } catch (Exception) { MessageBox.Show("Zle zadane parametre", "ERR"); } } }
private void Uloha3Vyhladaj_Click(object sender, RoutedEventArgs e) { try { var supisCislo = int.Parse(InputUloha3SupisCislo.Text); var katCislo = int.Parse(InputUloha3KatCis.Text); var listCislo = int.Parse(InputUloha3ListCis.Text); Uloha3List.ItemsSource = AfrikaKataster.Uloha3(katCislo, listCislo, supisCislo); } catch (Exception) { MessageBox.Show("Zle zadane parametre", "ERR"); } }
private void InputUloha20ListCis_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { try { var cisloListu = int.Parse(InputUloha20ListCis.Text); var cisloKatastru = int.Parse(InputUloha20KatCis.Text); Uloha20List.ItemsSource = AfrikaKataster.Uloha20Nehnutelnosti(cisloKatastru, cisloListu); } catch (Exception) { MessageBox.Show("Zle zadane parametre", "ERR"); } } }
private void InputUloha19IdListNew_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { try { var cisloListu = int.Parse(InputUloha19IdListNew.Text); var cisloKatastru = int.Parse(InputUloha19Katcislo.Text); Uloha19ListListVlast.ItemsSource = AfrikaKataster.Uloha19Listy(cisloKatastru, cisloListu); } catch (Exception) { MessageBox.Show("Zle zadane parametre", "ERR"); } } }
private void VsetkoKataster_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { try { var cisKatastra = int.Parse(VsetkoKataster.Text); VsetkoListyKatastra.ItemsSource = AfrikaKataster.Uloha19CisloKat(cisKatastra); VsetkoNehnutelnostiKatastra.ItemsSource = AfrikaKataster.UlohaVsetkoNehnutelnosti(cisKatastra); } catch (Exception) { MessageBox.Show("Zle zadany kataster cislo", "Err"); } } }
private void InputUloha8CisloKatUzem_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { try { var idKatastru = int.Parse(InputUloha8CisloKatUzem.Text); var rodCisloObcan = InputUloha8RodCislo.Text; Uloha8List.ItemsSource = AfrikaKataster.Uloha8(rodCisloObcan, idKatastru); } catch (Exception) { MessageBox.Show("Zle zadane parametre", "ERR"); } } }
private void AktivnyPanel(StackPanel aktivny) { foreach (var item in PanelList) { item.Visibility = Visibility.Hidden; } aktivny.Visibility = Visibility.Visible; var list = AfrikaKataster.VsetkoInfo(); if (list[0] != -1) { LabelKat.Content = "K:" + list[0]; LabelList.Content = "L:" + list[2]; LabelObcan.Content = "O:" + list[1]; LabelNeh.Content = "N:" + list[3]; } }
private void VsetkoListID_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { try { var cisKatastra = int.Parse(VsetkoKataster.Text); var idListu = int.Parse(VsetkoListID.Text); VsetkoVlastnikove.ItemsSource = AfrikaKataster.VsetkoVlastniciListu(cisKatastra, idListu); VsetkoListyNehnutelnosti.ItemsSource = AfrikaKataster.Uloha20Nehnutelnosti(cisKatastra, idListu); } catch (Exception) { MessageBox.Show("Zle zadane udaje", "Err"); } } }
private void VsetkoRodCislo_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { try { var rodCislo = VsetkoRodCislo.Text; VsetkoListyKatastra.ItemsSource = AfrikaKataster.VsetkyListyObcana(rodCislo); VsetkoVlastnikove.ItemsSource = AfrikaKataster.Uloha2(rodCislo); VsetkoListyNehnutelnosti.ItemsSource = AfrikaKataster.VsetkoCoVlastniObcanNeh(rodCislo); } catch (Exception) { MessageBox.Show("Zle zadane udaje", "Err"); } } }
private void VlozKataster_Click(object sender, RoutedEventArgs e) { try { var InputNazov = InputNazovKatUzemia.Text; var IdKat = int.Parse(InputIDKatUzem.Text); var uspech = AfrikaKataster.PridajKatastralUzemie(IdKat, InputNazov); if (uspech == "OK") { Uloha15List.ItemsSource = AfrikaKataster.Uloha15(); } else { MessageBox.Show(uspech, "ERR"); } } catch (Exception) { MessageBox.Show("Zle zadane parametre", "ERR"); } }
private void Uloha20Zmaz_Click(object sender, RoutedEventArgs e) { try { var cisloListu = int.Parse(InputUloha20ListCis.Text); var cisloKatastru = int.Parse(InputUloha20KatCis.Text); var supisCislo = int.Parse(InputUloha20SupisCislo.Text); var odpoved = AfrikaKataster.Uloha20(supisCislo, cisloListu, cisloKatastru); if (odpoved == "OK") { Uloha20List.ItemsSource = AfrikaKataster.Uloha20Nehnutelnosti(cisloKatastru, cisloListu); } else { MessageBox.Show(odpoved, "Err"); } } catch (Exception) { MessageBox.Show("Zle zadane parametre", "ERR"); } }
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"); } }
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"); } }
private void Uloha12BUloz_Click(object sender, RoutedEventArgs e) { try { var idKatastru = int.Parse(InputUloha12CisloKatUzem.Text); var rodCislo = InputUloha12RodCislo.Text; var cisloListu = int.Parse(InputUloha12CisloListuVlast.Text); var majetkovyPod = double.Parse(InputUloha12MajetkovyPodiel.Text); var uspech = AfrikaKataster.Uloha12Update(rodCislo, cisloListu, idKatastru, majetkovyPod); if (uspech == "OK") { Uloha12List.ItemsSource = AfrikaKataster.Uloha12(rodCislo, cisloListu, idKatastru); } else { MessageBox.Show(uspech, "Err"); } } catch (Exception) { MessageBox.Show("Zle zadane ciselne hodnoty (Majetkovy Podiel)", "Err"); } }
private void Uloha11Pridaj_Click(object sender, RoutedEventArgs e) { try { var rodCisloPovod = InputUloha11RodCisloPovod.Text; var rodCisloNove = InputUloha11RodCisloNove.Text; var supisCislo = int.Parse(InputUloha11SupisCislo.Text); var cisKat = int.Parse(InputUloha11KatCis.Text); var uspech = AfrikaKataster.Uloha11(rodCisloPovod, supisCislo, cisKat, rodCisloNove); if (uspech == "OK") { MessageBox.Show("Zmena uspesna", "OK"); } else { MessageBox.Show(uspech, "Err"); } } catch (Exception) { MessageBox.Show("Zle zadane parametre", "ERR"); } }
private void Uloha10Pridaj_Click(object sender, RoutedEventArgs e) { try { var rodCislo = InputUloha10RodCislo.Text; var nazovKatuzem = InputUloha10KatCis.Text; var supisCsilo = int.Parse(InputUloha10SupisCislo.Text); var uspech = AfrikaKataster.Uloha10(rodCislo, supisCsilo, nazovKatuzem); if (uspech == "OK") { MessageBox.Show("Priradenie trvaleho bydliska bolo uspesne", "OK"); } else { MessageBox.Show(uspech, "Err"); } } catch (Exception) { MessageBox.Show("Zle zadane parametre", "ERR"); } }
private void PridajNehnutelnost_Click(object sender, RoutedEventArgs e) { try { var SupisCislo = int.Parse(InputSupisCislo.Text); var IdListu = int.Parse(InputListNehnutelnost.Text); var IdKatastru = int.Parse(InputKatasterNehnutelnost.Text); var popis = InputPopis.Text; var adresa = InputAdresa.Text; var uspech = AfrikaKataster.PridajNehnutelnost(IdListu, IdKatastru, adresa, popis, SupisCislo); if (uspech == "OK") { MessageBox.Show("Nehnutelnost uspesne pridana", "OK"); } else { MessageBox.Show(uspech, "ERR"); } } catch (Exception) { MessageBox.Show("Zle zadane parametre", "ERR"); } }
private void DeleteList_Click(object sender, RoutedEventArgs e) { try { var cisloListuNew = int.Parse(InputUloha19IdListNew.Text); var cisloListuDel = int.Parse(InputUloha19IdListDel.Text); var cisloKatastru = int.Parse(InputUloha19Katcislo.Text); var odpoved = AfrikaKataster.Uloha19(cisloListuDel, cisloKatastru, cisloListuNew); if (odpoved == "OK") { var cisloKata = int.Parse(InputUloha19Katcislo.Text); Uloha19ListKata.ItemsSource = AfrikaKataster.Uloha19CisloKat(cisloKata); Uloha19ListListVlast.ItemsSource = AfrikaKataster.Uloha19Listy(cisloKatastru, cisloListuNew); } else { MessageBox.Show(odpoved, "Err"); } } catch (Exception) { MessageBox.Show("Zle zadane parametre", "ERR"); } }
private void StackPanel_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { VsetkoKatastre.ItemsSource = AfrikaKataster.Uloha15(); VsetkoObcaniaKatastra.ItemsSource = AfrikaKataster.VsetkoObyvatelstvo(); AktivnyPanel(UlohVsetkoPanel); }