addWorkgroup() 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

  • Add a new workgroup to an existing workgroup level.

Syntax

  • AeXMLBridge.addWorkgroup(AeWorkgroup);

Parameters

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

TAeWorkgroup wg = new TAeWorkgroup();

wg.Expires = "2099-12-31";
ws.WGCode = "CHI";

// code for Chicago
wg.WGLevel = 1;
// we will be adding to Workgroup Level 1 which happens to be a Location
wg.WGName = "Chicago";

wg.WGNum = 0;
// will create a new workgroup with the next sequential number

wg.WGRate = 25.00d;
// assign an hourly rate of $25 to this workgroup

try
{
ws.addWorkgroup(wg);
}
catch(Exception ex)
{
MessageBox.Show(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

Dim wg As New TAeWorkgroup()

wg.Expires = "2099-12-31"
ws.WGCode = "CHI"
' code for Chicago

wg.WGLevel = 1
' we will be adding to Workgroup Level 1 which happens to be a Location

wg.WGName = "Chicago"
wg.WGNum = 0
' will create a new workgroup with the next sequential number

wg.WGRate = 25.0
' assign an hourly rate of $25 to this workgroup

Try
ws.addWorkgroup(wg)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Remarks

  • Workgroup numbers and codes have guaranteed uniqueness
  • If WGNum = 0, the system will assign the next available workgroup number

Possible Errors

  • Invalid object name “WORKGROUPx” (x=WGLevel)
  • Duplicate Workgroup Code
  • yyyy-mm-dd is required [Date supplied in invalid format]

addDeptXlateItem
delWorkgroup
extractDeptXlateItems
extractWGXlates
getWorkgroup
getWorkgroupLevelDetails
getWorkgroups
getWorkgroupStruct
getWorkgroupViaCode
getWorkgroupViaName
maintainWGXlate
nextWGNumForWGLevel
removeDeptXlateItem
removeWGXlate
setWorkgroup
setWorkgroupLevelLabels

Back to Top