public BookController()
 {
     bookservice   = new BookService();
     this.bookView = new BookView();
     bookView.AddController(this);
     this.bookDetails = new BookDetails();
     bookDetails.AddController(this);
 }
        public void SearchBook(string searchFor)
        {
            List <Book> searchResult = bookservice.SearchBooks(searchFor);

            if (searchResult.Count == 1)
            {
                BookDetails result = new BookDetails();
                result.SetFieldReadOnly();
                result.AddController(this);
                result.ShowBookDetails(searchResult.ElementAt(0));
                result.ShowDialog();
            }
            else
            {
                BookSearchResults result = new BookSearchResults();
                result.AddController(this);
                result.UpdateDataInLstBook(searchResult);
                result.ShowDialog();
            }
        }