protected TransactionIterator ProcessTransactions(TransactionFactory transactionFactory, TransformDefinition tfmDef, eERPUpdateOperation updateOperation, SystemConnectorDTO system) { TransactionIterator iterator = new TransactionIterator(transactionFactory.Data, tfmDef); PushDataInterop target = new PushDataInterop(); target.Initialise(tfmDef, iterator, true, eTransformErrorAction.eTransformErrorActionAbort, updateOperation, system, new AuditProxy()); // Run the actual import. target.Process(); return(iterator); }
/// <summary> /// Processes a Push Style dataset by instantiating the ITransformInterop object and making the appropriate calls. /// </summary> /// <param name="transactionFactory">The transaction factory containing the dataset.</param> //protected string ProcessTransactions(TransactionFactory transactionFactory) //{ // ITransformInterop import = new TransformInterop(); // import.CreateController(JOBDEF_ID, INSTANCE_ID, transactionFactory.TransformDefinition.GetXml(), transactionFactory.Data.OuterXml, true, string.Empty); // ((TransformInterop) import).SetAuditProxy(new AuditProxy()); // // Run the actual import. // import.Process(); // return import.TransformedData(); //} protected static void ProcessTransactions(TransactionFactory transactionFactory) { TransformDefinition tfmDef = transactionFactory.TransformDefinition; // Obtain the system connector. SystemConnectorDTO connectorDTO = new SystemConnectorDTO(tfmDef.Options.GetProperty(GlobalResources.SYS_CONNECT_SYSID_OPT)); // Get the updateOperation. eERPUpdateOperation updateOperation = tfmDef.Options.GetProperty <eERPUpdateOperation>(GlobalResources.SYS_CONNECT_UPDATE_OP_OPT); // Create the ITransformProcess object implemented by the connector. PushDataInterop target = new PushDataInterop(); // Now initialise. target.Initialise(tfmDef, transactionFactory.CreateTransactionIterator(), false, tfmDef.AuditDefinition.ErrorAction, updateOperation, connectorDTO, new AuditProxy()); // Run the actual import. target.Process(); }