/// <summary> /// Reload data. /// </summary> /// <param name="setAutomatically">Indicates whether search options should be set automatically</param> public void ReloadSearch(bool setAutomatically) { ClassFields.ItemID = ItemID; ClassFields.ReloadData(setAutomatically, true); // Initialize properties List <IFormItem> itemList = null; FormFieldInfo formField = null; // Load DataClass dci = DataClassInfoProvider.GetDataClass(ItemID); if (dci != null) { // Load XML definition fi = FormHelper.GetFormInfo(dci.ClassName, true); if (CMSString.Compare(dci.ClassName, "cms.user", true) == 0) { plcImage.Visible = false; ClassFields.DisplaySetAutomatically = false; pnlIndent.Visible = true; document = DataClassInfoProvider.GetDataClass("cms.usersettings"); if (document != null) { FormInfo fiSettings = FormHelper.GetFormInfo(document.ClassName, true); fi.CombineWithForm(fiSettings, true, String.Empty); } } // Get all fields itemList = fi.GetFormElements(true, true); } if (itemList != null) { if (itemList.Any()) { pnlIndent.Visible = true; } // Store each field to array foreach (object item in itemList) { if (item is FormFieldInfo) { formField = ((FormFieldInfo)(item)); object[] obj = { formField.Name, FormHelper.GetDataType(formField.DataType) }; attributes.Add(obj); } } } ReloadControls(); }
/// <summary> /// Reload data. /// </summary> /// <param name="setAutomatically">Indicates whether search options should be set automatically</param> public void ReloadSearch(bool setAutomatically) { ClassFields.ItemID = ItemID; ClassFields.ReloadData(setAutomatically, true); // Initialize properties List <IDataDefinitionItem> itemList = null; if (ClassInfo != null) { // Load XML definition fi = FormHelper.GetFormInfo(ClassInfo.ClassName, true); if (CMSString.Compare(ClassInfo.ClassName, "cms.user", true) == 0) { plcImage.Visible = false; ClassFields.DisplaySetAutomatically = false; pnlIndent.Visible = true; document = DataClassInfoProvider.GetDataClassInfo("cms.usersettings"); if (document != null) { FormInfo fiSettings = FormHelper.GetFormInfo(document.ClassName, true); fi.CombineWithForm(fiSettings, true, String.Empty); } } // Get all fields itemList = fi.GetFormElements(true, true); } if (itemList != null) { if (itemList.Any()) { pnlIndent.Visible = true; } // Store each field to array foreach (var item in itemList) { var formField = item as FormFieldInfo; if (formField != null) { object[] obj = { formField.Name, DataTypeManager.GetSystemType(TypeEnum.Field, formField.DataType) }; attributes.Add(obj); } } } if (AdvancedMode) { ReloadControls(); } }