/// <summary> /// format values as such /// LookupWebID(string),LookupListID(string),LookupFieldName(string) /// </summary> /// <param name="value"></param> public GenericEntityPickerPropertyBag(string value) { _xmlDataMgr = new XMLDataManager(value); this.ParentWebID = !string.IsNullOrEmpty(_xmlDataMgr.GetPropVal("ParentWebID")) ? new Guid(_xmlDataMgr.GetPropVal("ParentWebID")) : Guid.Empty; this.LookupWebID = !string.IsNullOrEmpty(_xmlDataMgr.GetPropVal("LookupWebID")) ? new Guid(_xmlDataMgr.GetPropVal("LookupWebID")) : Guid.Empty; this.LookupListID = !string.IsNullOrEmpty(_xmlDataMgr.GetPropVal("LookupListID")) ? new Guid(_xmlDataMgr.GetPropVal("LookupListID")) : Guid.Empty; this.LookupFieldInternalName = !string.IsNullOrEmpty(_xmlDataMgr.GetPropVal("LookupFieldInternalName")) ? _xmlDataMgr.GetPropVal("LookupFieldInternalName") : ""; this.LookupFieldSourceFieldID = !string.IsNullOrEmpty(_xmlDataMgr.GetPropVal("LookupFieldID")) ? new Guid(_xmlDataMgr.GetPropVal("LookupFieldID")) : Guid.Empty; this.ListID = !string.IsNullOrEmpty(_xmlDataMgr.GetPropVal("ListID")) ? new Guid(_xmlDataMgr.GetPropVal("ListID")) : Guid.Empty; this.ItemID = !string.IsNullOrEmpty(_xmlDataMgr.GetPropVal("ItemID")) ? int.Parse(_xmlDataMgr.GetPropVal("ItemID")) : -99; this.IsMultiSelect = !string.IsNullOrEmpty(_xmlDataMgr.GetPropVal("IsMultiSelect")) ? _xmlDataMgr.GetPropVal("IsMultiSelect") : "false"; this.ControlType = !string.IsNullOrEmpty(_xmlDataMgr.GetPropVal("ControlType")) ? _xmlDataMgr.GetPropVal("ControlType") : ""; this.Parent = !string.IsNullOrEmpty(_xmlDataMgr.GetPropVal("Parent")) ? _xmlDataMgr.GetPropVal("Parent") : ""; this.ParentListField = !string.IsNullOrEmpty(_xmlDataMgr.GetPropVal("ParentListField")) ? _xmlDataMgr.GetPropVal("ParentListField") : ""; this.Field = !string.IsNullOrEmpty(_xmlDataMgr.GetPropVal("Field")) ? _xmlDataMgr.GetPropVal("Field") : ""; this.Required = !string.IsNullOrEmpty(_xmlDataMgr.GetPropVal("Required")) ? bool.Parse(_xmlDataMgr.GetPropVal("Required")) : false; if (bool.Parse(IsMultiSelect)) { this.SelectCandidateID = _xmlDataMgr.GetPropVal("SelectCandidateID"); this.AddButtonID = _xmlDataMgr.GetPropVal("AddButtonID"); this.RemoveButtonID = _xmlDataMgr.GetPropVal("RemoveButtonID"); this.SelectResultID = _xmlDataMgr.GetPropVal("SelectResultID"); } else { this.SourceControlID = _xmlDataMgr.GetPropVal("SourceControlID"); this.SourceDropDownID = _xmlDataMgr.GetPropVal("SourceDropDownID"); } }
private void InitializePropAndFlds() { _data = !string.IsNullOrWhiteSpace(Request.Params["data"]) ? Request.Params["data"] : string.Empty; if (!string.IsNullOrWhiteSpace(_data)) { _dataManager = new XMLDataManager(_data); _webSvcName = _dataManager.GetPropVal(WebSvcName); _webSvcMethod = _dataManager.GetPropVal(WebSvcMethod); } XmlDataSimplifier.CompLevels = new List <string>(); if (!string.IsNullOrWhiteSpace(_dataManager.GetPropVal("CompLevels"))) { string[] levels = _dataManager.GetPropVal("CompLevels").Split(','); foreach (string level in levels) { if (!string.IsNullOrWhiteSpace(level) && !XmlDataSimplifier.CompLevels.Contains(level)) { XmlDataSimplifier.CompLevels.Add(level.Trim()); } } } else { XmlDataSimplifier.CompLevels.Add("99"); } XmlDataSimplifier.SolutionType = _dataManager.GetPropVal("SolutionType"); }