Interface IAssociateAgent
Interface for the Associate Agent Associate utilities, notes, not user admininstration
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
[Agent("Associate Agent", "Interface for the Associate Agent. Associate utilities, notes, not user admininstration")]
public interface IAssociateAgent : IAgent
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (AssociateAgent agent = new AssociateAgent())
{
// call methods on agent here...
}
}
Methods
GetAssociateAsync(int, CancellationToken)
Gets a Associate object.
Declaration
Task<Associate> GetAssociateAsync(int associateId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | The identifier of the Associate object |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<Associate> | A single Associate |
GetAssociateByPersonIdAsync(int, CancellationToken)
Returns the associate that belongs to this person if the person is an associate.
Declaration
Task<Associate> GetAssociateByPersonIdAsync(int personId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | personId | The person id |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<Associate> | Associate if person is associate |
GetAssociateListAsync(int[], CancellationToken)
Gets an array of Associate objects.
Declaration
Task<Associate[]> GetAssociateListAsync(int[] associateIds, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | associateIds | The identifiers of the Associate object |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<Associate[]> | Array of Associate |
GetAssociatesByGroupAsync(int, int, CancellationToken)
Method that returns a array of associate , based on DiaryGroupType and groupId. The differernt types are, Userdefined, Usergroup and ResourceHeadings
Declaration
Task<Associate[]> GetAssociatesByGroupAsync(int groupId, int type, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | groupId | Id of the group |
| int | type | The type of group. See DiaryGroupType |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<Associate[]> | Array of associate |
GetEncryptionKeyAsync(CancellationToken)
Get unique key made from AssociateId and dbTag used for local storage encryption operations.
Declaration
Task<string> GetEncryptionKeyAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<string> | encryptionKey |
GetNoteAsync(int, CancellationToken)
Returns an array of strings(notepad pages).
Declaration
Task<string[]> GetNoteAsync(int associateId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | The associate id |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<string[]> | Returns an array of strings(notepad pages). |
LogOffWindowsUsersAsync(int[], CancellationToken)
Method that logs off associates that are logged on to the win client
Declaration
Task LogOffWindowsUsersAsync(int[] associateIds, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | associateIds | The ids of the associates that shall be logged off |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task | A void return |
SaveNoteAsync(int, string[], CancellationToken)
Saves an array of strings(notepad pages).
Declaration
Task SaveNoteAsync(int associateId, string[] note, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | associateId | The associate id |
| string[] | note | The array of strings(notepad pages). |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task |