Example #1
0
		protected void BindProductCategories()
		{
			BPProductCategories bp = new BPProductCategories();
			DSProductCategories = bp.SelectAllActive();
			DSProductCategories.tbl_ProductCategories.DefaultView.Sort = "ProductCategoryName";
			ddlProductCategories.DataBind();

			ddlProductCategories.Items.Insert(0, new ListItem("(All Categories)", "-1"));
			ddlProductCategories.Items.Insert(1, new ListItem("(Not Assigned)", "0"));
		}
		protected void BindProductCategoriesList()
		{
			BPProductCategories bpAppCats = new BPProductCategories();
			if (ProductCategoryID > 0)
			{
				DSProductCategories = bpAppCats.SelectProductCategoryByID(ProductCategoryID);

				BindProductsList();
			}
			else
			{
				DSProductCategories = bpAppCats.SelectAllActive();
			}

			rptProductCategories.DataBind();
		}