/// <summary>
        /// Creates the TransformDefinition for the dataset to be iterated.
        /// </summary>
        private TransformDefinition CreateCustomerDefintion()
        {
            // Create the resultant object.
            TransformDefinition result = CreatePullStyleTransformDef(TestConstants.CONNECTOR_SYSTEM, "Customer");

            TransformRecordDefinition customerRecDef = result.CreateTransformRecord("Customer", string.Empty);

            TransformDefinitionBuilder.CreateField(customerRecDef, "AccountNo");
            TransformDefinitionBuilder.CreateField(customerRecDef, "AccountName");
            TransformDefinitionBuilder.CreateField(customerRecDef, "CreditLimit", IntManFieldTypeEnum.eDecimal);
            TransformDefinitionBuilder.CreateField(customerRecDef, "Currency");
            TransformDefinitionBuilder.CreateField(customerRecDef, "AddressLine1");
            TransformDefinitionBuilder.CreateField(customerRecDef, "AddressLine2");
            TransformDefinitionBuilder.CreateField(customerRecDef, "AddressLine3");
            TransformDefinitionBuilder.CreateField(customerRecDef, "AddressLine4");
            TransformDefinitionBuilder.CreateField(customerRecDef, "City");
            TransformDefinitionBuilder.CreateField(customerRecDef, "County");
            TransformDefinitionBuilder.CreateField(customerRecDef, "Country");
            TransformDefinitionBuilder.CreateField(customerRecDef, "PostCode");
            TransformDefinitionBuilder.CreateField(customerRecDef, "DefaultTaxCode", IntManFieldTypeEnum.eLongInt);
            TransformDefinitionBuilder.CreateField(customerRecDef, "OrderPriority");
            TransformDefinitionBuilder.CreateField(customerRecDef, "UseTaxCodeAsDefault", IntManFieldTypeEnum.eBoolean);

            return(result);
        }
コード例 #2
0
        /// <summary>
        /// Creates the TransformDefinition for the dataset to be iterated.
        /// </summary>
        private TransformDefinition CreateOrderDefintion()
        {
            // Create the resultant object.
            TransformDefinition result = CreatePullStyleTransformDef(TestConstants.CONNECTOR_SYSTEM, "Order");

            TransformRecordDefinition orderRecDef = result.CreateTransformRecord("Order", string.Empty);

            TransformDefinitionBuilder.CreateField(orderRecDef, "UniqueID");
            TransformDefinitionBuilder.CreateField(orderRecDef, "OrderType", IntManFieldTypeEnum.eLongInt);
            TransformDefinitionBuilder.CreateField(orderRecDef, "Customer");
            TransformDefinitionBuilder.CreateField(orderRecDef, "OrderDate", IntManFieldTypeEnum.eDate);
            TransformDefinitionBuilder.CreateField(orderRecDef, "ShipDate", IntManFieldTypeEnum.eDate);
            TransformDefinitionBuilder.CreateField(orderRecDef, "OrderNo");
            TransformDefinitionBuilder.CreateField(orderRecDef, "ExchangeRate", IntManFieldTypeEnum.eDecimal);
            TransformDefinitionBuilder.CreateField(orderRecDef, "NetValue", IntManFieldTypeEnum.eDecimal);
            TransformDefinitionBuilder.CreateField(orderRecDef, "DiscountValue", IntManFieldTypeEnum.eDecimal);
            TransformDefinitionBuilder.CreateField(orderRecDef, "TaxValue", IntManFieldTypeEnum.eDecimal);

            TransformRecordDefinition orderDetailRecDef = result.CreateTransformRecord("OrderDetail", "Order");

            TransformDefinitionBuilder.CreateField(orderDetailRecDef, "Item");
            TransformDefinitionBuilder.CreateField(orderDetailRecDef, "Description", IntManFieldTypeEnum.eLongInt);
            TransformDefinitionBuilder.CreateField(orderDetailRecDef, "Qty", IntManFieldTypeEnum.eDecimal);
            TransformDefinitionBuilder.CreateField(orderDetailRecDef, "UnitAmount", IntManFieldTypeEnum.eDecimal);
            TransformDefinitionBuilder.CreateField(orderDetailRecDef, "TaxCode", IntManFieldTypeEnum.eLongInt);
            TransformDefinitionBuilder.CreateField(orderDetailRecDef, "DiscountAmount", IntManFieldTypeEnum.eDecimal);
            TransformDefinitionBuilder.CreateField(orderDetailRecDef, "TaxAmount", IntManFieldTypeEnum.eDecimal);

            TransformRecordDefinition serialNumRecDef = result.CreateTransformRecord("SerialNumbers", "OrderDetail");

            TransformDefinitionBuilder.CreateField(serialNumRecDef, "Serial");

            return(result);
        }
