コード例 #1
0
ファイル: Library.cs プロジェクト: HKrecki/LibraryDomainModel
        /////////////

        ///////////////
        // BookItems //

        /* Adds new book to library (not catalog)
         */
        public void AddNewBookToLibrary(string _isbn, string _barcode, string _tag, string _title, bool _isReferenceOnly, Language _lang, int _numberOfPages, Format _format)
        {
            Book_Item newBook = new Book_Item();

            newBook.ISBN            = _isbn;
            newBook.barcode         = _barcode;
            newBook.tag             = _tag;
            newBook.title           = _title;
            newBook.name            = _title;
            newBook.isReferenceOnly = _isReferenceOnly;
            newBook.lang            = _lang;
            newBook.numberOfPages   = _numberOfPages;
            newBook.format          = _format;

            newBook.borrowed   = DateTime.MinValue;
            newBook.loanPeriod = 0;
            newBook.dueDate    = DateTime.MinValue;
            newBook.isOverdue  = false;

            // Add book to library list
            libraryBookList.Add(newBook);
        }
コード例 #2
0
        //////////////////////////////////
        // Add existing book to cetalog //

        /* Adds existing book(in library) to catalog
         */
        public void AddBookToCatalog(Catalog _catalog, Book_Item _book)
        {
            _catalog.AddBookItem(_book);
        }
コード例 #3
0
 /*
  * Add bookitem to catalog
  * method from interface IManage
  */
 public void AddBookItem(Book_Item newBook)
 {
     // Add book to catalog -> method from Dictionary class
     bookItemCatalog.Add(newBook.ISBN, newBook);
 }
コード例 #4
0
ファイル: Account.cs プロジェクト: HKrecki/LibraryDomainModel
 public void AddBookToHistory(Book_Item _book)
 {
     booksHistory.Add(_book);
 }