示例#1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Veggi v = new Veggi()
            {
                Name = TextBoxVeggi.Text,
                Preis_pro_Einheit = (float)Convert.ToDouble(TextBoxUnitPrice.Text),
                Menge             = Convert.ToInt32(TextBoxUnits.Text),
                Kategorie         = TextBoxCategory.Text
            };

            einkaufswagen.Add(v);
            ListBoxBasket.ItemsSource = einkaufswagen.Veggies;
        }
示例#2
0
 public void Add(Veggi veggi)
 {
     Veggies.Add(veggi);
     TotalPriceChanged();
 }