Web/usercontrol/sort.ascx.cs

(开头部分) 4KB

这里只显示每个文件的开头 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;

namespace ClothesShop.Web.usercontrol
{
    public partial class sort : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                this.Bind();
            }
        }

        ClothesShop.BLL.type_1 t_1 = new ClothesShop.BLL.type_1();
        ClothesShop.BLL.type_2 t_2 = new ClothesShop.BLL.type_2();

        protected void parent_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                DataList list = e.Item.FindControl("child") as DataList;
                DataRowView drv = e.Item.DataItem as DataRowView;
                DataTable table = t_2.type_2list(int.Parse(drv["typeid_1"].ToString()), "");
                list.DataSource = table.DefaultView;
                list.DataBind();
            }
        }

        private void Bind()
        {
            DataTable t_1table = t_1.type_1list("");
            this.parent.DataSource = t_1table.DefaultView;
            this.parent.DataBind();
        }

        //private void Bind()
        //{
            //ClothesShop.BLL.type_1 t_1 = new ClothesShop.BLL.type_1();
            //ClothesShop.BLL.type_2 t_2 = new ClothesShop.BLL.type_2();

            //DataTable t_1lsit = t_1.type_1list("");
            //foreach (DataRow row in t_1lsit.Rows)
            //{
            //    TableRow tr = new TableRow();
            //    tr.Height = 20;
            //    TableCell tc_1 = new TableCell();
            //    TableCell tc_2 = new TableCell();
            //    tc_1.HorizontalAlign = HorizontalAlign.Left;
            //    tc_1.VerticalAlign = VerticalAlign.Top;
            //    tc_2.HorizontalAlign = HorizontalAlign.Left;
后面还有 52 行代码,购买后查看完整代码

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

AI 解读 AI

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

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