.NET Code Examples

This code sample simply gets the company name and displays it in a label. This is a good test to ensure you are successfully connecting to Attendance on Demand web services

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
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Linq
Imports System.Net
Imports System.Text
Imports System.Windows.Forms
Imports TestApp.CC1

Namespace TestApp
Public Partial Class Form1 Inherits Form

'Create an instance on the IAeXMLBridgeservice
Private cc1 As New IAeXMLBridgeservice()

' Create a network credential using an AoD Access Account
Private aodCred As New NetworkCredential("YourAccessAccountName", "YourAccessAccountPassword", "")

Public Sub New()
InitializeComponent()

cc1.Credentials = aodCred
cc1.PreAuthenticate = True
cc1.Url = "https://youruri.attendanceondemand.com:8192/cc1exec.aew/soap/IAeXMLBridge"

lblCompanyName.Text = cc1.getCompanyName()
End Sub
End Class
End Namespace

This code snippet will modify an employee’s first name (a single field value) for the employee whose ID number is ‘A123’

1
2
3
Dim emp As TAeEmployeeBasic = cc1.getEmployeeBasicByIDNum("A123")
emp.FirstName = "Mary"
cc1.maintainEmployeeBasic(emp, TAddEmpMode.aemAuto, TBadgeManagement.bmAuto)

This code snippet will populate a listbox with a list of Pay Designations extracted from the system

1
2
ddlPayDesignations.Items.Clear()
ddlPayDesignations.DataSource = cc1.getPayDesignationsSimple()

This code snippet will extract a list of all employees from the system and individually recompute each employee’s previous pay period

1
2
3
4
5
Dim emps As TAeEmployeeBasic() = cc1.getEmployeesListBasicFromHyperQuery("All Employees")

For Each e As TAeEmployeeBasic In emps
cc1.recomputeEmployeeByFilekey(e.Filekey, TPayPeriodEnum.ppePrevious)
Next

Example Libraries