Click or drag to resize

clsImportEquipmentMaster Class

Data holder to import the equipment master linked to an existing equipment category.

Use MPInterface.bImportEquipmentMaster(clsImportEquipmentMaster, clsImportBaseeImportMode) to import.

Inheritance Hierarchy
SystemObject
  MARIInterfaceclsImportBase
    MARIInterfaceclsImportEquipmentMaster

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

The clsImportEquipmentMaster type exposes the following members.

Constructors
  NameDescription
Public methodclsImportEquipmentMaster
Initializes a new instance of the clsImportEquipmentMaster class
Top
Properties
  NameDescription
Public propertyAsstNum
AsstNum free field to the fixed asset number. Can be linked to the fixed asset key (OITM.ItemCode), when fixed asset moduled is used.
Public propertyBuildInYear
MPEquipment.BuildInYear as a number
Public propertyBusinessUnit
Mandatory link to the business unit of the equipment. For cost accounting, this indicates the internal "owner" of the equipment. See dimension clsImportSetupBusinessUnits for details.
Public propertyCalendarId
For renting the availability of the equipment will be based on a planning calendar. This calendar can be defined as a link to the
Public propertyCollectionParts
Public propertyCompanyID
This field is filled automatically based on the selected business unit. When you leave this field empty(=0) its inherits the company from the business unit.
Public propertyDateInCompany
MPEquipment.DateInCompany as date.
Public propertyDateOutCompany
MPEquipment.DateOutCompany as date
Public propertyDrivingEmployee
Driving Employee or using employee. This field is used to manage the "owner" of an equipment, when it is given to an employee for the daily use. See clsImportEmployee for the employee dimension.
Public propertyEquipmentCategoryID
Equipment Category. Mandatory field
Public propertyEquipmentCode
MPEquipment.EquipmentCode Key field for each equipment. Please consider the user defined format for the Equipment code. For example E######.
Public propertyEquipmentIdentification
MPEquipment.EquipmentIdentification 50Char. For example: Number plate fo a vehicle
Public propertyEquipmentName
MPEquipment.EquipmentName 50 Char
Public propertyEquipmentType
EquipmentType: Standard Equpment = 223. Equipment with multiple quantities = 451, Equipment Assemblies = 452
Public propertyGroup1
Group1. GroupType=10503. EquipmentMasterGroup1
Public propertyGroup2
Group2. GroupType=10504. EquipmentMasterGroup2
Public propertyGroup3
Group3. GroupType=10505. EquipmentMasterGroup3
Public propertyHireCardCode
The VendorCardCode will define, where the equipment is purchased. The HireCardCode is used, when the Status is set to Active_RentedBySupplier = 2.
Public propertyHirePurchaseProcess
To monitor the invoices from the HireCardCode the purchase process can be linked.
Public propertyHirePurchaseProcessPos
Link the position in the HirePurchaseProcess for category of this equipment to monitor the rental invoices.
Public propertyInsuranceID
A group table to link equipments to the insurance company only for listing.
Public propertyInventoryNumber
InventoryNumber your internal number for this equipment
Public propertyItemCode
ItemCode in the SBO Database to purchase this equipmetn at the supplier. VendorCardCode for the supplier.
Public propertyLocationID
The location Id can be used to organize the internal location outside of the shop floor.
Public propertyMaintenanceContractID
Based on the MaintenanceProject a contract can be linked.
Public propertyMaintenanceContractPosition
Based on a MaintenanceContractID a service contract position can be linked to store the time used for the maintenance.
Public propertyMaintenancePhaseID
Based on the MaintenanceProject a phase can be selected to book the maintenance time to it.
Public propertyMaintenanceProject
Link to an internal project as a standard maintenance project. See also the linked service plans (clsImportWorkItemServicePlan), where also a project can be linked.
Public propertyMemo
MPEquipment.Memo as NTEXT
Public propertyMPLocationID
A link to the table MPLocation as an alternative (old) current location mechanism to the clsImportEquipmentLocation table.
Public propertyOcrCode2
OcrCode2
Public propertyOcrCode3
OcrCode3
Public propertyOcrCode4
OcrCode4
Public propertyOcrCode5
OcrCode5
Public propertyPictureArrayOfBytes
The picture can be transfered via a byte array instead of a PictureFileName.
Public propertyPictureFileName
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

