Show / Hide Table of Contents

Class QuoteData

Handles all database logic for the Quote. Used by the QuoteManager to keep track of the related quote and version and alternative objects.

This class is based on NestedPersist, and all Quote, version and alternative rows will be saved when the Save method is invoked.
Inheritance
object
NestedPersist
QuoteData
Implements
INestedPersist
IQuoteData
Inherited Members
NestedPersist._saveOwner
NestedPersist._isSaving
NestedPersist.SetSaveOwner(INestedPersist)
NestedPersist.OnPreIdUpdateAsync()
NestedPersist.OnPrimaryKeyRequestAsync(PKContainer)
NestedPersist.OnPrimaryKeyUpdateAsync(PKContainer)
NestedPersist.OnIdUpdateAsync()
NestedPersist.OnSaveAsync(BatchSave)
NestedPersist.OnSavedAsync(bool)
NestedPersist.IsSaving
NestedPersist.IsMarkedForDelete
NestedPersist.OnElementSaved
NestedPersist.OnElementIdUpdate
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.CRM.Sale
Assembly: SoDataBase.BusinessLogic.dll
Syntax
public class QuoteData : NestedPersist, INestedPersist, IQuoteData

Properties

ContactInfo

Get information for the Contact the sale is connected to. The Contact Info will be created when first asked for.

Declaration
public IContactInfo ContactInfo { get; }
Property Value
Type Description
IContactInfo

IsDeleted

Returns true if the QuoteRow is deleted.

Declaration
public override bool IsDeleted { get; }
Property Value
Type Description
bool
Overrides
NestedPersist.IsDeleted

IsDirty

Returns true if the QuoteRow or any versionrows or alternativerows isDirty.

Declaration
public override bool IsDirty { get; }
Property Value
Type Description
bool
Overrides
NestedPersist.IsDirty

PersonInfo

Get information for the Contact the sale is connected to. The Contact Info will be created when first asked for.

Declaration
public IPersonInfo PersonInfo { get; }
Property Value
Type Description
IPersonInfo

ProjectInfo

Get project information for this quote. If a project is not assigned to this sale, null will be returned.

Declaration
public IProjectInfo ProjectInfo { get; }
Property Value
Type Description
IProjectInfo

QuoteRow

The main quote row.

Declaration
public QuoteRow QuoteRow { get; set; }
Property Value
Type Description
QuoteRow

SaleInfo

Get Sale information for this quote. The Sale Info will be created when first asked for.

Declaration
public ISaleInfo SaleInfo { get; }
Property Value
Type Description
ISaleInfo

SaleRow

The main Sale row the quote is connected to.

Declaration
public SaleRow SaleRow { get; }
Property Value
Type Description
SaleRow

UserInfo

Returns UserInfo

Declaration
public UserInfo UserInfo { get; }
Property Value
Type Description
UserInfo

username, fullname, associate id, e-mail address in one package

Methods

AddQuoteAlternativeAsync(QuoteVersionRow, QuoteAlternativeRow, CancellationToken)

Adds an existing QuoteAlternativeRow to the dictionary.

Declaration
public Task<QuoteAlternativeRow> AddQuoteAlternativeAsync(QuoteVersionRow quoteVersionRow, QuoteAlternativeRow quoteAlternativeRow, CancellationToken cancellationToken = default)
Parameters
Type Name Description
QuoteVersionRow quoteVersionRow
QuoteAlternativeRow quoteAlternativeRow
CancellationToken cancellationToken
Returns
Type Description
Task<QuoteAlternativeRow>

AddQuoteAlternativeAsync(QuoteVersionRow, CancellationToken)

Creates a new QuoteAlternativeRow and adds it to the dictionary where quoteVersionRow is the key.

Declaration
public Task<QuoteAlternativeRow> AddQuoteAlternativeAsync(QuoteVersionRow quoteVersionRow, CancellationToken cancellationToken = default)
Parameters
Type Name Description
QuoteVersionRow quoteVersionRow

