CreateWorkOrder routine - HxGN EAM - 12.0 - Customization & Programming - Hexagon

HxGN EAM Web Services Toolkit Programmer Help

Language
English
Product
HxGN EAM
Search by Category
Customization & Programming
HxGN EAM Version
12

This routine creates an instance of the WorkOrder class created from the WSDL file and sets its properties from the information entered into the sample's main form. The routine performs the following steps:

  • Creates an instance of the WorkOrder class and assigns it to a variable wo.

    Dim wo As New WebServices.MP0023.WorkOrder

  • Sets the WORKORDERID property of wo. The type of this property is WOID_Type which is a class that was created from the WSDL file. Since it is a class, it must first be instantiated,

    wo.WORKORDERID = New WebServices.MP0023.WOID_Type

    and then its properties must be set. The properties are set directly from the controls on the main form of the sample. Note that the WOID_Type class has a property named ORGANIZATIONID, which is an object reference to a class created from the WSDL file. As with similar properties, it must first be instantiated before setting its own properties.

    With wo.WORKORDERID

    .JOBNUM = "99999"

    .DESCRIPTION = WODescTextBox.Text.Trim()

    .ORGANIZATIONID = New WebServices.MP0023.ORGANIZATIONID_Type

    .ORGANIZATIONID.ORGANIZATIONCODE =

    WOOrgTextBox.Text.Trim() End With

    The STATUS, TYPE, DEPARTMENTID, EQUIPMENTID, and CREATEDBY properties are object references and must be instantiated before being set. The FIXED property is required and needs to be hard coded to the value V.

  • Returns the WorkOrder instance.