clsImportCustomerServiceObject Class |
Use MPInterface.bImportCustomerServiceObject(clsImportCustomerServiceObject, clsImportBaseeImportMode) to import.
Namespace: MARIInterface
The clsImportCustomerServiceObject type exposes the following members.
| Name | Description | |
|---|---|---|
| clsImportCustomerServiceObject | Initializes a new instance of the clsImportCustomerServiceObject class |
| Name | Description | |
|---|---|---|
| AddrBlock | NVARCHAR (100) AddrBlock | |
| AddrBuilding | NTEXT AddrBuilding | |
| AddrCity | NVARCHAR (100) AddrCity | |
| AddrCountry | NVARCHAR (3) AddrCountry | |
| AddrCounty | NVARCHAR (100) AddrCounty | |
| AddrGlbLocNum | NVARCHAR (50) AddrGlbLocNum | |
| AddrState | NVARCHAR (3) AddrState | |
| AddrStreet | NVARCHAR (100) AddrStreet | |
| AddrStreetNo | NVARCHAR (100) AddrStreetNo | |
| AddrType | NVARCHAR (100) AddrType | |
| AddrZipCode | NVARCHAR (20) AddrZipCode | |
| CECGroupID | INT Customer Equipment Category | |
| CheckList | CheckList | |
| cntctPhone | NVARCHAR (20) cntctPhone | |
| CollectionLocations |
List of locations (At the client/Project or at in the warehouse)
| |
| CollectionParts |
List of spare parts, ware parts, components for the new customer service object
| |
| CompanyID | SMALLINT CompanyID | |
| contactCod | INT contactCod | |
| ContractID | ContractID | |
| ContractPosition | ContractPosition | |
| custmrName | NVARCHAR (100) custmrName | |
| customer | NVARCHAR (20) customer | |
| CustomerLocationTreeElementID | INT CustomerLocationTreeElementID | |
| internalSN | NVARCHAR (32) internalSN | |
| itemCode | NVARCHAR (20) itemCode | |
| itemName | NVARCHAR (100) itemName | |
| manufDate | Datetime (8) manufDate | |
| manufSN | NVARCHAR (32) manufSN | |
| Memo | Memo | |
| MPinsID | INT MPinsID | |
| PhaseID | PhaseID | |
| PictureArrayOfBytes |
The picture can be transfered via a byte array instead of a PictureFileName.
| |
| PictureFileName | Linking a file name, will load this file into the database. The file content has to be accessable from the import process.
The picture content is stored in: View: MARIPictures : : Table: MPBilder | |
| PictureID | PictureID (for the import only existing key in table MPBilder supported. | |
| Project | Projectnumber | |
| Status | Status | |
| warranty | Boolean | |
| wrrntyEnd | Datetime (8) wrrntyEnd | |
| wrrntyStrt | Datetime (8) wrrntyStrt |
| Name | Description | |
|---|---|---|
| bReadFromDB | (Overrides clsImportBasebReadFromDB(MPInterface, String).) | |
| bSaveRSToMDB | (Overrides clsImportBasebSaveRSToMDB(MPInterface, DataRow, DataTable).) | |
| GetListUserDefinedFields |
Returns the user defined field definition for the dimension "Customer Service Objects". 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; }