Example #1
0
        private static void ModifyProducts(Albums albumy, Instruments instrumenty, Accesories akcesoria)
        {
            Console.WriteLine("|==============================================|");
            Console.WriteLine("|Z jakiej Kategorii chcesz zmodyfikować Produkt|");
            Console.WriteLine("|==============================================|");
            Console.WriteLine("|1.Albumy                                      |");
            Console.WriteLine("|2.Instrumenty                                 |");
            Console.WriteLine("|3.Akcesoria                                   |");
            Console.WriteLine("|==============================================|");
            int choice = Convert.ToInt32(Console.ReadLine());
            int id     = 0;

            switch (choice)
            {
            case 1:
                albumy.PrintAlbums();
                Console.WriteLine("|==============================================|");
                Console.WriteLine("|Podaj id Produktu                             |");
                Console.WriteLine("|==============================================|");
                id = Convert.ToInt32(Console.ReadLine());
                albumy.ModifyAlbum(id);
                break;

            case 2:
                instrumenty.PrintInstruments();
                Console.WriteLine("|==============================================|");
                Console.WriteLine("|Podaj id Produktu                             |");
                Console.WriteLine("|==============================================|");
                id = Convert.ToInt32(Console.ReadLine());
                instrumenty.ModifyInstruments(id);
                break;

            case 3:
                akcesoria.PrintAccesories();
                Console.WriteLine("|==============================================|");
                Console.WriteLine("|Podaj id Produktu                             |");
                Console.WriteLine("|==============================================|");
                id = Convert.ToInt32(Console.ReadLine());
                akcesoria.ModifyAccesories(id);
                break;
            }
        }