/**
|
* DemandDescribeDeatil.aspx.cs
|
*
|
* 功 能: 需求信息展示页
|
* 类 名: DemandDescribeDeatil
|
*
|
* Ver 变更日期 负责人 变更内容
|
* ───────────────────────────────────
|
* V0.01 2013-4-12 9:23 吴崎均 初版
|
* V0.02 2013-4-17 吴崎均 修改Page_load方法为Target=GetDataById参数分配LoadModelById()方法
|
* V0.03 2013-5-23 9:34 吴崎均 修改继承类为默认类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 DemandDescribeDeatil : MainPage
|
{
|
private EC_DemandDescribeBLL _eC_DemandDescribeBLL = null;//需求信息业务逻辑操作对象
|
|
/// <summary>
|
/// 初始化
|
/// </summary>
|
public DemandDescribeDeatil()
|
{
|
|
_eC_DemandDescribeBLL = new EC_DemandDescribeBLL();
|
}
|
|
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)
|
{
|
PAGEHandleException(ex);
|
Response.Clear();
|
Response.Write("-1");
|
}
|
Response.End();
|
}
|
|
/// <summary>
|
/// 根据编号加载数据
|
/// </summary>
|
/// <returns></returns>
|
private bool LoadModelById()
|
{
|
|
int? id = MyConvert.ConvertToInt32(Request["id"]);
|
if (!id.HasValue)
|
return false;
|
EC_DemandDescribe eC_DemandDescribe = _eC_DemandDescribeBLL.SelectModleById(id.Value);
|
string jmodel = null == eC_DemandDescribe ? "" : JsonHelper.GetJsonStringByObject(eC_DemandDescribe);
|
//若是外部获取数据则输出jsonString
|
if (!string.IsNullOrEmpty(Request["IsFrontRequest"]) && "frontTrue".Equals(Request["IsFrontRequest"]))
|
{
|
Response.Write(jmodel);
|
}
|
else
|
{
|
Request.RequestContext.RouteData.DataTokens.Add("jmodel", jmodel);
|
}
|
|
return true;
|
}
|
}
|
}
|