Class ContactInterestRows
Link-table between contact and interests in ContInt Collection of ContactInterestRow. Each element of the collection represents one row in the ContactInterest table.
Inheritance
Implements
Inherited Members
Namespace: SuperOffice.CRM.Rows
Assembly: SoDataBase.dll
Syntax
public class ContactInterestRows : TableRowsBase, INestedPersist, IEnumerable<INestedPersist>, ISoCollection, INotifyCollectionChanged, IBindingList, IList, ICollection, IEnumerable
Remarks
Row collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type ContactInterestRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) ContactInterestRows ContactInterestRows.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as a Rows object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
Properties
this[int]
Get a ContactInterestRow given its index in the collection.
Declaration
public ContactInterestRow this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
int | index | Index of the ContactInterestRow in the collection |
Property Value
Type | Description |
---|---|
ContactInterestRow |
Remarks
Row collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type ContactInterestRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) ContactInterestRows ContactInterestRows.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as a Rows object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
Methods
Add(ContactInterestRow)
Add one ContactInterestRow to the collection.
Declaration
public int Add(ContactInterestRow row)
Parameters
Type | Name | Description |
---|---|---|
ContactInterestRow | row | An instance of ContactInterestRow to be added to the collection. |
Returns
Type | Description |
---|---|
int | The index of the added ContactInterestRow. |
Remarks
Row collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type ContactInterestRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) ContactInterestRows ContactInterestRows.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as a Rows object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
AddNew()
Add a new instance of ContactInterestRow added to the collection.
Declaration
public ContactInterestRow AddNew()
Returns
Type | Description |
---|---|
ContactInterestRow | A new instance of ContactInterestRow added to the collection. |
Remarks
Row collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type ContactInterestRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) ContactInterestRows ContactInterestRows.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as a Rows object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
AddRange(IEnumerable<ContactInterestRow>)
Add a range of ContactInterestRow to the collection.
Declaration
public ContactInterestRows AddRange(IEnumerable<ContactInterestRow> rows)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<ContactInterestRow> | rows |
Returns
Type | Description |
---|---|
ContactInterestRows | The updated ContactInterestRows collection object. |
Remarks
Row collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type ContactInterestRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) ContactInterestRows ContactInterestRows.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as a Rows object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
CreateChild()
Create a new instance of ContactInterestRow
Declaration
protected override TableRowBase CreateChild()
Returns
Type | Description |
---|---|
TableRowBase | New instance of ContactInterestRow |
Overrides
Remarks
Row collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type ContactInterestRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) ContactInterestRows ContactInterestRows.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as a Rows object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
CreateNew()
Create a new instance of the ContactInterestRows object. This collection will contain no rows.
Declaration
public static ContactInterestRows CreateNew()
Returns
Type | Description |
---|---|
ContactInterestRows | A new instance of the ContactInterestRows object. |
Remarks
Row collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type ContactInterestRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) ContactInterestRows ContactInterestRows.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as a Rows object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
Find(Predicate<ContactInterestRow>)
Apply the predicate to each element of the collection and return the first row that matches; if no match then return null
Declaration
public ContactInterestRow Find(Predicate<ContactInterestRow> condition)
Parameters
Type | Name | Description |
---|---|---|
Predicate<ContactInterestRow> | condition |
Returns
Type | Description |
---|---|
ContactInterestRow |
Remarks
Row collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type ContactInterestRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) ContactInterestRows ContactInterestRows.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as a Rows object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
FindAll(Predicate<ContactInterestRow>)
Return a new collection that contains only those elements that match the condition. Elements are shared, not clones! of the original collection
Declaration
public ContactInterestRows FindAll(Predicate<ContactInterestRow> condition)
Parameters
Type | Name | Description |
---|---|---|
Predicate<ContactInterestRow> | condition |
Returns
Type | Description |
---|---|
ContactInterestRows |
Remarks
Row collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type ContactInterestRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) ContactInterestRows ContactInterestRows.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as a Rows object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
ForEach(Action<ContactInterestRow>)
Method that iterates over all members and applies the action parameter to each of them
Declaration
public void ForEach(Action<ContactInterestRow> whatToDo)
Parameters
Type | Name | Description |
---|---|---|
Action<ContactInterestRow> | whatToDo |
Remarks
Row collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type ContactInterestRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) ContactInterestRows ContactInterestRows.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as a Rows object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
GetFromCustomSearch(CustomSearch)
Create a new instance of the ContactInterestRows object, and populate it with data from a custom search. If the search returns no results, an empty collection will be returned; if the result contains rows, a collection of ContactInterestRow objects representing each row will be returned.
Declaration
public static ContactInterestRows GetFromCustomSearch(ContactInterestRows.CustomSearch query)
Parameters
Type | Name | Description |
---|---|---|
ContactInterestRows.CustomSearch | query | The custom search to execute against the database |
Returns
Type | Description |
---|---|
ContactInterestRows | A new instance of the ContactInterestRows object, reflecting the result of the query. |
Remarks
Row collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type ContactInterestRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) ContactInterestRows ContactInterestRows.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as a Rows object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
GetFromIdxCinterestIdx(int)
Create a new instance of the ContactInterestRow object, by querying the database table via the index 'IDXCintrIntr_idx'. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static ContactInterestRows GetFromIdxCinterestIdx(int cinterestIdx)
Parameters
Type | Name | Description |
---|---|---|
int | cinterestIdx |
Returns
Type | Description |
---|---|
ContactInterestRows | Row object that represents the result of the search. IsNew will be true if the query did not match any row in the table |
Remarks
This method represents one of the unique indexes on the ContactInterest table. Non-unique indexes have corresponding inner classes and methods in the ContactInterestRows collection, since they may return more than one row.
GetFromIdxContactId(int)
Create a new instance of the ContactInterestRow object, by querying the database table via the index 'ICont_idIntr_idx'. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static ContactInterestRows GetFromIdxContactId(int contactId)
Parameters
Type | Name | Description |
---|---|---|
int | contactId |
Returns
Type | Description |
---|---|
ContactInterestRows | Row object that represents the result of the search. IsNew will be true if the query did not match any row in the table |
Remarks
This method represents one of the unique indexes on the ContactInterest table. Non-unique indexes have corresponding inner classes and methods in the ContactInterestRows collection, since they may return more than one row.
GetFromIdxEndDate(DateTime)
Create a new instance of the ContactInterestRow object, by querying the database table via the index 'IDXCintrEndDate'. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static ContactInterestRows GetFromIdxEndDate(DateTime endDate)
Parameters
Type | Name | Description |
---|---|---|
DateTime | endDate |
Returns
Type | Description |
---|---|
ContactInterestRows | Row object that represents the result of the search. IsNew will be true if the query did not match any row in the table |
Remarks
This method represents one of the unique indexes on the ContactInterest table. Non-unique indexes have corresponding inner classes and methods in the ContactInterestRows collection, since they may return more than one row.
GetFromIdxStartDate(DateTime)
Create a new instance of the ContactInterestRow object, by querying the database table via the index 'IDXCintrStartDate'. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static ContactInterestRows GetFromIdxStartDate(DateTime startDate)
Parameters
Type | Name | Description |
---|---|---|
DateTime | startDate |
Returns
Type | Description |
---|---|
ContactInterestRows | Row object that represents the result of the search. IsNew will be true if the query did not match any row in the table |
Remarks
This method represents one of the unique indexes on the ContactInterest table. Non-unique indexes have corresponding inner classes and methods in the ContactInterestRows collection, since they may return more than one row.
GetFromReader(SoDataReader, ContactInterestTableInfo)
Create a new instance of the ContactInterestRows object, and populate it with data from a reader. If the search returns no results, an empty collection will be returned; if the result contains rows, a collection of ContactInterestRow objects representing each row will be returned.
Note that the internal logic starts by calling reader.Read(), which is correct if you hand the method the result of an ExecuteReader(), but if the reader has already been advanced one or more rows, the current row will be skipped and collection population will start with the next row.Declaration
public static ContactInterestRows GetFromReader(SoDataReader reader, ContactInterestTableInfo tableInfo)
Parameters
Type | Name | Description |
---|---|---|
SoDataReader | reader | SoDataReader positioned to a valid database row. |
ContactInterestTableInfo | tableInfo | ContactInterestTableInfo instance used in the query that is the source of the reader. The fields used from the reader will be those owned by this tableinfo object. |
Returns
Type | Description |
---|---|
ContactInterestRows |
Remarks
Row collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type ContactInterestRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) ContactInterestRows ContactInterestRows.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as a Rows object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
Remove(ContactInterestRow)
Removes the given ContactInterestRow from the collection
Declaration
public void Remove(ContactInterestRow row)
Parameters
Type | Name | Description |
---|---|---|
ContactInterestRow | row | the ContactInterestRow to be removed |
Remarks
Row collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type ContactInterestRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) ContactInterestRows ContactInterestRows.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as a Rows object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
ToArray()
Link-table between contact and interests in ContInt Collection of ContactInterestRow. Each element of the collection represents one row in the ContactInterest table.
Declaration
public ContactInterestRow[] ToArray()
Returns
Type | Description |
---|---|
ContactInterestRow[] |
Remarks
Row collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type ContactInterestRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) ContactInterestRows ContactInterestRows.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as a Rows object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
ToString()
For debugging: Number of members, and the first (up to) 5 items
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |
Overrides
Remarks
Row collections can be created in several ways.
- Use the static CreateNew() method to create a new, empty collection. You can then add objects of type ContactInterestRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) ContactInterestRows ContactInterestRows.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(CustomSearch) method to apply the query to the database and obtain the result as a Rows object, with one item for each table row that matched your query.
- For each non-unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.