Class QuoteManagerFactory
Implements
Inherited Members
Namespace: SuperOffice.CRM.Sale
Assembly: SoDataBase.BusinessLogic.dll
Syntax
public class QuoteManagerFactory : IQuoteManagerFactory
Constructors
QuoteManagerFactory()
Declaration
public QuoteManagerFactory()
Methods
FromCachedQuoteVersionIdAsync(int, CancellationToken)
Gets QuoteManager from cache if present, via the quoteVersionId
Declaration
public Task<IQuoteManager> FromCachedQuoteVersionIdAsync(int quoteVersionId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | quoteVersionId | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<IQuoteManager> | A new instance of QuoteManager. |
FromCachedSaleIdAsync(int, CancellationToken)
Gets a cached copy of QuoteManager, or creates a new instance based on quoteId if cache is empty.
Declaration
public Task<IQuoteManager> FromCachedSaleIdAsync(int saleId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | saleId | Primary key of sale |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<IQuoteManager> | An instance of QuoteManager. |
FromQuoteAlternativeIdAsync(int, CancellationToken)
Creates a new QuoteManager from a quoteAlternativeId
Declaration
public Task<IQuoteManager> FromQuoteAlternativeIdAsync(int quoteAlternativeId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | quoteAlternativeId | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<IQuoteManager> | A new instance of QuoteManager. |
FromQuoteIdAsync(int, CancellationToken)
Creates a new QuoteManager based on quoteId.
Declaration
public Task<IQuoteManager> FromQuoteIdAsync(int quoteId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | quoteId | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<IQuoteManager> | A new instance of QuoteManager. |
FromQuoteLineIdAsync(int, CancellationToken)
Creates a QuoteManager from a quotelineId
Declaration
public Task<IQuoteManager> FromQuoteLineIdAsync(int quoteLineId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | quoteLineId | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<IQuoteManager> | A new instance of QuoteManager. |
FromQuoteVersionIdAsync(int, CancellationToken)
Creates a new QuoteManager from a quoteVersionInfo
Declaration
public Task<IQuoteManager> FromQuoteVersionIdAsync(int quoteVersionId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | quoteVersionId | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<IQuoteManager> | A new instance of QuoteManager. |
FromSaleIdAsync(int, CancellationToken)
Creates a new QuoteManager based on quoteId. Does not use cache - loads everything from database.
Declaration
public Task<IQuoteManager> FromSaleIdAsync(int saleId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | saleId | |
| CancellationToken | cancellationToken |
Returns
| Type | Description |
|---|---|
| Task<IQuoteManager> | A new instance of QuoteManager. |