IRtConnection.Transmit Method

The Transmit method sends the data held by the supplied DataModel to the runtime system and waits for a reply. This is a synchronous call and thus blocks the calling process.

Namespace – ABSuite.AccessLayer.Connector.Core

Assembly – Unisys.ABSuite.AccessLayer.Connector.Core (in Unisys.ABSuite.AccessLayer.Connector.Core.dll)

Syntax

TransmissionObject Transmit(
   Object datamodel
)

Argument

Return Value

If this method succeeds, it returns a TransmissionObject containing the results of the transaction.

The TransimissionReturnCode indicates success or failure of the method. The DataModel object contains information about the response received from the host system.

Using the IRtConnection Interface for the Transmit Method

The following code is an example of using the Transmit method:

// Create an instance of a PRODModel class
     PRODModel pModel = (PRODModel) ABSConnection.DataHandler.GetDataModelObject("PROD");
     // Populate the PRODModel 
     pModel._UserMAINT = "FIR";
     // Transmit the PRODModel to the host system
     TransmissionObject tObject =  ABSConnection.DataHandler.Transmit(pModel);
     // Check the return state and whether the current context is 
     // for the PROD ispec
     if (tObject.State == TransmissionReturnCode.Ok) 
     {
       // Check the DataModel type in the returned 
       // TransmissionObject by using the 
       // ObjectClassName as the name of the Ispec 
      // If it is a type of PRODModel, extract the data
         if (ABSConnection.DataHandler.GetDataModelType(tObject.ObjectClassName) == typeof(PRODModel))
         {
             // Extract the Data from the PRDOModel object returned 
             // by the Connector
             pModel = (PRODModel)tObject.Datamodel;
             string Name = pModel.NAM;
             string ID = pModel.PRODUCT;
             decimal price = pModel.SELLPRICE;
             Int32 reOrderLevel = pModel.REORDLEV;
         }
  }