Exemplo n.º 1
0
        //Get Book info from TabBook with ISBN
        public List <TabBookModel> GetTabBookInfo(string ISBN)
        {
            List <TabBookModel> _books = new List <TabBookModel>();

            _tabBookTable = _bookDao.GetTabBookByISBN(ISBN);

            foreach (DataSet1.TabBookRow booksRow in _tabBookTable.Rows)
            {
                TabBookModel tempRow = TabBookModel.Parse(booksRow);
                _books.Add(tempRow);
            }

            return(_books);
        }
Exemplo n.º 2
0
        // Get the value from the dataset and stock them in tabBook
        public static TabBookModel Parse(DataSet1.TabBookRow BooksRow)
        {
            if (BooksRow == null)
            {
                return(null);
            }
            else
            {
                TabBookModel tabBook = new TabBookModel();
                tabBook.Isbn          = BooksRow.ISBN;
                tabBook.Publisher     = BooksRow.Publisher;
                tabBook.BookName      = BooksRow.BookName;
                tabBook.PublisherYear = BooksRow.PublishYear;
                tabBook.Pages         = BooksRow.Pages;
                tabBook.AuthorID      = BooksRow.Author;
                tabBook.CategoryID    = BooksRow.Category;
                tabBook.LanguageID    = BooksRow.Language;

                return(tabBook);
            }
        }