private void ViewTasks() { string actiontype = "both"; string callBackPage = ""; //unknown System.Web.UI.WebControls.BoundColumn colBound = new System.Web.UI.WebControls.BoundColumn(); colBound.DataField = "TITLE"; colBound.HeaderText = m_refMsg.GetMessage("generic Title"); TaskDataGrid.Columns.Add(colBound); colBound = new System.Web.UI.WebControls.BoundColumn(); colBound.DataField = "ID"; colBound.HeaderText = m_refMsg.GetMessage("generic ID"); TaskDataGrid.Columns.Add(colBound); colBound = new System.Web.UI.WebControls.BoundColumn(); colBound.DataField = "STATE"; colBound.HeaderText = m_refMsg.GetMessage("lbl state"); TaskDataGrid.Columns.Add(colBound); colBound = new System.Web.UI.WebControls.BoundColumn(); colBound.DataField = "PRIORITY"; colBound.HeaderText = m_refMsg.GetMessage("lbl priority"); TaskDataGrid.Columns.Add(colBound); colBound = new System.Web.UI.WebControls.BoundColumn(); colBound.DataField = "DUEDATE"; colBound.HeaderText = m_refMsg.GetMessage("lbl Due Date"); TaskDataGrid.Columns.Add(colBound); if ((actiontype == "by") || (actiontype == "all") || (actiontype == "both")) { colBound = new System.Web.UI.WebControls.BoundColumn(); colBound.DataField = "ASSIGNEDTO"; colBound.HeaderText = m_refMsg.GetMessage("lbl Assigned to"); TaskDataGrid.Columns.Add(colBound); } if ((actiontype == "to") || (actiontype == "all") || (actiontype == "both")) { colBound = new System.Web.UI.WebControls.BoundColumn(); colBound.DataField = "ASSIGNEDBY"; colBound.HeaderText = m_refMsg.GetMessage("lbl Assigned By"); TaskDataGrid.Columns.Add(colBound); } colBound = new System.Web.UI.WebControls.BoundColumn(); colBound.DataField = "COMMENT"; colBound.HeaderText = m_refMsg.GetMessage("lbl Last Added comments"); TaskDataGrid.Columns.Add(colBound); colBound = new System.Web.UI.WebControls.BoundColumn(); colBound.DataField = "DATECREATED"; colBound.HeaderText = m_refMsg.GetMessage("lbl Create Date"); TaskDataGrid.Columns.Add(colBound); TaskDataGrid.BorderColor = System.Drawing.Color.White; DataTable dt = new DataTable(); DataRow dr; dt.Columns.Add(new DataColumn("TITLE", typeof(string))); dt.Columns.Add(new DataColumn("ID", typeof(string))); dt.Columns.Add(new DataColumn("STATE", typeof(string))); dt.Columns.Add(new DataColumn("PRIORITY", typeof(string))); dt.Columns.Add(new DataColumn("DUEDATE", typeof(string))); dt.Columns.Add(new DataColumn("ASSIGNEDTO", typeof(string))); dt.Columns.Add(new DataColumn("ASSIGNEDBY", typeof(string))); dt.Columns.Add(new DataColumn("COMMENT", typeof(string))); dt.Columns.Add(new DataColumn("DATECREATED", typeof(string))); if (TaskExists == true) { int TaskItemType = 1; m_refTask = m_refContentApi.EkTaskRef; Ektron.Cms.PageRequestData null_EktronCmsPageRequestData = null; cTasks = m_refTask.GetTasks(m_intId, -1, -1, TaskItemType, Request.QueryString["orderby"], ContentLanguage, ref null_EktronCmsPageRequestData, ""); } int i = 0; EkTask cTask; if (cTasks != null) { EmailHelper m_refMail = new EmailHelper(); while (i < cTasks.Count) { i++; cTask = cTasks.get_Item(i); if (!(cTask.TaskTypeID == (long)Ektron.Cms.Common.EkEnumeration.TaskType.BlogPostComment)) { Array.Resize(ref arrTaskTypeID, i - 1 + 1); arrTaskTypeID[i - 1] = (string)("shown_task_" + i + "_" + (cTask.TaskTypeID <= 0 ? "NotS" : (cTask.TaskTypeID.ToString()))); dr = dt.NewRow(); dr["TITLE"] = "<a href=\"tasks.aspx?action=ViewTask&tid=" + cTask.TaskID + "&folderid=" + cTask.FolderId + "&contentid=" + cTask.ContentID + "&fromViewContent=1&ty=both&LangType=" + cTask.ContentLanguage + callBackPage + "\">" + cTask.TaskTitle + "</a>"; dr["TITLE"] += " <script language=\"JavaScript\">" + "\r\n"; dr["TITLE"] += " AddShownTaskID(\'" + arrTaskTypeID[i - 1] + "\');" + "\r\n"; dr["TITLE"] += " </script> " + "\r\n"; dr["ID"] = cTask.TaskID; int iState = System.Convert.ToInt32(cTask.State); switch (iState) { case 1: dr["STATE"] = "Not Started"; break; case 2: dr["STATE"] = "Active"; break; case 3: dr["STATE"] = "Awaiting Data"; break; case 4: dr["STATE"] = "On Hold"; break; case 5: dr["STATE"] = "Pending"; break; case 6: dr["STATE"] = "ReOpened"; break; case 7: dr["STATE"] = "Completed"; break; case 8: dr["STATE"] = "Archived"; break; case 9: dr["STATE"] = "Deleted"; break; } int iPrio = System.Convert.ToInt32(cTask.Priority); switch (iPrio) { case 1: dr["PRIORITY"] = "Low"; break; case 2: dr["PRIORITY"] = "Normal"; break; case 3: dr["PRIORITY"] = "High"; break; } if (cTask.DueDate != "") { if (System.Convert.ToDateTime(cTask.DueDate) < DateTime.Today) //Verify:Udai 11/22/04 Replaced Now.ToOADate - 1 with DateTime.Today { dr["DUEDATE"] = cTask.DueDate; //Response.Write("<td class=""important"">" & AppUI.GetInternationalDateOnly(cTask.DueDate) & "</td>") } else { dr["DUEDATE"] = cTask.DueDate; //Response.Write("<td>" & AppUI.GetInternationalDateOnly(cTask.DueDate) & "</td>") } } else { dr["DUEDATE"] = "[Not Specified]"; } EkTask tempcTask = cTask; if ((actiontype == "by") || (actiontype == "all") || (actiontype == "both")) { if (cTask.AssignToUserGroupID == 0) { dr["ASSIGNEDTO"] = "All Authors of (" + cTask.ContentID.ToString() + ")"; } else if (cTask.AssignedToUser != "") { dr["ASSIGNEDTO"] = "<img src=\"" + m_refContentApi.AppPath + "images/UI/Icons/user.png\" align=\"absbottom\">" + m_refMail.MakeUserTaskEmailLink(tempcTask, false); } else if (cTask.AssignedToUserGroup != "") { dr["ASSIGNEDTO"] = "<img src=\"" + m_refContentApi.AppPath + "images/UI/Icons/users.png\" align=\"absbottom\">"; if (cTask.AssignToUserGroupID != -1) { dr[5] += m_refMail.MakeUserGroupTaskEmailLink(tempcTask); } else { dr[5] += cTask.AssignedToUserGroup; } } } if ((actiontype == "to") || (actiontype == "all") || (actiontype == "both")) { dr["ASSIGNEDBY"] = m_refMail.MakeByUserTaskEmailLink(tempcTask, false); } if (cTask.LastComment == "") { dr["COMMENT"] = "[Not Specified]"; } else { dr["COMMENT"] = "<div class=\"comment-block\">" + cTask.LastComment + "</div>"; } dr["DATECREATED"] = cTask.DateCreated; //GetInternationalDateOnly dt.Rows.Add(dr); } } } DataView dv = new DataView(dt); TaskDataGrid.DataSource = dv; TaskDataGrid.DataBind(); }
public bool ViewContentByCategory() { _CurrentUserId = _ContentApi.UserId; _AppImgPath = _ContentApi.AppImgPath; _AppPath = _ContentApi.AppPath; _SitePath = _ContentApi.SitePath; _EnableMultilingual = _ContentApi.EnableMultilingual; url_action.Text = _PageAction; url_id.Text = _Id.ToString(); if (_FolderData == null) { _FolderData = _ContentApi.GetFolderById(_Id); } if (_FolderData == null) { Response.Redirect((string)("reterror.aspx?info=" + _MessageHelper.GetMessage("com: folder does not exist")), true); return false; } else { if (_FolderData.XmlConfiguration != null) { _HasXmlConfig = true; } _PermissionData = _ContentApi.LoadPermissions(_Id, "folder", 0); _FolderType = _FolderData.FolderType; } //Setting JS Variable for global use through workarea.aspx page. pasteFolderType.Text = Convert.ToString(_FolderData.FolderType); pasteFolderId.Text = Convert.ToString(_FolderData.Id); pasteParentId.Text = Convert.ToString(_FolderData.ParentId); if (!string.IsNullOrEmpty(Request.QueryString["IsArchivedEvent"])) { _IsArchivedEvent = Convert.ToBoolean(Request.QueryString["IsArchivedEvent"]); is_archived.Text = Convert.ToString(_IsArchivedEvent); } _AssetInfoData = _ContentApi.GetAssetSupertypes(); if ((Ektron.Cms.Common.EkConstants.CMSContentType_Content == Convert.ToInt32(_ContentTypeSelected)) || (Ektron.Cms.Common.EkConstants.CMSContentType_Archive_Content == Convert.ToInt32(_ContentTypeSelected)) || (Ektron.Cms.Common.EkConstants.CMSContentType_XmlConfig == Convert.ToInt32(_ContentTypeSelected))) { _ContentType = int.Parse(_ContentTypeSelected); } else if (Ektron.Cms.Common.EkConstants.CMSContentType_Forms == Convert.ToInt32(_ContentTypeSelected) || Ektron.Cms.Common.EkConstants.CMSContentType_Archive_Forms == Convert.ToInt32(_ContentTypeSelected)) { _ContentType = int.Parse(_ContentTypeSelected); } else if (_ManagedAsset_Min <= Convert.ToInt32(_ContentTypeSelected) && Convert.ToInt32(_ContentTypeSelected) <= _ManagedAsset_Max) { if (DoesAssetSupertypeExist(_AssetInfoData, int.Parse(_ContentTypeSelected))) { _ContentType = int.Parse(_ContentTypeSelected); } } else if (Convert.ToInt32(_ContentTypeSelected) == _CMSContentType_AllTypes) { _ContentType = Ektron.Cms.Common.EkConstants.CMSContentType_NonLibraryForms; } else if (_IsArchivedEvent == true && (Convert.ToInt32(_ContentTypeSelected) == EkConstants.CMSContentType_Archive_ManagedFiles || Convert.ToInt32(_ContentTypeSelected) == EkConstants.CMSContentType_Archive_OfficeDoc || Convert.ToInt32(_ContentTypeSelected) == EkConstants.CMSContentType_Archive_MultiMedia || Convert.ToInt32(_ContentTypeSelected) == EkConstants.CMSContentType_Archive_Images)) { _ContentType = int.Parse(_ContentTypeSelected); } _ContentTypeSelected = _ContentType.ToString(); _PageData = new Microsoft.VisualBasic.Collection(); _PageData.Add(_Id, "FolderID", null, null); if (_FolderData.FolderType == 1) //blog { _PageData.Add("BlogPost", "OrderBy", null, null); } else { _PageData.Add(_OrderBy, "OrderBy", null, null); } if (Request.QueryString["orderbydirection"] == "desc") direction = "desc"; else direction = "asc"; _OrderByDirection = direction; _PageData.Add(_OrderByDirection, "OrderByDirection", null, null); _PageData.Add(_ContentLanguage, "m_intContentLanguage", null, null); switch ((Ektron.Cms.Common.EkEnumeration.FolderType)_FolderData.FolderType) { case Ektron.Cms.Common.EkEnumeration.FolderType.Blog: _ContentType = Ektron.Cms.Common.EkConstants.CMSContentType_Content; _PageData.Add(_ContentType, "ContentType", null, null); break; case Ektron.Cms.Common.EkEnumeration.FolderType.DiscussionForum: _ContentType = Ektron.Cms.Common.EkConstants.CMSContentType_Content; _PageData.Add(_ContentType, "ContentType", null, null); break; default: if (_ContentType > 0) { _PageData.Add(_ContentType, "ContentType", null, null); } break; } if (_ContentType == 1 && _ContentSubTypeSelected != Ektron.Cms.Common.EkEnumeration.CMSContentSubtype.AllTypes) { _PageData.Add(_ContentSubTypeSelected, "ContentSubType", null, null); } if ((Ektron.Cms.Common.EkEnumeration.FolderType)(_FolderData.FolderType) == Ektron.Cms.Common.EkEnumeration.FolderType.Calendar) { calendardisplay.Visible = true; pnlThreadedDiscussions.Visible = false; if ((Request.QueryString["showAddEventForm"] != null) && Request.QueryString["showAddEventForm"] == "true") { if (ViewState["AddEventFormDisplay"] == null || System.Convert.ToBoolean(ViewState["AddEventFormDisplay"]) == false) //only show once { ViewState.Add("AddEventFormDisplay", true); DateTime startDT = DateTime.Now.Date.AddHours(8); if (Request.QueryString["startDT"] != null) { startDT = DateTime.ParseExact(Request.QueryString["startDT"], "yyyyMMddHHmm", new System.Globalization.CultureInfo(1033)); } calendardisplay.ShowInsertForm(startDT); } } if (Request.QueryString["editEvent"] != null) { if (ViewState["editEvent"] == null || System.Convert.ToBoolean(ViewState["editEvent"]) == false) //only show once { ViewState.Add("editEvent", true); calendardisplay.ShowEditForm(Request.QueryString["editEvent"]); } } ScriptManager.RegisterClientScriptBlock(Page, typeof(UserControl), "CalendarCleanup", "try{ window.EditorCleanup(); }catch(ex){}", true); } _PagingPageSize = _ContentApi.RequestInformationRef.PagingSize; if ((Ektron.Cms.Common.EkEnumeration.FolderType)(_FolderData.FolderType) == Ektron.Cms.Common.EkEnumeration.FolderType.Blog) { _BlogData = _ContentApi.BlogObject(_FolderData); } //if it's a calendar then we do it on prerender if ((Ektron.Cms.Common.EkEnumeration.FolderType)(_FolderData.FolderType) != Ektron.Cms.Common.EkEnumeration.FolderType.Calendar) { if (_PageAction == "viewarchivecontentbycategory") { _EkContentCol = _EkContent.GetAllViewArchiveContentInfov5_0(_PageData, _PagingCurrentPageNumber, _PagingPageSize, ref _PagingTotalPagesNumber); _NextActionType = "ViewContentByCategory"; } else if (_PageAction == "viewcontentbycategory") { _EkContentCol = _EkContent.GetAllViewableChildContentInfoV5_0(_PageData, _PagingCurrentPageNumber, _PagingPageSize, ref _PagingTotalPagesNumber); _NextActionType = "ViewArchiveContentByCategory"; } //paging goes here int i; for (i = 0; i <= _EkContentCol.Count - 1; i++) { if (_EkContentCol.get_Item(i).ContentStatus == "A") { _TakeAction = true; _CheckedInOrApproved = true; break; } else { if (_EkContentCol.get_Item(i).ContentStatus == "I") { _CheckedInOrApproved = true; } } } } else { if (_PageAction == "viewarchivecontentbycategory") { _NextActionType = "ViewContentByCategory"; } else if (_PageAction == "viewcontentbycategory") { _NextActionType = "ViewArchiveContentByCategory"; } } switch ((Ektron.Cms.Common.EkEnumeration.FolderType)(_FolderData.FolderType)) { case Ektron.Cms.Common.EkEnumeration.FolderType.Catalog: if (_PageAction == "viewarchivecontentbycategory") { _NextActionType = "ViewContentByCategory"; } else if (_PageAction == "viewcontentbycategory") { _NextActionType = "ViewArchiveContentByCategory"; } Page.ClientScript.RegisterClientScriptBlock(typeof(string), "objselnotice", "<script type=\"text/javascript\">var objSelSupertype = null;</script>"); CatalogEntry CatalogManager = new CatalogEntry(_ContentApi.RequestInformationRef); System.Collections.Generic.List<EntryData> entryList = new System.Collections.Generic.List<EntryData>(); Ektron.Cms.Common.Criteria<EntryProperty> entryCriteria = new Ektron.Cms.Common.Criteria<EntryProperty>(); entryCriteria.AddFilter(EntryProperty.CatalogId, Ektron.Cms.Common.CriteriaFilterOperator.EqualTo, _Id); entryCriteria.PagingInfo.CurrentPage = Convert.ToInt32(_PagingCurrentPageNumber.ToString()); entryCriteria.PagingInfo.RecordsPerPage = _ContentApi.RequestInformationRef.PagingSize; if (_ContentApi.RequestInformationRef.ContentLanguage > 0) { entryCriteria.AddFilter(EntryProperty.LanguageId, Ektron.Cms.Common.CriteriaFilterOperator.EqualTo, _ContentApi.RequestInformationRef.ContentLanguage); } switch (this._ContentTypeQuerystringParam) { case "0": long[] IdList = new long[3]; IdList[0] = Convert.ToInt64(Ektron.Cms.Common.EkEnumeration.CatalogEntryType.Product); IdList[1] = Convert.ToInt64(Ektron.Cms.Common.EkEnumeration.CatalogEntryType.ComplexProduct); entryCriteria.AddFilter(EntryProperty.EntryType, Ektron.Cms.Common.CriteriaFilterOperator.In, IdList); break; case "2": entryCriteria.AddFilter(EntryProperty.EntryType, Ektron.Cms.Common.CriteriaFilterOperator.EqualTo, Ektron.Cms.Common.EkEnumeration.CatalogEntryType.Kit); break; case "3": entryCriteria.AddFilter(EntryProperty.EntryType, Ektron.Cms.Common.CriteriaFilterOperator.EqualTo, Ektron.Cms.Common.EkEnumeration.CatalogEntryType.Bundle); break; case "4": entryCriteria.AddFilter(EntryProperty.EntryType, Ektron.Cms.Common.CriteriaFilterOperator.EqualTo, Ektron.Cms.Common.EkEnumeration.CatalogEntryType.SubscriptionProduct); break; } if (_PageAction == "viewarchivecontentbycategory") { entryCriteria.AddFilter(EntryProperty.IsArchived, Ektron.Cms.Common.CriteriaFilterOperator.EqualTo, true); } else { entryCriteria.AddFilter(EntryProperty.IsArchived, Ektron.Cms.Common.CriteriaFilterOperator.EqualTo, false); } if (Request.QueryString["orderbydirection"] == "desc") direction = "desc"; else direction = "asc"; if(direction == "desc") entryCriteria.OrderByDirection = (EkEnumeration.OrderByDirection)OrderByDirection.Descending; else entryCriteria.OrderByDirection = (EkEnumeration.OrderByDirection)OrderByDirection.Ascending; switch (_OrderBy.ToLower()) { case "language": entryCriteria.OrderByField = EntryProperty.LanguageId; break; case "id": entryCriteria.OrderByField = EntryProperty.Id; break; case "status": entryCriteria.OrderByField = EntryProperty.ContentStatus; break; case "entrytype": entryCriteria.OrderByField = EntryProperty.EntryType; break; case "sale": entryCriteria.OrderByField = EntryProperty.SalePrice; break; case "list": entryCriteria.OrderByField = EntryProperty.ListPrice; break; default: //"title" entryCriteria.OrderByField = EntryProperty.Title; break; } entryList = CatalogManager.GetList(entryCriteria); for (int j = 0; j <= entryList.Count - 1; j++) { if (entryList[j].Status == "A") { _TakeAction = true; _CheckedInOrApproved = true; break; } else { if (entryList[j].Status == "I") { _CheckedInOrApproved = true; } } } _PagingTotalPagesNumber = System.Convert.ToInt32(entryCriteria.PagingInfo.TotalPages); //paging goes here ViewCatalogToolBar(entryList.Count); Populate_ViewCatalogGrid(_EkContentCol, entryList); _ContentType = int.Parse(_ContentTypeSelected); break; case Ektron.Cms.Common.EkEnumeration.FolderType.Blog: _IsMyBlog = System.Convert.ToBoolean((_BlogData.Id == _ContentApi.GetUserBlog(_ContentApi.UserId)) ? true : false); Page.ClientScript.RegisterClientScriptBlock(typeof(string), "objselnotice", "<script type=\"text/javascript\">var objSelSupertype = null;</script>"); if (!string.IsNullOrEmpty(Request.QueryString["ContType"]) && (Request.QueryString["ContType"] == Ektron.Cms.Common.EkConstants.CMSContentType_BlogComments.ToString())) { _ContentType = System.Convert.ToInt32(Request.QueryString["ContType"]); _Task = _ContentApi.EkTaskRef; if (!string.IsNullOrEmpty(Request.QueryString["contentid"])) { _PostID = Convert.ToInt64(Request.QueryString["contentid"]); _ContentData = _ContentApi.GetContentById(_PostID, 0); Ektron.Cms.PageRequestData null_EktronCmsPageRequestData = null; _Comments = _Task.GetTasks(_PostID, -1, -1, Convert.ToInt32(Ektron.Cms.Common.EkEnumeration.CMSTaskItemType.BlogCommentItem), "postcomment", 0, ref null_EktronCmsPageRequestData, ""); } else { Ektron.Cms.PageRequestData null_EktronCmsPageRequestData2 = null; _Comments = _Task.GetTasks(-1, -1, -1, Convert.ToInt32(Ektron.Cms.Common.EkEnumeration.CMSTaskItemType.BlogCommentItem), "", 0, ref null_EktronCmsPageRequestData2, ""); } ViewBlogContentByCategoryToolBar(); Populate_ViewBlogCommentsByCategoryGrid(_Comments); } else { Hashtable BlogPostCommentTally = new Hashtable(); BlogPostCommentTally = _EkContent.TallyCommentsForBlogPosts(_Id); ViewBlogContentByCategoryToolBar(); Populate_ViewBlogPostsByCategoryGrid(_EkContentCol, BlogPostCommentTally); } break; case Ektron.Cms.Common.EkEnumeration.FolderType.Media: Page.ClientScript.RegisterClientScriptBlock(typeof(string), "objselnotice", "<script type=\"text/javascript\">var objSelSupertype = null;</script>"); ViewContentByCategoryToolBar(); Populate_ViewMediaGrid(_EkContentCol); break; case Ektron.Cms.Common.EkEnumeration.FolderType.DiscussionBoard: Page.ClientScript.RegisterClientScriptBlock(typeof(string), "objselnotice", "<script type=\"text/javascript\">var objSelSupertype = null;</script>"); ViewDiscussionBoardToolBar(); Populate_ViewDiscussionBoardGrid(); break; case Ektron.Cms.Common.EkEnumeration.FolderType.DiscussionForum: Page.ClientScript.RegisterClientScriptBlock(typeof(string), "objselnotice", "<script type=\"text/javascript\">var objSelSupertype = null;</script>"); bool bCanModerate = false; int itotalpages = 1; int icurrentpage = 1; if (!string.IsNullOrEmpty(Request.QueryString["ContType"]) && (Request.QueryString["ContType"] == Ektron.Cms.Common.EkConstants.CMSContentType_BlogComments.ToString())) { _ContentType = System.Convert.ToInt32(Request.QueryString["ContType"]); if (this._ContentApi.UserId > 0 && ((!(_PermissionData == null) && _PermissionData.CanAddToImageLib == true) || _PermissionData.IsAdmin)) { bCanModerate = true; } _DiscussionBoard = _ContentApi.GetTopic(_ContentId, true); if (_DiscussionBoard == null) { throw new Exception("You may not have permission to view this object or it has been deleted."); } _BoardID = _DiscussionBoard.Id; _ContentData = (ContentData)(_DiscussionBoard.Forums[0].Topics[0]); _PermissionData = _ContentApi.LoadPermissions(_ContentId, "content", ContentAPI.PermissionResultType.All); ViewRepliesToolBar(); _Task = _ContentApi.EkTaskRef; if (!string.IsNullOrEmpty(Request.QueryString["contentid"])) { _PostID = Convert.ToInt64(Request.QueryString["contentid"]); _Comments = _Task.GetTopicReplies(_PostID, _DiscussionBoard.Id, ref icurrentpage, 0, 0, ref itotalpages, bCanModerate); } else { Ektron.Cms.PageRequestData null_EktronCmsPageRequestData3 = null; _Comments = _Task.GetTasks(-1, -1, -1, Convert.ToInt32(Ektron.Cms.Common.EkEnumeration.CMSTaskItemType.TopicReplyItem), "", 0, ref null_EktronCmsPageRequestData3, ""); } Populate_ViewTopicRepliesGrid(_Comments); } else { ArrayList ForumPostCommentTally = new ArrayList(); DiscussionBoard thisboard; bool bModerator = false; if (_PermissionData.IsAdmin == true || _PermissionData.CanAddToImageLib == true) { bModerator = true; } thisboard = _EkContent.GetForumbyID(_Id.ToString(), bModerator, _PagingCurrentPageNumber, ref this._PagingTotalPagesNumber, "", this._ContentApi.RequestInformationRef.PagingSize); //paging here ForumPostCommentTally = _EkContent.GetRepliesForTopics(_Id); ViewDiscussionForumToolBar(); Populate_ViewForumPostsByCategoryGrid(thisboard.Forums[0].Topics, ForumPostCommentTally); } break; case Ektron.Cms.Common.EkEnumeration.FolderType.Calendar: ViewCalendarToolBar(); break; default: ViewContentByCategoryToolBar(); Populate_ViewContentByCategoryGrid(_EkContentCol); break; } Util_SetJs(); return true; }