Backup/Discuz.Web/admin/forum/forum_attchemntgrid.aspx.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.IO;
using System.Web.UI.WebControls;
using System.Web.UI;
using Discuz.Forum;
using Discuz.Common;
using Discuz.Config;
namespace Discuz.Web.Admin
{
/// <summary>
/// 附件编辑列表
/// </summary>
public partial class attchemntgrid : AdminPage
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
if (Session["attchmentwhere"] != null)
{
ViewState["condition"] = Session["attchmentwhere"].ToString();
}
else
{
Response.Redirect("forum_searchattchment.aspx");
return;
}
BindData();
}
}
public void BindData()
{
#region
DataGrid1.AllowCustomPaging = false;
DataGrid1.TableHeaderName = "附件列表";
DataGrid1.BindData(Attachments.GetAttachList(ViewState["condition"].ToString(), Posts.GetPostTableName()));
#endregion
}
protected void Sort_Grid(Object sender, DataGridSortCommandEventArgs e)
{
DataGrid1.Sort = e.SortExpression.ToString();
}
protected void DataGrid_PageIndexChanged(object source, DataGridPageChangedEventArgs e)
{
DataGrid1.LoadCurrentPageIndex(e.NewPageIndex);
}
private void DataGrid_ItemDataBound(object sender, DataGridItemEventArgs e)
{
#region 数据绑定显示长度控制
if (e.Item.Cells[5].Text.ToString().Length > 15)
{
e.Item.Cells[5].Text = e.Item.Cells[5].Text.Substring(0, 15) + "…";
后面还有 98 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
