Class FieldLabelRows
Field label override table, makes it possible to override internal string resources. Define your own text for the panels in SuperOffice, e.g. rename Project to Cars in SOAdmin - System Options - Labels This table contains controlling data for the string substitution mechanism. There is one row in this table for each label or string that can be substituted; the active field indicates whether the string is actually being substituted or not. Initially, all rows have this field set to 0. The table is loaded with initial data during database setup. Only SuperOffice Development has the necessary expertise to safely add rows to this table. If a row has active = 1, the table LocaleText should contain one or more rows pointing back to this table, with the actual text to be used. Collection of FieldLabelRow. Each element of the collection represents one row in the FieldLabel table.
Inheritance
Implements
Inherited Members
Namespace: SuperOffice.CRM.Rows
Assembly: SoDataBase.dll
Syntax
public class FieldLabelRows : 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 FieldLabelRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) FieldLabelRows FieldLabelRows.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 FieldLabelRow given its index in the collection.
Declaration
public FieldLabelRow this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
int | index | Index of the FieldLabelRow in the collection |
Property Value
Type | Description |
---|---|
FieldLabelRow |
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 FieldLabelRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) FieldLabelRows FieldLabelRows.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(FieldLabelRow)
Add one FieldLabelRow to the collection.
Declaration
public int Add(FieldLabelRow row)
Parameters
Type | Name | Description |
---|---|---|
FieldLabelRow | row | An instance of FieldLabelRow to be added to the collection. |
Returns
Type | Description |
---|---|
int | The index of the added FieldLabelRow. |
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 FieldLabelRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) FieldLabelRows FieldLabelRows.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 FieldLabelRow added to the collection.
Declaration
public FieldLabelRow AddNew()
Returns
Type | Description |
---|---|
FieldLabelRow | A new instance of FieldLabelRow 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 FieldLabelRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) FieldLabelRows FieldLabelRows.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<FieldLabelRow>)
Add a range of FieldLabelRow to the collection.
Declaration
public FieldLabelRows AddRange(IEnumerable<FieldLabelRow> rows)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<FieldLabelRow> | rows |
Returns
Type | Description |
---|---|
FieldLabelRows | The updated FieldLabelRows 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 FieldLabelRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) FieldLabelRows FieldLabelRows.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 FieldLabelRow
Declaration
protected override TableRowBase CreateChild()
Returns
Type | Description |
---|---|
TableRowBase | New instance of FieldLabelRow |
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 FieldLabelRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) FieldLabelRows FieldLabelRows.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 FieldLabelRows object. This collection will contain no rows.
Declaration
public static FieldLabelRows CreateNew()
Returns
Type | Description |
---|---|
FieldLabelRows | A new instance of the FieldLabelRows 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 FieldLabelRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) FieldLabelRows FieldLabelRows.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<FieldLabelRow>)
Apply the predicate to each element of the collection and return the first row that matches; if no match then return null
Declaration
public FieldLabelRow Find(Predicate<FieldLabelRow> condition)
Parameters
Type | Name | Description |
---|---|---|
Predicate<FieldLabelRow> | condition |
Returns
Type | Description |
---|---|
FieldLabelRow |
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 FieldLabelRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) FieldLabelRows FieldLabelRows.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<FieldLabelRow>)
Return a new collection that contains only those elements that match the condition. Elements are shared, not clones! of the original collection
Declaration
public FieldLabelRows FindAll(Predicate<FieldLabelRow> condition)
Parameters
Type | Name | Description |
---|---|---|
Predicate<FieldLabelRow> | condition |
Returns
Type | Description |
---|---|
FieldLabelRows |
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 FieldLabelRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) FieldLabelRows FieldLabelRows.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<FieldLabelRow>)
Method that iterates over all members and applies the action parameter to each of them
Declaration
public void ForEach(Action<FieldLabelRow> whatToDo)
Parameters
Type | Name | Description |
---|---|---|
Action<FieldLabelRow> | 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 FieldLabelRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) FieldLabelRows FieldLabelRows.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 FieldLabelRows 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 FieldLabelRow objects representing each row will be returned.
Declaration
public static FieldLabelRows GetFromCustomSearch(FieldLabelRows.CustomSearch query)
Parameters
Type | Name | Description |
---|---|---|
FieldLabelRows.CustomSearch | query | The custom search to execute against the database |
Returns
Type | Description |
---|---|
FieldLabelRows | A new instance of the FieldLabelRows 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 FieldLabelRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) FieldLabelRows FieldLabelRows.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.
GetFromIdxResourceId(int)
Create a new instance of the FieldLabelRow object, by querying the database table via the index 'IDXFieldLabelResourceId'. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static FieldLabelRows GetFromIdxResourceId(int resourceId)
Parameters
Type | Name | Description |
---|---|---|
int | resourceId |
Returns
Type | Description |
---|---|
FieldLabelRows | 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 FieldLabel table. Non-unique indexes have corresponding inner classes and methods in the FieldLabelRows collection, since they may return more than one row.
GetFromReader(SoDataReader, FieldLabelTableInfo)
Create a new instance of the FieldLabelRows 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 FieldLabelRow 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 FieldLabelRows GetFromReader(SoDataReader reader, FieldLabelTableInfo tableInfo)
Parameters
Type | Name | Description |
---|---|---|
SoDataReader | reader | SoDataReader positioned to a valid database row. |
FieldLabelTableInfo | tableInfo | FieldLabelTableInfo 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 |
---|---|
FieldLabelRows |
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 FieldLabelRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) FieldLabelRows FieldLabelRows.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(FieldLabelRow)
Removes the given FieldLabelRow from the collection
Declaration
public void Remove(FieldLabelRow row)
Parameters
Type | Name | Description |
---|---|---|
FieldLabelRow | row | the FieldLabelRow 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 FieldLabelRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) FieldLabelRows FieldLabelRows.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()
Field label override table, makes it possible to override internal string resources. Define your own text for the panels in SuperOffice, e.g. rename Project to Cars in SOAdmin - System Options - Labels This table contains controlling data for the string substitution mechanism. There is one row in this table for each label or string that can be substituted; the active field indicates whether the string is actually being substituted or not. Initially, all rows have this field set to 0. The table is loaded with initial data during database setup. Only SuperOffice Development has the necessary expertise to safely add rows to this table. If a row has active = 1, the table LocaleText should contain one or more rows pointing back to this table, with the actual text to be used. Collection of FieldLabelRow. Each element of the collection represents one row in the FieldLabel table.
Declaration
public FieldLabelRow[] ToArray()
Returns
Type | Description |
---|---|
FieldLabelRow[] |
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 FieldLabelRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) FieldLabelRows FieldLabelRows.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 FieldLabelRow to it, and use methods like Save to operate on the whole collection.
- You can create a (nested) FieldLabelRows FieldLabelRows.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.