setManuallySelectedEmployeeData() Method

Table of Contents

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

Function

  • Allows the user to enter time card edits in bulk
  • Accepts multiple series of commands whereas each command set will represent a single time card edit on behalf of a single employee

Syntax

  • AeExchangeStruct = AeXMLBridge.setManuallySelectedEmployeeData(AeExchangeStruct);

Parameters

Return Value

Input Data

  • Sample Record – NEW{fs}TCADJ{ls}EMPID{fs}005{ls}BENEFIT{fs}1{ls}AMOUNT{fs}40.00{ls}EDITTYPE{fs}301{ls}EFFDATE{fs}12/12/2015{ls}TCADJ{fs}ADD{ls}
  • Note: {fs} is used as a placeholder for the field separator and {ls} is used as a placeholder for the line separator

FIELD DETAIL

  • NEW{fs}TCADJ{ls} – first in group, “start a new time card adjustment”
  • EMPID{fs}005{ls} – employee identifier
  • BENEFIT{fs}1{ls} – benefit number
  • AMOUNT{fs}40.00{ls} – amount (floating point)
  • EDITTYPE{fs}301{ls} – edit type value (see Edit Type Values below)
  • EFFDATE{fs}12/12/2015{ls} – effective date of edit (must be entered in mm/dd/yyyy format)
  • TCADJ{fs}ADD{ls} – last in group, “add time card adjustment to employee”

EDIT TYPE VALUES

  • 301 – Credit Benefit
  • 302 – Debit Benefit
  • 303 – Set Benefit Balance

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
29
30
31
32
33
34
35
36
37
38
39
40
TAeBasicDataItem[] benefits = ws.getBenefitsSimple();
int benefitType = benefits[0].Num;

// building the input parameter structure
TAeExchangeStruct input = new TAeExchangeStruct();
input.FieldSep = “{fs}”;
input.LineSep = “{ls}”;

// building the input.RawData field.
//We will Credit 10.25 hours of Sick Time to Employee 12345 that is Effective 10/10/2016
string empID = “12345”;
double amount = 10.25;
// numeric representation of 10:15
string effDate = “10/10/2016”;
string editType = “301”;
// 301 = Credit

string rawData = string.Empty;
rawData += “NEW” + input.FieldSep + “TCADJ” + input.LineSep;
// new record
rawData += “EMPID” + input.FieldSep + empID + input.LineSep;
rawData += “BENEFIT” + input.FieldSep + benefitType.ToString() + input.LineSep;
// note how we changed benefitType to a string
rawData += “AMOUNT” + input.FieldSep + amount.ToString() + input.LineSep;
// note how we changed amount to a string
rawData += “EDITTYPE” + input.FieldSep + editType + input.LineSep;
rawData += “EFFDATE” + input.FieldSep + effDate + input.LineSep;
rawData += “TCADJ” + input.FieldSep + “ADD” + input.LineSep;

input.RawData = rawData;

try
{
TAeExchangeStruct output = ws.setManuallySelectedEmployeeData(input);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}ex.Message);
}

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
30
Dim benefits As TAeBasicDataItem() = ws.getBenefitsSimple()
Dim benefitType As Integer = benefits(0).Num

' building the input parameter structure
Dim input As New TAeExchangeStruct()
input.FieldSep = “{fs}”
input.LineSep = “{ls}”

' building the input.RawData field. We will Credit 10.25 hours of Sick Time to Employee 12345 that is Effective 10/10/2016
Dim empID As String = “12345
Dim amount As Double = 10.25 ' numeric representation of 10:15
Dim effDate As String = “10/10/2016
Dim editType As String = “301' 301 = Credit

Dim rawData As String = String.Empty
rawData += “NEW” & input.FieldSep & “TCADJ” & input.LineSep ' new record
rawData += “EMPID” & input.FieldSep & empID & input.LineSep
rawData += “BENEFIT” & input.FieldSep & benefitType.ToString() & input.LineSep ' note how we changed benefitType to a string
rawData += “AMOUNT” & input.FieldSep & amount.ToString() & input.LineSep ' note how we changed amount to a string
rawData += “EDITTYPE” & input.FieldSep & editType & input.LineSep
rawData += “EFFDATE” & input.FieldSep & effDate & input.LineSep
rawData += “TCADJ” & input.FieldSep & “ADD” & input.LineSep

input.RawData = rawData

Try
Dim output As TAeExchangeStruct = ws.setManuallySelectedEmployeeData(input)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Remarks

  • Use [getBenefitsSimple] to find the benefit type
  • Can string multiple records together for update

Possible Errors

  • None

getManuallySelectedCalculatedData
getManuallySelectedSetupData
setManuallySelectedSetupData

Back to Top