Ejemplo n.º 1
0
        private void ButtonDodaj_Click(object sender, RoutedEventArgs e)
        {
            DodajOsobeWindow okno = new DodajOsobeWindow("");

            this.VisualOpacity = 0.3;

            if (okno.ShowDialog() == true)
            {
                MessageBox.Show("Osoba została pomyślnie dodana", "Informacja", MessageBoxButton.OK, MessageBoxImage.Information);
                PokazDane();
            }
            this.VisualOpacity = 1;
        }
Ejemplo n.º 2
0
 private void ButtonEdytuj_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         this.VisualOpacity = 0.3;
         Person           person = (Person)Tabela.SelectedItem;
         int              id     = person.ID;
         DodajOsobeWindow okno   = new DodajOsobeWindow(person.ID.ToString());
         if (okno.ShowDialog() == true)
         {
             MessageBox.Show("Zedytowano osobę o ID: " + id, "Informacja", MessageBoxButton.OK, MessageBoxImage.Information);
             PokazDane();
         }
         this.VisualOpacity = 1;
     }
     catch { this.VisualOpacity = 1; }
 }
Ejemplo n.º 3
0
 private void resultDataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     try
     {
         this.VisualOpacity = 0.3;
         Person           person = (Person)Tabela.SelectedItem;
         int              id     = person.ID;
         DodajOsobeWindow okno   = new DodajOsobeWindow(person.ID.ToString());
         if (okno.ShowDialog() == true)
         {
             MessageBox.Show("Zedytowano osobę o ID: " + id, "Informacja", MessageBoxButton.OK, MessageBoxImage.Information);
             PokazDane();
         }
     }
     catch (Exception ex)
     {
     }
     this.VisualOpacity = 1;
 }