Priya.InfoList.Views.TemplateInfoDetailSave.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 GetSaveView(long infoDetailId, long pageNo, long itemsPerPage, long dataIndex, string templateSuffix, long infoSectionId, bool loadSaveScript, bool loadSave)
        {
            string htmlSaveScript = "";
            if (loadSaveScript == true)
            {
                htmlSaveScript = GetSaveScript();
            }
            string htmlSaveDetail = "";
            if (loadSave == true)
            {
                htmlSaveDetail = GetSaveDetailView(infoDetailId, pageNo, itemsPerPage, dataIndex, templateSuffix, infoSectionId);
            }

            string message;
            bool hideDisplay = true;
            var templateSave = new TemplateInfoDetailSave
            {
                SaveScript = htmlSaveScript,
                SaveDetail = htmlSaveDetail,
                SaveViewHidden = hideDisplay,
                InfoSectionId = infoSectionId.ToString(),
            };
            string htmlSave = templateSave.GetFilled(templateSuffix, UtilsGeneric.Validate, UtilsGeneric.ThrowException, out message);
          
            return htmlSave;
        }