public void GetAllBook() { List <Book> books = new List <Book>(); BookBLL bookTemp = new BookBLL(); books = bookTemp.GetAllBookBLL(); Console.WriteLine("---------------------------Lista-Książek---------------------------"); Console.WriteLine("--Id-----Tytuł---------------Imię-i-Nazwisko-Autora-------------------Data-----"); foreach (Book book in books) { Console.WriteLine(" " + book.BookId + "\t" + book.BookName + "\t " + book.BookAuthorName + "\t" + book.BookAuthorSurname + "\t" + book.BookDate); } Console.WriteLine("----------------------------------------------------------------"); }
//RETRIEVE BOOKS FROM BOOK TABLE public void GetAllBook() { List <Book> books = new List <Book>(); BookBLL bookTemp = new BookBLL(); books = bookTemp.GetAllBookBLL(); Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine("---------------------------Books-List---------------------------"); Console.WriteLine("--Id-----Name---------------Author-------------------Copies-----"); Console.ForegroundColor = ConsoleColor.White; foreach (Book book in books) { Console.WriteLine(" " + book.BookId + "\t" + book.BookName + "\t " + book.BookAuthor + "\t\t\t" + book.BookCopies); } Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine("----------------------------------------------------------------"); Console.ForegroundColor = ConsoleColor.White; }