private void kd_delete_Click(object sender, RoutedEventArgs e) { Faehigkeit foo = new Faehigkeit(this.curr_id); foo.delete(); this.refreshList(); }
private void f_save_it() { Faehigkeit f = new Faehigkeit(this.curr_id); f.name = this.f_name.Text; f.save(); this.refreshList(); }
private void listing_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (this.listing.SelectedIndex >= 0) { this.curr_id = ((Faehigkeit)this.listing.Items[this.listing.SelectedIndex]).id; this.listing.Visibility = Visibility.Collapsed; Faehigkeit f = new Faehigkeit(this.curr_id); this.f_name.Text = f.name; this.formular.Visibility = Visibility.Visible; } }
public void refreshList() { this.listing.Items.Clear(); Faehigkeit f_neu = new Faehigkeit(); f_neu.name = " >>> NEUE Fähigkeit anlegen <<< "; this.listing.Items.Add(f_neu); ArrayList alleFaehigkeiten = Faehigkeit.getAll(); foreach (Faehigkeit f in alleFaehigkeiten) { this.listing.Items.Add(f); } this.curr_id = 0; this.formular.Visibility = Visibility.Collapsed; this.listing.Visibility = Visibility.Visible; }