Class TargetGroupRows
Info about a set of (sales, project, selection...) targets Collection of TargetGroupRow. Each element of the collection represents one row in the TargetGroup table.
Inheritance
Implements
Inherited Members
Namespace: SuperOffice.CRM.Rows
Assembly: SoDataBase.dll
Syntax
public class TargetGroupRows : 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 TargetGroupRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) TargetGroupRows TargetGroupRows.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 TargetGroupRow given its index in the collection.
Declaration
public TargetGroupRow this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
int | index | Index of the TargetGroupRow in the collection |
Property Value
Type | Description |
---|---|
TargetGroupRow |
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 TargetGroupRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) TargetGroupRows TargetGroupRows.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(TargetGroupRow)
Add one TargetGroupRow to the collection.
Declaration
public int Add(TargetGroupRow row)
Parameters
Type | Name | Description |
---|---|---|
TargetGroupRow | row | An instance of TargetGroupRow to be added to the collection. |
Returns
Type | Description |
---|---|
int | The index of the added TargetGroupRow. |
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 TargetGroupRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) TargetGroupRows TargetGroupRows.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 TargetGroupRow added to the collection.
Declaration
public TargetGroupRow AddNew()
Returns
Type | Description |
---|---|
TargetGroupRow | A new instance of TargetGroupRow 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 TargetGroupRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) TargetGroupRows TargetGroupRows.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<TargetGroupRow>)
Add a range of TargetGroupRow to the collection.
Declaration
public TargetGroupRows AddRange(IEnumerable<TargetGroupRow> rows)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<TargetGroupRow> | rows |
Returns
Type | Description |
---|---|
TargetGroupRows | The updated TargetGroupRows 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 TargetGroupRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) TargetGroupRows TargetGroupRows.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 TargetGroupRow
Declaration
protected override TableRowBase CreateChild()
Returns
Type | Description |
---|---|
TableRowBase | New instance of TargetGroupRow |
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 TargetGroupRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) TargetGroupRows TargetGroupRows.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 TargetGroupRows object. This collection will contain no rows.
Declaration
public static TargetGroupRows CreateNew()
Returns
Type | Description |
---|---|
TargetGroupRows | A new instance of the TargetGroupRows 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 TargetGroupRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) TargetGroupRows TargetGroupRows.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<TargetGroupRow>)
Apply the predicate to each element of the collection and return the first row that matches; if no match then return null
Declaration
public TargetGroupRow Find(Predicate<TargetGroupRow> condition)
Parameters
Type | Name | Description |
---|---|---|
Predicate<TargetGroupRow> | condition |
Returns
Type | Description |
---|---|
TargetGroupRow |
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 TargetGroupRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) TargetGroupRows TargetGroupRows.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<TargetGroupRow>)
Return a new collection that contains only those elements that match the condition. Elements are shared, not clones! of the original collection
Declaration
public TargetGroupRows FindAll(Predicate<TargetGroupRow> condition)
Parameters
Type | Name | Description |
---|---|---|
Predicate<TargetGroupRow> | condition |
Returns
Type | Description |
---|---|
TargetGroupRows |
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 TargetGroupRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) TargetGroupRows TargetGroupRows.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<TargetGroupRow>)
Method that iterates over all members and applies the action parameter to each of them
Declaration
public void ForEach(Action<TargetGroupRow> whatToDo)
Parameters
Type | Name | Description |
---|---|---|
Action<TargetGroupRow> | 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 TargetGroupRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) TargetGroupRows TargetGroupRows.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 TargetGroupRows 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 TargetGroupRow objects representing each row will be returned.
Declaration
public static TargetGroupRows GetFromCustomSearch(TargetGroupRows.CustomSearch query)
Parameters
Type | Name | Description |
---|---|---|
TargetGroupRows.CustomSearch | query | The custom search to execute against the database |
Returns
Type | Description |
---|---|
TargetGroupRows | A new instance of the TargetGroupRows 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 TargetGroupRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) TargetGroupRows TargetGroupRows.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.
GetFromReader(SoDataReader, TargetGroupTableInfo)
Create a new instance of the TargetGroupRows 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 TargetGroupRow 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 TargetGroupRows GetFromReader(SoDataReader reader, TargetGroupTableInfo tableInfo)
Parameters
Type | Name | Description |
---|---|---|
SoDataReader | reader | SoDataReader positioned to a valid database row. |
TargetGroupTableInfo | tableInfo | TargetGroupTableInfo 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 |
---|---|
TargetGroupRows |
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 TargetGroupRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) TargetGroupRows TargetGroupRows.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(TargetGroupRow)
Removes the given TargetGroupRow from the collection
Declaration
public void Remove(TargetGroupRow row)
Parameters
Type | Name | Description |
---|---|---|
TargetGroupRow | row | the TargetGroupRow 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 TargetGroupRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) TargetGroupRows TargetGroupRows.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()
Info about a set of (sales, project, selection...) targets Collection of TargetGroupRow. Each element of the collection represents one row in the TargetGroup table.
Declaration
public TargetGroupRow[] ToArray()
Returns
Type | Description |
---|---|
TargetGroupRow[] |
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 TargetGroupRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) TargetGroupRows TargetGroupRows.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 TargetGroupRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) TargetGroupRows TargetGroupRows.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.