quoteVersionRow is the key in the dictionary. The alternative row will be added in the list for the key quoteVersionRow.

CancellationToken cancellationToken
Returns
Type Description
Task<QuoteAlternativeRow>

AddQuoteVersionAsync(QuoteVersionRow, CancellationToken)

Adds an existing QuoteVersionRow to the QuoteVersions dictionary.

Declaration
public Task<QuoteVersionRow> AddQuoteVersionAsync(QuoteVersionRow quoteVersionRow, CancellationToken cancellationToken = default)
Parameters
Type Name Description
QuoteVersionRow quoteVersionRow
CancellationToken cancellationToken
Returns
Type Description
Task<QuoteVersionRow>

AddQuoteVersionAsync(CancellationToken)

Create a QuoteVersionRow and adds it to the QuoteVersions dictionary.

Declaration
public Task<QuoteVersionRow> AddQuoteVersionAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<QuoteVersionRow>

QuoteVersionRow

ApplyErpChangesToQuote(QuoteInfo)

Apply changes to quote.

Declaration
public bool ApplyErpChangesToQuote(QuoteInfo quoteInfo)
Parameters
Type Name Description
QuoteInfo quoteInfo
Returns
Type Description
bool

ApplyErpChangesToQuote(QuoteInfo, bool)

Apply changes to quote.

Declaration
public bool ApplyErpChangesToQuote(QuoteInfo quoteInfo, bool ignoreSentry)
Parameters
Type Name Description
QuoteInfo quoteInfo

QuoteInfo instance to save.

bool ignoreSentry

If true, the sentry will be disabled when saving to the database.

Returns
Type Description
bool

ApplyErpChangesToQuote(QuoteVersionContextInfo)

Apply changes to quote.

Declaration
public bool ApplyErpChangesToQuote(QuoteVersionContextInfo quoteVersionContextInfo)
Parameters
Type Name Description
QuoteVersionContextInfo quoteVersionContextInfo

QuoteVersionContextInfo with the QuoteInfo instance to save.

Returns
Type Description
bool

ApplyErpChangesToQuoteAlternativeAsync(QuoteAlternativeContextInfo, CancellationToken)

Handles all database logic for the Quote. Used by the QuoteManager to keep track of the related quote and version and alternative objects.

This class is based on NestedPersist, and all Quote, version and alternative rows will be saved when the Save method is invoked.
Declaration
public Task<bool> ApplyErpChangesToQuoteAlternativeAsync(QuoteAlternativeContextInfo quoteContextInfo, CancellationToken cancellationToken = default)
Parameters
Type Name Description
QuoteAlternativeContextInfo quoteContextInfo
CancellationToken cancellationToken
Returns
Type Description
Task<bool>

true if the alternative has been changed

ApplyErpChangesToQuoteAlternativeAsync(QuoteAlternativeInfo, bool, CancellationToken)

Handles all database logic for the Quote. Used by the QuoteManager to keep track of the related quote and version and alternative objects.

This class is based on NestedPersist, and all Quote, version and alternative rows will be saved when the Save method is invoked.
Declaration
public Task<bool> ApplyErpChangesToQuoteAlternativeAsync(QuoteAlternativeInfo quoteAlternativeInfo, bool ignoreSentry, CancellationToken cancellationToken = default)
Parameters
Type Name Description
QuoteAlternativeInfo quoteAlternativeInfo
bool ignoreSentry

If true, the sentry will be disabled when saving to the database.

CancellationToken cancellationToken
Returns
Type Description
Task<bool>

ApplyErpChangesToQuoteAlternativeAsync(QuoteAlternativeInfo, CancellationToken)

Handles all database logic for the Quote. Used by the QuoteManager to keep track of the related quote and version and alternative objects.

