Example #1
0
        public void GetAllCategories()
        {
            CategoriesDropDownList.DataSource     = _PurchaseRepository.GetAllCategories();
            CategoriesDropDownList.DataTextField  = "Name";
            CategoriesDropDownList.DataValueField = "Id";
            CategoriesDropDownList.DataBind();

            CategoriesDropDownList.Items.Insert(0, new ListItem("Chose Category", "0"));
        }