NewProduct.aspx.cs

(开头部分) 2KB

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

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using BLL.Article;
using CSA.DAL;
public partial class NewProduct : System.Web.UI.Page
{
    protected string cur_Code, cur_Id, kindname, title, content, name, navname, cur_sortno;
    protected DataRow drList;
    protected DataTable dtList, dtCat, dtProClass;

    protected void Page_Load(object sender, EventArgs e)
    {
        BindProducts();
    }

    protected void BindProducts()
    {
        cur_Code = Request.QueryString["Code"];   //接收Code
        cur_Id = Request.QueryString["Id"];               //接收传进来的Id
        if (string.IsNullOrEmpty(cur_Code))                //如果没有Code传进,自定义Code
        {
            cur_Code = "01";
        }
        int pageindex = 1;
        if (!string.IsNullOrEmpty(Request.QueryString["page"]))
        {
            pageindex = int.Parse(Request.QueryString["page"]);
        }
        string sql = " select top 20 * from bs_products  " + getSortno();
        //dtCat = BLL.Product.Product.getList("", 0, " and isnew=1");
        dtCat = DBAccess.getRS(sql);
        int pageSize = 10;

        AspNetPager1.UrlRewritePattern = "NewProduct-{0}.html";
        AspNetPager1.RecordCount = dtCat != null ? dtCat.Rows.Count : 0;
        AspNetPager1.PageSize = pageSize;
        dtList = CSA.DAL.PageHelper.getPage(dtCat, pageSize, pageindex);
        this.AspNetPager1.CurrentPageIndex = pageindex;
    }


    protected void AspNetPager1_PageChanged(object sender, EventArgs e)
    {
        BindProducts();
    }

    protected string getSortno()
    {
        string str = "";
        cur_sortno = Request.QueryString["sortno"];
        if (string.IsNullOrEmpty(cur_sortno))                //如果没有Code传进,自定义Code
        {
            cur_sortno = "2";
        }
        switch (cur_sortno)
        {
后面还有 11 行代码,购买后查看完整代码

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

AI 解读 AI

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

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