Class EmailPhoneProvider
List of e-mail addresses and phone numbers matching the search value Searches e-mail address, phone number, person name, company name.
E-mail address/phone number matches: return e-mail addresses/phone numbers + owner name (person or contact name)
Person name matches: return all e-mail addresses/phone numbers for matched persons
Company name matches. return all persons + first e-mail address/phone number for matched persons.
Inherited Members
Namespace: SuperOffice.CRM.Lists
Assembly: SoDataBase.BusinessLogic.dll
Syntax
[MDOProviderPlugin("emailphone")]
[MDOAdditionalInfo("phoneOnly", "Only phone numbers are searched", false)]
[MDOAdditionalInfo("operator", "Operator used for search. Available values: 'contains', 'startsWith'. Default value is 'contains'.", "contains")]
public class EmailPhoneProvider : AnyTableListProviderBase, ISoListProvider, ISoList
Remarks
Returns: list item with
Id = e-mail address/phone number id
Name = name + e-mail/phone
ExtraInfo = e-mail address/phone number
Type = "Email" or "Phone"
Constructors
EmailPhoneProvider()
Constructor
Declaration
public EmailPhoneProvider()
Remarks
Returns: list item with
Id = e-mail address/phone number id
Name = name + e-mail/phone
ExtraInfo = e-mail address/phone number
Type = "Email" or "Phone"
Fields
ProviderName
"emailphone"
Declaration
public const string ProviderName = "emailphone"
Field Value
Type | Description |
---|---|
string |
Remarks
Returns: list item with
Id = e-mail address/phone number id
Name = name + e-mail/phone
ExtraInfo = e-mail address/phone number
Type = "Email" or "Phone"
_contactTable
List of e-mail addresses and phone numbers matching the search value Searches e-mail address, phone number, person name, company name.
E-mail address/phone number matches: return e-mail addresses/phone numbers + owner name (person or contact name)
Person name matches: return all e-mail addresses/phone numbers for matched persons
Company name matches. return all persons + first e-mail address/phone number for matched persons.
Declaration
protected ContactTableInfo _contactTable
Field Value
Type | Description |
---|---|
ContactTableInfo |
Remarks
Returns: list item with
Id = e-mail address/phone number id
Name = name + e-mail/phone
ExtraInfo = e-mail address/phone number
Type = "Email" or "Phone"
_emailTable
List of e-mail addresses and phone numbers matching the search value Searches e-mail address, phone number, person name, company name.
E-mail address/phone number matches: return e-mail addresses/phone numbers + owner name (person or contact name)
Person name matches: return all e-mail addresses/phone numbers for matched persons
Company name matches. return all persons + first e-mail address/phone number for matched persons.
Declaration
protected EmailTableInfo _emailTable
Field Value
Type | Description |
---|---|
EmailTableInfo |
Remarks
Returns: list item with
Id = e-mail address/phone number id
Name = name + e-mail/phone
ExtraInfo = e-mail address/phone number
Type = "Email" or "Phone"
_personTable
List of e-mail addresses and phone numbers matching the search value Searches e-mail address, phone number, person name, company name.
E-mail address/phone number matches: return e-mail addresses/phone numbers + owner name (person or contact name)
Person name matches: return all e-mail addresses/phone numbers for matched persons
Company name matches. return all persons + first e-mail address/phone number for matched persons.
Declaration
protected PersonTableInfo _personTable
Field Value
Type | Description |
---|---|
PersonTableInfo |
Remarks
Returns: list item with
Id = e-mail address/phone number id
Name = name + e-mail/phone
ExtraInfo = e-mail address/phone number
Type = "Email" or "Phone"
_phoneTable
List of e-mail addresses and phone numbers matching the search value Searches e-mail address, phone number, person name, company name.
E-mail address/phone number matches: return e-mail addresses/phone numbers + owner name (person or contact name)
Person name matches: return all e-mail addresses/phone numbers for matched persons
Company name matches. return all persons + first e-mail address/phone number for matched persons.
Declaration
protected PhoneTableInfo _phoneTable
Field Value
Type | Description |
---|---|
PhoneTableInfo |
Remarks
Returns: list item with
Id = e-mail address/phone number id
Name = name + e-mail/phone
ExtraInfo = e-mail address/phone number
Type = "Email" or "Phone"
_searchTerms
List of e-mail addresses and phone numbers matching the search value Searches e-mail address, phone number, person name, company name.
E-mail address/phone number matches: return e-mail addresses/phone numbers + owner name (person or contact name)
Person name matches: return all e-mail addresses/phone numbers for matched persons
Company name matches. return all persons + first e-mail address/phone number for matched persons.
Declaration
protected string[] _searchTerms
Field Value
Type | Description |
---|---|
string[] |
Remarks
Returns: list item with
Id = e-mail address/phone number id
Name = name + e-mail/phone
ExtraInfo = e-mail address/phone number
Type = "Email" or "Phone"
Properties
TableInfo
The main table info of the query. This is used by subclasses (e.g. this class) when restricting history data.
Declaration
protected override TableInfo TableInfo { get; }
Property Value
Type | Description |
---|---|
TableInfo |
Overrides
Remarks
Returns: list item with
Id = e-mail address/phone number id
Name = name + e-mail/phone
ExtraInfo = e-mail address/phone number
Type = "Email" or "Phone"
Methods
ExecuteQueryAsync(Select, List<ISoListItem>, CancellationToken)
Execute the query in the database.
Declaration
protected override Task ExecuteQueryAsync(Select sql, List<ISoListItem> resultCollection, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Select | sql | The query to execute in the database. |
List<ISoListItem> | resultCollection | Collection holding the results of the query. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task |
Overrides
Remarks
Returns: list item with
Id = e-mail address/phone number id
Name = name + e-mail/phone
ExtraInfo = e-mail address/phone number
Type = "Email" or "Phone"
GetContactPhoneQuery()
List of e-mail addresses and phone numbers matching the search value Searches e-mail address, phone number, person name, company name.
E-mail address/phone number matches: return e-mail addresses/phone numbers + owner name (person or contact name)
Person name matches: return all e-mail addresses/phone numbers for matched persons
Company name matches. return all persons + first e-mail address/phone number for matched persons.
Declaration
protected Select GetContactPhoneQuery()
Returns
Type | Description |
---|---|
Select |
Remarks
Returns: list item with
Id = e-mail address/phone number id
Name = name + e-mail/phone
ExtraInfo = e-mail address/phone number
Type = "Email" or "Phone"
GetHistoryItemsFromDbAsync(CancellationToken)
Get all the history items from the database
Declaration
protected override Task<List<ISoListItem>> GetHistoryItemsFromDbAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<List<ISoListItem>> | Root items. |
Overrides
Remarks
Returns: list item with
Id = e-mail address/phone number id
Name = name + e-mail/phone
ExtraInfo = e-mail address/phone number
Type = "Email" or "Phone"
GetMainQueryAsync(CancellationToken)
Get the main query for the list.
Declaration
protected override Task<Select> GetMainQueryAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<Select> |
Overrides
Remarks
Returns: list item with
Id = e-mail address/phone number id
Name = name + e-mail/phone
ExtraInfo = e-mail address/phone number
Type = "Email" or "Phone"
GetRootItemsAsync()
Get all the root items from the database
Declaration
protected override Task<List<ISoListItem>> GetRootItemsAsync()
Returns
Type | Description |
---|---|
Task<List<ISoListItem>> | History items. |
Overrides
Remarks
Returns: list item with
Id = e-mail address/phone number id
Name = name + e-mail/phone
ExtraInfo = e-mail address/phone number
Type = "Email" or "Phone"
InitAsync(CancellationToken)
Initiate the provider after the ConstructAsync(string, string, int[], bool, string, bool, CancellationToken) method is called.
Declaration
protected override Task InitAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task |
Overrides
Remarks
Returns: list item with
Id = e-mail address/phone number id
Name = name + e-mail/phone
ExtraInfo = e-mail address/phone number
Type = "Email" or "Phone"
OnPostGetRootItemsAsync(List<ISoListItem>)
Event raised by GetRootItemsAsync(CancellationToken) after values are fetched from the database.
Declaration
protected override Task OnPostGetRootItemsAsync(List<ISoListItem> items)
Parameters
Type | Name | Description |
---|---|---|
List<ISoListItem> | items | List of items returned from GetRootItemsAsync(CancellationToken). |
Returns
Type | Description |
---|---|
Task |
Overrides
Remarks
Returns: list item with
Id = e-mail address/phone number id
Name = name + e-mail/phone
ExtraInfo = e-mail address/phone number
Type = "Email" or "Phone"
OnRead(SoDataReader, short)
Raised every time a new row has been read from the database.
The implementation should read tthe results from the reader
and populate an object implementing ISoListItem.
Declaration
protected override ISoListItem OnRead(SoDataReader reader, short lastRank)
Parameters
Type | Name | Description |
---|---|---|
SoDataReader | reader | Reader to reaf from. |
short | lastRank | Value of the last rank populated. |
Returns
Type | Description |
---|---|
ISoListItem | Data read from the reader. |
Overrides
Remarks
Returns: list item with
Id = e-mail address/phone number id
Name = name + e-mail/phone
ExtraInfo = e-mail address/phone number
Type = "Email" or "Phone"
SetSearchRestrictionAsync(Select, string)
Set the search restriction on the list.
Declaration
protected override Task SetSearchRestrictionAsync(Select sql, string searchValue)
Parameters
Type | Name | Description |
---|---|---|
Select | sql | Query to set the search restriction on. |
string | searchValue | The value of the search restriction. |
Returns
Type | Description |
---|---|
Task |
Overrides
Remarks
Returns: list item with
Id = e-mail address/phone number id
Name = name + e-mail/phone
ExtraInfo = e-mail address/phone number
Type = "Email" or "Phone"
SortItemsByScore(List<ISoListItem>)
List of e-mail addresses and phone numbers matching the search value Searches e-mail address, phone number, person name, company name.
E-mail address/phone number matches: return e-mail addresses/phone numbers + owner name (person or contact name)
Person name matches: return all e-mail addresses/phone numbers for matched persons
Company name matches. return all persons + first e-mail address/phone number for matched persons.
Declaration
protected void SortItemsByScore(List<ISoListItem> items)
Parameters
Type | Name | Description |
---|---|---|
List<ISoListItem> | items |
Remarks
Returns: list item with
Id = e-mail address/phone number id
Name = name + e-mail/phone
ExtraInfo = e-mail address/phone number
Type = "Email" or "Phone"