MPInterfacebImportCustomerServiceObject Method |
View: MARICustomerEquipmentCard: :Table: MPCustomerEquipmentCard
Namespace: MARIInterface
public bool bImportCustomerServiceObject( clsImportCustomerServiceObject oCustomerServiceObject, clsImportBaseeImportMode nImportMode )
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; }