コード例 #1
0
 public StorePromotionController(ICardRepository cardRepo,
     IGroupCardService groupData,
     IStoreCouponsRepository storecouponRepo,
     IStorePromotionRepository storeproRepo)
 {
     _cardRepo = cardRepo;
     _groupData = groupData;
     _storecouponRepo = storecouponRepo;
     _storeproRepo = storeproRepo;
 }
コード例 #2
0
 public StorePromotionController(ICardRepository cardRepo,
                                 IGroupCardService groupData,
                                 IStoreCouponsRepository storecouponRepo,
                                 IStorePromotionRepository storeproRepo)
 {
     _cardRepo        = cardRepo;
     _groupData       = groupData;
     _storecouponRepo = storecouponRepo;
     _storeproRepo    = storeproRepo;
 }
コード例 #3
0
        public static string CreateCode(int proId)
        {
            var code = string.Concat(string.Format("9{0}{1}", proId.ToString().Length, proId)
                                     , DateTime.UtcNow.Ticks.ToString().Reverse().Take(8)
                                     .Aggregate(new StringBuilder(), (s, e) => s.Append(e), s => s.ToString())
                                     .PadRight(8, '0'));
            IStoreCouponsRepository couponData = ServiceLocator.Current.Resolve <IStoreCouponsRepository>();
            var existingCodes = couponData.Get(c => c.Code == code && c.StorePromotionId == proId).Count();

            if (existingCodes > 0)
            {
                code = string.Concat(code, (existingCodes + 1).ToString());
            }
            return(code);
        }
コード例 #4
0
 public StorePromotionCouponController(ICardRepository cardRepo,
     IGroupCardService groupData,
     IStoreCouponsRepository storecouponRepo,
     IStorePromotionRepository storeproRepo,
     IPointRepository pointRepo,
     IStorePromotionScopeRepository storeproscopeRepo,
     ICouponLogRepository couponlogRepo)
 {
     _cardRepo = cardRepo;
     _groupData = groupData;
     _storecouponRepo = storecouponRepo;
     _storeproRepo = storeproRepo;
     _pointRepo = pointRepo;
     _storeproscopeRepo = storeproscopeRepo;
     _couponlogRepo = couponlogRepo;
 }
コード例 #5
0
 public StorePromotionCouponController(ICardRepository cardRepo,
                                       IGroupCardService groupData,
                                       IStoreCouponsRepository storecouponRepo,
                                       IStorePromotionRepository storeproRepo,
                                       IPointRepository pointRepo,
                                       IStorePromotionScopeRepository storeproscopeRepo,
                                       ICouponLogRepository couponlogRepo)
 {
     _cardRepo          = cardRepo;
     _groupData         = groupData;
     _storecouponRepo   = storecouponRepo;
     _storeproRepo      = storeproRepo;
     _pointRepo         = pointRepo;
     _storeproscopeRepo = storeproscopeRepo;
     _couponlogRepo     = couponlogRepo;
 }
コード例 #6
0
 public StoreCouponReportController(IStoreCouponsRepository storecouponRepo)
 {
     _storecouponRepo = storecouponRepo;
 }
コード例 #7
0
 public StoreCouponReportController(IStoreCouponsRepository storecouponRepo)
 {
     _storecouponRepo = storecouponRepo;
 }