The GetDataModelType method returns the type of DataModel for a specific ispec or class.
Namespace – ABSuite.AccessLayer.Connector.Core
Assembly – Unisys.ABSuite.AccessLayer.Connector.Core (in Unisys.ABSuite.AccessLayer.Connector.Core.dll)
Syntax
Type GetDataModelType(
string className
)
Argument
className – System.String
This argument provides the name of an ispec or a class to be checked.
Return Value
If this method succeeds, it returns the type of the object.
Using the IRtConnection Interface for the GetDataModelType Method
The following code is an example of using the GetDataModelType method:
// 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; }