clsImportCustomerServiceObjectLocation Class |
Use MPInterface.bImportCustomerServiceObjectCategory(clsImportCustomerServiceObjectCategory, clsImportBaseeImportMode) to import.
Namespace: MARIInterface
The clsImportCustomerServiceObjectLocation type exposes the following members.
| Name | Description | |
|---|---|---|
| clsImportCustomerServiceObjectLocation | Initializes a new instance of the clsImportCustomerServiceObjectLocation class |
| Name | Description | |
|---|---|---|
| BinLocations | BinLocations all requipred bin location ids as JSON list. (inernal use)
Mandatory field for LocationMode.eLocationMode.InLocalWarehouse=1 (if the warehouse has bin locations)
| |
| ContractID | ContractID. Internal Contract ID (not the visible contract number)
Mandatory field for LocationMode.eLocationMode.RentedToProject=2. Especially, when monthly invoices will be created based on the location.
| |
| ContractPositionID | ContractPositionID Internal Position ID
Mandatory field for LocationMode.eLocationMode.RentedToProject=2. Especially, when monthly invoices will be created based on the location.
| |
| CSOLocationID | CSOLocationID: internal id for each transaction | |
| CustomerLocationTreeElementID | CustomerLocationTreeElementID | |
| CustomerServiceObject | CustomerServiceObject: mandatory link to the relevant CSO | |
| Employee | Employee who has created the transaction or requestion for the CSO. See clsImportEmployee for the employee dimension. | |
| Latitude | Latitude | |
| LocationChangeDate | LocationChangeDate | |
| LocationMode | LocationMode | |
| LocationTransactionID | LocationTransactionID ID to group a transaction of several equipment or customer service objects. (internal number) | |
| Longitude | Longitude | |
| Memo | Memo | |
| PhaseID | PhaseID based on the planning version 3
Mandatory field (only when the project uses phases) for LocationMode.eLocationMode.RentedToProject=2. Especially, when monthly invoices will be created based on the location.
| |
| Project | Project
Mandatory field for LocationMode.eLocationMode.RentedToProject=2
| |
| Warehouse | Warehouse
Mandatory field for LocationMode.eLocationMode.InLocalWarehouse=1
|
| Name | Description | |
|---|---|---|
| bSaveRSToMDB | (Overrides clsImportBasebSaveRSToMDB(MPInterface, DataRow, DataTable).) | |
| GetListUserDefinedFields |
Returns the user defined field definition for the dimension "Customer Locations Tree". The fields have to be defined directly in MARIProject.
(Overrides clsImportBaseGetListUserDefinedFields(MPInterface).) |
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; }