Show / Hide Table of Contents

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!

Inheritance
object
MDOProviderBase
InterestHelper
PersonInterestHelper
Implements
ISoListProvider
ISoList
IEnumerable<ISoListItem>
IEnumerable
IInterestHelper
Inherited Members
InterestHelper.SetItemSelectionAsync(ISoList, CancellationToken)
InterestHelper.SetItemSelectionAsync(List<ISoListItem>, CancellationToken)
InterestHelper.SetItemSelectionAsync(List<ISelectableListItem>, CancellationToken)
InterestHelper.SetItemSelectionAsync(ISelectableListItem, CancellationToken)
InterestHelper.SetItemSelectionAsync(int, bool, CancellationToken)
InterestHelper.IsItemSelected(int)
InterestHelper.RefreshAsync(CancellationToken)
InterestHelper.SelectedRootItems
InterestHelper.SelectedHeadingItems
InterestHelper.OnActiveInterestsChanged
MDOProviderBase.ConstructAsync(string, string, int[], bool, string, bool, CancellationToken)
MDOProviderBase.GetHistoryItemsAsync(CancellationToken)
MDOProviderBase.ClearHistoryItems()
MDOProviderBase.GetRootItemsAsync(CancellationToken)
MDOProviderBase.GetHeadingItemsAsync(CancellationToken)
MDOProviderBase.IncludeDeletedItems
MDOProviderBase.InhibitResortOnFlattening
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
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
MDOProviderBase.HistoryInfo

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
InterestHelper.CreateInterest(int)

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
InterestHelper.GetInterestDate(TableRowBase)

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

Overrides
InterestHelper.GetInterestId(TableRowBase)

Implements

ISoListProvider
ISoList
IEnumerable<T>
IEnumerable
IInterestHelper

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top