appendEmployeeGeoPunchByIDNum() Method

Table of Contents

  1. Function
  2. Syntax
  3. Parameters
  4. Return Value
  5. Sample Code
  6. Remarks
  7. Possible Errors
  8. Alternate Method
  9. Related Methods

Function

  • Appends an employee punch with geographical information

Syntax

  • AeXMLBridge.appendEmployeeGeoPunchByIDNum(IDNum, TimeStamp, Station, TransType, GPSCoordsEnum, Latitude, Longitude, Accuracy, Altitude);

Parameters

  • String - employee ID
  • String - timestamp (yyyy-MM-dd HH:mm:ss.fff format)
  • Integer - clock station
  • Integer - transaction type
  • Enumeration - TGPSCoordsEnum
  • Double - latitude coordinate
  • Double - longitude coordinate
  • Double - accuracy
  • Double - altitude

Return Value

  • None

Sample Code C

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
string ts = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");                   
// get timestamp and format it

string empID = "1234";
// employees IDNum

TAeBasicDataItem[] stations = ws.getStationsSimple();
// get station id numbers

int transType = 0;
// 0 = punch

TGPSCoordsEnum coords = TGPSCoordsEnum.gpsOk;
// we will be using location information

double latitude = -120.3341d;
double longitude = 22.4356d;
double accuracy = 0;
double altitude = 0;

try
{
ws.appendEmployeeGeoPunchByIDNum(empID, ts, stations{0].Num, transType, coords, latitude, longitude, accuracy, altitude);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}

Sample Code VB.Net

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Dim ts As String = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")
' get timestamp and format it

Dim empID As String = "1234"
' employees IDNum

Dim stations As TAeBasicDataItem() = ws.getStationsSimple()
' retrieve station id's

Dim transType As Integer = 0
' 0 = punch

Dim coords As TGPSCoordsEnum = TGPSCoordsEnum.gpsOk
' we will be using location information

Dim latitude As Double = -120.3341
' actual latitude coordinate

Dim longitude As Double = 22.4356
' actual longitude coordinate

Dim accuracy As Double = 0
Dim altitude As Double = 0

Try
ws.appendEmployeeGeoPunchByIDNum(empID, stations[0].Num, transType, cords, latitude, longitude, accuracy, altitude)
Catch ex as Exception
MessageBox.Show(ex.Message)
End Try

Remarks

  • Use getStationsSimpleto retrieve a list of clock group stations if needed
  • If station parameters is unknown or not available, enter 0
  • Parameters latitude, longitude, accuracy and altitude can be set to zero if unknown

Possible Errors

  • Unable to locate employee with identifier
  • yyyy-mm-dd required [Date supplied in invalid format]

Alteranative Methods

appendEmployeeGeoPunchByFilekey

appendEmployeePunchByIDNum
appendEmployeeTransferByIDNum
extractEmployeeGPSRegistrationsByIDNum
extractTimeClockStations
getStationsSimple
punchEmployeeGeoNowByIDNum
punchEmployeeNowByIDNum
registerEmployeeGPSPresenceByIDNum
transferEmployeeNowByIDNum

Back to Top