punchEmployeeNowByFilekey() Method

Table of Contents

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

Function

  • Add punch transaction to an employee’s time card for current pay period

Syntax

  • AeXMLBridge.punchEmployeeNowByFilekey(Filekey, Station, TransType)

Parameters

  • Integer - employee filekey
  • Integer - station identifier
  • Integer - transaction type

Return Value

  • None

Sample Code

C#

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
int filekey = 1234;                                                    
// using employee w/filekey 1234

TAeBasicDataItem[] stations = ws.getStationsSimple();
int stationID = stations[0].Num;

int transType = 0;
// 0 = punches

try
{
ws.punchEmployeeNowByIDNum(empID, stationID, transType);
}
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
Dim filekey As Integer = 1234
' using employee w/filekey 1234

Dim stations As TAeBasicDataItem() = ws.getStationsSimple()
Dim stationID As Integer = stations(0).Num

Dim transType As Integer = 0
' 0 = punches

Try
ws.punchEmployeeNowByIDNum(empID, stationID, transType)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Remarks

  • Punch transaction will always be applied unless a duplicate transaction exists
  • Use getStationsSimple to retrieve a list of stations

Possible Errors

  • Unable to locate employee with filekey
  • Duplicate transaction

Preferred Method

punchEmployeeNowByIDNum

appendEmployeeGeoPunchByIDNum
appendEmployeePunchByIDNum
appendEmployeeTransferByIDNum
extractEmployeeGPSRegistrationsByIDNum
extractTimeClockStations
getStationsSimple
punchEmployeeGeoNowByIDNum
registerEmployeeGPSPresenceByIDNum
transferEmployeeNowByIDNum

Back to Top