clsImportWorkItemServicePlan Class |
Access Table MARIProjektImportWorkItemServicePlan. See clsImportBase.eImportMode relative tables in MS-Access.
Use MPInterface.bImportServicePlan(clsImportWorkItemServicePlan, clsImportBaseeImportMode) to import.
Use clsImportWorkItemServicePlanPosition to import positions to the service plan (Spare parts, services).
Namespace: MARIInterface
The clsImportWorkItemServicePlan type exposes the following members.
| Name | Description | |
|---|---|---|
| clsImportWorkItemServicePlan | Initializes a new instance of the clsImportWorkItemServicePlan class |
| Name | Description | |
|---|---|---|
| GetListUserDefinedFields |
Returns the user defined field definition for all dimension "WorkItem: Service Plan Template, Service Plan, Service Task, etc.". The fields have to be defined directly in MARIProject.
(Overrides clsImportBaseGetListUserDefinedFields(MPInterface).) |
| Name | Description | |
|---|---|---|
| CheckList | CheckList (int) | |
| CompanyID | Company ID. Link to the logical link to the SBO Database(Schema) | |
| ContractID | Link to the internal contract to fullfill the scheduled service | |
| ContractPosition | This field will default the contract position link for new spareparts in the service plan.
| |
| Currency | Currency (NVARCHAR 3) | |
| CycleType | Cycle Type. When a ServicePlanTemplate is linked and this value=None, the value is copied from the template. | |
| CycleValue | Cycle Value | |
| EndDate | WorkItemEnd End of the plan | |
| ExchangeRate | Exchange Rate (decimal) | |
| HandlingOnMovementMode | Store the behaviour, when returning material. clsImportWorkItemServicePlaneHandlingOnMovementMode | |
| Matchcode | Matchcode (NVARCHAR 50) | |
| PhaseID | Phase of the project with planning version = 3 | |
| Project | Link to an internal project with contract to fullfill the scheduled service | |
| ScheduleType | Handling definition to create the plan dates for a service plan. See eScheduleType. When a ServicePlanTemplate is linked and this value=None, the value is copied from the template. | |
| ServiceObject | Key of the customer service object or the equipment master | |
| ServiceObjectType | ServiceObjectType: Link to CSO or Equipment | |
| ServiceplanID | Serviceplan ID: Internal number of the service plan. Will be created in the import. Can be 0. For access this number should be <100000 to link the positions | |
| ServicePlanTemplate | Link to the service plan templates. The template defines the standard cylce and the standard checklist. | |
| StartDate | StartDate start of the plan |
View: MARIWorkItem or MARIWorkItem_ServicePlan: :Table: MPWorkItem With WorkItemType=379
View: MARICustomerServiceObject: :Table: MPCustomerEquipmentCard
string sErrordetails; try { //Create a service plan for one equipment clsImportWorkItemServicePlan NewServicePlan = new clsImportWorkItemServicePlan(); NewServicePlan.Matchcode = "DTW Service Plan for Equpment"; NewServicePlan.ServiceObjectType = clsImportWorkItemServicePlan.eServiceObjectType.Equipment; NewServicePlan.ServiceObject = "E110000"; // In this case the Id of the EquipmentMaster: SELECT EquipmentCode FROM MARIEquipmentMaster NewServicePlan.StartDate = new DateTime(2015, 1, 1); NewServicePlan.EndDate = new DateTime(2018, 12, 31); NewServicePlan.ServicePlanTemplate = 102055; // SELECT WorkItemID FROM MARIWorkItem WHERE WorkItemType=378 ... Additional conditions based on the "Used In" definition of the template NewServicePlan.CompanyID = 1; //Optional orverwrite the cycle type for this specific plan NewServicePlan.CycleType = clsImportWorkItemServicePlan.eCycleType.Quarterly; //Optional Link to a service project with contract and an internal contract NewServicePlan.Project = "P100028"; NewServicePlan.ContractID = 102056; //SELECT ContractID FROM MARIContract WHERE ProjectNumber='P100028' NewServicePlan.ContractPosition = 0; // New positions in the sevice plan will be default to item at cost. if (oMPInterface.bImportServicePlan(NewServicePlan, clsImportBase.eImportMode.ValidateAndImport)) { sErrordetails = ""; return; } sErrordetails = oMPInterface.oErrors.PrintErrors(true); LogFail(sErrordetails); return; } catch (Exception ex) { sErrordetails = ex.Message; LogFail(sErrordetails); return; }