Ejemplo n.º 1
0
        private void btnSafeNewMainMeal_Click(object sender, RoutedEventArgs e)
        {
            MainMeal meal = getMainMealFromTextBox();

            if (meal != null)
            {
                clearAllMainMealTextBoxes();
                addMainMealToDataGrid(meal);
                CSVHandler.addToCSV(meal);
                generateMealCombos(meal);
            }
        }
Ejemplo n.º 2
0
        // TODO: Die bestehenden MealCombos werden so immer überschrieben -> Preise weg -.-
        private void generateMealCombos(MainMeal mainMeal)
        {
            List <IMeal>           secondMeals = getSecondMealsFromCSV();
            List <MealCombination> mealCombos  = new List <MealCombination>();
            MealCombination        mealCombo;

            foreach (SecondMeal secondMeal in secondMeals)
            {
                mealCombo = MealCombination.getMealCombination(mainMeal, secondMeal);
                mealCombos.Add(mealCombo);
            }
            CSVHandler.addToCSV(mealCombos);
        }