Class SaleGuideUtility
Inheritance
SaleGuideUtility
Assembly: SoDataBase.dll
Syntax
public static class SaleGuideUtility
Methods
BatchUpdateNextDueDateAsync(ProgressEstimateCallback, ProgressStepCallback, CancellationToken)
Updates the next due date for all sales.
Declaration
public static Task BatchUpdateNextDueDateAsync(ProgressEstimateCallback estimateCB, ProgressStepCallback stepCB, CancellationToken cancellationToken = default)
Parameters
Returns
CalculateNextDueDateAsync(int, CancellationToken)
Calculates the next due date for a given sale. This method takes into account the status of the sale.
Declaration
public static Task<NextDateInfo> CalculateNextDueDateAsync(int saleId, CancellationToken cancellationToken = default)
Parameters
Type |
Name |
Description |
int |
saleId |
Identifies the sale for which you want to calculate the next due date
|
CancellationToken |
cancellationToken |
|
Returns
GetNextDueAppointmentDateAsync(int, CancellationToken)
Gets the active date from the first appointment associated with the specified sale.
This method does not take into account the status of the sale.
Declaration
public static Task<NextDateInfo> GetNextDueAppointmentDateAsync(int saleId, CancellationToken cancellationToken = default)
Parameters
Type |
Name |
Description |
int |
saleId |
Identifies the sale for which you want to calculate the next due date
|
CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
Task<NextDateInfo> |
The DateTime representing the next due date for the supplied sale identifier.
Returns DateTime.MinValue if no appointment is found
|
GetNextSaleStageAsync(int, bool, CancellationToken)
Declaration
public static Task<int> GetNextSaleStageAsync(int saleId, bool includeCurrentStage, CancellationToken cancellationToken = default)
Parameters
Returns
LastActivityOfStageDoneAsync(int, int, int, CancellationToken)
Determine if (all instances of) the last activity of the given stage/sale are Complete, AND
that the given suggestedappointment is in fact the last one of the stage
Declaration
public static Task<bool> LastActivityOfStageDoneAsync(int saleId, int stageId, int suggestedAppointmentId, CancellationToken cancellationToken = default)
Parameters
Returns
OfferAutoNextStageOnApppointmentCompletedAsync(int, CancellationToken)
Determine if we should offer the user auto-advance to next stage, based on a just-completed appointment
Declaration
public static Task<bool> OfferAutoNextStageOnApppointmentCompletedAsync(int appointmentId, CancellationToken cancellationToken = default)
Parameters
Returns