/// <summary> /// Gets the specified chapter_id. /// </summary> /// <param name="chapter_id">The chapter_id.</param> /// <returns></returns> /// <remarks>Documented by Dev03, 2009-01-13</remarks> public IChapter Get(int chapter_id) { DbChapter chapter = new DbChapter(chapter_id, false, Parent.GetChildParentClass(this)); if (!chapter.HasPermission(PermissionTypes.Visible)) { throw new PermissionException(); } return(chapter); }
/// <summary> /// Finds the specified title. /// </summary> /// <param name="title">The title.</param> /// <returns></returns> /// <remarks>Documented by Dev03, 2009-01-13</remarks> public IChapter Find(string title) { int id = connector.FindChapter(LmId, title); if (id < 0) { return(null); } DbChapter chapter = new DbChapter(id, false, Parent.GetChildParentClass(this)); if (!chapter.HasPermission(PermissionTypes.Visible)) { return(null); } return(chapter); }
/// <summary> /// Gets the specified chapter_id. /// </summary> /// <param name="chapter_id">The chapter_id.</param> /// <returns></returns> /// <remarks>Documented by Dev03, 2009-01-13</remarks> public IChapter Get(int chapter_id) { DbChapter chapter = new DbChapter(chapter_id, false, Parent.GetChildParentClass(this)); if (!chapter.HasPermission(PermissionTypes.Visible)) throw new PermissionException(); return chapter; }
/// <summary> /// Finds the specified title. /// </summary> /// <param name="title">The title.</param> /// <returns></returns> /// <remarks>Documented by Dev03, 2009-01-13</remarks> public IChapter Find(string title) { int id = connector.FindChapter(LmId, title); if (id < 0) return null; DbChapter chapter = new DbChapter(id, false, Parent.GetChildParentClass(this)); if (!chapter.HasPermission(PermissionTypes.Visible)) return null; return chapter; }