Beispiel #1
0
        public BookInfoModel GetBookInfo(uint authorId, uint titleId, uint formatId)
        {
            DataRow       rawBookInfo   = GetBookInfo(_getBookId(authorId, titleId, formatId));
            BookInfoModel bookInfoModel = ConvertDataRowToBookInfo(rawBookInfo);

            return(bookInfoModel);
        }
Beispiel #2
0
        public bool AddBookInfo(BookInfoModel bookInfo)
        {
            bool addBookWasSuccessful = false;

            addBookWasSuccessful = addItem(bookInfo);
            bookInfo.BookId      = _newKeyValue;

            return(addBookWasSuccessful);
        }
        public BookModel(bool EditNotInsert)
        {
            _bookKey         = 0;
            _bookInfo        = new BookInfoModel();
            _authorInfo      = null;
            _itemsToValidate = new List <DataTableItemBaseModel>();
            _itemsToAddToDb  = new List <DataTableItemBaseModel>();
            _editMode        = EditNotInsert;

            if (!EditNotInsert)
            {
                _bookInfoIndex = AddUnique(_itemsToValidate, _bookInfo);
            }
            else
            {
                _itemsToUpDate = new List <DataTableItemBaseModel>();
            }
        }