Пример #1
0
 public static bool Delete(string couponId)
 {
     if (DataValidator.IsValidId(couponId) && dal.Delete(couponId))
     {
         CouponItem.Delete(couponId);
         return(true);
     }
     return(false);
 }
Пример #2
0
        private static void CreateCoupon(CouponInfo couponInfo, int userId)
        {
            string         randStringByPattern = RandomManage.GetRandStringByPattern(couponInfo.CouponNumPattern);
            CouponItemInfo couponItemInfo      = new CouponItemInfo();

            couponItemInfo.CouponId  = couponInfo.CouponId;
            couponItemInfo.CouponNum = randStringByPattern;
            couponItemInfo.UserId    = userId;
            couponItemInfo.OrderId   = 0;
            CouponItem.Add(couponItemInfo);
        }