Class DuplicateHelper
Class that encapsulates the duplicate check in the import routine
Inherited Members
Namespace: SuperOffice.CRM.Import
Assembly: SoDataBase.BusinessLogic.dll
Syntax
public class DuplicateHelper
Constructors
DuplicateHelper(Dictionary<string, int>, ImportContactDuplicateMatch, ImportPersonDuplicateMatch, ImportBlankAction, bool, bool, int, int)
Constructor
Declaration
public DuplicateHelper(Dictionary<string, int> columnsDictionary, ImportContactDuplicateMatch contactMatch, ImportPersonDuplicateMatch dupPersonMatch, ImportBlankAction contactNameBlankAction, bool addAllContacts, bool addAllPersons, int countEmail, int countPhones)
Parameters
| Type | Name | Description |
|---|---|---|
| Dictionary<string, int> | columnsDictionary | Columns setup |
| ImportContactDuplicateMatch | contactMatch | Duplicate type for contact matches |
| ImportPersonDuplicateMatch | dupPersonMatch | Duplicate type for person matches |
| ImportBlankAction | contactNameBlankAction | Action to take when contact name is blank |
| bool | addAllContacts | Add contacts? |
| bool | addAllPersons | Add persons? |
| int | countEmail | |
| int | countPhones |
Methods
GetDuplicatesAsync(ImportItem[], Dictionary<string, bool>, Dictionary<string, Dictionary<string, object>>, Dictionary<string, bool>, Dictionary<int, string>, Dictionary<string, Dictionary<string, object>>, Dictionary<string, short>, bool, bool, bool, int, ImportDuplicateAction, ImportDuplicateAction, CancellationToken)
Prepare the duplicate information
Declaration
public Task GetDuplicatesAsync(ImportItem[] importRows, Dictionary<string, bool> contactInserted, Dictionary<string, Dictionary<string, object>> contactLookup, Dictionary<string, bool> personInserted, Dictionary<int, string> contactIdLookup, Dictionary<string, Dictionary<string, object>> personLookup, Dictionary<string, short> contactPersonRankLookUp, bool saveForReal, bool isErpContact, bool isErpPerson, int connectionId, ImportDuplicateAction contactDuplicateAction, ImportDuplicateAction personDuplicateAction, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| ImportItem[] | importRows | |
| Dictionary<string, bool> | contactInserted | |
| Dictionary<string, Dictionary<string, object>> | contactLookup | |
| Dictionary<string, bool> | personInserted | |
| Dictionary<int, string> | contactIdLookup | |
| Dictionary<string, Dictionary<string, object>> | personLookup | |
| Dictionary<string, short> | contactPersonRankLookUp | |
| bool | saveForReal | |
| bool | isErpContact | |
| bool | isErpPerson | |
| int | connectionId | |
| ImportDuplicateAction | contactDuplicateAction | |
| ImportDuplicateAction | personDuplicateAction | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task |