440petSaleWeb/Web/pet.aspx.cs

(开头部分) 1KB

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

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

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

            BindData();
        }
    }

    /// <summary>
    /// 绑定
    /// </summary>
    private void BindData()
    {
        PSD.BLL.products bll = new PSD.BLL.products();

        string where = "  1=1  ";

        if (txt_title.Text != "")
        {
            where += " and pname like '%" + txt_title.Text + "%' ";
        }

        if (Request.QueryString["tid"] != null)
        {
            where += " and tid=" + Request.QueryString["tid"];

            PSD.Model.productType md = new PSD.BLL.productType().GetModel(int.Parse(Request.QueryString["tid"]));
            Literal1.Text = md.tname;
        }
        else
        {
            Literal1.Text = "宠物展示";
        }

        int pagesize = this.AspNetPager1.PageSize;
        int pageindex = this.AspNetPager1.CurrentPageIndex;
        Repeater1.DataSource = bll.GetListByPage(where, " pid desc ", 1 + (AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex * AspNetPager1.PageSize);
        Repeater1.DataBind();

        this.AspNetPager1.RecordCount = bll.GetRecordCount(where);

    }

    /// <summary>
    /// 分页
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
后面还有 10 行代码,购买后查看完整代码

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

AI 解读 AI

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

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