Exemple #1
0
        public static List <Note> GetNotesInChapter(String bookID, String chapterID)
        {
            List <Note> list     = null;
            List <Page> pageList = PagesOnDeviceDataAccessor.GetPagesInChapter(bookID, chapterID);

            if (pageList != null)
            {
                List <Note> noteList = GetNotes(bookID);
                if (noteList != null && noteList.Count > 0)
                {
                    foreach (var page in pageList)
                    {
                        List <Note> tempList = noteList.Where(i => i.PageID == page.ID).ToList();
                        if (tempList != null && tempList.Count > 0)
                        {
                            if (list == null)
                            {
                                list = new List <Note>();
                            }
                            list.AddRange(tempList);
                        }
                    }
                }
            }

            return(list);
        }
 public static int GetNumAnnotationsInChapter(String bookID, String chapterID)
 {
     return(GetNumAnnotations(bookID, PagesOnDeviceDataAccessor.GetPagesInChapter(bookID, chapterID)));
 }
 public static List <Page> GetPages(String bookID, String chapterID)
 {
     return(PagesOnDeviceDataAccessor.GetPagesInChapter(bookID, chapterID));
 }