日期:2014-05-17 浏览次数:20603 次
/// <summary>
/// 绑定产品目录列表
/// </summary>
/// <param name="cid">公司ID</param>
protected void BindBigProductCataLog(string cid)
{
Catagary ca = new Catagary();
BllGlodMemberProductCatagorySort bllcatagory = new BllGlodMemberProductCatagorySort();
ArrayList al = ca.GetOfferCatalogIDSort(cid);
ArrayList al_temp = null;
ArrayList al2 = bllcatagory.GetCatalogList(cid);
if (al != null && al2 != null)
{
if (al.Count == al2.Count)
{
al = al2;
}
}
DataTable dt = ca.GetAllProductCatalogChildSort(cid);
DataTable dt2 = bllcatagory.GetChildCatalogList(cid);
rptCatalogOne.DataSource = al;
rptCatalogOne.DataBind();
foreach (RepeaterItem rpone in rptCatalogOne.Items)
{
int i = rpone.ItemIndex;
int cateGoryoneId;
if (int.TryParse(al[i].ToString(), out cateGoryoneId))
{
DataTable listTwo =null;
if (dt != null)
{
listTwo = ca.GetChildCatalogListByParentIDSort(cateGoryoneId, dt);
}
DataTable listThree = null;
if (dt2 != null)
{
listThree = ca.GetChildCatalogListByParentIDSort(cateGoryoneId, dt2);
}
DataTable list_temp = null;
if (listThree != null && listTwo != null)
{
if (listTwo.Rows.Count == listThree.Rows.Count)
{
list_temp = listThree;
}
else
{
list_temp = listTwo;
}
}
else
{
list_temp = listTwo;
}
Repeater rptCatalogTwo = (Repeater)rpone.FindControl("rptCatalogTwo");
rptCatalogTwo.DataSource = listTwo;
rptCatalogTwo.DataBind();
}
}
}