コード例 #1
0
 public void DisplayStatus(bool status)
 {
     foreach (Book book in books)
     {
         view = new BookView(book);
         if (book.Status == status)
         {
             view.Display();
         }
     }
 }
コード例 #2
0
 public void DisplayTitle(string title)
 {
     foreach (Book book in books)
     {
         view = new BookView(book);
         if (book.Title.Contains(title))
         {
             view.Display();
         }
     }
 }
コード例 #3
0
 public void DisplayAuthor(string author)
 {
     foreach (Book book in books)
     {
         view = new BookView(book);
         if (book.Author == author)
         {
             view.Display();
         }
     }
 }
コード例 #4
0
 public void DisplayType(string type)
 {
     foreach (Book book in books)
     {
         view = new BookView(book);
         if (book.Type == type)
         {
             view.Display();
         }
     }
 }
コード例 #5
0
        public void DisplayDate()
        {
            foreach (Book b in bookDb)
            {
                BookView view = new BookView(b);

                if (DateTime.Compare(DateTime.Now, b.DueDate) < 0)
                {
                    view.DisplayDate();
                }
            }
            ReserveBook();
        }
コード例 #6
0
        public void BookAction(Book b)
        {
            BookView view = new BookView(b);

            view.Display();
        }