public static string GetListAllItemView(long pageNo, long itemsPerPage, long dataIndex, string templateSuffix, long infoPageId, bool asyncLoading) { string message = ""; if (itemsPerPage == 0) { itemsPerPage = UtilsGeneric.DefaultInnerItemsPerPage; } long totalSections; long totalItems; string htmlTextItemList = ""; string htmlAddItemList = ""; #region Add Link LTD_InfoPage ltdInfoPage = DataInfoList.GetLtdInfoPage(infoPageId); if (UtilsSecurity.HaveAuthorRoleEnabled() == true) { if ((ltdInfoPage != null) && (ltdInfoPage.UserID == UtilsSecurity.GetUserId())) { TemplateInfoSectionSaveAdd templateSaveAdd = new TemplateInfoSectionSaveAdd { DataIndex = dataIndex.ToString(), PageNo = pageNo.ToString(), ItemsPerPage = itemsPerPage.ToString(), TemplateSuffix = templateSuffix, InfoPageId = infoPageId.ToString(), }; htmlAddItemList = templateSaveAdd.GetFilled(templateSuffix, UtilsGeneric.Validate, UtilsGeneric.ThrowException, out message); } } #endregion #region Get Fill List #region Get Section Data List <LTD_InfoSection> ltdSectionList = new List <LTD_InfoSection>(); if ((UtilsSecurity.HaveAdminRole() == true) || (UtilsSecurity.HaveAuthorRoleEnabled() == true)) { ltdSectionList = DataInfoList.GetPagedLtdInfoSection(infoPageId, false, pageNo, itemsPerPage, out totalSections, out totalItems); } else { ltdSectionList = DataInfoList.GetPagedLtdInfoSection(infoPageId, true, pageNo, itemsPerPage, out totalSections, out totalItems); } #endregion if (ltdSectionList.Count > 0) { #region Get Section Details string topSectionrDetails = UtilsGeneric.GetItemPagerView(pageNo, itemsPerPage, dataIndex, templateSuffix, totalSections, RefreshListFunctionName, asyncLoading.ToString().ToLower() + "," + infoPageId.ToString()); string bottomSectionrDetails = UtilsGeneric.GetLinkPagerView(pageNo, itemsPerPage, dataIndex, templateSuffix, totalSections, totalItems, RefreshListFunctionName, asyncLoading.ToString().ToLower() + "," + infoPageId.ToString(), false); #endregion #region Append Top Sectionr if (topSectionrDetails.Trim().Length > 0) { htmlTextItemList += topSectionrDetails; } #endregion #region Append Items int index = 0; for (; index < ltdSectionList.Count; index++) { LTD_InfoSection ltdSection = ltdSectionList[index]; string htmlTextItemTemplate = GetListSingleItemView(ltdSection, pageNo, itemsPerPage, dataIndex, templateSuffix, infoPageId, index, asyncLoading); htmlTextItemList += htmlTextItemTemplate; } #endregion #region Append Bottom Sectionr if (bottomSectionrDetails.Trim().Length > 0) { htmlTextItemList += bottomSectionrDetails; } #endregion } #endregion #region Set Fill List if ((htmlTextItemList.Length == 0) && (UtilsSecurity.HaveAuthorRoleEnabled() == true)) { //TemplateInfoSectionListDetailEmpty templateListDetailEmpty = new TemplateInfoSectionListDetailEmpty //{ // DataIndex = dataIndex.ToString(), // PageNo = pageNo.ToString(), // ItemsPerPage = itemsPerPage.ToString(), // TemplateSuffix = templateSuffix, // InfoPageId = infoPageId.ToString(), // AsyncLoading = asyncLoading.ToString().ToLower() //}; //htmlTextItemList = templateListDetailEmpty.GetFilled(templateSuffix, UtilsGeneric.Validate, UtilsGeneric.ThrowException, out message); } #endregion return(htmlAddItemList + htmlTextItemList); }