private void ujOsztaly_Click(object sender, RoutedEventArgs e)
 {
     UserControlok.OsztalyModositas ujOsztaly = new UserControlok.OsztalyModositas(1, false);
     if (ujOsztaly.ShowDialog() == true)
     {
         OsztalyokFrissitese();
         ferohelyValt.Visibility  = Visibility.Hidden;
         torlesOsztaly.Visibility = Visibility.Hidden;
     }
 }
        private void ferohelyValt_Click(object sender, RoutedEventArgs e)
        {
            Osztaly selectedDept = (Osztaly)osztalyLista.SelectedItems[0];

            UserControlok.OsztalyModositas osztalyMod = new UserControlok.OsztalyModositas(selectedDept.id, true);
            if (osztalyMod.ShowDialog() == true)
            {
                OsztalyokFrissitese();
                ferohelyValt.Visibility  = Visibility.Hidden;
                torlesOsztaly.Visibility = Visibility.Hidden;
            }
        }