/// <summary> /// To Get TypeIII Pages for selected Book /// Added By: Praveena /// Date:16/09/2010 /// Reason: For module Add additional attributes to change page owner table /// </summary> /// <param name="siteURL"></param> /// <param name="bookId"></param> /// <param name="terminated"></param> /// <returns></returns> public DataTable GetTypeIIIPagesForBook(string siteURL, string bookId, string terminated) { DataTable dtResult = null; objCommonDAL = new CommonDAL(); objCommonBLL = new CommonBLL(); StringBuilder strChapterId = new StringBuilder(); string strCamlQuery = @"<Where><And><Eq><FieldRef Name='Book_ID' /> <Value Type='Number'> " + bookId + "</Value></Eq><Eq><FieldRef Name='Terminate_Status' /><Value Type='Choice'>" + terminated + "</Value></Eq></And></Where>"; dtResult = objCommonDAL.ReadList(siteURL, DWBCHAPTERLIST, strCamlQuery); if (dtResult != null && dtResult.Rows.Count > 0) { for (int intRowIndex = 0; intRowIndex < dtResult.Rows.Count; intRowIndex++) { strChapterId.Append(Convert.ToString(dtResult.Rows[intRowIndex][IDCOLUMN])); strChapterId.Append(";"); } strCamlQuery = objCommonBLL.CreateCamlQueryWithoutWhere(strChapterId.ToString(), "Chapter_ID", "Number"); strChapterId.Remove(0, strChapterId.Length); strChapterId.Append(strCamlQuery); strChapterId.Append("<Eq><FieldRef Name='Connection_Type' /><Value Type='Text'>3 - User Defined Document</Value></Eq></And>"); strChapterId.Append("<Eq><FieldRef Name='Terminate_Status' /><Value Type='Choice'>" + terminated + "</Value></Eq></And></Where>"); strChapterId.Insert(0, "<Where><And><And>"); dtResult = objCommonDAL.ReadList(siteURL, CHAPTERPAGESMAPPINGLIST, strChapterId.ToString()); } return dtResult; }