Class CustomTableRow<TTableInfo>
Inherited Members
Namespace: SuperOffice.CRM.Rows
Assembly: SoDataBase.dll
Syntax
public class CustomTableRow<TTableInfo> : TableRowBase, INestedPersist, ISoDataLookup, ISentryIgnorable, ISoItem where TTableInfo : TableInfo
Type Parameters
Name | Description |
---|---|
TTableInfo |
Constructors
CustomTableRow(CustomTableRow<TTableInfo>.CustomTableRowIdxBase)
Constructor for the class taking an index as argument. This class can take any table based on a TableInfo object
Declaration
protected CustomTableRow(CustomTableRow<TTableInfo>.CustomTableRowIdxBase idx)
Parameters
Type | Name | Description |
---|---|---|
CustomTableRow.CustomTableRowIdxBase<> | idx | The index representing a SELECT command to the database. |
Properties
InnerFieldValuePairs
Container for the fields and values that belong to the current sql-command.
Declaration
protected override ArgumentParameterCollection InnerFieldValuePairs { get; }
Property Value
Type | Description |
---|---|
ArgumentParameterCollection |
Overrides
InnerPrimaryKey
The primary key needed to decide which specific row to alter with the current sql-command.
Declaration
protected override FieldInfo InnerPrimaryKey { get; }
Property Value
Type | Description |
---|---|
FieldInfo |
Overrides
InnerPrimaryKeyValue
The actual value the primary key must have.
Declaration
protected override Parameter InnerPrimaryKeyValue { get; }
Property Value
Type | Description |
---|---|
Parameter | The inner primary key value. |
Overrides
IsDirty
Is the row dirty, e.g. been modified since the last time it was saved to the database.
Declaration
public override bool IsDirty { get; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
IsNew
Is the row new, e.g. not been inserted to the database?
Declaration
public override bool IsNew { get; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
Item[String]
Get or set a value based on the name of the field.
Declaration
public override object this[string fieldName] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
String | fieldName | Name of the field in the database |
Property Value
Type | Description |
---|---|
Object | Value of the field. |
Overrides
TableInfo
Declaration
public override TableInfo TableInfo { get; }
Property Value
Type | Description |
---|---|
TableInfo |
Overrides
Methods
InternalSetValue(String, Object)
Declaration
protected override void InternalSetValue(string fieldName, object value)
Parameters
Type | Name | Description |
---|---|---|
String | fieldName | |
Object | value |
Overrides
OnLoad(SoDataReader, TableInfo)
Called when data is read from the database, to fill the road with appropriate data.
Declaration
protected override void OnLoad(SoDataReader reader, TableInfo tableInfo)
Parameters
Type | Name | Description |
---|---|---|
SoDataReader | reader | SoDataReader holding the data returned from the database. |
TableInfo | tableInfo | The TableInfo used for the SELECT statement. |
Overrides
Reset()
Reset the changes made on the object.
Declaration
protected override void Reset()
Overrides
Remarks
If the row is not persisted to the database (e.g. IsNew is true), all the values will be reset. If the row has been persisted to or loaded from the database, the properties will be set to those of the last persisted or loaded values.
SetDefaults(DefaulterStrategy)
Set default values for the row.
Declaration
public override void SetDefaults(DefaulterStrategy strategy)
Parameters
Type | Name | Description |
---|---|---|
DefaulterStrategy | strategy | Strategy used when applying default values; values depend on where we are in the Create/Fetch/Populate/Save cycle |
Overrides
SetPrimaryKey(Int32)
Declaration
protected override void SetPrimaryKey(int primaryKey)
Parameters
Type | Name | Description |
---|---|---|
Int32 | primaryKey |
Overrides
Validate(RowValidator)
Validate this row.
Declaration
public override void Validate(RowValidator rowValidator)
Parameters
Type | Name | Description |
---|---|---|
RowValidator | rowValidator | RowValidator for inserting the result of the validation |