clsImportLine Class |
Use MPInterface.bImportTimeKeepingLine(clsImportLine, clsImportBaseeImportMode) to import.
See also the usage in the web service: MARIWebService.TimeKeepingLine
Namespace: MARIInterface
The clsImportLine type exposes the following members.
| Name | Description | |
|---|---|---|
| clsImportLine | Initializes a new instance of the clsImportLine 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.
With V5.4 more modes are stored in the user interface
| |
| ApprovalText | ApprovalText | |
| BeginnTime |
(Optional) Time of the day 09:00 stored in a date format
| |
| BeginnTimeBillable |
(Optionaly) The billable time can optionally be different from the actual time (date format)
| |
| cHours |
Only for compatibility. Same as Hours | |
| cHoursBillable |
Only for compatibility. Same as HoursBillable | |
| ContractID | Contract Identifier. This is the internal identifier (INT) not the official contract number (char20). This is optional for internal projects.
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. | |
| ContractPositionIDByServiceCode |
Optional field. Whenn ContractPositionID is not provided, the ContractPositionID is searched by the service number in the contract.
When more than one position with the same service is used in the contract, the validation will return an error. | |
| DayOfService | The day the service was provided. From the date, the period (month) will be calculated. | |
| dBegin |
Old Property (for compatibilty). Please use BeginnTime | |
| dBeginBillable |
Old Property (for compatibilty). Please use BeginnTimeBillable | |
| dDayOfService |
Old Property (for compatibilty). Please use DayOfService | |
| dEnd |
Old Property (for compatibilty). Please use EndTime | |
| dEndBillable |
Old Property (for compatibilty). Please use EndTimeBillable | |
| EmployeeNumber | Nubmer of the employee (VARCHAR20) "M1000" | |
| EndTime |
(Optional) Time of the day 17:00 stored in a date format
| |
| EndTimeBillable |
(Optionaly) The billable time can optionally be different from the actual time (date format)
| |
| Hours |
Hours worked in the project. The number will be truncated after two digits. A minimum of 3 Minutes 0,05 hours will make sense.
Same value as cHours | |
| HoursBillable |
Hours invoicable to the customer. Normaly this will be the same as cHours. Occationaly this may differ.
Same value as cHoursBillable | |
| 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. For new lines=0 | |
| lLineID |
Old Property (for compatibilty). Please use LineID | |
| lPhaseID | Obsolete.
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. 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.
| |
| ProjectNumber | Identifier of the project (VARHCHAR20) "P12345" | |
| sActivity |
Old Property (for compatibilty). Please use Activity | |
| sEmployeeNumber |
Old Property (for compatibilty). Please use EmployeeNumber | |
| sMemo |
Old Property (for compatibilty). Please use MemoText | |
| SourceReferenceID |
When using a SourceReferenceType, then fill this reference ID with the corresponding value (for example the hotline ticket id)
| |
| SourceReferenceType |
Link a source reference to the time booking line. See clsImportLineeSourceReferenceType.
| |
| sProjectNumber |
Old Property (for compatibilty). Please use ProjectNumber |
| Name | Description | |
|---|---|---|
| bReadFromDB |
Reads the time keeping 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: MARIProjectTimeKeepingLines: :Table: MPProjektBuchungserfassung
View: MARIProjectTimeKeepingLinesServices : :Table: MPProjektLeistungserfassung
View: MARIProjectTimeKeepingHeader: :Table: MPProjektBuchungskopf (one line per employee and Month)
MARIInterface.clsImportLine oTimeKeepingLine; oTimeKeepingLine = new MARIInterface.clsImportLine(); // Mandantory Entries oTimeKeepingLine.Hours = 8; oTimeKeepingLine.HoursBillable = 8; oTimeKeepingLine.EmployeeNumber = "0001"; //SELECT EmployeeNumber FROM MARIEmployeeMaster WHERE Matchcode='Manager, Marc' oTimeKeepingLine.ProjectNumber = "P100005"; oTimeKeepingLine.PhaseID = 100018; // SELECT PhaseID FROM MARIProjectPhases WHERE ProjectNumber=N'P100005' AND PlanningVersion=3 oTimeKeepingLine.DayOfService = new DateTime(2020, 3, 3); // The BookingPeriod will be set automatically by the date // Mandatory for project types: customer project or iternal project with contract oTimeKeepingLine.ContractID = 100008; // SELECT ContractID FROM MARIContract WHERE ProjectNumber=N'P100005' oTimeKeepingLine.ContractPositionID = 100031; // SELECT ContractPositionId FROM MARIContractPositions WHERE ContractID=100008 AND PositionType=4 --(ServiceAtCost) //Additional Information oTimeKeepingLine.Activity = "This is the activity"; oTimeKeepingLine.MemoText = "This is the memo"; if (!oMPInterface.bImportTimeKeepingLine(oTimeKeepingLine, clsImportBase.eImportMode.ValidateAndImport)) { //oTimeKeepingLine.oErrors contains all Errors throw new Exception(oMPInterface.oErrors.PrintErrors()); } else { string sMessage = "The time keeping entry has succesfully been saved ! ID=" + oTimeKeepingLine.LineID; }