Пример #1
0
        public static void user()
        {
            userMenu();
            int input = InputCheck.CheckInteger("Please enter a number from the menu: ", 6);

            switch (input)
            {
            case 1:
                LibraryMethods.findByName();
                break;

            case 2:
                LibraryMethods.findByAuthor();
                break;

            case 3:
                LibraryMethods.findByGenre();
                break;

            case 4:
                LibraryMethods.findByType();
                break;

            case 5:
                Console.WriteLine();
                LibraryMethods.findAllBooks();
                break;

            default:
                Console.WriteLine("Thank you for using the Library!!!");
                Console.WriteLine();
                return;
            }
            user();
        }
Пример #2
0
        public static void admin()
        {
            Book b = new Book();

            adminMenu();
            int input = InputCheck.CheckInteger("Please enter a number from the menu: ", 9);

            switch (input)
            {
            case 1:
                LibraryMethods.findByName();
                break;

            case 2:
                LibraryMethods.findByAuthor();
                break;

            case 3:
                LibraryMethods.findByGenre();
                break;

            case 4:
                LibraryMethods.findByType();
                break;

            case 5:
                LibraryMethods.findAllBooks();
                break;

            case 6:
                LibraryMethods.editBook();
                break;

            case 7:
                LibraryMethods.addBook();
                break;

            case 8:
                LibraryMethods.deleteBook();
                break;

            default:
                Console.WriteLine("Thank you for using the Library!!!");
                return;
            }
            admin();
        }