This class is based on NestedPersist, and all Quote, version and alternative rows will be saved when the Save method is invoked.
Declaration
public Task<bool> ApplyErpChangesToQuoteAlternativeAsync(QuoteAlternativeInfo quoteAlternativeInfo, CancellationToken cancellationToken = default)
Parameters
Type Name Description
QuoteAlternativeInfo quoteAlternativeInfo
CancellationToken cancellationToken
Returns
Type Description
Task<bool>

ApplyErpChangesToQuoteVersionAsync(QuoteAlternativeContextInfo, CancellationToken)

Apply changes to version

Declaration
public Task<bool> ApplyErpChangesToQuoteVersionAsync(QuoteAlternativeContextInfo quoteAlternativeContextInfo, CancellationToken cancellationToken = default)
Parameters
Type Name Description
QuoteAlternativeContextInfo quoteAlternativeContextInfo

version info

CancellationToken cancellationToken
Returns
Type Description
Task<bool>

true if changed

ApplyErpChangesToQuoteVersionAsync(QuoteVersionContextInfo, CancellationToken)

Apply changes to version.

Declaration
public Task<bool> ApplyErpChangesToQuoteVersionAsync(QuoteVersionContextInfo quoteContextInfo, CancellationToken cancellationToken = default)
Parameters
Type Name Description
QuoteVersionContextInfo quoteContextInfo
CancellationToken cancellationToken
Returns
Type Description
Task<bool>

true of the version has been changed

ApplyErpChangesToQuoteVersionAsync(QuoteVersionInfo, bool, CancellationToken)

Apply changes to version.

Declaration
public Task<bool> ApplyErpChangesToQuoteVersionAsync(QuoteVersionInfo quoteVersionInfo, bool ignoreSentry, CancellationToken cancellationToken = default)
Parameters
Type Name Description
QuoteVersionInfo quoteVersionInfo

version info

bool ignoreSentry

If true, the sentry will be disabled when saving to the database.

CancellationToken cancellationToken
Returns
Type Description
Task<bool>

true if changed

ApplyErpChangesToQuoteVersionAsync(QuoteVersionInfo, CancellationToken)

Apply changes to version.

Declaration
public Task<bool> ApplyErpChangesToQuoteVersionAsync(QuoteVersionInfo quoteVersionInfo, CancellationToken cancellationToken = default)
Parameters
Type Name Description
QuoteVersionInfo quoteVersionInfo

version info

CancellationToken cancellationToken
Returns
Type Description
Task<bool>

true if changed

ClearQuoteLineCache()

Clear the quoteline cache

Declaration
public void ClearQuoteLineCache()

CloneQuoteAlternativesAsync(QuoteVersionRow, QuoteVersionRow, List<QuoteAlternativeRow>, CancellationToken)

Clone alternatives and its quotelines in to new version.

Declaration
public Task CloneQuoteAlternativesAsync(QuoteVersionRow existingQuoteVersionRow, QuoteVersionRow newQuoteVersionRow, List<QuoteAlternativeRow> existingQuoteAlternativeRows, CancellationToken cancellationToken = default)
Parameters
Type Name Description
QuoteVersionRow existingQuoteVersionRow

Version to clone alternatives from.

QuoteVersionRow newQuoteVersionRow

Updated with new LikelyQuoteAlternativeId based on the cloned alternatives

List<QuoteAlternativeRow> existingQuoteAlternativeRows

Alternatives to clone

CancellationToken cancellationToken
Returns
Type Description
Task

CloneQuoteAsync(IQuoteManager, CancellationToken)

Create a new quote on a sale based on a quote, active version and alternatives from another sale

Declaration
public Task CloneQuoteAsync(IQuoteManager copyFromQuoteManager, CancellationToken cancellationToken = default)
Parameters
Type Name Description
IQuoteManager copyFromQuoteManager
CancellationToken cancellationToken
Returns
Type Description
Task

CloneQuoteLineRowsAsync(QuoteAlternativeRow, QuoteAlternativeRow, CancellationToken)