コード例 #3
0
        /// <summary>
        /// Creates the TransformDefinition for the Customer push style connector.
        /// </summary>
        /// <returns></returns>
        private TransformDefinition CreateAuthorizeDefinition(eERPUpdateOperation updateOp = eERPUpdateOperation.eUpdateInsert)
        {
            // Create the resultant object.
            TransformDefinition tfmDef = CreatePushStyleTransformDef(TestConstants.CONNECTOR_SYSTEM, ImportTypeEnum.Authorize, updateOp);

            // Create the Customer RecordDefinition.
            TransformRecordDefinition recDef = TransformDefinitionBuilder.CreateRecord(tfmDef, "Authorize", string.Empty);

            // Add the fields to the Customer Transform.
            TransformDefinitionBuilder.CreateField(recDef, "Reference");
            TransformDefinitionBuilder.CreateField(recDef, "Name");
            TransformDefinitionBuilder.CreateField(recDef, "ShortName");
            TransformDefinitionBuilder.CreateField(recDef, "CreditLimit", IntManFieldTypeEnum.eDecimal);
            TransformDefinitionBuilder.CreateField(recDef, "Currency");
            TransformDefinitionBuilder.CreateField(recDef, "PaymentTermDays");
            TransformDefinitionBuilder.CreateField(recDef, "CountryCode");
            TransformDefinitionBuilder.CreateField(recDef, "AddressLine1");
            TransformDefinitionBuilder.CreateField(recDef, "AddressLine2");
            TransformDefinitionBuilder.CreateField(recDef, "AddressLine3");
            TransformDefinitionBuilder.CreateField(recDef, "AddressLine4");
            TransformDefinitionBuilder.CreateField(recDef, "City");
            TransformDefinitionBuilder.CreateField(recDef, "County");
            TransformDefinitionBuilder.CreateField(recDef, "PostCode");
            TransformDefinitionBuilder.CreateField(recDef, "AddressCountryCode");
            TransformDefinitionBuilder.CreateField(recDef, "MainTelephoneCountryCode");
            TransformDefinitionBuilder.CreateField(recDef, "MainTelephoneAreaCode");
            TransformDefinitionBuilder.CreateField(recDef, "MainTelephoneSubscriberNumber");
            TransformDefinitionBuilder.CreateField(recDef, "MainFaxCountryCode");
            TransformDefinitionBuilder.CreateField(recDef, "MainFaxAreaCode");
            TransformDefinitionBuilder.CreateField(recDef, "MainFaxSubscriberNumber");
            TransformDefinitionBuilder.CreateField(recDef, "MainWebSite");
            TransformDefinitionBuilder.CreateField(recDef, "DefaultTaxCode", IntManFieldTypeEnum.eLongInt);
            TransformDefinitionBuilder.CreateField(recDef, "TaxRegistrationCode");
            TransformDefinitionBuilder.CreateField(recDef, "MonthsToKeepTransactions", IntManFieldTypeEnum.eLongInt);
            TransformDefinitionBuilder.CreateField(recDef, "OrderPriority");
            TransformDefinitionBuilder.CreateField(recDef, "DUNSCode");
            TransformDefinitionBuilder.CreateField(recDef, "UseTaxCodeAsDefault", IntManFieldTypeEnum.eBoolean);
            TransformDefinitionBuilder.CreateField(recDef, "DefaultNominalCode");
            TransformDefinitionBuilder.CreateField(recDef, "TradingAccountType");
            TransformDefinitionBuilder.CreateField(recDef, "EarlySettlementDiscountPercent", IntManFieldTypeEnum.eDecimal);
            TransformDefinitionBuilder.CreateField(recDef, "EarlySettlementDiscountDays", IntManFieldTypeEnum.eLongInt);
            TransformDefinitionBuilder.CreateField(recDef, "PaymentTermsDays", IntManFieldTypeEnum.eLongInt);
            TransformDefinitionBuilder.CreateField(recDef, "PaymentTermsBasis", IntManFieldTypeEnum.eLongInt);
            TransformDefinitionBuilder.CreateField(recDef, "SAGE200IMPSUCCESS");

            return(tfmDef);
        }
        private TransformDefinition CreateCaptureDefinition(eERPUpdateOperation updateOperation = eERPUpdateOperation.eUpdate)
        {
            // Create the resultant object.
            TransformDefinition result = CreatePushStyleTransformDef(TestConstants.CONNECTOR_SYSTEM, ImportTypeEnum.Capture, updateOperation);

            // Create the Record Definition
            TransformRecordDefinition order = TransformDefinitionBuilder.CreateRecord(result, "Capture", string.Empty);

            TransformDefinitionBuilder.CreateField(order, nameof(Capture.ApiLoginID));            // "ApiLoginID");
            TransformDefinitionBuilder.CreateField(order, nameof(Capture.ApiTransactionKey));
            TransformDefinitionBuilder.CreateField(order, nameof(Capture.TransactionAmount));
            TransformDefinitionBuilder.CreateField(order, nameof(Capture.TransactionID));
            TransformDefinitionBuilder.CreateField(order, nameof(Capture.ResponseCode));
            TransformDefinitionBuilder.CreateField(order, nameof(Capture.MessageCode));
            TransformDefinitionBuilder.CreateField(order, nameof(Capture.Description));
            TransformDefinitionBuilder.CreateField(order, nameof(Capture.AuthCode));
            TransformDefinitionBuilder.CreateField(order, nameof(Capture.ErrorCode));
            TransformDefinitionBuilder.CreateField(order, nameof(Capture.CaptureErrorMessage));

            return(result);
        }