YKT_EShop/_Template/Default/product_channel.cs

(开头部分) 7KB

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

using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using YKT_BLL;
using YKT_Model;
using YKT_Common;
using Wuqi.Webdiyer;

namespace YKT_EShop._Template.Default
{
    public partial class ProductChannel : BasicPage
    {
        protected ModelProductClass productclass = new ModelProductClass();
        public int _classid = 0, _showid = 0, _orderid = 0, _pageid = 0;
        protected Repeater rpList1;
        protected Repeater rpList2;
        protected AspNetPager Pager;
        protected override void OnInit(EventArgs e)
        {
            this.rpList2.ItemDataBound += new RepeaterItemEventHandler(rpList2_ItemDataBound);
            base.OnInit(e);
        }

        void rpList2_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            HiddenField hf = (HiddenField)e.Item.FindControl("hfProductFields");
            Repeater rp = (Repeater)e.Item.FindControl("rpSingleList");
            if (rp != null)
            {
                DataTable dt = new DataTable();

                dt.Columns.Add(new DataColumn("m1"));
                dt.Columns.Add(new DataColumn("m2"));
                if (hf.Value.Trim().Length > 0)
                {
                    string[] sarr1 = hf.Value.Split(new string[] { "||" }, StringSplitOptions.None);
                    foreach (string s1 in sarr1)
                    {
                        string[] sarr2 = s1.Split(new string[] { ":" }, StringSplitOptions.None);
                        DataRow dr = dt.NewRow();
                        dr["m1"] = sarr2[0];
                        dr["m2"] = sarr2[1];
                        dt.Rows.Add(dr);
                    }
                }
                rp.DataSource = dt;
                rp.DataBind();
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                _classid = Input.SetInt(Request["classid"]);
                if (_classid < 1)
后面还有 178 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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