コード例 #1
0
        private void BindComponentList()
        {
            IList <KitComponent> components = new List <KitComponent>();

            foreach (ProductKitComponent pc in _Product.ProductKitComponents)
            {
                components.Add(pc.KitComponent);
            }
            KitComponentList.DataSource = components;
            KitComponentList.DataBind();
        }
コード例 #2
0
        protected void QuickSort_SelectedIndexChanged(object sender, EventArgs e)
        {
            IList <KitComponent> components = new List <KitComponent>();

            foreach (ProductKitComponent pc in _Product.ProductKitComponents)
            {
                components.Add(pc.KitComponent);
            }
            switch (QuickSort.SelectedIndex)
            {
            case 2:
                components.Sort("Name", CommerceBuilder.Common.SortDirection.DESC);
                break;

            default:
                components.Sort("Name", CommerceBuilder.Common.SortDirection.ASC);
                break;
            }
            KitComponentList.DataSource = components;
            KitComponentList.DataBind();
            QuickSort.SelectedIndex = 0;
        }