clsImportItemBooking Class |
Use MPInterface.bImportItemBookingLine(clsImportItemBooking, clsImportBaseeImportMode) to import.
See also the usage in the web service: MARIWebService.ItemBookingLine
Namespace: MARIInterface
The clsImportItemBooking type exposes the following members.
| Name | Description | |
|---|---|---|
| clsImportItemBooking | Initializes a new instance of the clsImportItemBooking class |
| Name | Description | |
|---|---|---|
| Activity | The Activity text field (VARCHAR40 from Version 3.2 NVARCHAR100) will describe the type of service. (Free text) | |
| ApprovalFlag | The import can directly set the approval flag. This only works, if the user loged into the interface is allowed in the project to approve equipment bookings. | |
| ContractID | Contract Identifier. This is the internal identifier (INT) not the official contract number (char20).
The contract number is mandatory for customer projects and internal projects with contract.
The interface is working with the internal contract ID (100002) and not with the contract number "V12345".
| |
| ContractIDByContractNumber |
Optional Field. When the ContractID is not provided, the import will search for the ContractID via the contract number. (text field) | |
| ContractPositionID | Identifier of the contract position (INT). Only service prositions can be used.
A service for a contract can be internally saved in form of a contract position. A ContractPositionID has to be provided for projects that require a contract.
| |
| ContractPositionIDByItemCode |
Optional field. Whenn ContractPositionID is not provided, the ContractPositionID is searched by the item number in the contract. (Item at cost, Item at fixed price)
When more than one position with the same item code is used in the contract, the validation will return an error. | |
| DayOfService | The day the service or item was provided. The period (month) will be computed based on the DayOfService | |
| dDayOfService |
Old Property (for compatibilty). Please use DayOfService | |
| DeliveryID | Link to the Sales Goods Delivery Position ID | |
| EmployeeNumber | Nubmer of the employee. When this is not given, the project manager is used. (employees need to have a political cost rate, even thoght it is not used for item bookings) | |
| InvoiceID | Link to the A/R invoice position ID | |
| lContractID |
Old Property (for compatibilty). Please use ContractID | |
| lContractPositionID |
Old Property (for compatibilty). Please use ContractPositionID | |
| LineID | Each line will get an identifier, after saved in MARIProject. This identifier will be used in MARIProject further on.
Will be used for MPProjektArtikelerfassung.ArtikelerfassungsID Field can be 0 for the import | |
| lLineID |
Old Property (for compatibilty). Please use LineID | |
| lPhaseID |
Old Property (for compatibilty). Please use PhaseID | |
| MemoText | The Memo field can store 2 Million caracters (TEXT). | |
| PhaseID | Phase Identifier (INT). Only leaves of phases can be used, not branches.
Optional if the project has no phases. The ID can be establisched by means of the table MPProjektPhasen. Please use only planning version 3 (Actual Planning). | |
| PhaseIDByName |
Optional Field: When the PhaseID is not provided, the phase will be found by its name. If the project does have more than one phase with the given name, an error will be created.
| |
| PODeliveryID | Link to the AP Goods Receipt Position ID | |
| POInvoiceID | Link to the A/P Invoice Position ID | |
| ProjectNumber | Identifier of the project "P12345" Mandatory | |
| PurchasePrice | Read only, when the option in the contract position is not set to puchase price editable (In System Currency) | |
| Quantity | Number of items used | |
| QuantityBillable | Number of items used for billing (please fill this field 1:1 with the Quanity | |
| sActivity |
Old Property (for compatibilty). Please use Activity | |
| SalesPrice | Read only, when the option in the contract position is set to sales price editable | |
| sEmployeeNumber |
Old Property (for compatibilty). Please use EmployeeNumber | |
| sMemo |
Old Property (for compatibilty). Please use MemoText | |
| SourceReference | Reference to other sources. See SourceType for the valid id | |
| SourceReferencePos | Reference a source position. See SourceType for the valid id | |
| SourceType | Reference to a source object. (Support Ticket...). See clsImportItemBookingeSourceType for details. Use the field SourceReference for the link id. | |
| sProjectNumber |
Old Property (for compatibilty). Please use ProjectNumber |
| Name | Description | |
|---|---|---|
| bReadFromDB |
Reads the item booking 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).) |
View: MARIProjectItemBooking: :Table: MPProjektArtikelerfassung
View: MARIProjectItemBookingSerialNumbers: :Table: MPProjektArtikelerfassungSerie
View: MARIProjectTimeKeepingHeader: :Table: MPProjektBuchungskopf (one line per employee and Month)
Used by MS Access table: MARIProjektImportItemBooking.public bool CreateItemBooking(string sProject, int lContract, int lContractPositionItem) { clsImportItemBooking oItemBooking = new clsImportItemBooking(); oItemBooking.ProjectNumber = sProject; oItemBooking.ContractID = lContract; oItemBooking.ContractPositionID = lContractPositionItem; oItemBooking.EmployeeNumber = "0001"; oItemBooking.Activity = "Interface created based on Goods receipt"; oItemBooking.Quantity = 6m; oItemBooking.QuantityBillable = 6m; oItemBooking.DayOfService = DateTime.Today; if (oMPInterface.bImportItemBookingLine(oItemBooking, clsImportBase.eImportMode.ValidateAndImport)) { return true; } else { // on import error LogFail(oMPInterface.oErrors.PrintErrors()); return false; } }