performTimeCardEdit Method

Table of Contents

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

Function

  • Performs an adjustment to an employee’s time card

Syntax

  • AeXMLBridge.performTimeCardEdit(AeEdit, RecomputeImmediately);

Parameters

  • Structure - TAeEdit
  • Boolean - recomputed immediately

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
TAeEdit edit = new TAeEdit();

edit.Filekey = 1234;
// performing an edit to employee with filekey 1234

edit.EditType = 0;
// adding a punch

edit.EffDate = DateTime.Now.ToString("yyyy-MM-dd");
edit.EffTime = DateTime.Now.ToString("HH:mm:ss");
edit.EditTimeStamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

bool recompute = true;

try
{
ws.performTimeCardEdit(edit, recompute);
}
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
Dim edit As New TAeEdit()

edit.Filekey = 1234
' performing an edit to employee with filekey 1234

edit.EditType = 0
' adding a punch

edit.EffDate = DateTime.Now.ToString("yyyy-MM-dd")
' set to today

edit.EffTime = DateTime.Now.ToString("HH:mm:ss")
' set to now
edit.EditTimeStamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")

Dim recompute As Boolean = True

Try
ws.performTimeCardEdit(edit, recompute)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Remarks

  • Refer to TAeEdit to get the values for the field EditType
  • Recomputing the Time Card will lengthen the time it takes to respond to this method
  • When doing a Workgroup Transfer (EDITTYPE 101), set the workgroups the employee is being transferred to in the WG1, WG2, etc… fields. Do not put them in the EDITWG1, WDITWG@, etc… fields

Possible Errors

  • Filekey not found/invalid
  • Dates must be in yyyy-mm-dd formats

authPeriodTimeCardByIDNum
cancelTimeCardEdit
deleteTimeCardEdit
unAuthPeriodTimeCardByIDNum

Back to Top