/// <summary> /// Get the Chapter Pages /// </summary> /// <param name="siteUrl">The site URL.</param> /// <param name="listName">List Name.</param> /// <param name="CAMLQuery">The CAML query.</param> /// <returns>ListEntry object.</returns> public ListEntry GetChapterPages(string siteUrl, string listName, string CAMLQuery) { objWellBookChapterDAL = new WellBookChapterDAL(); return objWellBookChapterDAL.SetChapterPage(siteUrl, listName, CAMLQuery); }
/// <summary> /// Get Pages for the Selected Book /// </summary> /// <param name="strParentSiteUrl">Site URL.</param> /// <param name="listName">List Name.</param> /// <param name="strCamlQuery">CAML Query.</param> /// <returns>ListEntry object</returns> public ListEntry GetBookPages(string siteURL, string listName, string CAMLQuery) { ListEntry objListEntry = null; DataTable dtResultTable = null; objWellBookChapterDAL = new WellBookChapterDAL(); objCommonDAL = new CommonDAL(); string strcamlQuery = string.Empty; int intRowId = 0; objListEntry = objWellBookChapterDAL.SetChapterPage(siteURL, listName, CAMLQuery); strcamlQuery = @"<Where><Eq><FieldRef Name='ID' /> <Value Type='Counter'>" + Convert.ToString(objListEntry.ChapterDetails.RowID) + "</Value></Eq></Where>"; dtResultTable = objCommonDAL.ReadList(siteURL, DWBCHAPTERLIST, strcamlQuery); if (dtResultTable != null && dtResultTable.Rows.Count > 0) { int.TryParse(Convert.ToString(dtResultTable.Rows[0]["Book_ID"]), out intRowId); objListEntry.ChapterDetails.BookID = intRowId; objListEntry.ChapterDetails.ChapterTitle = Convert.ToString(dtResultTable.Rows[0][TITLECOLUMN]); } if (dtResultTable != null) { dtResultTable.Dispose(); } return objListEntry; }