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

  • Increase the employee access rights of a select account code by adding a workgroup set to the account’s list of workgroup access rights

Syntax

  • AeXMLBridge.addAccessAccountWorkgroupAccessRightByAccountCode(AccountCode, AeWorkgroupSet);

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
TAeWorkgroupSet AeWorkgroupSet = new TAeWorkgroupSet();
TAeAccessAccount AeAccessAccount = ws.getCurrentAccessAccount();

// add our WorkgroupSet
AeWorkgroupSet.WG1 = 1;
AeWorkgroupSet.WG2 = 5;
AeWorkgroupSet.WG3 = 3;
AeWorkgroupSet.WG4 = 0;
AeWorkgroupSet.WG5 = 0;
AeWorkgroupSet.WG6 = 0;
AeWorkgroupSet.WG7 = 0;

try
{
ws.addAccessAccountWorkgroupAccessRightByAccountCode(AeAccessAccount.AccountCode, AeWorkgroupSet);
}
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
Dim AeWorkgroupSet As New TAeWorkgroupSet()
Dim AeAccessAccount As TAeAccessAccount = ws.getCurrentAccessAccount()

' add our WorkgroupSet
AeWorkgroupSet.WG1 = 1
AeWorkgroupSet.WG2 = 5
AeWorkgroupSet.WG3 = 3
AeWorkgroupSet.WG4 = 0
AeWorkgroupSet.WG5 = 0
AeWorkgroupSet.WG6 = 0
AeWorkgroupSet.WG7 = 0

Try
ws.addAccessAccountWorkgroupAccessRightByAccountCode(AeAccessAccount.AccountCode, AeWorkgroupSet)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Remarks

  • None

Possible Errors

  • Account code not in system

accessAccountCodeExists
addAccessAccount
editAccessAccount
getAccessAccounts
getAccessAccountViaAccountCode
getAccessAccountViaUniqueID
getAccessAccountWorkgroupAccessRightsByAccountCode
getCurrentAccessAccount
getEmptyAccessAccount
loadAccessAccountActivitysInRange
removeAccessAccount
removeAccessAccountAllWorkgroupAccessRightsByAccountCode

Back to Top