Click or drag to resize

clsImportEquipmentMasterAssemblyLink Class

Import for table MPEquipmentDetailsLink: Equipment Assembly: List of inner components AccessMDB = MARIProjektImportEquipmentMasterAssemblyLink

Use MPInterface.bImportEquipmentMasterAssemblyLink(clsImportEquipmentMasterAssemblyLink, clsImportBaseeImportMode) to import.

Inheritance Hierarchy
SystemObject
  MARIInterfaceclsImportBase
    MARIInterfaceclsImportEquipmentMasterAssemblyLink

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

The clsImportEquipmentMasterAssemblyLink type exposes the following members.

Constructors
  NameDescription
Public methodclsImportEquipmentMasterAssemblyLink
Initializes a new instance of the clsImportEquipmentMasterAssemblyLink class
Top
Properties
  NameDescription
Public propertyCostRatio
CostRatio [not used at the moment]
Public propertyEquipmentCode
EquipmentCode. Mandatory field. The Equipment Master (assembly) with the EquipmentType=452 has to be created in advance
Public propertyEquipmentDetailLinkID
EquipmentDetailLinkID Internal ID. can be 0. will be created during the import
Public propertyLinkEquipmentCode
LinkEquipmentCode the code of the equipment to be assembled into the assembly
Public propertyLinkQuantity
LinkQuantity
Public propertyLinkType
LinkType
Public propertyMoveInAssemblyDate
When a date is set, the equipment is directly linked to the assembled (it will be shown as assembledIn)

A line in the location table will be created: View: MARIEquipmentLocation: :Table: MPEquipmentLocation

Public propertyRevenueRatio
RevenueRatio [not used at the moment]
Public propertySortOrder
SortOrder
Public propertyValidFrom
ValidFrom
Top
Methods
Remarks
Examples
Advanced Assembly Example
private bool ImportEquipmentAssemblyExample() {
    bool bOK = true;
    //Category for the cars
    int EquipmentCategoryCars = CreateEquipmentCategory("VW Golf Class");
    //Create two cars
    string Car1 = CreateEquipmentMaster(EquipmentCategoryCars, "E160001", "Golf K-MC 1001", MARIInterface.clsImportEquipmentMaster.eEquipmentMasterType.EquipmentMaster, new DateTime(2014, 11, 1));
    string Car2 = CreateEquipmentMaster(EquipmentCategoryCars, "E160002", "Golf K-MC 1002", MARIInterface.clsImportEquipmentMaster.eEquipmentMasterType.EquipmentMaster, new DateTime(2014, 11, 1));

    //Category for the trailers
    int EquipmentCategoryTrailer = CreateEquipmentCategory("Trailers Standard");
    if (EquipmentCategoryTrailer == 0) return false;

    //Create two trailers
    string Trailer1 = CreateEquipmentMaster(EquipmentCategoryCars, "E260001", "Trailer 1.2 t K-MC 15", MARIInterface.clsImportEquipmentMaster.eEquipmentMasterType.EquipmentMaster, new DateTime(2014, 11, 1));
    string Trailer2 = CreateEquipmentMaster(EquipmentCategoryCars, "E260002", "Trailer 1.5 t K-AA 19", MARIInterface.clsImportEquipmentMaster.eEquipmentMasterType.EquipmentMaster, new DateTime(2014, 11, 1));

    //Category for the assembly (renting one position car+trailer)
    int EquipmentCategoryAssembly = CreateEquipmentCategory("Car with trailers");
    if (EquipmentCategoryAssembly == 0) return false;

    //Create assembly
    string EqupimentAssembly = CreateEquipmentMaster(EquipmentCategoryAssembly, "E560001", "Golf 6 with trailer 1.2t", MARIInterface.clsImportEquipmentMaster.eEquipmentMasterType.EquipmentAssembly, new DateTime(2014, 11, 1));


    //Link Car1, Trailer1 to assembly
    MARIInterface.clsImportEquipmentMasterAssemblyLink NewAssemblyLink;

    //Link "Golf" to Assembly
    NewAssemblyLink = new MARIInterface.clsImportEquipmentMasterAssemblyLink();
    NewAssemblyLink.EquipmentCode = EqupimentAssembly;
    NewAssemblyLink.LinkType = MARIInterface.clsImportEquipmentMasterAssemblyLink.eEquipmentLinkType.EqupimentInAssembly;
    NewAssemblyLink.LinkEquipmentCode = Car1;
    //Directly move the equpment to the assembly
    NewAssemblyLink.MoveInAssemblyDate = new DateTime(2014, 11, 2);
    //Save link + current location
    if (oMPInterface.bImportEquipmentMasterAssemblyLink(NewAssemblyLink, MARIInterface.clsImportBase.eImportMode.ValidateAndImport)) {
        bOK = bOK && true;
    } else {
        bOK = false;
        Assert.False(true, oMPInterface.oErrors.PrintErrors());
    }

    //Link "trailer" to Assembly
    NewAssemblyLink = new MARIInterface.clsImportEquipmentMasterAssemblyLink();
    NewAssemblyLink.EquipmentCode = EqupimentAssembly;
    NewAssemblyLink.LinkType = MARIInterface.clsImportEquipmentMasterAssemblyLink.eEquipmentLinkType.EqupimentInAssembly;
    NewAssemblyLink.LinkEquipmentCode = Trailer1;
    //Directly move the equpment to the assembly
    NewAssemblyLink.MoveInAssemblyDate = new DateTime(2014, 11, 2);
    //Save link + current location
    if (oMPInterface.bImportEquipmentMasterAssemblyLink(NewAssemblyLink, MARIInterface.clsImportBase.eImportMode.ValidateAndImport)) {
        bOK = bOK && true;
    } else {
        bOK = false;
        Assert.False(true, oMPInterface.oErrors.PrintErrors());
    }
    return bOK;
}
See Also