clsImportService Class |
Used by MS Access table: MARIProjektImportService
Use MPInterface.bImportService(clsImportService, clsImportBaseeImportMode) to import.
Namespace: MARIInterface
The clsImportService type exposes the following members.
| Name | Description | |
|---|---|---|
| clsImportService | Initializes a new instance of the clsImportService class |
| Name | Description | |
|---|---|---|
| CompanyID | Company ID. Used to create the properties for the first company. More company can be managed via clsImportServicePosition and the list ListOfServicePositions.
| |
| Description1Day |
Invoice in days: Description1 of the service linked via CompanyID for services based on days. More company can be managed via clsImportServicePosition and the list ListOfServicePositions.
See Description1.
| |
| Description1Hour |
Invoice in hours: Description1 of the service linked via CompanyID for services based on hours. More company can be managed via clsImportServicePosition and the list ListOfServicePositions.
See Description1.
| |
| Description2Day |
Invoice in days: Description2 of the service linked via CompanyID for services based on days. More company can be managed via clsImportServicePosition and the list ListOfServicePositions.
See Description2.
| |
| Description2Hour |
Invoice in hours: Description2 of the service linked via CompanyID for services based on hours. More company can be managed via clsImportServicePosition and the list ListOfServicePositions.
See Description2.
| |
| DescriptionMemo1Day |
Invoice in days: Description3 for the customer for placeholders by each time booking line linked via CompanyID for services based on days. More company can be managed via clsImportServicePosition and the list ListOfServicePositions.
Placeholders can be imported using the current user language place holder codes. For example [Posting information].
See Description3.
| |
| DescriptionMemo1Hour |
Invoice in hours: Description3 for the customer for placeholders by each time booking line linked via CompanyID for services based on hours. More company can be managed via clsImportServicePosition and the list ListOfServicePositions.
Placeholders can be imported using the current user language place holder codes. For example [Posting information].
See Description3.
| |
| DescriptionMemo2Day |
Invoice in days: Description4 for the customer for placeholders by each time booking line linked via CompanyID for services based on days. More company can be managed via clsImportServicePosition and the list ListOfServicePositions.
Placeholders can be imported using the current user language place holder codes.
See Description4.
| |
| DescriptionMemo2Hour |
Invoice in hours: Description4 for the customer linked via CompanyID for services based on hours. More company can be managed via clsImportServicePosition and the list ListOfServicePositions.
Placeholders can be imported using the current user language place holder codes.
See Description4.
| |
| Group1 | Service Group1 (Optional) | |
| Group2 | Service Group2 (Optional) | |
| Group3 | Service Group3 (Optional) | |
| ItemCodeDay |
Invoice in days: Item number from SBO (OITM.ItemCode) linked via CompanyID for services based on days. More company can be managed via clsImportServicePosition and the list ListOfServicePositions.
See ItemCode.
| |
| ItemCodeHour |
Invoice in hours: Item number from SBO (OITM.ItemCode) linked via CompanyID for services based on hours. More company can be managed via clsImportServicePosition and the list ListOfServicePositions.
See ItemCode.
| |
| ItemPriceDay |
Invoice in days: Selling price per hour of the service linked via CompanyID for services based on days (MARIProject SystemCurrency). More company can be managed via clsImportServicePosition and the list ListOfServicePositions.
See ContractPrice.
| |
| ItemPriceHour |
Invoice in hours: Selling price per hour of the service linked via CompanyID for services based on hours (MARIProject SystemCurrency). More company can be managed via clsImportServicePosition and the list ListOfServicePositions.
See ContractPrice.
| |
| ListOfPoolLinks |
List of resource pools linked to this service. See clsImportServicePoolLink.
| |
| ListOfServicePositions |
Collection of hour items, day items per company. See clsImportServicePosition.
| |
| MatchcodeDay |
Invoice in days: Matchcode of the service linked via CompanyID for services based on days. More company can be managed via clsImportServicePosition and the list ListOfServicePositions.
See Matchcode.
| |
| MatchcodeHour |
Invoice in hours: Matchcode of the service linked via CompanyID for services based on hours, visible in the time keeping. More company can be managed via clsImportServicePosition and the list ListOfServicePositions.
See Matchcode.
| |
| OptionMemo | Internal Memo for additional properties | |
| PurchasePriceDay |
Invoice in days: Imputed Purchase Price of the service linked via CompanyID for services based on days. More company can be managed via clsImportServicePosition and the list ListOfServicePositions.
See PurchasePriceManual.
| |
| PurchasePriceHour |
Invoice in hours: Imputed Purchase Price of the service linked via CompanyID for services based on hours. More company can be managed via clsImportServicePosition and the list ListOfServicePositions.
See PurchasePriceManual.
| |
| QuantityDay |
Invoice in days: Quantity of the service linked via CompanyID for services based on days. More company can be managed via clsImportServicePosition and the list ListOfServicePositions.
See ContractQuantity.
| |
| QuantityHour |
Invoice in hours: Quantity of the service linked via CompanyID for services based on hours. More company can be managed via clsImportServicePosition and the list ListOfServicePositions.
See ContractQuantity.
| |
| QuantityUnitDay |
Invoice in days: Quantity unit ("d") of the service linked via CompanyID for services based on days. More company can be managed via clsImportServicePosition and the list ListOfServicePositions.
See UnitOfMeasurement.
| |
| QuantityUnitHour |
Invoice in hours: Quantity unit ("h") of the service linked via CompanyID for services based on hours. More company can be managed via clsImportServicePosition and the list ListOfServicePositions.
See UnitOfMeasurement.
| |
| ServiceMatchcode | Matchcode of the service | |
| ServiceNumber | Employee Service Number Identifier (Unique Key). Format must follow settings | |
| Standardphase | Store link to a phase holder. Not used |
| Name | Description | |
|---|---|---|
| AddPosition |
Method to add additional positions. Does not replace existing. See AddPositionWithReplace(clsImportServicePosition) | |
| AddPositionWithReplace |
Public Method to add a Service Position. This function will replace existing postiions of the same type (per day/per hour). Use AddPosition(clsImportServicePosition) to add only extra positions.
| |
| bReadFromDB |
Reads the service data from the database and copies the values to the class
Only for internal use! To load data use your own SQL.
(Overrides clsImportBasebReadFromDB(MPInterface, String).) | |
| bSaveRSToMDB | (Overrides clsImportBasebSaveRSToMDB(MPInterface, DataRow, DataTable).) |
private string CreateServiceMaster() { string sErrordetails; clsImportService oNewService = new clsImportService(); int lBusinessUnit = 1;//sample business unit //Get next free number based on the (sample) number format oNewService.ServiceNumber = oNewService.sGetClassNummer(oMPInterface, "S1*", clsImportBase.eCoreDataClassID.Service, lBusinessUnit); oNewService.ServiceMatchcode = "Project Management"; //Setting for the service in hours (company 1) oNewService.CompanyID = 1; oNewService.ItemCodeHour = "12345"; //OITM.ItemCode oNewService.MatchcodeHour = "Project Management Hours"; // Text visible in the time registration oNewService.Description1Hour = "Project Management"; // Text visible on the invoice (for service at cost) oNewService.Description2Hour = "based on hours used"; oNewService.QuantityHour = 1; // standard is one hour oNewService.ItemPriceHour = 125; // standard sales price per hout //Setting service in days (company 1) oNewService.ItemCodeDay = "12346"; //OITM.ItemCode oNewService.MatchcodeDay = "Project Management days"; // Text visible in the time registration oNewService.Description1Day = "Project Management"; // Text visible on the invoice (for service at cost) oNewService.Description2Day = "based on days used"; oNewService.QuantityDay = 1; // standard is one day oNewService.ItemPriceDay = 1000; // standard sales price per hout if (oMPInterface.bImportService(oNewService, clsImportBase.eImportMode.ValidateAndImport)) { return oNewService.ServiceNumber; } else { sErrordetails = oMPInterface.oErrors.PrintErrors(true); Assert.False(true, sErrordetails); return ""; } }
private string CreateServiceMasterCompanies() { string sErrordetails; clsImportService oNewService = new clsImportService(); //This sample creates a service and links the service to three companies //This sample assumes, that the item codes are synchronized between the companies List<short> ListCompanies = new List<short> { 1, 2, 3 }; //Get next free number based on the (sample) number format oNewService.ServiceNumber = oNewService.sGetClassNummer(oMPInterface, "S1*", clsImportBase.eCoreDataClassID.Service); oNewService.ServiceMatchcode = "Project Management"; //Create 3*2=6 Positions foreach (short Company in ListCompanies) { CreatePos(oNewService, Company, clsImportProjectContractPosition.eQuantityType.ServiceEquipmentInHours, "12345", "CAD in hours", 125); CreatePos(oNewService, Company, clsImportProjectContractPosition.eQuantityType.ServiceEquipmentInDays, "12346", "CAD in hours", 1000); } if (oMPInterface.bImportService(oNewService, clsImportBase.eImportMode.ValidateAndImport)) { return oNewService.ServiceNumber; } else { sErrordetails = oMPInterface.oErrors.PrintErrors(true); Assert.False(true, sErrordetails); return ""; } } private void CreatePos(clsImportService oNewService, short Company, clsImportProjectContractPosition.eQuantityType QualtityType, string ItemCode, string Matchcode, Decimal Price) { clsImportServicePosition oPos = new clsImportServicePosition(); oPos.PositionTyp = clsImportProjectContractPosition.eContractPositionType.ServiceAtCost; oPos.QuantityType = QualtityType; oPos.ItemCode = ItemCode; oPos.Matchcode = Matchcode; oPos.Description1 = Matchcode; oPos.ContractQuantity = 1; oPos.ContractPrice = Price; oNewService.AddPositionWithReplace(oPos); }