username@email.com
2025-05-14 99ddfbcecf0fa2881eb3a91028257eef87dab6de
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
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.BLL;
using CY.Infrastructure.Common;
using CY.BLL.Sys;
using CY.BLL.EC;
 
namespace CY.WebForm.Pages.webmanage
{
    //吴辉
    //兑换记录管理
    public partial class CMSExChangePrEdit : BasePage
    {
        EC_ExchangeRecordBLL bll_EC_ExchangeRecordBLL = null;
        Sys_DictionaryBLL bll_Sys_DictionaryBLL = null;
        EC_PrizeInfoBLL bll_EC_PrizeInfoBLL = null;
 
        //初始化
        public CMSExChangePrEdit()
        {
            bll_EC_ExchangeRecordBLL = new EC_ExchangeRecordBLL();
            bll_Sys_DictionaryBLL = new Sys_DictionaryBLL();
            bll_EC_PrizeInfoBLL = new EC_PrizeInfoBLL();
        }
 
        //页面加载
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                InitData();
            }
        }
 
        //数据加载
        public void InitData()
        {
            this.selStatus.DataSource = bll_Sys_DictionaryBLL.GetDataByType("积分奖品兑换状态");
            this.selStatus.DataTextField = "Name";
            this.selStatus.DataValueField = "MeanValue";
            this.DataBind();
 
            EC_ExchangeRecord m_EC_ExchangeRecord = bll_EC_ExchangeRecordBLL.GetModelByKeyid(Request["keyid"].ToInt32());
 
            EC_PrizeInfo m_EC_PrizeInfo = bll_EC_PrizeInfoBLL.getOnePrizeInfo(m_EC_ExchangeRecord.PrizeId);
 
            this.spanAddress.InnerText = m_EC_ExchangeRecord.AssociateAddress;
            this.spanCount.InnerText = m_EC_ExchangeRecord.ExchangeCount.ToString2();
            this.spanCreatTime.InnerText = m_EC_ExchangeRecord.ExchangeTime.Value.ToString();
            this.spanOpreator.InnerText = m_EC_ExchangeRecord.Operator;
            this.spanPrizeName.InnerText = m_EC_PrizeInfo.PrizeName;
            this.spanReciveType.InnerText = m_EC_ExchangeRecord.ShippingMethod;
            this.spanScore.InnerText = m_EC_ExchangeRecord.AllUseIntegral.ToString2();
            this.spanUpTime.InnerText = m_EC_ExchangeRecord.LastUpdateTime.Value.ToString2();
            this.txtRemarks.InnerText = m_EC_ExchangeRecord.Remark;
            this.selStatus.Value = m_EC_ExchangeRecord.ExchangeStatus;
 
        }
 
        //提交事件
        protected void btn_submit_form(object sender, EventArgs e)
        {
            try
            {
                EC_ExchangeRecord m_EC_ExchangeRecord = bll_EC_ExchangeRecordBLL.GetModelByKeyid(Request["keyid"].ToInt32());
                m_EC_ExchangeRecord.ExchangeStatus = this.selStatus.Value;
                m_EC_ExchangeRecord.Operator = CurrentUser.ShortName;
                m_EC_ExchangeRecord.LastUpdateTime = DateTime.Now;
                m_EC_ExchangeRecord.Remark = this.txtRemarks.Value;
                if (bll_EC_ExchangeRecordBLL.UpdateModel(m_EC_ExchangeRecord))
                {
                    JavaScript.MessageBox("操作成功", this);
                }
                else
                {
                    JavaScript.MessageBox("操作失败", this);
                }
            }
            catch (Exception ex)
            {
                PAGEHandleException(ex);
                JavaScript.MessageBox("更新失败", this);
            }
 
        }
    }
}