/// <summary> /// /// </summary> public void LoadBooks() { if (BookLists?.ToArray().Length > 0) { return; } BookLists.Add(new Books { id = "B1212", bookName = "History of Amazon Valley", author = "Ross Suarez", copiesAvailable = 0, totalCopies = 2 }); BookLists.Add(new Books { id = "B4232", bookName = "Language Fundamentals", author = "H S Parkmay", copiesAvailable = 5, totalCopies = 5 }); SaveChanges(); }
public void onItemClick(View view, int position, object data) { if (data is HotReview.Reviews) { BookDiscussionDetailActivity.startActivity(this, ((HotReview.Reviews)data)._id); } else if (data is RecommendBookList.RecommendBook) { RecommendBookList.RecommendBook recommendBook = (RecommendBookList.RecommendBook)data; BookLists bookLists = new BookLists(); BookLists.BookListsBean bookListsBean = new BookLists.BookListsBean(); bookListsBean._id = recommendBook.id; bookListsBean.author = recommendBook.author; bookListsBean.bookCount = recommendBook.bookCount; bookListsBean.collectorCount = recommendBook.collectorCount; bookListsBean.cover = recommendBook.cover; bookListsBean.desc = recommendBook.desc; bookListsBean.title = recommendBook.title; SubjectBookListDetailActivity.startActivity(this, bookListsBean); } }