Ejemplo n.º 1
0
        private static void RemoveAllDishesByFoodGroupFromSpecificChef(string[] info)
        {
            string foodGroup = info[0];
            string chefName  = info[1];

            if (!chefs.ContainsKey(chefName))
            {
                Console.WriteLine("Non existing chef!");


                return;
            }

            Chef chef = chefs[chefName];

            bool removed = chef.RemoveAllByFoodGroup(foodGroup);

            if (removed)
            {
                Console.WriteLine($"Successfully removed dishes with food group: {foodGroup} from chef {chef.Name}!");
            }
            else
            {
                Console.WriteLine($"Dish removal failed.");
            }
        }
Ejemplo n.º 2
0
        private static void RemoveAllDishesByFoodGroupFromSpecificChef(string [] info)
        {
            string foodGroup = info[0];
            string chefName  = info[1];

            if (!chefs.ContainsKey(chefName))
            {
                Console.WriteLine("Non existing chef");
                return;
            }

            Chef chef    = chefs[chefName];
            bool removed = chef.RemoveAllByFoodGroup(foodGroup);

            if (removed)
            {
                Console.WriteLine($"Uspeshno iztrivane na grupata{foodGroup}  ot chef {chef.Name}");
            }
            else
            {
                Console.WriteLine("Deleted failed");
            }
        }