Web.UI/Label_Contents.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Text;
namespace Web.UI
{
/// <summary>
/// 内容标签类
/// </summary>
public partial class BasePage
{
/// <summary>
/// 根据标签取得内容页内容
/// </summary>
protected string GetContent(string callIndex)
{
if (string.IsNullOrEmpty(callIndex))
return "";
BLL.Contents bll = new BLL.Contents();
if (bll.Exists(callIndex))
{
return bll.GetModel(callIndex).Content;
}
return "";
}
/// <summary>
/// 绑定Repeater控件数据
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Content_List_DataBind(object sender, EventArgs e)
{
Repeater _rpt = sender as Repeater;
if (_rpt == null)
return;
BLL.Contents bll = new BLL.Contents();
//绑定数据
if (_rpt.PageSize > 0)
{
_rpt.DataSource = bll.GetPageList(_rpt.PageSize, _rpt.PageIndex, _rpt.Where, "SortId asc,Id desc");
}
else
{
_rpt.DataSource = bll.GetList(_rpt.Top, _rpt.Where, "SortId asc,Id desc");
}
_rpt.DataBind();
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。