cn/products.aspx.cs

(开头部分) 3KB

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

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class cn_proudcts : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            try
            {
                if (Request.QueryString["id"].ToString() != null)
                {
                   
                    int id = Convert.ToInt32(Request.QueryString["id"].ToString());
                    bind(id);
                }
            }
            catch
            {
                try
                {
                    if (Request.QueryString["pbcid"].ToString() != null)
                    {
                        int pbcid = Convert.ToInt32(Request.QueryString["pbcid"].ToString());
                        bindclass(pbcid);
                    }
                }
                catch
                {
                    bindalll();
                }
            }
            //bind();
        }
    }
    public void bindalll()
    {
        DataSet ds2 = Common.selectall("productbigclass where show=1");
        int topid2 = Convert.ToInt32(ds2.Tables["s"].Rows[0]["pbcid"].ToString());

        DataSet ds = Common.selectwhereid("productclass", "pbcid=@id and show=1", topid2);
        int topid = Convert.ToInt32(ds.Tables["s"].Rows[0]["id"].ToString());//该类第一个产品的id

        DataSet ds1 = Common.selectwhereidaspnet(AspNetPager1,"product", "show=1 and classid=@id", topid);
        DataList1.DataSource = ds1;
        DataList1.DataBind();

        AspNetPager1.AlwaysShow = true;
        AspNetPager1.PageSize = 12;
        AspNetPager1.RecordCount = Common.selectwhereid("product", "show=1 and classid=@id", topid).Tables[0].Rows.Count;

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

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

AI 解读 AI

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

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