Admin/PiclList.aspx.cs

(开头部分) 6KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;

    
public partial class Admin_PiclList : System.Web.UI.Page
{
    public int pagecounts, recordcount;
    public int pageindexs = 1;
    public int pagesize = 30;
    protected void Page_Load(object sender, EventArgs e)
    {
         if (!IsPostBack)
        {
            if (!Common.QX())
            {
                Common.TopShowAndRedirect(this, "你不是后台管理员,请重新登录", "adminlogin.aspx", "");
                return;
            }

            if (Request.QueryString["Typeid"] != null)
            {
                if (Request.QueryString["Typeid"].ToString() == "8")
                    lbltext.Text = "团队风采列表";
                else if (Request.QueryString["Typeid"].ToString() == "9")
                    lbltext.Text = "企业荣誉列表";
                Bind(1);
            }
           
        }
    }

    protected void Bind(int pageindexs)
    {
        string whe = "";
        if (txtTitle.Text != "")
        {
            whe += " and picname like'%" + txtTitle.Text + "%'";
        }
        string sql = " select * from Pic where Typeid=" + Request.QueryString["Typeid"].ToString()+whe+" order by id desc";
        DataTable dt = new DataTable();
        dt = DbHelperSQL.Query(sql).Tables[0];
        gridviewadmin.DataSource = dt;
        gridviewadmin.DataBind();

        dt = DbHelperSQL.GetList(sql, pageindexs, pagesize, out pagecounts, out recordcount);
        HiddenFieldpagecount.Value = pagecounts.ToString();
        HiddenFieldrecordcount.Value = recordcount.ToString();
        HiddenFieldpageindex.Value = pageindexs.ToString();
        bool b = false;
        string RecordNum = dt.Rows.Count.ToString();
        if (dt.Rows.Count == 0)
        {
            DataRow dr = dt.NewRow();
            dt.Rows.Add(dr);
后面还有 118 行代码,购买后查看完整代码

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

AI 解读

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

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