WEB/ascx/category_2.ascx.cs

(开头部分) 2KB

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

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
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.Xml.Linq;
using shop.Model;
using shop.BLL;

public partial class category_2 : System.Web.UI.UserControl
{
    private bool isNew = false;

    public bool IsNew
    {
        get { return isNew; }
        set { isNew = value; }
    }
    private bool isHot = false;

    public bool IsHot
    {
        get { return isHot; }
        set { isHot = value; }
    }
    private bool isDiscount = false;

    public bool IsDiscount
    {
        get { return isDiscount; }
        set { isDiscount = value; }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
            rCategoryList_load();
    }
    private void rCategoryList_load()
    {
        string where = "is_show=1 and father_id=0";
        string fieldList = "Id,category_name,order_by,is_show";
        string orderField = "order_by";
        bool orderby = true;
        DataRecordTable table = new ProductCategoryBusiness().GetList(fieldList,orderField,orderby,1,6,where);
        rCategoryList.DataSource = table.Table;
        rCategoryList.DataBind();
    }
    protected void rCategoryList_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        string id = DataBinder.Eval(e.Item.DataItem,"Id").ToString();

        HyperLink hlcategorylink = e.Item.FindControl("hlcategorylink") as HyperLink;
        if (hlcategorylink != null)
后面还有 10 行代码,购买后查看完整代码

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

AI 解读 AI

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

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