Show / Hide Table of Contents

Class QuoteListsByNameProvider

Wildcard list provider for Quote Management lists; see remarks for naming conventions. If you cannot dynamically generate the proper list name, then see QuoteListsByIdProvider, which has a fixed name and instead takes a QuoteAlternativeId.

Inheritance
Object
QuoteListsByNameProvider
Implements
IWildcardMDOProvider
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.CRM.Lists
Assembly: SoDataBase.dll
Syntax
[WildcardMDOProviderPlugin("QuoteListsByName")]
public sealed class QuoteListsByNameProvider : IWildcardMDOProvider, IPlugin
Remarks

Quote lists, supplied by the Quote Management connectors, adhere to the following naming convention:
If the list is named 'PaymentTerms', and the context is sale with id 5, then the list name QM_5_PaymentTerms will retrieve the correct list via the correct connector.

The first part must be uppercase QM, the second part must be a valid sale that has a quote, and the third part must be a list name recognized by the connector. Underscore is the delimiter character.

Quote list dispatching is a two-step process. A Quote Connector may choose to implement its own MDO List provider(s), in which case the lists must be called "<ListName><ConnectorName>". If such a provider plugin class exists, then it will be called.

Otherwise, we dispatch to a generic facade that will in turn call the plugins' method, which is a much simpler interface to implement than the full-size MDO provider. If the connector does not have that capability, then we finally give up.

If the call fails for any reason, then an empty list is returned. Only flat lists are supported by this mechanism. Quote Connector assemblies may implement their own WildcardMDOProvider that has a different behaviour (icons, headings etc) if they wish to do so - just use a low priority value in the declaring attribute and you will be called first.

If the saleId is 0, then an aggregate list from all visible connectors is requested (good for searching). Delegates to list "erpProductFamily" or "ErpProductCategory" list provider, which calls us back once for each list the user can see.

Constructors

QuoteListsByNameProvider()

Declaration
public QuoteListsByNameProvider()

Fields

Prefix

Declaration
public const string Prefix = "QM"
Field Value
Type Description
String

Methods

GetListName(String, Int32)

Given a base list name and sale id, return the list name that uniquely specifies the "real" list name that can be used all over the place

Declaration
public static string GetListName(string name, int saleId)
Parameters
Type Name Description
String name
Int32 saleId
Returns
Type Description
String

GetListName(String, String)

Declaration
public static string GetListName(string name, string connectorName)
Parameters
Type Name Description
String name
String connectorName
Returns
Type Description
String

GetProvider(String)

Return a fully populated, concrete list provider for a given list name; or null. See class remarks for more information.

Declaration
public ISoListProvider GetProvider(string listName)
Parameters
Type Name Description
String listName

"qm_excelquoteconnector_productcategory" (generic connector name - during setup) or "qm_con3_productCategory" (3=connection id), or "qm_3_productCategory", where 3 = sale-id

Returns
Type Description
ISoListProvider

Implements

IWildcardMDOProvider

Extension Methods

EnumUtil.MapEnums<From, To>(From)
ObjectExtensions.AssignByReflection<T>(T, T)
ObjectExtensions.GraphCopy<T>(T)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top