Priya.InfoList.Views.TemplateInfoCategoryView.GetFilled C# (CSharp) Method

GetFilled() public method

public GetFilled ( string templateSuffix, bool validate, bool throwException, string &retMessage ) : string
templateSuffix string
validate bool
throwException bool
retMessage string
return string
		public virtual string GetFilled(string templateSuffix, bool validate, bool throwException, out string retMessage)
		{
            string message = "";
			string template = GetTemplate(templateSuffix, validate, throwException, out message);

			if ((string.IsNullOrEmpty(template)==false) && ((validate ==false) || IsValid(throwException, out message)))
            {
				template = ProcessListSection(template);

				template = ProcessBoolSection(template);
			
				template = ProcessPlaceHolder(template);
			}
			retMessage = message;
			return template;
		}

Usage Example

        public static string GetListAllItemView(long pageNo, long itemsPerPage, long dataIndex, string templateSuffix, bool hideDisplay)
        {
            string message = "";
            long totalPages;
            long totalItems;
            string htmlTextItemList = "";
            string htmlAddItemList = "";

            if ((UtilsSecurity.HaveAdminRole() == false) && (UtilsSecurity.HaveAuthorRole() == false))
            {
                TemplateInfoCategoryView templateView = new TemplateInfoCategoryView
                {
                    DataIndex = dataIndex.ToString(),
                    PageNo = pageNo.ToString(),
                    ItemsPerPage = itemsPerPage.ToString(),
                    TemplateSuffix = templateSuffix,
                    HideDisplay = hideDisplay.ToString().ToLower(),
                };
                htmlTextItemList = templateView.GetFilled(templateSuffix, UtilsGeneric.Validate, UtilsGeneric.ThrowException, out message);
            }else
            {
                #region Add Link

                if (UtilsSecurity.HaveAuthorRoleEnabled() == true)
                {
                    TemplateInfoCategorySaveAdd templateSaveAdd = new TemplateInfoCategorySaveAdd
                    {
                        DataIndex = dataIndex.ToString(),
                        PageNo = pageNo.ToString(),
                        ItemsPerPage = itemsPerPage.ToString(),
                        TemplateSuffix = templateSuffix,
                    };
                    htmlAddItemList = templateSaveAdd.GetFilled(templateSuffix, UtilsGeneric.Validate, UtilsGeneric.ThrowException, out message);
                }

                #endregion

                #region Get Fill List

                #region Get Paged Data

                List<LTD_InfoCategory> ltdInfoCategoryList = new List<LTD_InfoCategory>();
                ltdInfoCategoryList = DataInfoList.GetPagedLtdInfoCategory(pageNo, itemsPerPage, out totalPages, out totalItems);

                #endregion

                if (ltdInfoCategoryList.Count > 0)
                {
                    #region Get Pager Details

                    string topPagerDetails = UtilsGeneric.GetItemPagerView(pageNo, itemsPerPage, dataIndex, templateSuffix, totalPages, RefreshListFunctionName, hideDisplay.ToString(CultureInfo.InvariantCulture).ToLower(), true, true);
                    string bottomPagerDetails = UtilsGeneric.GetLinkPagerView(pageNo, itemsPerPage, dataIndex, templateSuffix, totalPages, totalItems, RefreshListFunctionName, hideDisplay.ToString(CultureInfo.InvariantCulture).ToLower());

                    #endregion

                    #region Append Top Pager

                    if (topPagerDetails.Trim().Length > 0)
                    {
                        htmlTextItemList += topPagerDetails;
                    }

                    #endregion

                    #region Append Items

                    int index = 0;
                    for (; index < ltdInfoCategoryList.Count; index++)
                    {
                        LTD_InfoCategory ltdInfoCategory = ltdInfoCategoryList[index];
                        string htmlTextItemTemplate = GetListSingleItemView(ltdInfoCategory, pageNo, itemsPerPage, dataIndex, templateSuffix, hideDisplay);
                        htmlTextItemList += htmlTextItemTemplate;
                    }

                    #endregion

                    #region Append Bottom Pager

                    if (bottomPagerDetails.Trim().Length > 0)
                    {
                        htmlTextItemList += bottomPagerDetails;
                    }

                    #endregion
                }

                #endregion

                #region Set Fill List

                if (htmlTextItemList.Length == 0)
                {
                    TemplateInfoCategoryListDetailEmpty templateListDetailEmpty = new TemplateInfoCategoryListDetailEmpty
                    {
                        DataIndex = dataIndex.ToString(),
                        PageNo = pageNo.ToString(),
                        ItemsPerPage = itemsPerPage.ToString(),
                        TemplateSuffix = templateSuffix,
                        HideDisplay = hideDisplay.ToString().ToLower(),
                    };
                    htmlTextItemList = templateListDetailEmpty.GetFilled(templateSuffix, UtilsGeneric.Validate, UtilsGeneric.ThrowException, out message);
                }

                #endregion
            }

            return htmlAddItemList + htmlTextItemList;
        }
All Usage Examples Of Priya.InfoList.Views.TemplateInfoCategoryView::GetFilled