Clone all quotelines from an alternative to another alternative.

Declaration
public Task<QuoteLineRows> CloneQuoteLineRowsAsync(QuoteAlternativeRow existingAlternativeRow, QuoteAlternativeRow newAlternativeRow, CancellationToken cancellationToken = default)
Parameters
Type Name Description
QuoteAlternativeRow existingAlternativeRow

The alternative where the existing quotelines are connected to.

QuoteAlternativeRow newAlternativeRow

The alternative where the quotelines will be copied to.

CancellationToken cancellationToken
Returns
Type Description
Task<QuoteLineRows>

CloneQuoteVersionAsync(QuoteVersionRow, CancellationToken)

Handles all database logic for the Quote. Used by the QuoteManager to keep track of the related quote and version and alternative objects.

This class is based on NestedPersist, and all Quote, version and alternative rows will be saved when the Save method is invoked.
Declaration
public Task<QuoteVersionRow> CloneQuoteVersionAsync(QuoteVersionRow existingQuoteVersionRow, CancellationToken cancellationToken = default)
Parameters
Type Name Description
QuoteVersionRow existingQuoteVersionRow
CancellationToken cancellationToken
Returns
Type Description
Task<QuoteVersionRow>

CopyQuoteAlternativeAsync(int, int, CancellationToken)

Copy a quotealternative row

