clsImportAttendanceDayActivity Class |
Namespace: MARIInterface
The clsImportAttendanceDayActivity type exposes the following members.
| Name | Description | |
|---|---|---|
| clsImportAttendanceDayActivity | Initializes a new instance of the clsImportAttendanceDayActivity class |
| Name | Description | |
|---|---|---|
| Activity | Activity: internal ID for each action. This field will not be filled during the import. | |
| ActivityDetail | ActionDetail: Additional details value for special Activities. Values are from the group table | |
| ActivityErrorCode | ErrorCode calculated by the working time rule linked to the employee | |
| ActivityOrder | Internal Order in the activities. Field can be empty in the import. Only the | |
| ActivityText | ActivityText: Free text to be stored with the activity | |
| ActivityType | ActivityType: Type of activity in the day. See eAttendanceActivityType | |
| ApprovalMode | ApprovalMode | |
| ApprovedDate | ApprovedDate | |
| ApprovedUser | ApprovedUser | |
| ContractID | ContractID: Activities can store the start time working on a project, contract, contract position and phase. | |
| ContractPositionID | ContractPositionID: Activities can store the start time working on a project, contract, contract position and phase. | |
| EmployeeNumber | EmployeeNumber. See clsImportEmployee for the employee dimension. | |
| LinkClassID | LinkClassID. Source for the action. For example MARIServiceJob | |
| LinkClassKey | LinkClassKey: Value of the source. For example the MARIServiceJob-ID | |
| Memo | Memo: Additional note | |
| PhaseID | PhaseID: Activities can store the start time working on a project, contract, contract position and phase. | |
| ProjectNumber | ProjectNumber: Activities can store the start time working on a project, contract, contract position and phase. | |
| Source | Source | |
| SourceText | SourceText: Reference to the source. Can be IP address for web client,mobile client. | |
| TimeValueExact | WorkingDay and this value build the exact time stamp of the acitity. together they have to be unique. | |
| TimeValueRounded | Each action have to have an exact timestamp (WorkingDay and TimeValueExact). When a rule moves a comming action from 05:58 to 06:00. This field will hold 06:00 | |
| WorkingDay | WorkingDay. Defines the day of the transaction. Togehter with TimeValueExact they build the unique time stamp of the activity |
public bool CreateAttendanceDayActivity(string sProject, int lContract, int lContractPositionItem) { clsImportAttendanceDayActivity oAttendanceDayActivity = new clsImportAttendanceDayActivity(); oAttendanceDayActivity.ProjectNumber = sProject; oAttendanceDayActivity.ContractID = lContract; oAttendanceDayActivity.ContractPositionID = lContractPositionItem; oAttendanceDayActivity.EmployeeNumber = "0001"; //Creating Punch in oAttendanceDayActivity.ActivityType = clsImportAttendanceDayActivity.eAttendanceActivityType.Comming; oAttendanceDayActivity.ActivityText = "Punch in Activity"; oAttendanceDayActivity.WorkingDay = new DateTime(2016, 1, 1); oAttendanceDayActivity.TimeValueExact = DateTime.MinValue.Add(new TimeSpan(8, 15, 0)); if (!oMPInterface.bImportAttendanceDayActivity(oAttendanceDayActivity, clsImportBase.eImportMode.ValidateAndImport)) { // oTimeKeepingLine.oErrors contains all Errors throw new Exception(oMPInterface.oErrors.PrintErrors()); } else { oMPInterface.oErrors.Clear(); //OO20200629 - auch wenn bImportAttendanceDayActivity true ist schreibt er ein "import erfolgreich" fehler rein oAttendanceDayActivity.oErrors.Clear(); // Creating Punch out oAttendanceDayActivity.ActivityType = clsImportAttendanceDayActivity.eAttendanceActivityType.Going; oAttendanceDayActivity.ActivityText = "Punch out Activity"; oAttendanceDayActivity.WorkingDay = new DateTime(2016, 1, 1); oAttendanceDayActivity.TimeValueExact = DateTime.MinValue.Add(new TimeSpan(16, 45, 0)); if (!oMPInterface.bImportAttendanceDayActivity(oAttendanceDayActivity, clsImportBase.eImportMode.ValidateAndImport)) { // oTimeKeepingLine.oErrors contains all Errors throw new Exception(oMPInterface.oErrors.PrintErrors()); } else { return true; } } }