Click or drag to resize

clsImportEquipmentLocation Class

Import for table MPEquipmentLocation: Equipment: Current Location of this equipment. Each import will add a current location. The old status will be changed. The LocationChangeDate has to be the last in the row.

Use MPInterface.bImportEquipmentLocation(clsImportEquipmentLocation, clsImportBaseeImportMode) to import.

Inheritance Hierarchy
SystemObject
  MARIInterfaceclsImportBase
    MARIInterfaceclsImportEquipmentLocation

Namespace:  MARIInterface
Assembly:  MARIInterface (in MARIInterface.dll) Version: 8.0.0.100
Syntax
public class clsImportEquipmentLocation : clsImportBase

The clsImportEquipmentLocation type exposes the following members.

Constructors
  NameDescription
Public methodclsImportEquipmentLocation
Initializes a new instance of the clsImportEquipmentLocation class
Top
Properties
  NameDescription
Public propertyBinLocations
BinLocations all requipred bin location ids as JSON list. (inernal use) Mandatory field for LocationMode.eLocationMode.InLocalWarehouse=1 (if the warehouse has bin locations)
Public propertyCardCode
CardCode
Public propertyCompanyID
Company mandatory fields for all LocationModes
Public propertyContractID
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.
Public propertyContractPositionID
ContractPositionID Internal Position ID Mandatory field for LocationMode.eLocationMode.RentedToProject=2. Especially, when monthly invoices will be created based on the location.
Public propertyCustomerLocationTreeElementID
CustomerLocationTreeElementID
Public propertyEmployee
Employee who has created the transaction or has requested the equipment. See clsImportEmployee for the employee dimension.
Public propertyEquipmentCode
EquipmentCode
Public propertyEquipmentLocationID
EquipmentLocationID internal id. Automatically created
Public propertyLatitude
Latitude GEO Location
Public propertyLinkToEquipmentCode
LinkToEquipmentCode when the equipment will be imported to an equipment assembly, the code of the father goes in this field Mandatory field for LocationMode.eLocationMode.EqupimentInAssembly=4
Public propertyLocationChangeDate
LocationChangeDate: Transaction date. This date must be newer than all other location transactions on the equipment.
Public propertyLocationMode
LocationMode Defines the type of transaction.
Public propertyLocationTransactionID
LocationTransactionID ID to group a transaction of several equipment or customer service objects. (internal number)
Public propertyLongitude
Longitude GEO Location
Public propertyMemo
Memo
Public propertyPhaseID
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.
Public propertyProject
Project Mandatory field for LocationMode.eLocationMode.RentedToProject=2
Public propertyQuantity
Quantity Quantiy only allowd for equipment of the EquipmentType eEquipmentMasterType.EquipmentMasterQtyNoSN
Public propertyWarehouse
Warehouse Mandatory field for LocationMode.eLocationMode.InLocalWarehouse=1
Top
Methods
Remarks

View: MARIEquipmentLocation: :Table: MPEquipmentLocation

Import used by MARIProjektImportEquipmentLocation.
Examples
Move equipment back to a local warehouse
private bool ImportEquipmentLocationChange(string sEqupmentNo, string sWhs, DateTime dtLocationChangeDate) {
    //Example to move one equipment back to warehouse
    clsImportEquipmentLocation oLocation = new clsImportEquipmentLocation();
    oLocation.LocationMode = clsImportEquipmentLocation.eLocationMode.InLocalWarehouse;
    oLocation.EquipmentCode = sEqupmentNo;
    oLocation.Warehouse = sWhs;
    oLocation.CompanyID = 1;
    oLocation.LocationChangeDate = dtLocationChangeDate;
    oLocation.Memo = "Changes by MARIInterface " + DateTime.Now.ToString();

    if (oMPInterface.bImportEquipmentLocation(oLocation, clsImportBase.eImportMode.ValidateAndImport)) {
        return true;
    } else {
        Assert.False(true, oMPInterface.oErrors.PrintErrors());
        return false;
    }
}
See Also