Beispiel #1
0
        public void AddData(DataItem item)
        {
            // schema validation passed, but we need do custom rule validation here
            bool valid = true;

            if (Schema.Rules != null)
            {
                Schema.IndexRules();
                foreach (DataSchemaRule rule in Schema.Rules)
                {
                    if (!valid)
                    {
                        break;
                    }
                    // TODO: add param value of code here, by alex@20080820
                    valid = rule.ExecuteCommand(item.ValidationResults, item, _state);
                }
            }
            if (!valid)
            {
                AddSkippedData(item);
                return;
            }

            item.RowIndex = ++_rowIndex;
            _data.Add(item);
        }
Beispiel #2
0
 public void AddSkippedData(DataItem item)
 {
     item.RowIndex = ++_rowIndex;
     _skippeddata.Add(item);
 }