Esempio n. 1
0
        /// <summary>
        /// <para>Refresh the contracts of a batchSize of sales agents with a LastContractRefresh time in the past.</para>
        /// </summary>
        /// <param name="force">If true, indicates that all sales agents should be refreshed, ignoring their NextRefresh values.</param>
        /// <param name="batchSize">The number of sales agents to refresh at a time.</param>
        internal void RefreshContracts(bool force, int batchSize)
        {
            IEnumerable <SalesAgent> salesAgents = new List <SalesAgent>();

            salesAgents = doctrineShipsRepository.GetSalesAgentsForRefresh(force, batchSize);

            if (salesAgents.Any() == true)
            {
                // Reset the ship fit list.
                ShipFitList = null;

                this.RefreshContracts(salesAgents);
            }
        }