///////////// /////////////// // 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); }
////////////////////////////////// // Add existing book to cetalog // /* Adds existing book(in library) to catalog */ public void AddBookToCatalog(Catalog _catalog, Book_Item _book) { _catalog.AddBookItem(_book); }
/* * 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); }
public void AddBookToHistory(Book_Item _book) { booksHistory.Add(_book); }