Esempio n. 1
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            int      num;
            GiftInfo entity = new GiftInfo();

            if (!int.TryParse(this.txtNeedPoint.Text.Trim(), out num))
            {
                this.ShowMsg("兑换所需积分不能为空,大小0-10000之间", false);
            }
            else
            {
                entity.GiftId           = this.Id;
                entity.NeedPoint        = num;
                entity.Name             = Globals.HtmlEncode(this.txtGiftName.Text.Trim());
                entity.Title            = Globals.HtmlEncode(this.txtGiftTitle.Text.Trim());
                entity.Meta_Description = Globals.HtmlEncode(this.txtTitleDescription.Text.Trim());
                entity.Meta_Keywords    = Globals.HtmlEncode(this.txtTitleKeywords.Text.Trim());
                entity.IsPromotion      = this.ckpromotion.Checked;
                Globals.EntityCoding(entity, false);
                if (SubsiteGiftHelper.UpdateMyGifts(entity))
                {
                    this.ShowMsg("成功修改了一件礼品的基本信息", true);
                }
                else
                {
                    this.ShowMsg("修改件礼品的基本信息失败", true);
                }
            }
        }
Esempio n. 2
0
        private void btnUpdate_Click(object sender, System.EventArgs e)
        {
            GiftInfo giftInfo = new GiftInfo();
            int      needPoint;

            if (!int.TryParse(this.txtNeedPoint.Text.Trim(), out needPoint))
            {
                this.ShowMsg("兑换所需积分不能为空,大小0-10000之间", false);
                return;
            }
            giftInfo.GiftId           = this.Id;
            giftInfo.NeedPoint        = needPoint;
            giftInfo.Name             = Globals.HtmlEncode(this.txtGiftName.Text.Trim());
            giftInfo.Title            = Globals.HtmlEncode(this.txtGiftTitle.Text.Trim());
            giftInfo.Meta_Description = Globals.HtmlEncode(this.txtTitleDescription.Text.Trim());
            giftInfo.Meta_Keywords    = Globals.HtmlEncode(this.txtTitleKeywords.Text.Trim());
            giftInfo.IsPromotion      = this.ckpromotion.Checked;
            Globals.EntityCoding(giftInfo, false);
            if (SubsiteGiftHelper.UpdateMyGifts(giftInfo))
            {
                this.ShowMsg("成功修改了一件礼品的基本信息", true);
                return;
            }
            this.ShowMsg("修改件礼品的基本信息失败", true);
        }
Esempio n. 3
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            int      num;
            GiftInfo entity = new GiftInfo();

            if (!int.TryParse(txtNeedPoint.Text.Trim(), out num))
            {
                ShowMsg("兑换所需积分不能为空,大小0-10000之间", false);
            }
            else
            {
                entity.GiftId           = Id;
                entity.NeedPoint        = num;
                entity.Name             = txtGiftName.Text.Trim();
                entity.Title            = txtGiftTitle.Text.Trim();
                entity.Meta_Description = txtTitleDescription.Text.Trim();
                entity.Meta_Keywords    = txtTitleKeywords.Text.Trim();
                Globals.EntityCoding(entity, false);
                if (SubsiteGiftHelper.UpdateMyGifts(entity))
                {
                    ShowMsg("成功修改了一件礼品的基本信息", true);
                }
                else
                {
                    ShowMsg("修改件礼品的基本信息失败", true);
                }
            }
        }