Esempio n. 1
0
		protected string ProcessBoolIsDeleteVisibleSection(IsDeleteVisible isdeletevisible, string template)
		{
			
			return template;
		}
Esempio n. 2
0
		protected string ProcessListIsDeleteVisibleSection(IsDeleteVisible isdeletevisible, string template)
		{
			string sectionValueList;
			string sectionStartTag;
			string sectionEndTag;
			string sectionTag;
			string sectionValue;
			string invertedSectionTag;
			string invertedSectionValue;

			#region List Section Processing

			#region Initialize Variables
 				
			sectionTag = "";
			sectionValue = "";
			invertedSectionTag = "";
			invertedSectionValue = "";
			
			#endregion

			#region Get Section Tag/Value

			sectionStartTag = "{{#IsDeleteChecked}}";
			sectionEndTag = "{{/IsDeleteChecked}}";
            sectionTag = TemplateUtil.GetSectionTag(template, sectionStartTag, sectionEndTag);
			sectionValue = sectionTag.Replace(sectionStartTag, "").Replace(sectionEndTag, "");

			#endregion

            #region List Section

            sectionValueList ="";
			if ((sectionTag.Trim().Length > 0) && (isdeletevisible.IsDeleteCheckedList !=null))
			{
				foreach (var isdeletechecked in isdeletevisible.IsDeleteCheckedList)
                {
					var sectionValueInstance = sectionValue;
					sectionValueInstance = sectionValueInstance.Replace("{{DataIndex}}", string.IsNullOrEmpty(isdeletechecked.DataIndex)==false ? isdeletechecked.DataIndex : "");
					sectionValueList += sectionValueInstance;
                }
            }

            if (sectionTag.Trim().Length > 0)
            {
                template = template.Replace(sectionTag, sectionValueList);
            }
            if ((invertedSectionTag.Trim().Length > 0) && ((sectionValueList.Trim().Length == 0)||(isdeletevisible.IsDeleteCheckedList ==null)))
            {
                template = template.Replace(invertedSectionTag, invertedSectionValue);
            }
			else if (invertedSectionTag.Trim().Length > 0)
			{
                template = template.Replace(invertedSectionTag, "");
			}

            #endregion

            #endregion

			#region List Section Processing

			#region Initialize Variables
 				
			sectionTag = "";
			sectionValue = "";
			invertedSectionTag = "";
			invertedSectionValue = "";
			
			#endregion

			#region Get Section Tag/Value

			sectionStartTag = "{{#IsDelete}}";
			sectionEndTag = "{{/IsDelete}}";
            sectionTag = TemplateUtil.GetSectionTag(template, sectionStartTag, sectionEndTag);
			sectionValue = sectionTag.Replace(sectionStartTag, "").Replace(sectionEndTag, "");

			#endregion

            #region List Section

            sectionValueList ="";
			if ((sectionTag.Trim().Length > 0) && (isdeletevisible.IsDeleteList !=null))
			{
				foreach (var isdelete in isdeletevisible.IsDeleteList)
                {
					var sectionValueInstance = sectionValue;
					sectionValueInstance = sectionValueInstance.Replace("{{DataIndex}}", string.IsNullOrEmpty(isdelete.DataIndex)==false ? isdelete.DataIndex : "");
					sectionValueList += sectionValueInstance;
                }
            }

            if (sectionTag.Trim().Length > 0)
            {
                template = template.Replace(sectionTag, sectionValueList);
            }
            if ((invertedSectionTag.Trim().Length > 0) && ((sectionValueList.Trim().Length == 0)||(isdeletevisible.IsDeleteList ==null)))
            {
                template = template.Replace(invertedSectionTag, invertedSectionValue);
            }
			else if (invertedSectionTag.Trim().Length > 0)
			{
                template = template.Replace(invertedSectionTag, "");
			}

            #endregion

            #endregion

			return template;
		}