Class QuoteVersionAttachmentManager
Class implementing QuoteVersionAttachment business logic
Inherited Members
Namespace: SuperOffice.CRM.Sale
Assembly: SoDataBase.dll
Syntax
public static class QuoteVersionAttachmentManager
Methods
AddSaleTypeQuoteAttachmentAsync(int, int, CancellationToken)
Adds a new quote attachment document to a sale type
Declaration
public static Task<int> AddSaleTypeQuoteAttachmentAsync(int saleTypeId, int documentId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | saleTypeId | The ID of the sale type |
int | documentId | The ID of the document |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<int> | ID of the new sale type quote attachment row |
CreateOrUpdateQuoteVersionAttachmentsAsync(int, CancellationToken)
Look at the Quote version, related sale and sale type, and ensure that the correct QuoteVersionAttachment records exist. This method may create or delete records
Declaration
public static Task<QuoteVersionAttachmentRows> CreateOrUpdateQuoteVersionAttachmentsAsync(int quoteVersionId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | quoteVersionId | The ID of the quote version |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<QuoteVersionAttachmentRows> | The current attachments for the given Quote version, after all updates have been completed |
DeleteSaleTypeQuoteAttachmentAsync(int, CancellationToken)
Deletes a sale type quote attachment row
Declaration
public static Task DeleteSaleTypeQuoteAttachmentAsync(int id, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | id | The ID of the row to delete |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task |
IncludeQuoteVersionAttachmentAsync(int, int, bool, CancellationToken)
Toggle the 'included' state of a quote version attachment; will throw exceptions if called on locked versions
Declaration
public static Task<bool> IncludeQuoteVersionAttachmentAsync(int quoteVersionId, int documentId, bool include, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | quoteVersionId | The ID of the Quote version |
int | documentId | The ID of the document |
bool | include | Desired state |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<bool> | The new state |
ToggleSaleTypeQuoteAttachmentDefaultIncludedAsync(int, CancellationToken)
Toggle the 'default included' state of a sale type quote attachment
Declaration
public static Task<bool> ToggleSaleTypeQuoteAttachmentDefaultIncludedAsync(int id, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | id | The ID of the sale type quote attachment |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<bool> | The new state |