Click or drag to resize

MPInterfacebImportCustomerServiceObject Method

Namespace:  MARIInterface
Assembly:  MARIInterface (in MARIInterface.dll) Version: 8.0.0.100
Syntax
public bool bImportCustomerServiceObject(
	clsImportCustomerServiceObject oCustomerServiceObject,
	clsImportBaseeImportMode nImportMode
)

Parameters

oCustomerServiceObject
Type: MARIInterfaceclsImportCustomerServiceObject
nImportMode
Type: MARIInterfaceclsImportBaseeImportMode
Type of validation. See eImportMode for details.

Return Value

Type: Boolean
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