Ejemplo n.º 1
0
    protected void uxCategory5RadioList_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (uxCategory5RadioList.SelectedItem.Text.Contains(">"))
        {
            uxPrimaryCategoryList6Panel.Visible = true;
            string               parentPimaryCategoryID = uxCategory5RadioList.SelectedValue.ToString();
            EBayAccess           eBayAccess             = new EBayAccess();
            IList <EBayCategory> eBayCategoryList       = eBayAccess.GetCategories(parentPimaryCategoryID, 5, ListSite);
            uxCategory6RadioList.Items.Clear();

            foreach (EBayCategory eBayCategory in eBayCategoryList)
            {
                ListItem list = new ListItem();
                if (!eBayCategory.IsExpire && !eBayCategory.IsVirtual && parentPimaryCategoryID != eBayCategory.PimaryCategoryID)
                {
                    if (eBayCategory.IsLeafCategory)
                    {
                        list.Text = eBayCategory.PimaryCategoryName;
                    }
                    else
                    {
                        list.Text = eBayCategory.PimaryCategoryName + " >";
                    }
                    list.Value = eBayCategory.PimaryCategoryID;
                    list.Attributes.Add("IsLeaf", eBayCategory.IsLeafCategory.ToString());
                    uxCategory6RadioList.Items.Add(list);
                }
            }
        }
        else
        {
        }
    }
Ejemplo n.º 2
0
    public void PopulateControl()
    {
        uxPrimaryCategoryListPanel.Visible  = true;
        uxPrimaryCategoryList1Panel.Visible = true;
        EBayAccess           eBayAccess       = new EBayAccess();
        IList <EBayCategory> eBayCategoryList = eBayAccess.GetCategories("-1", 0, ListSite);

        uxCategory1RadioList.Items.Clear();
        uxCategory2RadioList.Items.Clear();
        uxCategory3RadioList.Items.Clear();
        uxCategory4RadioList.Items.Clear();
        uxCategory5RadioList.Items.Clear();
        uxCategory6RadioList.Items.Clear();

        foreach (EBayCategory eBayCategory in eBayCategoryList)
        {
            ListItem list = new ListItem();
            if (!eBayCategory.IsExpire && !eBayCategory.IsVirtual)
            {
                if (eBayCategory.IsLeafCategory)
                {
                    list.Text = eBayCategory.PimaryCategoryName;
                }
                else
                {
                    list.Text = eBayCategory.PimaryCategoryName + " >";
                }
                list.Value = eBayCategory.PimaryCategoryID;
                //list.Attributes.Add( "IsLeaf", eBayCategory.IsLeafCategory.ToString() );
                uxCategory1RadioList.Items.Add(list);
            }
        }
    }