Class PersonInterestHelper
Person interest helper. The helpers provide functionality that combines MDO list and 'what is actually selected', i.e., they combine entity subcollections with mdo lists. See the base class InterestHelper for more information!
Inherited Members
Namespace: SuperOffice.CRM.Entities
Assembly: SoDataBase.BusinessLogic.dll
Syntax
public sealed class PersonInterestHelper : InterestHelper, ISoListProvider, ISoList, IEnumerable<ISoListItem>, IEnumerable, IInterestHelper
Constructors
PersonInterestHelper(PersonInterestRows, int)
Constructor, accept the link rows collection and parent contact ID, and pass them to the base class
Declaration
public PersonInterestHelper(PersonInterestRows linkRows, int personId)
Parameters
| Type | Name | Description |
|---|---|---|
| PersonInterestRows | linkRows | Collection of link rows, i.e., currently selected interests |
| int | personId | Parent Person id |
Properties
HistoryInfo
History information for the supported list
Declaration
public override HistoryInfo HistoryInfo { get; }
Property Value
| Type | Description |
|---|---|
| HistoryInfo |
Overrides
Methods
ConstructAsync(CancellationToken)
Person interest helper. The helpers provide functionality that combines MDO list and 'what is actually selected', i.e., they combine entity subcollections with mdo lists. See the base class InterestHelper for more information!
Declaration
public Task ConstructAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task |
CreateInterest(int)
Create a new link row for the given interest, using the protected _parentEntityId as the entity id. ALSO: Add to the _selectedInterests collection, since TableRowsBase does not have a public Add operator.
Declaration
protected override TableRowBase CreateInterest(int interestId)
Parameters
| Type | Name | Description |
|---|---|---|
| int | interestId | Interest id to link to |
Returns
| Type | Description |
|---|---|
| TableRowBase | New row, which has already been added to the entity's link table collections |
Overrides
GetInterestDate(TableRowBase)
Get the interest date from the link row (which must be castable to the correct type)
Declaration
protected override DateTime GetInterestDate(TableRowBase row)
Parameters
| Type | Name | Description |
|---|---|---|
| TableRowBase | row | Row, castable to the type needed by the subclass |
Returns
| Type | Description |
|---|---|
| DateTime | Last changed date extracted from the row |
Overrides
GetInterestId(TableRowBase)
Get the interest id from the link row (which must be castable to the correct type)
Declaration
protected override int GetInterestId(TableRowBase row)
Parameters
| Type | Name | Description |
|---|---|---|
| TableRowBase | row | Row, castable to the type needed by the subclass |
Returns
| Type | Description |
|---|---|
| int | Interest ID the row links to |