clsImportEquipmentMasterAssemblyLink Class |
Use MPInterface.bImportEquipmentMasterAssemblyLink(clsImportEquipmentMasterAssemblyLink, clsImportBaseeImportMode) to import.
Namespace: MARIInterface
The clsImportEquipmentMasterAssemblyLink type exposes the following members.
| Name | Description | |
|---|---|---|
| clsImportEquipmentMasterAssemblyLink | Initializes a new instance of the clsImportEquipmentMasterAssemblyLink class |
| Name | Description | |
|---|---|---|
| CostRatio | CostRatio [not used at the moment] | |
| EquipmentCode | EquipmentCode. Mandatory field. The Equipment Master (assembly) with the EquipmentType=452 has to be created in advance | |
| EquipmentDetailLinkID | EquipmentDetailLinkID Internal ID. can be 0. will be created during the import | |
| LinkEquipmentCode | LinkEquipmentCode the code of the equipment to be assembled into the assembly | |
| LinkQuantity | LinkQuantity | |
| LinkType | LinkType | |
| MoveInAssemblyDate |
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 | |
| RevenueRatio | RevenueRatio [not used at the moment] | |
| SortOrder | SortOrder | |
| ValidFrom | ValidFrom |
| Name | Description | |
|---|---|---|
| bSaveRSToMDB | (Overrides clsImportBasebSaveRSToMDB(MPInterface, DataRow, DataTable).) |
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; }