Hidistro.UI.SaleSystem.CodeBehind/VCategoryList.cs
(完整代码) 1KBnamespace Hidistro.UI.SaleSystem.CodeBehind
{
using Hidistro.SaleSystem.Vshop;
using Hidistro.UI.Common.Controls;
using System;
using System.Data;
using System.Web.UI;
using System.Web.UI.WebControls;
[ParseChildren(true)]
public class VCategoryList : VshopTemplatedWebControl
{
private VshopTemplatedRepeater rptCategories;
protected override void AttachChildControls()
{
this.rptCategories = (VshopTemplatedRepeater) this.FindControl("rptCategories");
DataSet categoryList = CategoryBrowser.GetCategoryList();
this.rptCategories.ItemDataBound += new RepeaterItemEventHandler(this.rptCategories_ItemDataBound);
this.rptCategories.DataSource = categoryList;
this.rptCategories.DataBind();
PageTitle.AddSiteNameTitle("商品分类");
}
protected override void OnInit(EventArgs e)
{
if (this.SkinName == null)
{
this.SkinName = "Skin-VCategoryList.html";
}
base.OnInit(e);
}
private void rptCategories_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
DataView view = (DataView) DataBinder.Eval(e.Item.DataItem, "SubCategories");
DataRowView dataItem = (DataRowView) e.Item.DataItem;
int num = Convert.ToInt32(dataItem["CategoryId"]);
Literal literal = (Literal) e.Item.Controls[0].FindControl("litPlus");
if ((view == null) || (view.ToTable().Rows.Count == 0))
{
literal.Visible = false;
}
else
{
literal.Visible = true;
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
