Click or drag to resize

clsImportCustomerServiceObjectPart Class

Import parts to a customer service object. Using the table MARIProjektImportCustomerServiceObjectParts in the access database.

Use MPInterface.bImportCustomerServiceObjectPart(clsImportCustomerServiceObjectPart, clsImportBaseeImportMode) to import.

Inheritance Hierarchy
SystemObject
  MARIInterfaceclsImportBase
    MARIInterfaceclsImportCustomerServiceObjectPart

Namespace:  MARIInterface
Assembly:  MARIInterface (in MARIInterface.dll) Version: 8.0.0.100
Syntax
public class clsImportCustomerServiceObjectPart : clsImportBase

The clsImportCustomerServiceObjectPart type exposes the following members.

Constructors
  NameDescription
Public methodclsImportCustomerServiceObjectPart
Initializes a new instance of the clsImportCustomerServiceObjectPart class
Top
Properties
  NameDescription
Public propertyCustomerServiceObject
Customer Service Object
Public propertyDescription1
NVARCHAR (100) Description1
Public propertyDescription2
NVARCHAR (100) Description2
Public propertyMatchcode
Matchcode
Public propertyPosID
Position ID
Public propertyPosType
Position Type
Public propertyPosValue
Position Value (ItemCode or CustomerServiceObject)
Public propertyQuantity
Quantity
Top
Methods
Remarks
Examples
Create a customer service object.
private int CreateCustomerServiceObject(string ItemCode, int lCECGroupID) {
    clsImportCustomerServiceObject oCSO = new clsImportCustomerServiceObject();
    oCSO.CompanyID = 1;
    oCSO.itemCode = ItemCode;
    oCSO.itemName = "Name of the CSO";
    oCSO.CECGroupID = lCECGroupID; //Customer Equipment Category
    oCSO.customer = "10000";
    oCSO.manufSN = "19283721987";
    oCSO.internalSN = "13928";
    //standard project
    oCSO.Project = "P100005";

    //Parts
    oCSO.CollectionParts = new List<clsImportCustomerServiceObjectPart>();
    oCSO.CollectionParts.Add(new clsImportCustomerServiceObjectPart() {
        PosType = clsImportCustomerServiceObjectPart.ePosType.SparePart,
        PosValue = "220002" /*ItemCode of sparepart*/
    });
    oCSO.CollectionParts.Add(new clsImportCustomerServiceObjectPart() {
        PosType = clsImportCustomerServiceObjectPart.ePosType.Component,
        PosValue = "220003" /*ItemCode of sparepart*/
    });
    //current Location
    oCSO.CollectionLocations = new List<clsImportCustomerServiceObjectLocation>();
    oCSO.CollectionLocations.Add(new clsImportCustomerServiceObjectLocation() {
        LocationMode = clsImportEquipmentLocation.eLocationMode.InLocalWarehouse,
        Warehouse = "01"
    });

    if (oMPInterface.bImportCustomerServiceObject(oCSO, MARIInterface.clsImportBase.eImportMode.ValidateAndImport)) {
        Log($"CreateCustomerServiceObject MPinsID={oCSO.MPinsID}");
        return oCSO.MPinsID;
    } else {
        LogFail("Create_APInvoice: " + oMPInterface.oErrors.PrintErrors());
    }
    return 0;
}
See Also