Example #1
0
        /// <summary>
        /// Did the person hit maximum list limit.
        /// </summary>
        /// <param name="offeror">The offer person.</param>
        /// <param name="auctions">The auctions.</param>
        /// <returns>
        /// true if he did, false either
        /// </returns>
        public bool DidPersonHitMaxListLimit(PersonOfferor offeror, List <Auction> auctions)
        {
            PersonOfferorService personOfferorService = new PersonOfferorService(offeror);

            int counted = personOfferorService.CountAllActiveAuctions(auctions);

            int max_in_progress = maxInProgress;

            return(counted >= max_in_progress);
        }
Example #2
0
        /// <summary>
        /// Did the person hit maximum category list limit.
        /// </summary>
        /// <param name="offeror">The offer person.</param>
        /// <param name="category">The category.</param>
        /// <param name="auctions">The auctions.</param>
        /// <returns>
        /// true if he did, false either
        /// </returns>
        public bool DidPersonHitMaxCategoryListLimit(PersonOfferor offeror, Category category, List <Auction> auctions)
        {
            PersonOfferorService personOfferorService = new PersonOfferorService(offeror);

            int counted = personOfferorService.CountActiveAuctionsInCategory(category, auctions);

            int max_in_category = maxInProgressByCategory;

            return(counted >= max_in_category);
        }