punchEmployeeGeoNowByFilekey() Method

Table of Contents

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

Function

  • Adds an employee punch while recording geographic location information as well

Syntax

  • AeXMLBridge.punchEmployeeGeoNowByFilekey(Filekey, Station, TransType, GPSCoordsEnum, Latitude, Longitude, Accuracy, Altitude);

Parameters

  • Integer - employee filekey
  • Integer - station identifier
  • Integer - transaction type
  • Enumeration - TGPSCoordsEnum
  • Double - latitude coordinate
  • Double - longtitude 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
int filekey = 1234;                                               
// using employee with filekey 1234

TAeBasicDataItem[] clockGroups = ws.getClockGroupsSimple();
// getting a station identifier

TAeBasicDataItem[] stations = ws.getClockGroupStationsSimple(clockGroups[0].num);
int station = stations[0].Num;

int transType = 0;
// 0=punches

TGPSCoordsEnum coords = TGPSCoordsEnum.gpsOK;

double latitude = 40.7484;
double longitude = 73.9857;
double accuracy = 0;
double altitude = 0;

try
{
ws.punchEmployeeGeoNowByFilekey(filekey, station, 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
Dim filekey As Integer = 1234
' using employee with filekey 1234

Dim clockGroups As TAeBasicDataItem() = ws.getClockGroupsSimple()
' getting a station identifier

Dim stations As TAeBasicDataItem() = ws.getClockGroupStationsSimple(clockGroups(0).num)
Dim station As Integer = stations(0).Num

Dim transType As Integer = 0
' 0=punches

Dim coords As TGPSCoordsEnum = TGPSCoordsEnum.gpsOK

Dim latitude As Double = 40.7484
' coordinates
Dim longitude As Double = 73.9857

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

Try
ws.punchEmployeeGeoNowByFilekey(filekey, station, transType, coords, latitude, longitude, accuracy, altitude)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Remarks

  • If unknown, you can set the values for latitude, longitude, accuracy, and altitude to zero

Possible Errors

  • Unable to locate employee with filekey
  • Invalid station

Preferred Method

punchEmployeeGeoNowByIDNum

appendEmployeeGeoPunchByIDNum
appendEmployeePunchByIDNum
appendEmployeeTransferByIDNum
extractEmployeeGPSRegistrationsByIDNum
extractTimeClockStations
getStationsSimple
punchEmployeeNowByIDNum
registerEmployeeGPSPresenceByIDNum
transferEmployeeNowByIDNum

Back to Top