username@email.com
2025-05-21 a980cd04341d71216e0f59bd4b7327fe9fc50032
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CY.Model;
using CY.Infrastructure.Common;
using CY.BLL.EC;
 
namespace CY.WebForm.Pages.front
{
    //吴辉
    //礼品详情
    public partial class PrizesDetail : FrontBasePage
    {
        EC_PrizeInfoBLL bll_EC_PrizeInfoBLL = null;
        public string PrizeImg = "";
        public int? keyid = 0;
 
        //初始化
        public PrizesDetail()
        {
            bll_EC_PrizeInfoBLL = new EC_PrizeInfoBLL();
        }
 
        //页面加载
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                InitData();
            }
        }
 
        //数据绑定
        public void InitData()
        {
            EC_PrizeInfo m_EC_PrizeInfo = bll_EC_PrizeInfoBLL.getOnePrizeInfo(Request["keyid"].ToInt32());
            if (m_EC_PrizeInfo == null || m_EC_PrizeInfo.IsUsed == false || m_EC_PrizeInfo.AllCount <= m_EC_PrizeInfo.ExchangedCount)
            {
                JavaScript.MessageBox("此礼品不存在或已下架", this);
                m_EC_PrizeInfo = new EC_PrizeInfo();
            }
            else
            {
                keyid = m_EC_PrizeInfo.Keyid;
                int? nowCount = m_EC_PrizeInfo.AllCount - m_EC_PrizeInfo.ExchangedCount;
 
                this.spanTitleUrl.InnerText = m_EC_PrizeInfo.PrizeName;
                this.spanPrizeTitle.InnerText = m_EC_PrizeInfo.PrizeName;
                this.spanNum.InnerText = m_EC_PrizeInfo.Commoditycode;
                this.spanAddress.InnerText = m_EC_PrizeInfo.PrizeReciveAddress.Address;
                this.spanNeedScore.InnerText = m_EC_PrizeInfo.NeedIntegral.Value.ToString("0");
                this.spanMyScore.InnerText = CurrentUser ==null ?"0": CurrentPayAccount.Score.Value.ToString("0");
                this.spanNowQuality.InnerText = ((nowCount == null || nowCount<0)?0:nowCount).Value.ToString();
                this.divPrizeContent.InnerText = " 礼品介绍:"+m_EC_PrizeInfo.Remark;
                PrizeImg = m_EC_PrizeInfo.FileId;
            }
        }
    }
}