Class PersonList
PersonList implements the person list in SuperOffice.
Implements
Inherited Members
Namespace: SuperOffice.CRM.Archives
Assembly: SoDataBase.dll
Syntax
public sealed class PersonList : ListBase<PersonList.PersonListQuery, PersonListItem>, IList, ICollection, IList<PersonListItem>, ICollection<PersonListItem>, IEnumerable<PersonListItem>, IEnumerable
Methods
GetPerson(int)
Returns the person described by the person_id.
Declaration
public Person GetPerson(int personId)
Parameters
| Type | Name | Description |
|---|---|---|
| int | personId | The person in question |
Returns
| Type | Description |
|---|---|
| Person | The person |
GetPersonContact(int)
Returns the contact on the person described by the person_id. If the person does not exist in the list, we still return the correct contact.
Declaration
public Contact GetPersonContact(int personId)
Parameters
| Type | Name | Description |
|---|---|---|
| int | personId | The person in question |
Returns
| Type | Description |
|---|---|
| Contact | The person's contact. |
GetPersonListItem(int)
Will return the PersonListItem described by the personId.
Declaration
public PersonListItem GetPersonListItem(int personId)
Parameters
| Type | Name | Description |
|---|---|---|
| int | personId | The person |
Returns
| Type | Description |
|---|---|
| PersonListItem | The person. |
OnLoadAsync(PersonListQuery, SoDataReader, CancellationToken)
Responsible for reading each row with data from the SoDataReader and insert the object each row represents into the class' collection.
Declaration
protected override Task OnLoadAsync(PersonList.PersonListQuery query, SoDataReader reader, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| PersonList.PersonListQuery | query | |
| SoDataReader | reader | The reader which contains all data in the list. |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task |
Overrides
PersonExist(int)
Checks if the person described by the person_id exist in the list.
Declaration
public bool PersonExist(int personId)
Parameters
| Type | Name | Description |
|---|---|---|
| int | personId | The person |
Returns
| Type | Description |
|---|---|
| bool | True/false |