Exemplo n.º 1
0
        private void btnAddCoupon_Click(object sender, EventArgs e)
        {
            string text = this.txtCoupon.Text;

            if (!TradeHelper.ExitCouponClaimCode(text))
            {
                this.ShowMessage("你输入的优惠券号码无效,请重试", false);
            }
            else if (TradeHelper.AddClaimCodeToUser(text, HiContext.Current.User.UserId) > 0)
            {
                this.BindCoupons();
                this.txtCoupon.Text = string.Empty;
                this.ShowMessage("成功的添加了优惠券到你的账户", true);
            }
        }