using System;
using System.Collections.Generic;
using SlowX.DAL.Helpers;
using SlowX.Functions.Functions;
using SlowX.Common;
using SlowX.NewsItem.Items;
using System.Text;
using SlowX.Core.ICoreClasses;
using System.Data;
using System.Reflection;
using SlowX.Core.Model;
using SlowX.WebSite.Classes;
// 新闻列表和新闻栏目 //
public partial class NewsList
:
WebPageBase
{
/// <summary>
///
/// </summary>
protected string preUrl = "";
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btn_Search_Click(object sender, EventArgs e)
{
}
/// <summary>
///
/// </summary>
protected NewsSortBasicItem newsSortItem
=
null;
/// <summary>
///
/// </summary>
public string filesInfo = "";
/// <summary>
/// 当前新闻栏目ID
/// </summary>
public long curNewSortId = 0;
/// <summary>
/// 显示图片
/// </summary>
public string newsSortHeadImg = "";
/// <summary>
/// 内容区导航
/// </summary>
public string newsSortNav = "";
/// <summary>
///
/// </summary>
protected string CurPageTitle = "";
/// <summary>
///
/// </summary>
/// <param name="newsId"></param>
/// <param name="xdbHelper"></param>
protected SlowX.NewsLib.Model.UTB_SLOWX_NEWS
DataBindNews
(
long newsId,
DBHelper xdbHelper
)
{
SlowX.NewsLib.Enums.ViewModel.EmViewModel
EmViewModelValue
=
SlowX.NewsLib.Enums.ViewModel.GetDefaultEmByObj
(
Request.QueryString[HttpContextParamName.EmViewModel],
SlowX.NewsLib.Enums.ViewModel.EmViewModel.正常
);
bool bIsCreate = true;
if (xdbHelper == null)
{
xdbHelper = SlowX.DAL.Helpers.DBHelper.CreateDBHelper();
}
else
{
// 没有打开链接 //
bIsCreate = xdbHelper.IsNotOpen();
}
try
{
if (bIsCreate)
xdbHelper.OpenDBHelper();
SlowX.NewsLib.Business.UTB_SLOWX_NEWS bll
= SlowX.NewsLib.Business.UTB_SLOWX_NEWS.instance;
SlowX.NewsLib.Entity.UTB_SLOWX_NEWS entity
= new SlowX.NewsLib.Entity.UTB_SLOWX_NEWS();
IQueryDriver iq = entity;
UserSessionInfo
uInfo
=
WebSiteBLL.instance.GetUserSessionInfo(xdbHelper);
switch (EmViewModelValue)
{
case SlowX.NewsLib.Enums.ViewModel.EmViewModel.管理员预览:
if (!WebSiteBLL.instance.IsAdminByUserSessionInfo(uInfo, xdbHelper))
{
iq.InitIQueryItem
(
SlowX.Core.Enums.WhereModel.EmWhereModel.显示
);
}
break;
case SlowX.NewsLib.Enums.ViewModel.EmViewModel.录入预览:
if (uInfo == null)
{
iq.InitIQueryItem
(
SlowX.Core.Enums.WhereModel.EmWhereModel.显示
);
}
else
{
iq.AddIQueryItemWithEntityFieldInfo
(
entity._InputUserId,
uInfo.ID
);
}
break;
case SlowX.NewsLib.Enums.ViewModel.EmViewModel.正常:
iq.InitIQueryItem
(
SlowX.Core.Enums.WhereModel.EmWhereModel.显示
);
break;
default:
throw new Exception
(
"方法:"
+ MethodBase.GetCurrentMethod().ReflectedType.FullName
+ " "
+ MethodBase.GetCurrentMethod().ToString()
+ " 发生异常:枚举"
+ EmViewModelValue.GetType().FullName
+ "."
+
EmViewModelValue.ToString()
+ "尚未实现。"
);
}
iq.AddIQueryItemWithEntityFieldInfo
(
entity._ID,
newsId
);
SlowX.NewsLib.Model.UTB_SLOWX_NEWS model
= bll.GetBaseModel(entity, xdbHelper) as SlowX.NewsLib.Model.UTB_SLOWX_NEWS;
if (model == null)
{
if (bIsCreate)
xdbHelper.EndDBHelper();
return null;
}
SetNewsDetail
(
SlowX.NewsLib.Enums.ShowTitleInfo.GetEmByInt(model.EmShowTitleInfoValue),
model,
xdbHelper
);
//NewsSortBasicItem newsSortBasicItemValue
// = FindNewsSortBasicItem(theList, model.SortId);
//string strMetaKeywords = model.MetaKeywords;
//if (strMetaKeywords == null || strMetaKeywords.Length == 0)
//{
// strMetaKeywords = model.TheName;
//}
//if (newsSortBasicItemValue != null)
//{
// string sortKeyWords = newsSortBasicItemValue.GetNewsSortKeywords();
// if (sortKeyWords != null && sortKeyWords.Length > 0)
// strMetaKeywords += sortKeyWords;
//}
//MetaKeywords
// =
// StringSlowXFunctions.ConvertStringQuot(strMetaKeywords);
//string strMetaDescription = model.MetaDescription;
//if (strMetaDescription == null || strMetaDescription.Length == 0)
//{
// strMetaDescription = model.TheName;
//}
//MetaDescription = StringSlowXFunctions.ConvertStringQuot(strMetaDescription);
//if (newsSortBasicItemValue != null)
//{
// WebPageTitle
// =
// StringSlowXFunctions.CutString(model.TheName, 100) + newsSortBasicItemValue.GetNewsSortPageTitle() + WB.WebTitle;
//}
//else
//{
// WebPageTitle
// =
// StringSlowXFunctions.CutString(model.TheName, 100) + "_" + WB.WebTitle;
//}
//lt_TheName.Text = model.TheName;
//lt_InsertTime.Text = model.InsertTime.ToString("yyyy-MM-dd HH:mm:ss");
//lt_TheContent.Text = model.TheContent;
//if (model.TheKeywords != null && model.TheKeywords.Length > 0)
//{
// lt_TheKeywords.Text = "关键词:" + model.TheKeywords;
//}
if (bIsCreate)
xdbHelper.EndDBHelper();
return model;
}
catch (Exception err)
{
if (bIsCreate)
xdbHelper.TranDBHelper();
throw err;
}
finally
{
if (bIsCreate)
xdbHelper.FinallyDBHelper();
}
}
/// <summary>
///
/// </summary>
/// <param name="curId"></param>
/// <param name="newsSortItem"></param>
/// <param name="xdbHelper"></param>
protected void DataBindNewsPreNext
(
long curId,
NewsSortBasicItem newsSortItem,
DBHelper xdbHelper
)
{
bool bIsCreate = true;
if (xdbHelper == null)
{
xdbHelper = SlowX.DAL.Helpers.DBHelper.CreateDBHelper();
}
else
{
// 没有打开链接 //
bIsCreate = xdbHelper.IsNotOpen();
}
try
{
if (bIsCreate)
xdbHelper.OpenDBHelper();
SlowX.NewsLib.Business.UTB_SLOWX_NEWS
bll = SlowX.NewsLib.Business.UTB_SLOWX_NEWS.instance;
long sortId = newsSortItem.ID;
DataRow dr = null;
NewsDetailListBasicItem item = null;
SlowX.NewsLib.DataColumnNameInfo.UTB_SLOWX_NEWS
nameInfo = SlowX.NewsLib.DataColumnNameInfo.UTB_SLOWX_NEWS.instance;
dr = bll.GetDataRowPre
(
curId,
nameInfo.SortId,
sortId,
SlowX.Core.Enums.WhereModel.EmWhereModel.显示,
xdbHelper
);
NewsHrefValueParams nhvp = new NewsHrefValueParams();
nhvp.CssClass = "NewsHrefSTYLE3";
if (dr != null)
{
item = new NewsDetailListBasicItem
(
dr,
newsSortItem,
nhvp
);
lt_PreNews.Text = "<p>上一条:" + item.HrefValue + "</p>";
}
else
{
lt_PreNews.Text = "";
}
dr = bll.GetDataRowNext
(
curId,
nameInfo.SortId,
sortId,
SlowX.Core.Enums.WhereModel.EmWhereModel.显示,
xdbHelper
);
if (dr != null)
{
item = new NewsDetailListBasicItem(dr, newsSortItem,
nhvp);
lt_NextNews.Text =
"<p>下一条:" + item.HrefValue + "</p>";
}
else
{
lt_NextNews.Text = "";
}
if (lt_NextNews.Text.Length == 0
&& lt_PreNews.Text.Length == 0)
{
pl_PreNext.Visible = false;
}
else
{
pl_PreNext.Visible = true;
}
if (bIsCreate)
xdbHelper.EndDBHelper();
}
catch (Exception err)
{
if (bIsCreate)
xdbHelper.TranDBHelper();
throw err;
}
finally
{
if (bIsCreate)
xdbHelper.FinallyDBHelper();
}
}
/// <summary>
///
/// </summary>
/// <param name="curId"></param>
/// <param name="xdbHelper"></param>
protected int AddNewsHits(long curId, DBHelper xdbHelper)
{
SlowX.NewsLib.DataColumnNameInfo.UTB_SLOWX_NEWS
nameInfo = SlowX.NewsLib.DataColumnNameInfo.UTB_SLOWX_NEWS.instance;
return SlowX.NewsLib.Business.UTB_SLOWX_NEWS.instance.AddHits
(
curId,
nameInfo.Hits,
xdbHelper
);
}
/// <summary>
///
/// </summary>
/// <param name="theValue"></param>
/// <returns></returns>
protected string ToGenderStr(int theValue)
{
return ZJL.LabLib.Enums.Gender.GetDefaultEmByInt(theValue).ToString();
}
protected string ToJxLbStr(long theValue,DBHelper xdbHelper)
{
ZJL.LabLib.Business.LAB.UTB_ZJL_LAB_JXLB
bll
=
ZJL.LabLib.Business.LAB.UTB_ZJL_LAB_JXLB.instance;
object obj = bll.CacheGetValueByStrId(theValue.ToString(), "TheName", false, xdbHelper);
if (obj == null)
return "";
return obj.ToString();
}
protected string ToJxDjStr(long theValue, DBHelper xdbHelper)
{
ZJL.LabLib.Business.LAB.UTB_ZJL_LAB_JXDJ
bll
=
ZJL.LabLib.Business.LAB.UTB_ZJL_LAB_JXDJ.instance;
object obj = bll.CacheGetValueByStrId(theValue.ToString(), "TheName", false, xdbHelper);
if (obj == null)
return "";
return obj.ToString();
}
/// <summary>
///
/// </summary>
/// <param name="dt"></param>
/// <returns></returns>
protected string ToBirthDay(DateTime? dt)
{
if (dt == null)
return "";
return dt.Value.ToString("yyyy.MM");
}
/// <summary>
/// 获得人员名单
/// </summary>
/// <param name="xdbHelper"></param>
/// <returns></returns>
protected string ToRYMD(DBHelper xdbHelper)
{
StringBuilder theResult = new StringBuilder();
bool bIsCreate = true;
if (xdbHelper == null)
{
xdbHelper = SlowX.DAL.Helpers.DBHelper.CreateDBHelper();
}
else
{
// 没有打开链接 //
bIsCreate = xdbHelper.IsNotOpen();
}
try
{
if (bIsCreate)
xdbHelper.OpenDBHelper();
ZJL.LabLib.Business.LAB.UTB_ZJL_LAB_RYMD
bll
=
ZJL.LabLib.Business.LAB.UTB_ZJL_LAB_RYMD.instance;
ZJL.LabLib.Entity.LAB.UTB_ZJL_LAB_RYMD
entity
=
new ZJL.LabLib.Entity.LAB.UTB_ZJL_LAB_RYMD();
IOrderByDriver iorder = entity;
iorder.AddOrderAsc(entity._ShowSeq);
iorder.AddOrderAsc(entity._TheName);
iorder.AddOrderAsc(entity._ID);
List<ZJL.LabLib.Model.LAB.UTB_ZJL_LAB_RYMD>
theList = bll.ListCurModel(entity, xdbHelper);
theResult.AppendLine("<table class=\"DL\">");
theResult.AppendLine("<tr class=\"DL\">");
theResult.Append("<th class=\"DL\">序号</th>");
theResult.Append("<th class=\"DL\">姓名</th>");
theResult.Append("<th class=\"DL\">性别</th>");
theResult.Append("<th class=\"DL\">出生日期</th>");
theResult.Append("<th class=\"DL\">职务</th>");
theResult.Append("<th class=\"DL\">职称</th>");
theResult.Append("<th class=\"DL\">所学专业</th>");
theResult.Append("<th class=\"DL\">工作性质</th>");
theResult.AppendLine("</tr>");
bool bClassFlag = true;
string className = null;
int idx = 0;
foreach (ZJL.LabLib.Model.LAB.UTB_ZJL_LAB_RYMD
model in theList)
{
bClassFlag = !bClassFlag;
if (bClassFlag)
className = "DL";
else
className = "DLA";
++idx;
theResult.AppendLine("<tr class=\"DL\">");
theResult.Append("<td class=\"" + className + "\">" +idx.ToString() + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.TheName + "</td>");
theResult.Append("<td class=\"" + className + "\">" + ToGenderStr(model.EmGenderV ) + "</td>");
theResult.Append("<td class=\"" + className + "\">" + ToBirthDay(model.Birth_Day) + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.ZW + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.ZC + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.SXZY + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.GZXZ + "</td>");
theResult.AppendLine("</tr>");
}
theResult.AppendLine("</table>");
if (bIsCreate)
xdbHelper.EndDBHelper();
}
catch (Exception err)
{
if (bIsCreate)
xdbHelper.TranDBHelper();
throw err;
}
finally
{
if (bIsCreate)
xdbHelper.FinallyDBHelper();
}
return theResult.ToString();
}
/// <summary>
/// 获得奖项
/// </summary>
/// <param name="xdbHelper"></param>
/// <returns></returns>
protected string ToJX(DBHelper xdbHelper)
{
string kw = Request.QueryString["kw"];
if (kw != null)
{
kw = kw.Trim();
kw = Server.UrlDecode(kw);
}
StringBuilder theResult = new StringBuilder();
bool bIsCreate = true;
if (xdbHelper == null)
{
xdbHelper = SlowX.DAL.Helpers.DBHelper.CreateDBHelper();
}
else
{
// 没有打开链接 //
bIsCreate = xdbHelper.IsNotOpen();
}
try
{
if (bIsCreate)
xdbHelper.OpenDBHelper();
ZJL.LabLib.Business.LAB.UTB_ZJL_LAB_JX
bll
=
ZJL.LabLib.Business.LAB.UTB_ZJL_LAB_JX.instance;
ZJL.LabLib.Entity.LAB.UTB_ZJL_LAB_JX
entity
=
new ZJL.LabLib.Entity.LAB.UTB_ZJL_LAB_JX();
IOrderByDriver iorder = entity;
IQueryDriver iq = entity;
iorder.AddOrderDesc(entity._ItemSeq);
iorder.AddOrderDesc(entity._HJNF);
iorder.AddOrderAsc(entity._TheName);
iorder.AddOrderAsc(entity._ID);
iq.InitIQueryItemWithShow();
if (kw != null && kw.Length > 0)
{
iq.AddIQueryItemAdvSearch(entity._TheName._Name, kw.ToLower());
}
List<ZJL.LabLib.Model.LAB.UTB_ZJL_LAB_JX>
theList = bll.ListCurModel(entity, xdbHelper);
theResult.AppendLine("<table class=\"DL\">");
theResult.AppendLine("<tr class=\"DL\">");
theResult.Append("<th class=\"DL\" style=\"width:40px;\">序号</th>");
theResult.Append("<th class=\"DL\">成果名称</th>");
theResult.Append("<th class=\"DL\">获奖类别</th>");
theResult.Append("<th class=\"DL\" style=\"width:80px;\">等级</th>");
theResult.Append("<th class=\"DL\">完成人及排序</th>");
theResult.Append("<th class=\"DL\" style=\"width:85px;\">获奖年份</th>");
theResult.AppendLine("</tr>");
bool bClassFlag = true;
string className = null;
int idx = 0;
foreach (ZJL.LabLib.Model.LAB.UTB_ZJL_LAB_JX
model in theList)
{
bClassFlag = !bClassFlag;
if (bClassFlag)
className = "DL";
else
className = "DLA";
++idx;
theResult.AppendLine("<tr class=\"DL\">");
theResult.Append("<td class=\"" + className + "\">" + idx.ToString() + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.TheName + "</td>");
theResult.Append("<td class=\"" + className + "\">" + ToJxLbStr(model.JXLB_Id,xdbHelper) + "</td>");
theResult.Append("<td class=\"" + className + "\">" + ToJxDjStr(model.JXDJ_Id,xdbHelper) + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.WCRJPX + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.HJNF.ToString() + "</td>");
theResult.AppendLine("</tr>");
}
theResult.AppendLine("</table>");
if (bIsCreate)
xdbHelper.EndDBHelper();
}
catch (Exception err)
{
if (bIsCreate)
xdbHelper.TranDBHelper();
throw err;
}
finally
{
if (bIsCreate)
xdbHelper.FinallyDBHelper();
}
return theResult.ToString();
}
/// <summary>
/// 获得专著
/// </summary>
/// <param name="xdbHelper"></param>
/// <returns></returns>
protected string ToZZ(DBHelper xdbHelper)
{
string kw = Request.QueryString["kw"];
if (kw != null)
{
kw = kw.Trim();
kw = Server.UrlDecode(kw);
}
StringBuilder theResult = new StringBuilder();
bool bIsCreate = true;
if (xdbHelper == null)
{
xdbHelper = SlowX.DAL.Helpers.DBHelper.CreateDBHelper();
}
else
{
// 没有打开链接 //
bIsCreate = xdbHelper.IsNotOpen();
}
try
{
if (bIsCreate)
xdbHelper.OpenDBHelper();
ZJL.LabLib.Business.LAB.UTB_ZJL_LAB_ZZ
bll
=
ZJL.LabLib.Business.LAB.UTB_ZJL_LAB_ZZ.instance;
ZJL.LabLib.Entity.LAB.UTB_ZJL_LAB_ZZ
entity
=
new ZJL.LabLib.Entity.LAB.UTB_ZJL_LAB_ZZ();
IOrderByDriver iorder = entity;
IQueryDriver iq = entity;
iorder.AddOrderDesc(entity._ItemSeq);
iorder.AddOrderDesc(entity._CBRQ);
iorder.AddOrderAsc(entity._TheName);
iorder.AddOrderAsc(entity._ID);
iq.InitIQueryItemWithShow();
if (kw != null && kw.Length > 0)
{
iq.AddIQueryItemAdvSearch(entity._TheName._Name, kw.ToLower());
}
List<ZJL.LabLib.Model.LAB.UTB_ZJL_LAB_ZZ>
theList = bll.ListCurModel(entity, xdbHelper);
theResult.AppendLine("<table class=\"DL\">");
theResult.AppendLine("<tr class=\"DL\">");
theResult.Append("<th class=\"DL\" style=\"width:40px;\">序号</th>");
theResult.Append("<th class=\"DL\">著作名称</th>");
theResult.Append("<th class=\"DL\">作者</th>");
theResult.Append("<th class=\"DL\" style=\"min-width:80px;\">出版单位</th>");
theResult.Append("<th class=\"DL\" style=\"min-width:85px;\">出版日期</th>");
theResult.AppendLine("</tr>");
bool bClassFlag = true;
string className = null;
int idx = 0;
foreach (ZJL.LabLib.Model.LAB.UTB_ZJL_LAB_ZZ
model in theList)
{
bClassFlag = !bClassFlag;
if (bClassFlag)
className = "DL";
else
className = "DLA";
++idx;
theResult.AppendLine("<tr class=\"DL\">");
theResult.Append("<td class=\"" + className + "\">" + idx.ToString() + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.TheName + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.TheAuthor + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.CBDW + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.CBRQ + "</td>");
theResult.AppendLine("</tr>");
}
theResult.AppendLine("</table>");
if (bIsCreate)
xdbHelper.EndDBHelper();
}
catch (Exception err)
{
if (bIsCreate)
xdbHelper.TranDBHelper();
throw err;
}
finally
{
if (bIsCreate)
xdbHelper.FinallyDBHelper();
}
return theResult.ToString();
}
/// <summary>
/// 获得专利
/// </summary>
/// <param name="xdbHelper"></param>
/// <returns></returns>
protected string ToZL(DBHelper xdbHelper)
{
string kw = Request.QueryString["kw"];
if (kw != null)
{
kw = kw.Trim();
kw = Server.UrlDecode(kw);
}
StringBuilder theResult = new StringBuilder();
bool bIsCreate = true;
if (xdbHelper == null)
{
xdbHelper = SlowX.DAL.Helpers.DBHelper.CreateDBHelper();
}
else
{
// 没有打开链接 //
bIsCreate = xdbHelper.IsNotOpen();
}
try
{
if (bIsCreate)
xdbHelper.OpenDBHelper();
ZJL.LabLib.Business.LAB.UTB_ZJL_LAB_ZL
bll
=
ZJL.LabLib.Business.LAB.UTB_ZJL_LAB_ZL.instance;
ZJL.LabLib.Entity.LAB.UTB_ZJL_LAB_ZL
entity
=
new ZJL.LabLib.Entity.LAB.UTB_ZJL_LAB_ZL();
IOrderByDriver iorder = entity;
IQueryDriver iq = entity;
iorder.AddOrderDesc(entity._ItemSeq);
iorder.AddOrderDesc(entity._SQRQ);
iorder.AddOrderAsc(entity._TheName);
iorder.AddOrderAsc(entity._ID);
iq.InitIQueryItemWithShow();
if (kw != null && kw.Length > 0)
{
iq.AddIQueryItemAdvSearch(entity._TheName._Name, kw.ToLower());
}
List<ZJL.LabLib.Model.LAB.UTB_ZJL_LAB_ZL>
theList = bll.ListCurModel(entity, xdbHelper);
theResult.AppendLine("<table class=\"DL\">");
theResult.AppendLine("<tr class=\"DL\">");
theResult.Append("<th class=\"DL\" style=\"width:40px;\">序号</th>");
theResult.Append("<th class=\"DL\">专利名称</th>");
theResult.Append("<th class=\"DL\">专利号</th>");
theResult.Append("<th class=\"DL\" style=\"min-width:80px;\">授权日期</th>");
theResult.Append("<th class=\"DL\" style=\"min-width:85px;\">发明人</th>");
theResult.AppendLine("</tr>");
bool bClassFlag = true;
string className = null;
int idx = 0;
foreach (ZJL.LabLib.Model.LAB.UTB_ZJL_LAB_ZL
model in theList)
{
bClassFlag = !bClassFlag;
if (bClassFlag)
className = "DL";
else
className = "DLA";
++idx;
theResult.AppendLine("<tr class=\"DL\">");
theResult.Append("<td class=\"" + className + "\">" + idx.ToString() + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.TheName + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.TheCode + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.SQRQ + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.FMR + "</td>");
theResult.AppendLine("</tr>");
}
theResult.AppendLine("</table>");
if (bIsCreate)
xdbHelper.EndDBHelper();
}
catch (Exception err)
{
if (bIsCreate)
xdbHelper.TranDBHelper();
throw err;
}
finally
{
if (bIsCreate)
xdbHelper.FinallyDBHelper();
}
return theResult.ToString();
}
/// <summary>
/// 获得专著
/// </summary>
/// <param name="xdbHelper"></param>
/// <returns></returns>
protected string ToLW(DBHelper xdbHelper)
{
string kw = Request.QueryString["kw"];
if (kw != null)
{
kw = kw.Trim();
kw = Server.UrlDecode(kw);
}
StringBuilder theResult = new StringBuilder();
bool bIsCreate = true;
if (xdbHelper == null)
{
xdbHelper = SlowX.DAL.Helpers.DBHelper.CreateDBHelper();
}
else
{
// 没有打开链接 //
bIsCreate = xdbHelper.IsNotOpen();
}
try
{
if (bIsCreate)
xdbHelper.OpenDBHelper();
ZJL.LabLib.Business.LAB.UTB_ZJL_LAB_LW
bll
=
ZJL.LabLib.Business.LAB.UTB_ZJL_LAB_LW.instance;
ZJL.LabLib.Entity.LAB.UTB_ZJL_LAB_LW
entity
=
new ZJL.LabLib.Entity.LAB.UTB_ZJL_LAB_LW();
IOrderByDriver iorder = entity;
IQueryDriver iq = entity;
iorder.AddOrderDesc(entity._ItemSeq);
iorder.AddOrderAsc(entity._TheName);
iorder.AddOrderAsc(entity._ID);
iq.InitIQueryItemWithShow();
if (kw != null && kw.Length > 0)
{
iq.AddIQueryItemAdvSearch(entity._TheName._Name, kw.ToLower());
}
List<ZJL.LabLib.Model.LAB.UTB_ZJL_LAB_LW>
theList = bll.ListCurModel(entity, xdbHelper);
theResult.AppendLine("<table class=\"DL\">");
theResult.AppendLine("<tr class=\"DL\">");
theResult.Append("<th class=\"DL\" style=\"width:40px;\">序号</th>");
theResult.Append("<th class=\"DL\" style=\"width:40px;\">论文<br />名称</th>");
theResult.Append("<th class=\"DL\" style=\"width:40px;\">刊物<br />名称</th>");
theResult.Append("<th class=\"DL\" style=\"width:40px;\" >论文所<br />在期刊<br />的卷、<br />期、页</th>");
theResult.Append("<th class=\"DL\" style=\"width:40px;\" >论文收<br />录类型</th>");
theResult.Append("<th class=\"DL\" style=\"width:40px;\">是否为<br />1区论文</th>");
theResult.Append("<th class=\"DL\" style=\"width:40px;\">论文<br />作者</th>");
theResult.Append("<th class=\"DL\" style=\"width:40px;\" >通讯<br />作者</th>");
theResult.AppendLine("</tr>");
bool bClassFlag = true;
string className = null;
int idx = 0;
foreach (ZJL.LabLib.Model.LAB.UTB_ZJL_LAB_LW
model in theList)
{
bClassFlag = !bClassFlag;
if (bClassFlag)
className = "DL";
else
className = "DLA";
++idx;
theResult.AppendLine("<tr class=\"DL\">");
theResult.Append("<td class=\"" + className + "\">" + idx.ToString() + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.TheName + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.KWMC + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.SZQK + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.LWSLLX + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.YQLW + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.LWZZ + "</td>");
theResult.Append("<td class=\"" + className + "\">" + model.TXZZ + "</td>");
theResult.AppendLine("</tr>");
}
theResult.AppendLine("</table>");
if (bIsCreate)
xdbHelper.EndDBHelper();
}
catch (Exception err)
{
if (bIsCreate)
xdbHelper.TranDBHelper();
throw err;
}
finally
{
if (bIsCreate)
xdbHelper.FinallyDBHelper();
}
return theResult.ToString();
}
/// <summary>
///
/// </summary>
/// <param name="emShowTitleInfoValue"></param>
/// <param name="newsModel"></param>
/// <param name="xdbHelper"></param>
protected void SetNewsDetail
(
SlowX.NewsLib.Enums.ShowTitleInfo.EmShowTitleInfo emShowTitleInfoValue,
SlowX.NewsLib.Model.UTB_SLOWX_NEWS model,
DBHelper xdbHelper
)
{
if (model.DetailTitle == null || model.DetailTitle.Length == 0)
{
lt_Title.Text = "<h2 class=\"news_title\">" + model.TheName + "</h2>";
}
else
{
lt_Title.Text = model.DetailTitle;
}
if (model.Author != null && model.Author.Length > 0)
lt_Author.Text = "来源:" + model.Author;
else
lt_Author.Text = "来源:不详";
lt_Hits.Text = model.Hits.ToString();
lt_InsertTime.Text = model.InsertTime.ToString("yyyy-MM-dd HH:mm:ss");
StringBuilder sbContext = new StringBuilder();
string videoText = "";
// 视频 //
if (model.VideoUrl != null && model.VideoUrl.Length > 0)
{
string strVideoWidth = "600px";
if (model.VideoWidth != null && model.VideoWidth != 0)
{
if (model.VideoWidth > 0)
strVideoWidth = model.VideoWidth.ToString() + "px";
else
strVideoWidth = (-model.VideoWidth).ToString() + "%";
}
string strVideoHeight = "400px";
if (model.VideoHeight != null && model.VideoHeight != 0)
{
if (model.VideoHeight > 0)
strVideoHeight = model.VideoHeight.ToString() + "px";
else
strVideoHeight = (-model.VideoHeight).ToString() + "%";
}
SlowX.NewsLib.Enums.VideoShowInText.EmVideoShowInText
EmVideoShowInTextValue
=
SlowX.NewsLib.Enums.VideoShowInText.GetEmByInt(model.EmVideoShowInTextValue);
if (EmVideoShowInTextValue != SlowX.NewsLib.Enums.VideoShowInText.EmVideoShowInText.不显示)
{
string videoUrl = DBH.ConvertStrUrl(model.VideoUrl);
string pAlign = "center";
switch (EmVideoShowInTextValue)
{
case SlowX.NewsLib.Enums.VideoShowInText.EmVideoShowInText.内容顶端右边显示:
pAlign = "right";
break;
case SlowX.NewsLib.Enums.VideoShowInText.EmVideoShowInText.内容顶端左边显示:
pAlign = "left";
break;
default:
pAlign = "center";
break;
}
SlowX.NewsLib.Enums.VideoType.EmVideoType
EmVideoTypeValue = SlowX.NewsLib.Enums.VideoType.GetEmByInt(model.EmVideoTypeValue);
switch (EmVideoTypeValue)
{
case SlowX.NewsLib.Enums.VideoType.EmVideoType.Flash:
videoText = @"<object classid=""clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"" codebase=""http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"" width=""" + strVideoWidth + @""" height=""" + strVideoHeight + @""" >
<param name=""movie"" value=""" + videoUrl + @""" />
<param name=""wmode"" value=""opaque"">
<param name=""quality"" value=""high"" />
<embed src=""" + videoUrl + @""" quality=""high"" pluginspage=""http://www.macromedia.com/go/getflashplayer"" type=""application/x-shockwave-flash"" width=""" + strVideoWidth + @""" height=""" + strVideoHeight + @""" ></embed>
</object>";
break;
case SlowX.NewsLib.Enums.VideoType.EmVideoType.avi:
videoText = @"<object width=""" + strVideoWidth + @""" height=""" + strVideoHeight + @""" border=""0"" classid=""clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"">
<param name=""ShowDisplay"" value=""0"">
<param name=""ShowControls"" value=""1"">
<param name=""AutoStart"" value=""1"">
<param name=""AutoRewind"" value=""0"">
<param name=""PlayCount"" value=""0"">
<param name=""Appearance value=""0 value="""""">
<param name=""BorderStyle value=""0 value="""""">
<param name=""MovieWindowHeight"" value=""" + strVideoHeight + @""">
<param name=""MovieWindowWidth"" value=""" + strVideoWidth + @""">
<param name=""FileName"" value=""" + videoUrl + @""">
<embed width=""" + strVideoWidth + @""" height=""" + strVideoHeight + @""" border=""0"" showdisplay=""0"" showcontrols=""1"" autostart=""1"" autorewind=""0"" playcount=""0"" moviewindowheight=""" + strVideoHeight + @""" moviewindowwidth=""" + strVideoWidth + @""" filename=""" + videoUrl + @""" src=""" + videoUrl + @""">
</embed>
</object> ";
break;
}
videoText
=
"<p style=\"text-align:" + pAlign + ";\">" + videoText + "</p><br />";
sbContext.Append(videoText);
}
}
string imageText = "";
if (model.ImageUrl != null && model.ImageUrl.Length > 0)
{
string strImgWidth = "600px";
if (model.ImageWidth != null && model.ImageWidth != 0)
{
if (model.ImageWidth > 0)
strImgWidth = model.ImageWidth.ToString() + "px";
else
strImgWidth = (-model.ImageWidth).ToString() + "%";
}
string strImgHeight = "400px";
if (model.ImageHeight != null && model.ImageHeight != 0)
{
if (model.ImageHeight > 0)
strImgHeight = model.ImageHeight.ToString() + "px";
else
strImgHeight = (-model.ImageHeight).ToString() + "%";
}
SlowX.NewsLib.Enums.ImageShowInText.EmImageShowInText
EmImageShowInTextValue
=
SlowX.NewsLib.Enums.ImageShowInText.GetEmByInt(model.EmImageShowInTextValue);
if (EmImageShowInTextValue != SlowX.NewsLib.Enums.ImageShowInText.EmImageShowInText.不显示)
{
string imgUrl = DBH.ConvertStrUrl(model.ImageUrl);
string pAlign = "center";
switch (EmImageShowInTextValue)
{
case SlowX.NewsLib.Enums.ImageShowInText.EmImageShowInText.内容顶端右边显示:
pAlign = "right";
break;
case SlowX.NewsLib.Enums.ImageShowInText.EmImageShowInText.内容顶端左边显示:
pAlign = "left";
break;
default:
pAlign = "center";
break;
}
imageText
=
"<p style=\"text-align:" + pAlign + ";\"><a href=\"" + imgUrl + "\" target=\"_blank\"><img src=\"" + imgUrl + "\" alt=\"\" border=\"0\" style=\"border:0px;width:" + strImgWidth + ";height:" + strImgHeight + ";\" /></a></p><br />";
sbContext.Append(imageText);
}
}
if (model.TheContentNumber == 1)
{
detailAspNetPager.Visible = false;
pl_DetailThree.Visible = false;
string newsTheContent = model.TheContent;
if (newsTheContent != null )
{
string strCT = null;
if (newsTheContent.Contains("{$db.rymd}"))
{
// 转义人员名单 //
strCT = ToRYMD(xdbHelper);
newsTheContent = newsTheContent.Replace("{$db.rymd}", strCT);
}
if (newsTheContent.Contains("{$db.jx}"))
{
// 转义奖项 //
strCT = ToJX(xdbHelper);
newsTheContent = newsTheContent.Replace("{$db.jx}", strCT);
}
if (newsTheContent.Contains("{$db.zz}"))
{
// 转义专著 //
strCT = ToZZ(xdbHelper);
newsTheContent = newsTheContent.Replace("{$db.zz}", strCT);
}
if (newsTheContent.Contains("{$db.zl}"))
{
// 转义专著 //
strCT = ToZL(xdbHelper);
newsTheContent = newsTheContent.Replace("{$db.zl}", strCT);
}
if (newsTheContent.Contains("{$db.lw}"))
{
// 转义论文 //
strCT = ToLW(xdbHelper);
newsTheContent = newsTheContent.Replace("{$db.lw}", strCT);
}
}
sbContext.Append(newsTheContent);
}
else
{
pl_DetailThree.Visible = true;
detailAspNetPager.RecordCount = model.TheContentNumber;
int pageindex
=
HttpContextSlowXFunctions.GetIntParameter(detailAspNetPager.UrlPageIndexName, 1) - 1;
detailAspNetPager.Visible = true;
if (pageindex == 0)
{
sbContext.Append(model.TheContent);
}
else
{
sbContext.Append(WebSiteBLL.instance.GetNewsContent(model.ID, pageindex, xdbHelper));
}
}
// 获得文件URL //
if (model.FileUrl != null && model.FileUrl.Length > 0)
{
// 下载文件信息 //
filesInfo = GetNewsFiles(model.ID, xdbHelper);
if (filesInfo.Length > 0)
{
pl_DetailFour.Visible = true;
}
else
{
pl_DetailFour.Visible = false;
}
}
lt_TheContent.Text
=
sbContext.ToString();
switch (emShowTitleInfoValue)
{
case SlowX.NewsLib.Enums.ShowTitleInfo.EmShowTitleInfo.显示:
lt_Title.Visible = true;
pl_contentBar.Visible = true;
break;
case SlowX.NewsLib.Enums.ShowTitleInfo.EmShowTitleInfo.不显示:
lt_Title.Visible = false;
pl_contentBar.Visible = false;
break;
default:
throw new Exception
(
"方法:"
+ MethodBase.GetCurrentMethod().ReflectedType.FullName
+ " "
+ MethodBase.GetCurrentMethod().ToString()
+ " 发生异常:枚举"
+ emShowTitleInfoValue.GetType().FullName
+ "."
+ emShowTitleInfoValue.ToString()
+ "尚未实现。"
);
}
pl_Detail.Visible = lt_Title.Visible;
// 更新点击率 //
AddNewsHits(model.ID, xdbHelper);
}
/// <summary>
/// 获得下载文件信息
/// </summary>
/// <param name="newsId"></param>
/// <param name="xdbHelper"></param>
/// <returns></returns>
protected string GetNewsFiles
(
long newsId,
DBHelper xdbHelper
)
{
StringBuilder theResult = null;
bool bIsCreate = true;
if (xdbHelper == null)
{
xdbHelper = SlowX.DAL.Helpers.DBHelper.CreateDBHelper();
}
else
{
// 没有打开链接 //
bIsCreate = xdbHelper.IsNotOpen();
}
try
{
if (bIsCreate)
xdbHelper.OpenDBHelper();
SlowX.NewsLib.Business.UTB_SLOWX_NEWS_FILE
bll = SlowX.NewsLib.Business.UTB_SLOWX_NEWS_FILE.instance;
SlowX.NewsLib.Entity.UTB_SLOWX_NEWS_FILE
entity = new SlowX.NewsLib.Entity.UTB_SLOWX_NEWS_FILE();
IQueryDriver iq = entity;
IOrderByDriver iorder = entity;
iq.AddIQueryItemWithEntityFieldInfo
(
entity._NewsId,
newsId
);
iq.AddIQueryItemWithEntityFieldInfoByBoolean
(
entity._IsShow,
true
);
iorder.AddOrderByEm(entity._ShowSeq, SlowX.Core.Enums.OrderBy.EmOrderBy.ASC);
iorder.AddOrderByEm(entity._ID, SlowX.Core.Enums.OrderBy.EmOrderBy.ASC);
List<BaseModel> theList = bll.ListBaseModel(entity, xdbHelper);
if (theList != null && theList.Count > 0)
{
theResult = new StringBuilder();
string fileUrl = null;
foreach (SlowX.NewsLib.Model.UTB_SLOWX_NEWS_FILE
model in theList)
{
if (model.FileUrl == null || model.FileUrl.Length == 0)
continue;
fileUrl = DBH.ConvertStrUrl(model.FileUrl);
theResult.Append("<a href=\"" + fileUrl + "\" target=\"_blank\" title=\"" + DBH.ConvertStr(model.TheName) + "\">" + model.TheName + "</a><br />");
}
}
if (bIsCreate)
xdbHelper.EndDBHelper();
}
catch (Exception err)
{
if (bIsCreate)
xdbHelper.TranDBHelper();
return "系统异常:" + err.Message;
}
finally
{
if (bIsCreate)
xdbHelper.FinallyDBHelper();
}
string returnResult = "";
if (theResult != null)
{
returnResult = theResult.ToString();
}
if (returnResult.Length == 0)
return "";
return "<p class=\"contentText\"><b>相关附件:</b><br />" + returnResult + "</p>";
}
/// <summary>
/// 绑定控件
/// </summary>
/// <param name="xdbHelper"></param>
protected string DataBindTheControls
(
DBHelper xdbHelper
)
{
string searchSortId = "";
bool bIsCreate = true;
if (xdbHelper == null)
{
xdbHelper = SlowX.DAL.Helpers.DBHelper.CreateDBHelper();
}
else
{
// 没有打开链接 //
bIsCreate = xdbHelper.IsNotOpen();
}
try
{
if (bIsCreate)
xdbHelper.OpenDBHelper();
NewsSortBasicItem mainNewsSort = null;
WebSiteBLL wi = WebSiteBLL.instance;
// 获得新闻ID //
long newsId
=
HttpContextSlowXFunctions.GetLongParameter(DataColumnName.ID);
SlowX.NewsLib.Model.UTB_SLOWX_NEWS newsModel = null;
// 绑定新闻 //
if (newsId != 0)
{
// 获得新闻纪录 //
newsModel = DataBindNews(newsId, xdbHelper);
if (newsModel == null)
{
if (bIsCreate)
xdbHelper.EndDBHelper();
return "没有获得" + wi.GetNewsTitle();
}
newsSortItem = wi.GetNewsSortBasicItem
(
newsModel.SortId,
xdbHelper
);
}
else
{
// 获得栏目ID //
long sortId
=
HttpContextSlowXFunctions.GetLongParameter(DataColumnName.SortId);
if (sortId != 0)
{
newsSortItem
=
wi.GetNewsSortBasicItem
(
sortId,
xdbHelper
);
}
else
{
string theCode
=
HttpContextSlowXFunctions.GetParameter(DataColumnName.TheCode);
if (theCode.Length != 0)
{
newsSortItem = wi.GetNewsSortBasicItem
(
theCode,
xdbHelper
);
}
}
}
if (newsSortItem == null)
{
if (bIsCreate)
xdbHelper.EndDBHelper();
return "没有获得" + wi.GetNewsTitle() + "栏目";
}
//
curNewSortId = newsSortItem.ID;
//
List<NewsSortBasicItem> listNewsSort
=
newsSortItem._ListNewsSortBasicItem;
//
mainNewsSort
=
newsSortItem;
if (listNewsSort == null || listNewsSort.Count == 0)
{
if (newsSortItem._parent == null)
{
// 顶层 //
listNewsSort =
wi.GetListNewsSortBasicItem(xdbHelper);
// new List<NewsSortBasicItem>();
}
else
{
mainNewsSort = newsSortItem._parent;
listNewsSort
=
mainNewsSort._ListNewsSortBasicItem;
}
}
// 绑定左边导航 //
rp_Nav.DataSource = listNewsSort;
rp_Nav.DataBind();
StringBuilder sbNav = new StringBuilder();
NewsSortBasicItem itemNav = newsSortItem;
string strNav = "";
while (itemNav != null)
{
strNav = HtmlSlowXFunctions.GetHref
(
itemNav.ListUrl,
itemNav.TheName,
itemNav.TheName,
"",
"NewsHrefSTYLE3"
);
sbNav.Insert(0, " > " + strNav);
itemNav = itemNav._parent;
}
if (newsModel != null)
{
sbNav.Append(" > " +
HtmlSlowXFunctions.GetHref(strCurUrl, "内容", newsModel.TheName, "", "NewsHrefSTYLE3")
);
}
newsSortNav = sbNav.ToString();
if (newsModel != null)
{
// 显示新闻 //
this.pl_Detail.Visible = true;
this.pl_DetailTwo.Visible = true;
this.pl_List.Visible = false;
SetWebPageTitle
(
DBH.CutStr(newsModel.TheName, 20) + "__" + newsSortItem.TheName
);
DataBindNewsPreNext
(
newsModel.ID,
newsSortItem,
xdbHelper
);
CurPageTitle = "新闻详情";
}
else
{
// 绑定新闻列表 //
DataBindList(newsSortItem, xdbHelper);
SetWebPageTitle(newsSortItem.TheName);
CurPageTitle = newsSortItem.TheName;
}
if (searchSortId == null || searchSortId.Length == 0)
searchSortId = curNewSortId.ToString();
preUrl = strPhyPath + "/newslist.aspx?sortid=" + searchSortId + "&kw=";
if (bIsCreate)
xdbHelper.EndDBHelper();
}
catch (Exception err)
{
if (bIsCreate)
xdbHelper.TranDBHelper();
return "系统异常:" + err.Message;
}
finally
{
if (bIsCreate)
xdbHelper.FinallyDBHelper();
}
return "";
}
/// <summary>
/// 绑定新闻列表
/// </summary>
/// <param name="newsUrlParamsValue"></param>
/// <param name="xdbHelper"></param>
protected void DataBindList
(
NewsSortBasicItem newsSortItem,
DBHelper xdbHelper
)
{
string kw = Request.QueryString["kw"];
if (kw != null)
{
kw = kw.Trim();
kw = Server.UrlDecode(kw);
}
txt_Search.Text = kw;
WebSiteBLL wi = WebSiteBLL.instance;
bool bIsCreate = true;
if (xdbHelper == null)
{
xdbHelper = SlowX.DAL.Helpers.DBHelper.CreateDBHelper();
}
else
{
// 没有打开链接 //
bIsCreate = xdbHelper.IsNotOpen();
}
try
{
if (bIsCreate)
xdbHelper.OpenDBHelper();
int iPageIndex
=
HttpContextSlowXFunctions.GetIntParameter(mainAspNetPager.UrlPageIndexName, 1) - 1; // mainAspNetPager.CurrentPageIndex - 1;
int iPageSize = mainAspNetPager.PageSize;
if (iPageSize == 0)
iPageSize = int.MaxValue;
int iRowCount = -1;
NewsHrefValueParams nhvp = new NewsHrefValueParams();
nhvp.CutSize = 92;
nhvp.CssClass = "LiNewsHref";
nhvp.KeyWord = kw;
SlowX.NewsLib.Enums.NewsSortType.EmNewsSortType
EmNewsSortTypeValue
=
SlowX.NewsLib.Enums.NewsSortType.GetEmByInt(newsSortItem.EmNewsSortTypeValue);
string strKw = kw;
if(EmNewsSortTypeValue == SlowX.NewsLib.Enums.NewsSortType.EmNewsSortType.单条){
strKw = "";
}
List<NewsDetailListBasicItem> theList
=
wi.PageListNewsDetailListBasicItem
(
nhvp,
newsSortItem,
strKw,
false,
true,
true,
iPageIndex,
iPageSize,
ref iRowCount,
xdbHelper
);
bool showDetail = false;
if (iRowCount == 1 && iPageIndex == 0
&& theList != null && theList.Count == 1)
{
switch (EmNewsSortTypeValue)
{
case SlowX.NewsLib.Enums.NewsSortType.EmNewsSortType.单条:
case SlowX.NewsLib.Enums.NewsSortType.EmNewsSortType.单条显示内容:
showDetail = true;
break;
default:
showDetail = false;
break;
}
}
if (showDetail)
{
// 一条记录,显示内容 //
SlowX.NewsLib.Model.UTB_SLOWX_NEWS
model
=
SlowX.NewsLib.Business.UTB_SLOWX_NEWS.instance.GetCurModel(theList[0].ID, xdbHelper);
this.pl_Detail.Visible = true;
this.pl_DetailTwo.Visible = true;
this.pl_List.Visible = false;
SetNewsDetail
(
SlowX.NewsLib.Enums.ShowTitleInfo.GetEmByInt(model.EmShowTitleInfoValue),
model,
xdbHelper
);
}
else
{
this.pl_Detail.Visible = false;
this.pl_DetailTwo.Visible = false;
this.pl_List.Visible = true;
rp_List.DataSource = theList;
rp_List.DataBind();
mainAspNetPager.RecordCount = iRowCount;
if (iPageSize == int.MaxValue || iPageSize == 0 || (iPageIndex == 0 && iPageSize >= iRowCount))
{
mainAspNetPager.CustomInfoHTML
= "第" + (iPageIndex + 1).ToString() + "/" + mainAspNetPager.PageCount.ToString() + "页 共" + mainAspNetPager.RecordCount.ToString() + "条记录";
}
else
{
mainAspNetPager.CustomInfoHTML
= "第" + (iPageIndex + 1).ToString() + "/" + mainAspNetPager.PageCount.ToString() + "页 共" + mainAspNetPager.RecordCount.ToString() + "条记录,每页" + iPageSize.ToString() + "条";
}
}
if (bIsCreate)
xdbHelper.EndDBHelper();
}
catch (Exception err)
{
if (bIsCreate)
xdbHelper.TranDBHelper();
throw err;
}
finally
{
if (bIsCreate)
xdbHelper.FinallyDBHelper();
}
}
/// <summary>
/// 页面加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
// 数据绑定 //
string str = DataBindTheControls(null);
if (str != null && str.Length > 0)
{
Response.Redirect(strPhyPath + "/error.aspx?msg=" + Server.UrlEncode(str));
}
}
}
}