コード例 #1
0
        public PickListItem Copy()
        {
            PickListItem pickListItem = new PickListItem();

            pickListItem._value = _value;
            pickListItem._selected = _selected;

            return pickListItem;
        }
コード例 #2
0
        public PickListTerm(XmlNode termNode, Template template, bool isFilter)
            : base(termNode, template, isFilter)
		{
			TermType = TermType.PickList;
			NameRequired = true;
			_pickListItems = new List<PickListItem>();

			_multiSelect = Utility.XMLHelper.GetAttributeBool(termNode, XMLNames._A_MultiSelect);
			_requiredSelectedValue = Utility.XMLHelper.GetAttributeString(termNode, XMLNames._A_RequiredSelectedValue);
			_useTextNumberFormat = Utility.XMLHelper.GetAttributeBool(termNode, XMLNames._A_UseTextNumberFormat);

            XmlNodeList pickListItemNodes = termNode.SelectNodes(XMLNames._E_ListItem);
			foreach (XmlNode pickListItemNode in pickListItemNodes)
			{
				PickListItem pickListItem = new PickListItem(pickListItemNode);
				//@@@ RR 05/06/2008:  Commented out to eliminate erroneous display of the DefaultValue on the Summary Page
				//if (!(this.Editable ?? false) && (pickListItem.Value == this.DefaultValue))
				//	pickListItem.Selected = true;
				_pickListItems.Add(pickListItem);
			}
		}