示例#1
0
        private void addSingleMainMealToDataGrid(MainMeal mainMeal)
        {
            SecondMeal secondMeal = new SecondMeal();

            secondMeal.price    = 0;
            secondMeal.mealName = "ohne";
            MealCombination mc = MealCombination.getMealCombination(mainMeal, secondMeal);

            updateTotalPriceTxtBox(mainMeal.price);
            addMealCombosToDataGrid(mc);
        }
        // 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);
        }