Пример #1
0
        public bool SetBookList(string html, int pageIndex)
        {
            if (!string.IsNullOrEmpty(html))
            {
                List <BookEntity> arrary = AnalysisSoduService.GetBookUpdateChapterList(html);
                if (arrary == null)
                {
                    return(false);
                }
                else
                {
                    if (this.ChapterList != null)
                    {
                        this.ChapterList.Clear();
                    }
                    else
                    {
                        this.ChapterList = new ObservableCollection <BookEntity>();
                    }
                    this.PageIndex = pageIndex;

                    foreach (var item in arrary)
                    {
                        item.BookName = this.ContentTitle;
                        item.BookID   = this.CurrentEntity.BookID;
                        this.ChapterList.Add(item);
                    }
                    return(true);
                }
            }

            return(false);
        }