/**
|
* SeckillBusinessDeatil.aspx.cs
|
*
|
* 功 能: 特价业务展示页
|
* 类 名: SeckillBusinessDeatil
|
*
|
* Ver 变更日期 负责人 变更内容
|
* ───────────────────────────────────
|
* V0.01 2013-4-9 10:43 吴崎均 初版
|
* V0.02 2013-4-12 17:45 吴崎均 修改Page_load方法为Target=GetDataById参数分配LoadModelById()方法
|
* V0.03 2013-5-23 9:33 吴崎均 修改继承类为默认类Page使显示信息不受登录控制
|
*
|
*
|
*
|
*
|
*
|
*
|
*/
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Web;
|
using System.Web.UI;
|
using System.Web.UI.WebControls;
|
using CY.BLL.EC;
|
using CY.Infrastructure.Common;
|
using CY.Model;
|
|
namespace CY.WebForm.Pages.business
|
{
|
|
/// <summary>
|
/// 特价业务展示页
|
/// </summary>
|
public partial class SeckillBusinessDeatil : FrontBasePage
|
{
|
|
private EC_SeckillBusinessBLL _eC_SeckillBusinessBLL = null;//特价秒杀业务逻辑操作对象
|
/// <summary>
|
/// 初始化
|
/// </summary>
|
public SeckillBusinessDeatil()
|
{
|
|
_eC_SeckillBusinessBLL = new EC_SeckillBusinessBLL();
|
}
|
|
protected void Page_Load(object sender, EventArgs e)
|
{
|
try
|
{
|
switch (Request["Target"])
|
{
|
case "SaveInfo":
|
|
break;
|
case "GetDataById":
|
LoadModelById();
|
break;
|
default://一般情况不处理
|
|
LoadModelById();
|
if (IsPostBack || IsCallback)
|
return;
|
else
|
{
|
}
|
|
return;
|
}
|
}
|
catch (Exception ex)
|
{
|
Response.Clear();
|
Response.Write("-1");
|
|
}
|
Response.End();
|
}
|
/// <summary>
|
/// 根据编号加载数据
|
/// </summary>
|
/// <returns></returns>
|
private bool LoadModelById()
|
{
|
// DealMvc.Common.Net.DealString.ChangeSQL(Request["ParamName"])
|
int? id = MyConvert.ConvertToInt32(Request["id"]);
|
if (!id.HasValue)
|
return false;
|
EC_SeckillBusiness eC_SeckillBusiness = _eC_SeckillBusinessBLL.SelectModleById(id.Value);
|
|
if (CurrentUser != null)
|
{
|
if (CurrentUser.MemberId == eC_SeckillBusiness.MemberId)
|
{
|
eC_SeckillBusiness.IsMyOrder = 1;
|
}
|
else
|
{
|
eC_SeckillBusiness.IsMyOrder = 0;
|
}
|
}
|
|
string jmodel = null == eC_SeckillBusiness ? "" : JsonHelper.GetJsonStringByObject(eC_SeckillBusiness);
|
//若是外部获取数据则输出jsonString
|
if (!string.IsNullOrEmpty(Request["IsFrontRequest"]) && "frontTrue".Equals(Request["IsFrontRequest"]))
|
{
|
Response.Write(jmodel);
|
}
|
else
|
{
|
Request.RequestContext.RouteData.DataTokens.Add("jmodel", jmodel);
|
}
|
return true;
|
}
|
|
}
|
}
|