Declaration
public Task<QuoteAlternativeRow> CopyQuoteAlternativeAsync(int quoteVersionId, int copyFromQuoteAlternativeId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int quoteVersionId

Quote version id

int copyFromQuoteAlternativeId
CancellationToken cancellationToken
Returns
Type Description
Task<QuoteAlternativeRow>

CreateAsync(int, CancellationToken)

Handles all database logic for the Quote. Used by the QuoteManager to keep track of the related quote and version and alternative objects.

This class is based on NestedPersist, and all Quote, version and alternative rows will be saved when the Save method is invoked.
Declaration
public static Task<QuoteData> CreateAsync(int saleId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int saleId
CancellationToken cancellationToken
Returns
Type Description
Task<QuoteData>

CreateQuoteAlternativeAsync(QuoteVersionRow, string, CancellationToken)

Creates a new QuoteAlternative for a Quote version

Declaration
public Task<QuoteAlternativeRow> CreateQuoteAlternativeAsync(QuoteVersionRow quoteVersionRow, string alternativeName, CancellationToken cancellationToken = default)
Parameters
Type Name Description
QuoteVersionRow quoteVersionRow
string alternativeName
CancellationToken cancellationToken
Returns
Type Description
Task<QuoteAlternativeRow>

CreateQuoteAlternativeAsync(int, string, CancellationToken)

Creates a new QuoteAlternative for a Quote version

Declaration
public Task<QuoteAlternativeRow> CreateQuoteAlternativeAsync(int quoteVersionId, string alternativeName, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int quoteVersionId
string alternativeName
CancellationToken cancellationToken
Returns
Type Description
Task<QuoteAlternativeRow>

CreateQuoteLine(int)

Add a new quoteline to an existing alternative

Declaration
public QuoteLineRow CreateQuoteLine(int quoteAlternativeId)
Parameters
Type Name Description
int quoteAlternativeId

Alternative to add new quote line to

Returns
Type Description
QuoteLineRow

The blank, unsaved quote line

CreateQuoteVersionAsync(string, CancellationToken)

Create a Quoteversion for the current Quote.

Declaration
public Task<QuoteVersionRow> CreateQuoteVersionAsync(string firstAlternativeName, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string firstAlternativeName

Name to be given to the default alternative

CancellationToken cancellationToken
Returns
Type Description
Task<QuoteVersionRow>

The created and unsaved QuoteVersionRow

CreateQuoteVersionCopyAsync(QuoteVersionRow, List<QuoteAlternativeRow>, CancellationToken)

Create a copy of a quote version, the copy can be placed in the same quote, or a quote on another sale. The address and details on the quote version are also copied. The existing quote may be marked "archived".

Declaration
public Task<QuoteVersionRow> CreateQuoteVersionCopyAsync(QuoteVersionRow existingQuoteVersionRow, List<QuoteAlternativeRow> existingQuoteAlternativeRows, CancellationToken cancellationToken = default)
Parameters
Type Name Description
QuoteVersionRow existingQuoteVersionRow

The existing quote, which will be marked "archived" if the alternativerows == NULL.

List<QuoteAlternativeRow> existingQuoteAlternativeRows

Alternatives to attach to the quote version. NULL = all existing alternatives on this version. NULL implies that the existing version will be marked "archived"

CancellationToken cancellationToken
Returns
Type Description
Task<QuoteVersionRow>

The new quote version row

DeleteQuote(int)

Handles all database logic for the Quote. Used by the QuoteManager to keep track of the related quote and version and alternative objects.

This class is based on NestedPersist, and all Quote, version and alternative rows will be saved when the Save method is invoked.
Declaration
public void DeleteQuote(int quoteId)
Parameters
Type Name Description
int quoteId

DeleteQuoteAlternativeAsync(int)

Mark a quotealternative row to be deleted

Declaration
public Task DeleteQuoteAlternativeAsync(int quoteAlternativeId)
Parameters
Type Name Description
int quoteAlternativeId
Returns
Type Description
Task

DeleteQuoteLineAsync(int, CancellationToken)

Deletes a QuoteLine

Declaration
public Task DeleteQuoteLineAsync(int quoteLineId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int quoteLineId

Id of the quoteline to delete.

CancellationToken cancellationToken
Returns
Type Description
Task

DeleteQuoteLineRowAsync(int, CancellationToken)

Delete the quoteline from the database.

Declaration
public Task DeleteQuoteLineRowAsync(int quoteLineId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int quoteLineId

Quote line to delete

CancellationToken cancellationToken
Returns
Type Description
Task

DetectErpQuoteLineChangesAsync(List<QuoteLineInfo>, List<QuoteLineInfo>, CancellationToken)

Handles all database logic for the Quote. Used by the QuoteManager to keep track of the related quote and version and alternative objects.

This class is based on NestedPersist, and all Quote, version and alternative rows will be saved when the Save method is invoked.
Declaration
public Task<QuoteAlternativeRecalculatedHelper> DetectErpQuoteLineChangesAsync(List<QuoteLineInfo> quoteLineInfosBefore, List<QuoteLineInfo> quoteLineInfosAfter, CancellationToken cancellationToken = default)
Parameters
Type Name Description
List<QuoteLineInfo> quoteLineInfosBefore
List<QuoteLineInfo> quoteLineInfosAfter
CancellationToken cancellationToken
Returns
Type Description
Task<QuoteAlternativeRecalculatedHelper>

GetActiveQuoteVersionRowAsync(CancellationToken)

Get the QuoteVersionRow marked as active.

Declaration
public Task<QuoteVersionRow> GetActiveQuoteVersionRowAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<QuoteVersionRow>

GetAllRowObjectsAsync(CancellationToken)

Handles all database logic for the Quote. Used by the QuoteManager to keep track of the related quote and version and alternative objects.

This class is based on NestedPersist, and all Quote, version and alternative rows will be saved when the Save method is invoked.
Declaration
public IAsyncEnumerable<TableRowBase> GetAllRowObjectsAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
IAsyncEnumerable<TableRowBase>

GetAlternativeRowAsync(int, CancellationToken)

Get QuoteAlternativeRow from the dictionary based on its id.

Declaration
public Task<QuoteAlternativeRow> GetAlternativeRowAsync(int alternativeId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int alternativeId
CancellationToken cancellationToken
Returns
Type Description
Task<QuoteAlternativeRow>

GetAlternativeRowsAsync(QuoteVersionRow, CancellationToken)

Get a list of QuoteAlternativeRows belonging to a QuoteVersionRow

Declaration
public Task<List<QuoteAlternativeRow>> GetAlternativeRowsAsync(QuoteVersionRow quoteVersionRow, CancellationToken cancellationToken = default)
Parameters
Type Name Description
QuoteVersionRow quoteVersionRow
CancellationToken cancellationToken
Returns
Type Description
Task<List<QuoteAlternativeRow>>

List of QuoteAlternativeRow. Null if the quoteVersionRow is not valid.

GetAlternativeRowsAsync(int, CancellationToken)

Get a list of QuoteAlternativeRows belonging to a QuoteVersionRow with given id.

Declaration
public Task<List<QuoteAlternativeRow>> GetAlternativeRowsAsync(int quoteVersionId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int quoteVersionId
CancellationToken cancellationToken
Returns
Type Description
Task<List<QuoteAlternativeRow>>

List of QuoteAlternativeRow. Null if the quoteVersionInfo is not valid.

GetBillingAddressAsync(int, CancellationToken)

Handles all database logic for the Quote. Used by the QuoteManager to keep track of the related quote and version and alternative objects.

This class is based on NestedPersist, and all Quote, version and alternative rows will be saved when the Save method is invoked.
Declaration
public Task<AddressRow> GetBillingAddressAsync(int quoteVersionId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int quoteVersionId
CancellationToken cancellationToken
Returns
Type Description
Task<AddressRow>

GetLikelyAlternativeRowAsync(QuoteVersionRow, CancellationToken)

Get the most likely quotealternative for the QuoteVersionRow

Declaration
public Task<QuoteAlternativeRow> GetLikelyAlternativeRowAsync(QuoteVersionRow quoteVersionRow, CancellationToken cancellationToken = default)
Parameters
Type Name Description
QuoteVersionRow quoteVersionRow
CancellationToken cancellationToken
Returns
Type Description
Task<QuoteAlternativeRow>

GetQuoteLineRowAsync(int, CancellationToken)

Return quoteline row

Declaration
public Task<QuoteLineRow> GetQuoteLineRowAsync(int quoteLineId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int quoteLineId

Primary key of quote line

CancellationToken cancellationToken
Returns
Type Description
Task<QuoteLineRow>

The quote line row. Throws exception if quote line row does not exist

GetQuoteLineRowsAsync(int, CancellationToken)

Get all quotelines for a specified quote alternative

Declaration
public Task<QuoteLineRows> GetQuoteLineRowsAsync(int quoteAlternativeId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int quoteAlternativeId
CancellationToken cancellationToken
Returns
Type Description
Task<QuoteLineRows>

Quotelines collection

Remarks

The quotelines will be cached for the lifetime of the QuoteData instance.

GetQuoteVersionsAsync(CancellationToken)

Get the Dictionary of QuoteVersionRows. A QuoteVersionRow is a key in the dictionary. The value part of the dictionary is a list of QuoteAlternativeRows.

Declaration
public Task<Dictionary<QuoteVersionRow, List<QuoteAlternativeRow>>> GetQuoteVersionsAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<Dictionary<QuoteVersionRow, List<QuoteAlternativeRow>>>

GetShippingAddressAsync(int, CancellationToken)

Handles all database logic for the Quote. Used by the QuoteManager to keep track of the related quote and version and alternative objects.

This class is based on NestedPersist, and all Quote, version and alternative rows will be saved when the Save method is invoked.
Declaration
public Task<AddressRow> GetShippingAddressAsync(int quoteVersionId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int quoteVersionId
CancellationToken cancellationToken
Returns
Type Description
Task<AddressRow>

GetVersionAttachmentRowsAsync(CancellationToken)

Handles all database logic for the Quote. Used by the QuoteManager to keep track of the related quote and version and alternative objects.

This class is based on NestedPersist, and all Quote, version and alternative rows will be saved when the Save method is invoked.
Declaration
public Task<Dictionary<QuoteVersionRow, QuoteVersionAttachmentRows>> GetVersionAttachmentRowsAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<Dictionary<QuoteVersionRow, QuoteVersionAttachmentRows>>

GetVersionRowAsync(int, CancellationToken)

Get a QuoteVersionRow from the QuoteData collection based on quoteVersionId

Declaration
public Task<QuoteVersionRow> GetVersionRowAsync(int quoteVersionId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int quoteVersionId
CancellationToken cancellationToken
Returns
Type Description
Task<QuoteVersionRow>

InitializeAsync(int, CancellationToken)

Handles all database logic for the Quote. Used by the QuoteManager to keep track of the related quote and version and alternative objects.

This class is based on NestedPersist, and all Quote, version and alternative rows will be saved when the Save method is invoked.
Declaration
public Task InitializeAsync(int saleId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int saleId
CancellationToken cancellationToken
Returns
Type Description
Task

PopulateQuoteAlternativeRow(QuoteAlternativeRow, QuoteAlternativeInfo)

Handles all database logic for the Quote. Used by the QuoteManager to keep track of the related quote and version and alternative objects.

This class is based on NestedPersist, and all Quote, version and alternative rows will be saved when the Save method is invoked.
Declaration
public QuoteAlternativeRow PopulateQuoteAlternativeRow(QuoteAlternativeRow quoteAlternativeRow, QuoteAlternativeInfo quoteAlternative)
Parameters
Type Name Description
QuoteAlternativeRow quoteAlternativeRow
QuoteAlternativeInfo quoteAlternative
Returns
Type Description
QuoteAlternativeRow

PopulateQuoteLineRow(QuoteLineRow, QuoteLineInfo)

Handles all database logic for the Quote. Used by the QuoteManager to keep track of the related quote and version and alternative objects.

This class is based on NestedPersist, and all Quote, version and alternative rows will be saved when the Save method is invoked.
Declaration
public QuoteLineRow PopulateQuoteLineRow(QuoteLineRow quoteLineRow, QuoteLineInfo quoteLine)
Parameters
Type Name Description
QuoteLineRow quoteLineRow
QuoteLineInfo quoteLine
Returns
Type Description
QuoteLineRow

PopulateQuoteRow(QuoteRow, QuoteInfo)

Handles all database logic for the Quote. Used by the QuoteManager to keep track of the related quote and version and alternative objects.

This class is based on NestedPersist, and all Quote, version and alternative rows will be saved when the Save method is invoked.
Declaration
public QuoteRow PopulateQuoteRow(QuoteRow quoteRow, QuoteInfo quoteInfo)
Parameters
Type Name Description
QuoteRow quoteRow
QuoteInfo quoteInfo
Returns
Type Description
QuoteRow

PopulateQuoteVersionRow(QuoteVersionRow, QuoteVersionInfo)

Populates a QuoteVersionRow from a QuoteVersionInfo.

Declaration
public QuoteVersionRow PopulateQuoteVersionRow(QuoteVersionRow quoteVersionRow, QuoteVersionInfo quoteVersionInfo)
Parameters
Type Name Description
QuoteVersionRow quoteVersionRow
QuoteVersionInfo quoteVersionInfo
Returns
Type Description
QuoteVersionRow

PopulateQuoteVersionRow(QuoteVersionRow, QuoteVersionInfo, bool)

Populates a QuoteVersionRow from a QuoteVersionInfo.

Declaration
public QuoteVersionRow PopulateQuoteVersionRow(QuoteVersionRow quoteVersionRow, QuoteVersionInfo quoteVersionInfo, bool ignorNumberField)
Parameters
Type Name Description
QuoteVersionRow quoteVersionRow
QuoteVersionInfo quoteVersionInfo
bool ignorNumberField

If true, the number field will not be copied from the QuoteVersionInfo object.

Returns
Type Description
QuoteVersionRow

RenameQuoteAlternativeAsync(int, string, CancellationToken)

Handles all database logic for the Quote. Used by the QuoteManager to keep track of the related quote and version and alternative objects.

This class is based on NestedPersist, and all Quote, version and alternative rows will be saved when the Save method is invoked.
Declaration
public Task RenameQuoteAlternativeAsync(int quoteAlternativeId, string newName, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int quoteAlternativeId
string newName
CancellationToken cancellationToken
Returns
Type Description
Task

SaveAlternativesAsync(QuoteVersionRow)

Save all alternatives for a version

Declaration
public Task SaveAlternativesAsync(QuoteVersionRow versionRow)
Parameters
Type Name Description
QuoteVersionRow versionRow
Returns
Type Description
Task

SaveAsync()

Save quote and all it's versions and alternatives

Declaration
public override Task SaveAsync()
Returns
Type Description
Task
Overrides
NestedPersist.SaveAsync()

SaveErpQuoteLineChangesAsync(int, QuoteAlternativeRecalculatedHelper, CancellationToken)

Persist changed, added and deleted quotelines

Declaration
public Task SaveErpQuoteLineChangesAsync(int quoteAlternativeId, QuoteAlternativeRecalculatedHelper i_quoteAlternativeRecalculatedHelper, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int quoteAlternativeId
QuoteAlternativeRecalculatedHelper i_quoteAlternativeRecalculatedHelper
CancellationToken cancellationToken
Returns
Type Description
Task

SaveQuoteLineAsync(QuoteLineInfo, string, CancellationToken)

Save a Quote line

Declaration
public Task<QuoteLineInfo> SaveQuoteLineAsync(QuoteLineInfo quoteLine, string strImage, CancellationToken cancellationToken = default)
Parameters
Type Name Description
QuoteLineInfo quoteLine
string strImage
CancellationToken cancellationToken
Returns
Type Description
Task<QuoteLineInfo>

SetOwnAddressAsync(QuoteVersionRow, AddressInfo, AddressType, CancellationToken)

Handles all database logic for the Quote. Used by the QuoteManager to keep track of the related quote and version and alternative objects.

This class is based on NestedPersist, and all Quote, version and alternative rows will be saved when the Save method is invoked.
Declaration
public Task SetOwnAddressAsync(QuoteVersionRow quoteVersionRow, AddressInfo addressInfo, AddressType addressType, CancellationToken cancellationToken = default)
Parameters
Type Name Description
QuoteVersionRow quoteVersionRow
AddressInfo addressInfo
AddressType addressType
CancellationToken cancellationToken
Returns
Type Description
Task

SetOwnAddressAsync(int, AddressRow, int, CancellationToken)

Handles all database logic for the Quote. Used by the QuoteManager to keep track of the related quote and version and alternative objects.

This class is based on NestedPersist, and all Quote, version and alternative rows will be saved when the Save method is invoked.
Declaration
public Task SetOwnAddressAsync(int quoteVersionId, AddressRow addressRow, int countryId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int quoteVersionId
AddressRow addressRow
int countryId
CancellationToken cancellationToken
Returns
Type Description
Task

SetQuoteLineImageAsync(QuoteLineInfo, BlobLinkType, string, string, CancellationToken)

Save an image for the QuoteLine to the Binary object tables.

Declaration
public Task SetQuoteLineImageAsync(QuoteLineInfo quoteLineInfo, BlobLinkType blobLinkType, string base64String, string conceptualType, CancellationToken cancellationToken)
Parameters
Type Name Description
QuoteLineInfo quoteLineInfo
BlobLinkType blobLinkType

Must be either QuoteLineImage or QuoteLineThumbnail

string base64String
string conceptualType
CancellationToken cancellationToken
Returns
Type Description
Task

Implements

INestedPersist
IQuoteData

Extension Methods

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