Exemple #1
0
        //IsUserCanParticipateInBidding
        public bool IsUserCanParticipateInBidding(long auction_id, long user_id)
        {
            DataCacheObject dco = new DataCacheObject(DataCacheType.ACTIVITY, DataCacheRegions.WATCHLISTS, "ISUSERCANPARTICIPATEINBIDDING",
                                                      new object[] { auction_id, user_id }, CachingExpirationTime.Days_01);
            bool?result = CacheRepository.Get(dco) as bool?;

            if (result.HasValue)
            {
                return(true);
            }
            result = dataContext.spBid_IsUserHasRightsToBid(user_id, auction_id).ToList().Any();
            if (result.Value)
            {
                dco.Data = true;
                CacheRepository.Add(dco);
            }
            return(result.Value);
        }