Class SaleListProvider
List of sales.
Searches sale + company names + person names.
Skips completed sales SkipCompletedSales userpref is set.
Skips sales without quotes if AdditionalInfo contains "hasQuoteOnline=1".
Skips sales without stakeholders if AdditionalInfo contains "stakeholderOnly=1".
Filter sales according to currency if AdditionalInfo contains "hasCurrency=(currency-id)"
Inheritance
System.Object
SaleListProvider
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: SoDataBase.dll
Syntax
[MDOProviderPlugin("sale_new")]
[MDOAdditionalInfoSeparator(";")]
[MDOAdditionalInfo("stakeholderOnly", "Only Sales with stakeholders", "1")]
[MDOAdditionalInfo("hasQuoteOnly", "Only Sales with quotes", "1")]
[MDOAdditionalInfo("hasCurrency", "Only Sales with currency id = value", "234")]
public class SaleListProvider : AnyTableListProviderBase, ISoListProvider, ISoList, IPlugin
Constructors
SaleListProvider()
Declaration
public SaleListProvider()
Fields
HasCurrency
Declaration
public const string HasCurrency = "hasCurrency"
Field Value
Type |
Description |
System.String |
|
HasQuoteOnly
Declaration
public const string HasQuoteOnly = "hasQuoteOnly"
Field Value
Type |
Description |
System.String |
|
ProviderName
Declaration
public const string ProviderName = "sale_new"
Field Value
Type |
Description |
System.String |
|
StakeholderOnly
Declaration
public const string StakeholderOnly = "stakeholderOnly"
Field Value
Type |
Description |
System.String |
|
Properties
TableInfo
Declaration
protected override TableInfo TableInfo { get; }
Property Value
Overrides
Methods
ExecuteReader(SoCommand)
Read whole resultset - no paging here, since we do scoring and filtering of results,
and highest scoring hit might be #501.
Unless we are not doing a search, then we just read the first 500 matches.
Declaration
protected override SoDataReader ExecuteReader(SoCommand cmd)
Parameters
Returns
Overrides
GetMainQuery()
Declaration
protected override Select GetMainQuery()
Returns
Overrides
Init()
Declaration
protected override void Init()
Overrides
OnPostGetRootItems(List<ISoListItem>)
Sort the matches into rank order, so that the best matches are listed first, if there
are search terms. If no search terms, then we do not modify the list.
Declaration
protected override void OnPostGetRootItems(List<ISoListItem> items)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<ISoListItem> |
items |
Results - will be re-ordered if there are search terms, and capped at 500 items
|
Overrides
OnRead(SoDataReader, Int16)
Declaration
protected override ISoListItem OnRead(SoDataReader reader, short lastRank)
Parameters
Type |
Name |
Description |
SoDataReader |
reader |
|
System.Int16 |
lastRank |
|
Returns
Overrides
Declaration
protected void SetContactSearchRestriction(Select sql, bool individualTerms)
Parameters
SetPersonSearchRestriction(Select)
Declaration
protected void SetPersonSearchRestriction(Select sql)
Parameters
Type |
Name |
Description |
Select |
sql |
|
SetProjectSearchRestriction(Select, Boolean)
Declaration
protected void SetProjectSearchRestriction(Select sql, bool individualTerms)
Parameters
SetSaleSearchRestriction(Select, Boolean)
Declaration
protected void SetSaleSearchRestriction(Select sql, bool individualTerms)
Parameters
SetSearchRestriction(Select, String)
Declaration
protected override void SetSearchRestriction(Select sql, string searchValue)
Parameters
Type |
Name |
Description |
Select |
sql |
|
System.String |
searchValue |
|
Overrides
SortItemsByScore(List<ISoListItem>)
Sort the matches into rank order, so that the best matches are listed first, if there
are search terms. If no search terms, then we do not modify the list.
Declaration
protected void SortItemsByScore(List<ISoListItem> items)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<ISoListItem> |
items |
Results - will be re-ordered if there are search terms
|
Implements
Extension Methods
EnumUtil.MapEnums<From, To>(From)