Class PersonProvider
This is the archive Provide for the Person Archive of the Contact Panel - or to use GUI terminology, the Contact archive of the Company panel. It provides two entities, person and retiredPerson, and a large number of columns. Through the constructor one can choose to include Contact table data; this will also pull in contact udef and related fields.
Inheritance
Implements
Inherited Members
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoDataBase.BusinessLogic.dll
Syntax
[ArchiveProvider("Person", 1073741823)]
public class PersonProvider : TypedQueryProviderBase<ArchiveRow, PersonPersonExtender>, IArchiveProviderQueryMapping, IArchiveQueryProvider, IArchiveProviderExtensible, IArchiveTypedProvider<ArchiveRow>, IArchiveTypedProviderBase, IArchiveProvider, IArchiveProviderHasRows, IArchiveProviderHasColumns, IArchiveProviderHasEntities
Constructors
PersonProvider()
Create the PersonProvider instance, WITHOUT contact information
Declaration
public PersonProvider()
PersonProvider(bool)
Create the PersonProvider instance, with or without contact information
Declaration
public PersonProvider(bool includeContact)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | includeContact | If true, columns from the contact table and related tables will be available |
Fields
ProviderName
This is the archive Provide for the Person Archive of the Contact Panel - or to use GUI terminology, the Contact archive of the Company panel. It provides two entities, person and retiredPerson, and a large number of columns. Through the constructor one can choose to include Contact table data; this will also pull in contact udef and related fields.
Declaration
public const string ProviderName = "Person"
Field Value
| Type | Description |
|---|---|
| string |
Methods
GetEntityName(SoDataReader)
Determine the proper entity name for a raw row
Declaration
protected override string GetEntityName(SoDataReader reader)
Parameters
| Type | Name | Description |
|---|---|---|
| SoDataReader | reader | SoDataReader with the current row |
Returns
| Type | Description |
|---|---|
| string | Entity name, depending on the contents of the retired field |
Overrides
InnerMapFieldsAsync(CancellationToken)
Map fields during building of the query. We ensure the presence of the retired field in the query, needed to determine which entity a row belongs to. Depending on chosen entities, we may also add a a restriction to avoid fetching retired persons, since that entity is optional.
Declaration
public override Task InnerMapFieldsAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task |
Overrides
InnerPopulateRowFromReader(SoDataReader, ArchiveRow)
Populate data return rows from the reader. Since the provider is essentially just a wrapper around the PersonPersonExtender, this method does nothing.
Declaration
protected override void InnerPopulateRowFromReader(SoDataReader reader, ArchiveRow row)
Parameters
| Type | Name | Description |
|---|---|---|
| SoDataReader | reader | SoDataReader with data |
| ArchiveRow | row | Row to populate |