private void Row_DoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (sender != null)
            {
                Grunddaten selected = DGGrundDat.SelectedItem as Grunddaten;
                switch (selected.Modul)
                {
                case 1:
                    string        openArgs = selected.ID.ToString() + "#2"; //1 -> neuer Datensatz
                    AddMikroMakro mmEdit   = new AddMikroMakro(openArgs);
                    mmEdit.ShowDialog();
                    break;

                case 2:
                    string          oaExpo = selected.ID.ToString() + "#2"; //1 -> neuer Datensatz
                    AddEditExponate exEdit = new AddEditExponate(oaExpo);
                    exEdit.ShowDialog();
                    break;

                case 3:
                    string         oaMineral = selected.ID.ToString() + "#2"; //1 -> neuer Datensatz
                    AddEditMineral miEdit    = new AddEditMineral(oaMineral);
                    miEdit.ShowDialog();
                    break;
                }
            }
        }
Exemplo n.º 2
0
 private void Button_edit_Click(object sender, RoutedEventArgs e)
 {
     if (cModul == 1)
     {
         string        openArgs = gdID.ToString() + "#2"; //1 -> neuer Datensatz
         AddMikroMakro mmEdit   = new AddMikroMakro(openArgs);
         mmEdit.ShowDialog();
     }
     if (cModul == 2)
     {
         string          openArgs = gdID.ToString() + "#2"; //1 -> neuer Datensatz
         AddEditExponate exEdit   = new AddEditExponate(openArgs);
         exEdit.ShowDialog();
     }
     if (cModul == 3)
     {
         string         openArgs = gdID.ToString() + "#2"; //1 -> neuer Datensatz
         AddEditMineral exEdit   = new AddEditMineral(openArgs);
         exEdit.ShowDialog();
     }
     DGGrundDat.ItemsSource = Admin.Admin.GetDataGrunddatenListe(cModul);
     ShowDaten();
 }