Пример #1
0
        public override RunResult Run(DataRow input, DataTable dataTable, DataObjectStore store, Type codeBehind, Workflow.UpdateTableDelegate updateTableDelegate)
        {
            RunResult runResult = new RunResult();

            foreach (string text in this.GetDataObjectKeys(store))
            {
                object             obj = null;
                IDataObjectCreator dataObjectCreator = store.GetDataObjectCreator(text);
                if (dataObjectCreator != null)
                {
                    obj = dataObjectCreator.Create(dataTable);
                }
                else
                {
                    Type dataObjectType = store.GetDataObjectType(text);
                    if (null != dataObjectType)
                    {
                        obj = dataObjectType.GetConstructor(new Type[0]).Invoke(new object[0]);
                    }
                }
                if (obj != null)
                {
                    store.UpdateDataObject(text, obj, true);
                    updateTableDelegate(text, false);
                }
            }
            runResult.DataObjectes.AddRange(store.GetKeys());
            return(runResult);
        }