Ejemplo n.º 1
0
 private void DoChangedValueEvent(ItemFieldName field)
 {
     if ((ValueChanged != null) && (ActiveItem != null) && !_haltEvents)
     {
         ValueChanged.Invoke(this, new ItemValueChangedArgs(ActiveItem, field));
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Recursively creates new children (BusinessObjects) and attaches them to proper xml elements.
        /// </summary>
        /// <param name="element">Xml element to attach.</param>
        public override void Deserialize(XElement element)
        {
            base.Deserialize(element);

            //update the field name
            this.itemFieldName = DictionaryMapper.Instance.GetItemField(this.ItemFieldId).TypeName;
        }
Ejemplo n.º 3
0
        public ItemAttrValue CreateNew(ItemFieldName fieldName)
        {
            ItemAttrValue itemAttr = this.CreateNew();

            itemAttr.ItemFieldName = fieldName;
            return(itemAttr);
        }
Ejemplo n.º 4
0
        public ItemAttrValue GetOrCreateNew(ItemFieldName fieldName)
        {
            ItemAttrValue itemAttr = this[fieldName];

            if (itemAttr == null)
            {
                itemAttr = this.CreateNew();
                itemAttr.ItemFieldName = fieldName;
            }
            return(itemAttr);
        }
Ejemplo n.º 5
0
        public decimal?GetDecimalValue(ItemFieldName fieldName)
        {
            decimal?      result = null;
            ItemAttrValue attr   = this[fieldName];

            if (attr != null)
            {
                result = Convert.ToDecimal(attr.Value.Value, CultureInfo.InvariantCulture);
            }

            return(result);
        }
Ejemplo n.º 6
0
 public ItemValueChangedArgs(Item item, ItemFieldName field)
 {
     ChangedItem = item;
     FieldName   = field;
 }
Ejemplo n.º 7
0
 public ItemAttrValue this[ItemFieldName fieldName]
 {
     get { return(this.Children.Where(c => c.ItemFieldName == fieldName).FirstOrDefault()); }
 }