Exemple #1
0
 static void SearchBookById()
 {
     try
     {
         int  bookID;
         Book book = null;
         Console.Write("Enter bookID for search : ");
         bookID = int.Parse(Console.ReadLine());
         //search book using business layer
         BusinessLayer bll = new BusinessLayer();
         book = bll.SelectBookById(bookID);
         Console.WriteLine(book.BookID + "\t\t" + book.BookName + "\t\t" + book.AuthorName + "\t\t"
                           + book.Publisher + "\t\t" + book.NoOfCopies + "\t\t" + book.Price);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }