UI/ProList.aspx.cs

(开头部分) 3KB

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

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using Common;
public partial class ProList : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        BLL.fathercate my_f = new BLL.fathercate();
        DataSet ds_f = my_f.dataset();
        Repeater1.DataSource = ds_f.Tables[0];
        Repeater1.DataBind();
        select();
        info();
        
    }
    public string datas(string f_cateid)
    {
        string result = "";
        BLL.procate myb = new BLL.procate();
        DataSet ds = myb.data_f(Convert.ToInt32(f_cateid));
        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
        {
            if (ds.Tables[0].Rows[i] != null)
            {
                result = result + "<li>" + "<a href=pro_catelist.aspx?cateid=" + ds.Tables[0].Rows[i]["_cateid"].ToString() + ">" + ds.Tables[0].Rows[i]["_catename"].ToString() + "</a>" + "</li>";

            }



        }
        return result;


    }
    public void select()
    {
        string name = Request.QueryString["title"].ToString();
        string str = " select count(*) from product where _title like '%"+name+"%' ";
        int result = Convert.ToInt32(Common.DB.ExecuteScalar(str));
        AspNetPager1.RecordCount = result;
        AspNetPager1.PageSize = 9;
    }
    public void info()
    {
        string name = Request.QueryString["title"].ToString();
        string str = @"select product._id, product._imageid, procate._catename, 
                       product._title,product._localprice from product , procate where
                       product._cateid=procate._cateid and _title like '%"+name+"%' ";
        SqlDataReader sdr = Common.DbHelperSQL.ExecuteReader(str);
        if (sdr.Read())
后面还有 48 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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