コード例 #1
0
        public static void FoundBook()
        {
            string name;
            string autor;

            Console.WriteLine("Please enter information about book \n");
            Console.WriteLine("Name of book: ");
            name = Console.ReadLine();
            Console.WriteLine("Autor of book: ");
            autor = Console.ReadLine();
            List <BookAll> booklist = MainPro.OpenListBooks();

            Console.WriteLine("Information about this book \n");
            foreach (BookAll book in booklist)
            {
                if (book.NameB == name && book.AutorB == autor)
                {
                    Console.WriteLine("Name: " + book.NameB);
                    Console.WriteLine("Autor: " + book.AutorB);
                    Console.WriteLine("Ganre: " + book.GanreB);
                    Console.WriteLine("PersonState: " + book.PersonStateB);
                    Console.WriteLine("\n");
                }
            }
        }
コード例 #2
0
        public static void AllBooks()
        {
            Console.WriteLine("All books: \n");

            List <BookAll> booklist = MainPro.OpenListBooks();

            foreach (BookAll book in booklist)
            {
                Console.WriteLine("Name: " + book.NameB);
                Console.WriteLine("Autor: " + book.AutorB);
                Console.WriteLine("Ganre: " + book.GanreB);
                Console.WriteLine("PersonState: " + book.PersonStateB);
                Console.WriteLine("\n");
            }
        }
コード例 #3
0
        public static void FoundBookGanre()
        {
            string ganre;

            Console.WriteLine("Please enter information about book \n");
            Console.WriteLine("Ganre of book: ");
            ganre = Console.ReadLine();

            List <BookAll> booklist = MainPro.OpenListBooks();

            Console.WriteLine("Books \n");
            foreach (BookAll book in booklist)
            {
                if (book.GanreB == ganre)
                {
                    Console.WriteLine("Name: " + book.NameB);
                    Console.WriteLine("Autor: " + book.AutorB);
                    Console.WriteLine("Ganre: " + book.GanreB);
                    Console.WriteLine("PersonState: " + book.PersonStateB);
                    Console.WriteLine("\n");
                }
            }
        }