Class LocaleTextRows
Multi-language text items. Used for user-defined field labels. Must be assigned correct name to match the language they start SuperOffice in. This table should be viewed in conjunction with FieldLabel. If a row in FieldLable has active = 1 this table will need to contain at least one row with the same resourceId as the FieldLabel row. The language id can be either 0 or one of the Windows language ID's; SuperOffice will pick the correct language on startup according to the user settings. If a label cannot be found with the given language and also not with language 0, it will not be substituted. Collection of LocaleTextRow. Each element of the collection represents one row in the LocaleText table.
Inheritance
Implements
Inherited Members
Namespace: SuperOffice.CRM.Rows
Assembly: SoDataBase.dll
Syntax
public class LocaleTextRows : TableRowsBase, INestedPersist, IEnumerable<INestedPersist>, ISoCollection, IEnumerable, IList, ICollection, INotifyCollectionChanged, IBindingList
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
LocaleTextRow to it, and use methods like
to operate on the whole collection. - You can create a (nested) LocaleTextRows LocaleTextRows.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(LocaleTextRows.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
Item[Int32]
Get a LocaleTextRow given its index in the collection.
Declaration
public LocaleTextRow this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | Index of the LocaleTextRow in the collection |
Property Value
Type | Description |
---|---|
LocaleTextRow |
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
LocaleTextRow to it, and use methods like
to operate on the whole collection. - You can create a (nested) LocaleTextRows LocaleTextRows.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(LocaleTextRows.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(LocaleTextRow)
Add one LocaleTextRow to the collection.
Declaration
public int Add(LocaleTextRow row)
Parameters
Type | Name | Description |
---|---|---|
LocaleTextRow | row | An instance of LocaleTextRow to be added to the collection. |
Returns
Type | Description |
---|---|
Int32 | The index of the added LocaleTextRow. |
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
LocaleTextRow to it, and use methods like
to operate on the whole collection. - You can create a (nested) LocaleTextRows LocaleTextRows.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(LocaleTextRows.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 LocaleTextRow added to the collection.
Declaration
public LocaleTextRow AddNew()
Returns
Type | Description |
---|---|
LocaleTextRow | A new instance of LocaleTextRow 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
LocaleTextRow to it, and use methods like
to operate on the whole collection. - You can create a (nested) LocaleTextRows LocaleTextRows.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(LocaleTextRows.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<LocaleTextRow>)
Add a range of LocaleTextRow to the collection.
Declaration
public LocaleTextRows AddRange(IEnumerable<LocaleTextRow> rows)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<LocaleTextRow> | rows |
Returns
Type | Description |
---|---|
LocaleTextRows | The updated LocaleTextRows 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
LocaleTextRow to it, and use methods like
to operate on the whole collection. - You can create a (nested) LocaleTextRows LocaleTextRows.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(LocaleTextRows.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 LocaleTextRow
Declaration
protected override TableRowBase CreateChild()
Returns
Type | Description |
---|---|
TableRowBase | New instance of LocaleTextRow |
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
LocaleTextRow to it, and use methods like
to operate on the whole collection. - You can create a (nested) LocaleTextRows LocaleTextRows.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(LocaleTextRows.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 LocaleTextRows object. This collection will contain no rows.
Declaration
public static LocaleTextRows CreateNew()
Returns
Type | Description |
---|---|
LocaleTextRows | A new instance of the LocaleTextRows 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
LocaleTextRow to it, and use methods like
to operate on the whole collection. - You can create a (nested) LocaleTextRows LocaleTextRows.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(LocaleTextRows.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<LocaleTextRow>)
Apply the predicate to each element of the collection and return the first row that matches; if no match then return null
Declaration
public LocaleTextRow Find(Predicate<LocaleTextRow> condition)
Parameters
Type | Name | Description |
---|---|---|
Predicate<LocaleTextRow> | condition |
Returns
Type | Description |
---|---|
LocaleTextRow |
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
LocaleTextRow to it, and use methods like
to operate on the whole collection. - You can create a (nested) LocaleTextRows LocaleTextRows.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(LocaleTextRows.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<LocaleTextRow>)
Return a new collection that contains only those elements that match the condition. Elements are shared, not clones! of the original collection
Declaration
public LocaleTextRows FindAll(Predicate<LocaleTextRow> condition)
Parameters
Type | Name | Description |
---|---|---|
Predicate<LocaleTextRow> | condition |
Returns
Type | Description |
---|---|
LocaleTextRows |
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
LocaleTextRow to it, and use methods like
to operate on the whole collection. - You can create a (nested) LocaleTextRows LocaleTextRows.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(LocaleTextRows.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<LocaleTextRow>)
Method that iterates over all members and applies the action parameter to each of them
Declaration
public void ForEach(Action<LocaleTextRow> whatToDo)
Parameters
Type | Name | Description |
---|---|---|
Action<LocaleTextRow> | 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
LocaleTextRow to it, and use methods like
to operate on the whole collection. - You can create a (nested) LocaleTextRows LocaleTextRows.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(LocaleTextRows.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(LocaleTextRows.CustomSearch)
Create a new instance of the LocaleTextRows 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 LocaleTextRow objects representing each row will be returned.
Declaration
public static LocaleTextRows GetFromCustomSearch(LocaleTextRows.CustomSearch query)
Parameters
Type | Name | Description |
---|---|---|
LocaleTextRows.CustomSearch | query | The custom search to execute against the database |
Returns
Type | Description |
---|---|
LocaleTextRows | A new instance of the LocaleTextRows 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
LocaleTextRow to it, and use methods like
to operate on the whole collection. - You can create a (nested) LocaleTextRows LocaleTextRows.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(LocaleTextRows.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.
GetFromIdxLanguageId(Int32)
Create a new instance of the LocaleTextRow object, by querying the database table via the index 'ILanguageIdTypeIdResourceId'. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static LocaleTextRows GetFromIdxLanguageId(int languageId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | languageId |
Returns
Type | Description |
---|---|
LocaleTextRows | Row object that represents the result of the search. |
Remarks
This method represents one of the unique indexes on the LocaleText table. Non-unique indexes have corresponding inner classes and methods in the LocaleTextRows collection, since they may return more than one row.
GetFromIdxLanguageIdTypeId(Int32, Int16)
Create a new instance of the LocaleTextRow object, by querying the database table via the index 'ILanguageIdTypeIdResourceId'. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static LocaleTextRows GetFromIdxLanguageIdTypeId(int languageId, short typeId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | languageId | |
Int16 | typeId |
Returns
Type | Description |
---|---|
LocaleTextRows | Row object that represents the result of the search. |
Remarks
This method represents one of the unique indexes on the LocaleText table. Non-unique indexes have corresponding inner classes and methods in the LocaleTextRows collection, since they may return more than one row.
GetFromIdxResourceId(Int32)
Create a new instance of the LocaleTextRow object, by querying the database table via the index 'IDXLocaleTextResourceId'. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static LocaleTextRows GetFromIdxResourceId(int resourceId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | resourceId |
Returns
Type | Description |
---|---|
LocaleTextRows | Row object that represents the result of the search. |
Remarks
This method represents one of the unique indexes on the LocaleText table. Non-unique indexes have corresponding inner classes and methods in the LocaleTextRows collection, since they may return more than one row.
GetFromReader(SoDataReader, LocaleTextTableInfo)
Create a new instance of the LocaleTextRows 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 LocaleTextRow 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 LocaleTextRows GetFromReader(SoDataReader reader, LocaleTextTableInfo tableInfo)
Parameters
Type | Name | Description |
---|---|---|
SoDataReader | reader | SoDataReader positioned to a valid database row. |
LocaleTextTableInfo | tableInfo | LocaleTextTableInfo 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 |
---|---|
LocaleTextRows |
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
LocaleTextRow to it, and use methods like
to operate on the whole collection. - You can create a (nested) LocaleTextRows LocaleTextRows.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(LocaleTextRows.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(LocaleTextRow)
Removes the given LocaleTextRow from the collection
Declaration
public void Remove(LocaleTextRow row)
Parameters
Type | Name | Description |
---|---|---|
LocaleTextRow | row | the LocaleTextRow 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
LocaleTextRow to it, and use methods like
to operate on the whole collection. - You can create a (nested) LocaleTextRows LocaleTextRows.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(LocaleTextRows.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()
Multi-language text items. Used for user-defined field labels. Must be assigned correct name to match the language they start SuperOffice in. This table should be viewed in conjunction with FieldLabel. If a row in FieldLable has active = 1 this table will need to contain at least one row with the same resourceId as the FieldLabel row. The language id can be either 0 or one of the Windows language ID's; SuperOffice will pick the correct language on startup according to the user settings. If a label cannot be found with the given language and also not with language 0, it will not be substituted. Collection of LocaleTextRow. Each element of the collection represents one row in the LocaleText table.
Declaration
public LocaleTextRow[] ToArray()
Returns
Type | Description |
---|---|
LocaleTextRow[] |
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
LocaleTextRow to it, and use methods like
to operate on the whole collection. - You can create a (nested) LocaleTextRows LocaleTextRows.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(LocaleTextRows.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 |
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
LocaleTextRow to it, and use methods like
to operate on the whole collection. - You can create a (nested) LocaleTextRows LocaleTextRows.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(LocaleTextRows.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.