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);
|
}
|
|
}
|
}
|
}
|