Click or drag to resize

clsImportERPResource Class

Store Resources data via DI-API to ORSC into the database given CompanyID.

Please make sure, that SAP Business One DI-API in 32 or 64 bit is installed according to the usage of this interface. The logon user in MARIProject has to have a corresponding user linked to the selected company database.

Use MPInterface.bImportERPResource(clsImportERPResource, clsImportBaseeImportMode) to import.

Inheritance Hierarchy
SystemObject
  MARIInterfaceclsImportBase
    MARIInterfaceclsImportBaseERP
      MARIInterfaceclsImportERPResource

Namespace:  MARIInterface
Assembly:  MARIInterface (in MARIInterface.dll) Version: 8.0.0.100
Syntax
public class clsImportERPResource : clsImportBaseERP

The clsImportERPResource type exposes the following members.

Constructors
  NameDescription
Public methodclsImportERPResource
Initializes a new instance of the clsImportERPResource class
Top
Properties
  NameDescription
Public propertyCodeBars
CodeBars
Public propertyFrgnName
FrgnName
Public propertyIssueMthd
IssueMthd
Public propertyNumber
Number
Public propertyNumResUnit
NumResUnit
Public propertyQryGroup
QryGroup1 - QryGroup64 (0base 0-63 in array)
Public propertyResCode
ResCode
Public propertyResGrpCod
ResGrpCod >> ORSB.ResGrpCod
Public propertyResName
ResName
Public propertyResType
ResType
Public propertySeries
Series
Public propertyTimeResUn
TimeResUn
Public propertyUnitOfMsr
UnitOfMsr
Public propertyVisResCode
VisResCode
Top
Methods
Examples
Create a new resource for labour and maschine in SBO via DI-API
public bool CreateResource_Labour() {

    //works only from SBO 9.2
    clsImportERPResource NewResource = new clsImportERPResource();
    NewResource.CompanyID = 1; // First company linked to MARIProject
    NewResource.VisResCode = "930";
    NewResource.ResName = "Welding";
    NewResource.ResType = clsImportERPResource.ResourceTypeEnum.rtLabor;
    NewResource.UnitOfMsr = "h";
    NewResource.ResGrpCod = 1; // ORSB.ResGrpCod
    NewResource.IssueMthd = clsImportProductTreeLine.BoIssueMethod.im_Manual;
    NewResource.QryGroup[0] = true; //QryGroup1 = Y [Array 0 based]

    if (oMPInterface.bImportERPResource(NewResource, clsImportBase.eImportMode.ValidateAndImport)) {
        return true;
    } else {
        LogFail(oMPInterface.oErrors.PrintErrors());
        return false;
    }
}
public bool CreateResource_Machine() {
    //works only from SBO 9.2
    clsImportERPResource NewResource = new clsImportERPResource();
    NewResource.CompanyID = 1; // First company linked to MARIProject
    NewResource.VisResCode = "931";
    NewResource.ResName = "Welding-Maschine";
    NewResource.ResType = clsImportERPResource.ResourceTypeEnum.rtMachine;
    NewResource.UnitOfMsr = "h";
    NewResource.ResGrpCod = 1; // ORSB.ResGrpCod
    NewResource.IssueMthd = clsImportProductTreeLine.BoIssueMethod.im_Manual;
    NewResource.QryGroup[0] = true; //QryGroup1 = Y [Array 0 based]

    if (oMPInterface.bImportERPResource(NewResource, clsImportBase.eImportMode.ValidateAndImport)) {
        return true;
    } else {
        LogFail(oMPInterface.oErrors.PrintErrors());
        return false;
    }
}
See Also