Beispiel #1
0
 public UseCoupons(UserCouponss item)
 {
     couponsType = CouponsType.GetName(item.couponsType);
     if (item.couponsType == CouponsType.DiscountedVolume)
     {
         describe = "折扣券";
         amount   = string.Format("<span>{0}</span>折<br>", Convert.ToInt32(item.discount * 10).ToString());
     }
     else if (item.couponsType == CouponsType.FullVolumeReduction)
     {
         describe = string.Format("满{0}减{1}", item.fullAmount, item.reduceAmount);
         amount   = string.Format("¥<span>{0}</span><br>", Convert.ToInt32(item.reduceAmount).ToString());
     }
     else if (item.couponsType == CouponsType.OffsetRoll)
     {
         describe = "抵扣券";
         amount   = string.Format("¥<span>{0}</span><br>", Convert.ToInt32(item.deductibleAmount).ToString());
     }
     else
     {
         describe = "";
     }
     if (item.validity.HasValue)
     {
         validity = item.validity.Value.ToString("yyyy-MM-dd");
     }
     else
     {
         validity = "永久有效";
     }
     useScope      = string.IsNullOrWhiteSpace(item.useScope) ? "所有门店" : item.shopName;
     UserCouponsId = item.id;
 }
Beispiel #2
0
 public CouponsModel(UserCouponss item) : base(item)
 {
 }