Example #1
0
        private void buttonAdd_Click(object sender, RoutedEventArgs e)
        {
            Bestellung      b  = (Bestellung)comboAuftrag.SelectedItem;
            BestellPosition bp = new BestellPosition();

            bp.Bestellnummer = b.Bestellid;
            bp.Menge         = Convert.ToInt32(txtBoxMenge.Text);
            bp.NeuePizza     = (Pizza)comboPizza.SelectedItem;
            b.AddBestellung(bp);
        }
Example #2
0
 private void buttonBestellungErzeugen_Click(object sender, RoutedEventArgs e)
 {
     bestellung         = new Bestellung();
     bestellung.Kundenr = Convert.ToInt32(((Kunde)comboKunde.SelectedItem).Kundennr);
     bestellung.Datum   = DateTime.Now;
     lstBestellung.Add(bestellung);
     //comboKunde.SelectedItem = bestellung;
     comboAuftrag.SelectedItem = bestellung;
     //comboAuftrag.IsDropDownOpen = true;
     comboAuftrag.Text = bestellung.ToString();
 }