Backup/Discuz.Web/admin/forum/forum_postgrid.aspx.cs

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Data;
using System.Web.UI.WebControls;

using Discuz.Forum;
using Discuz.Common;

namespace Discuz.Web.Admin
{
    /// <summary>
    /// 帖子列表
    /// </summary>
    public partial class postgrid : AdminPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                BindData();
            }
        }

        public void BindData()
        {
            #region 数据绑定

            DataGrid1.AllowCustomPaging = false;
            DataTable dt = AdminTopics.AdminGetPostList(DNTRequest.GetInt("tid", -1), DataGrid1.PageSize, DataGrid1.CurrentPageIndex + 1).Tables[0];

            foreach (DataRow dr in dt.Select("layer=0"))
            {
                dt.Rows.Remove(dr);
            }

            DataGrid1.DataSource = dt;
            DataGrid1.DataBind();

            #endregion
        }


        protected void DataGrid_PageIndexChanged(object source, DataGridPageChangedEventArgs e)
        {
            DataGrid1.CurrentPageIndex = e.NewPageIndex;
            BindData();
        }


        protected void DataGrid_Cancel(Object sender, DataGridCommandEventArgs E)
        {
            DataGrid1.Cancel();
        }

        public string Invisible(string invisible)
        {
            return invisible == "1" ? "<div align=center><img src=../images/OK.gif /></div>" : "<div align=center><img src=../images/Cancel.gif /></div>";
        }

        #region Web Form Designer generated code

后面还有 16 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。