Class TZDstRuleRow.CustomSearch
Class representing a custom search against table 'TZDstRule'. Use this class to create a query that is pre-populated with the correct TZDstRuleTableInfo and return fields; you can then add your own restrictions and other clauses to the query. The result will be a TZDstRuleRow. If your query matches more than one row in the database, the result will reflect the first row only.
Inheritance
Inherited Members
Namespace: SuperOffice.CRM.Rows
Assembly: SoDataBase.dll
Syntax
public sealed class TZDstRuleRow.CustomSearch : TZDstRuleRow.TZDstRuleRowIdx, ICloneable, ISentryIgnorable
Examples
This example shows how a custom search is created, one restriction added, and the search executed.
TZDstRuleRow.CustomSearch mySearch = new TZDstRuleRow.CustomSearch();
mySearch.Restriction = (some relevant restriction);
TZDstRuleRow myRow = TZDstRuleRow.GetFromCustomSearch( mySearch ); // query executed here
Constructors
CustomSearch()
Constructor for class TZDstRuleRows.CustomSearch. This class represents a custom search against table 'TZDstRule'.
Declaration
public CustomSearch()
Remarks
By adding restrictions and order by information,
a custom query can be formatted against the database.
If this is not added, all the rows in the
table are returned.
Properties
InnerOrderBy
Implementation of the OrderBy clause.
Declaration
protected override OrderBy InnerOrderBy { get; }
Property Value
Type | Description |
---|---|
OrderBy |
Overrides
InnerRestriction
Restriction (e.g. sql: WHERE) for the select statement.
Declaration
protected override Restriction InnerRestriction { get; }
Property Value
Type | Description |
---|---|
Restriction | RestrictionObject holding the restrictions for the select statement. |
Overrides
OrderBy
Implementation of the OrderBy clause.
Declaration
public OrderBy OrderBy { get; }
Property Value
Type | Description |
---|---|
OrderBy |
Restriction
Restriction (e.g. sql: WHERE) for the select statement.
Declaration
public Restriction Restriction { get; set; }
Property Value
Type | Description |
---|---|
Restriction | RestrictionObject holding the restrictions for the select statement. |
Methods
RestrictionAnd(Restriction)
Calling this method is equivalent to the statement Restriction = Restriction.And( <argument> ), including protection against null Restrictions. Use it as a convenient shorthand if you are building complex restrictions out of smaller parts.
Declaration
public void RestrictionAnd(Restriction rightHandSide)
Parameters
Type | Name | Description |
---|---|---|
Restriction | rightHandSide | The right-hand side of the AND, the left-hand side is this objects' current Restriction. |
RestrictionOr(Restriction)
Calling this method is equivalent to the statement Restriction = Restriction.Or( <argument> ), including protection against null Restrictions. Use it as a convenient shorthand if you are building complex restrictions out of smaller parts.
Declaration
public void RestrictionOr(Restriction rightHandSide)
Parameters
Type | Name | Description |
---|---|---|
Restriction | rightHandSide | The right-hand side of the OR, the left-hand side is this objects' current Restriction. |
UpdateRow(TableRowBase)
Update the TZDstRuleRow with the values from the index.
Declaration
public override void UpdateRow(TableRowBase row)
Parameters
Type | Name | Description |
---|---|---|
TableRowBase | row | The row to update. This must be an instance of TZDstRuleRow. |
Overrides
Remarks
This method does nothing for a the CustomSearch class.