Exemplo n.º 1
0
        public void Load(Dictionary<string /*FieldName*/, string /*FieldValue*/> fieldValues)
        {
            if (fieldValues != null)
            {
                ComplexListItem item = new Business.ComplexListItem();

                foreach (Business.ComplexListField field in _fields)
                {
                    if (!fieldValues.ContainsKey(field.Name))
                        throw new Exception(string.Format("Field {0} not included in data", field.Name));
                    Business.ComplexListItemValue itemValue = new Business.ComplexListItemValue(this, field.FilterTerm);
                    itemValue.BigText = field.BigText ?? false;
                    itemValue.FieldID = field.ID;
                    itemValue.Load(fieldValues[field.Name]);
                    item.ItemValues.Add(itemValue);
                }
                _items.Add(item);
            }
        }