public void AddNewOwnedBook(IAddNewOwnedBookView inForm, IOwnedRepository ownedRepository)
        {
            if (inForm.ShowViewModal() == true)
            {
                try
                {
                    string   title       = inForm.Title;
                    string   author      = inForm.Author;
                    string   publisher   = inForm.Publisher;
                    DateTime datePub     = inForm.DatePublished;
                    int      numPages    = inForm.NumberOfPages;
                    string   genre       = inForm.Genre;
                    decimal  price       = inForm.Price;
                    string   placeBought = inForm.PlaceBought;
                    bool     read        = inForm.Read;

                    BookOwned newOwned = BookFactory.CreateBookOwned(title, author, publisher, datePub, numPages, genre, price, placeBought, read);

                    ownedRepository.AddBookOwned(newOwned);
                }
                catch (Exception ex)
                {
                    MessageBox.Show("EXCEPTION: " + ex.Message);
                    throw;
                }
            }
        }
 public MainFormController(IWindowFormsFactory inFormFactory, IReadRepository inReadRepo, ITBRRepository inTBRRepo, IOwnedRepository inOwnedRepo, ILibraryRepository inLibraryRepo, IWishlistRepository inWishlistRepo)
 {
     _formsFactory       = inFormFactory;
     _readRepository     = inReadRepo;
     _tbrRepository      = inTBRRepo;
     _ownedRepository    = inOwnedRepo;
     _libraryRepository  = inLibraryRepo;
     _wishlistRepository = inWishlistRepo;
 }
        public void ViewOwnedBooks(IShowOwnedBookListView inForm, IOwnedRepository ownedRepository, IMainController mainController)
        {
            List <BookOwned> listBooks = ownedRepository.getListBooksOwned();

            inForm.ShowModaless(mainController, listBooks);
        }