Public propertyPictureID
PictureID (for the import only existing key in table MPBilder supported.
Public propertyProfitCenter
ProfitCenter/CostCenter (Dimension1) inherited from the business unit, the costs will be stored.
Public propertyProjectCode
Cost objective used to link the cost bookings to.
Public propertyResponsible1
First Employee in the organization managing this equipment. See clsImportEmployee for the employee dimension.
Public propertyResponsible2
Second Employee in the organization managing this equipment. See clsImportEmployee for the employee dimension.
Public propertySerialNumber
SerialNumber
Public propertySLA_ID
Define the current service level agreement, when a problem for this equipment arises. This field will be used, when the user creates a service ticket (clsImportSupportIssue) linked to the equipment.
Public propertyStatus
Public propertyValidFrom
Linked to the equipment master serveral Detail information can be stored. This table is 1:n with a valid from (and a valid To in the database). This import will create the first mandatory line in the Dteail table.

You must give a first valid from date to start the logical link to the business unit.

Public propertyVendorCardCode
Code of the supplier to purchase this equipment or to ask for service or spare parts. See ItemCode for the item code.
Public propertyWareHouseCode
Standard WareHouse this equipment will be located, when it is not rented by a customer. See also clsImportEquipmentLocation to manage the current location of the equipment.
Top
Methods
Remarks
User Defined fields are only supported for the table MARIEquipmentMaster/MPEquipment.

View: MARIEquipmentMaster: :Table: MPEquipment

View: MARIEquipmentDetails: :Table: MPEquipmentDetails

Import used by MARIProjektImportEquipmentMaster.
Examples
Create Equipment Category Business Partner Catalog Number
public string CreateImportEquipmentMaster(int lEquipmentCategory) {
    Log($"CreateImportEquipmentMaster({lEquipmentCategory})");
    MARIInterface.clsImportEquipmentMaster NewEquipment = new MARIInterface.clsImportEquipmentMaster();

    //Link the New Equipment to category
    NewEquipment.EquipmentCategoryID = lEquipmentCategory; //SELECT EquipmentCategory FROM MARIEquipmentCategory
    NewEquipment.EquipmentIdentification = "K-MC-120"; // Number plate
    NewEquipment.EquipmentName = "VW Golf green";
    NewEquipment.AsstNum = "I384837734"; // Fixed asset code
    NewEquipment.SerialNumber = "VNH3498889283928829";
    NewEquipment.BuildInYear = 2011;
    NewEquipment.DateInCompany = new DateTime(2014, 12, 1);

    //Information for the details (valid from) and the link to the business unit.
    NewEquipment.ValidFrom = new DateTime(2014, 12, 1);
    NewEquipment.Status = MARIInterface.clsImportEquipmentMaster.eEquipmentMasterStatus.Active_CompanyOwned;
    NewEquipment.BusinessUnit = 1; //SELECT BusinessUnitID FROM MARIBusinessUnitMaster
    NewEquipment.Responsible1 = "0001"; // Manager Marc,
    NewEquipment.DrivingEmployee = "0002"; // Projectmanager, Paula
    NewEquipment.VendorCardCode = "70003"; // VW Palo Alto
    NewEquipment.ItemCode = "290013"; // Purchase item


    if (!oMPInterface.bImportEquipmentMaster(NewEquipment, MARIInterface.clsImportBase.eImportMode.ValidateAndImport)) {
        //NewEquipmentCategory.oErrors contains all Errors
        LogFail(oMPInterface.oErrors.PrintErrors());
        return null;
    } else {
        Log($"CreateImportEquipmentMaster({lEquipmentCategory}) = {NewEquipment.EquipmentCode}");
        return NewEquipment.EquipmentCode;
    }
}
See Also