コード例 #1
0
        protected void btnCat_Click(object sender, EventArgs e)
        {
            string    categoryName = txtnewCat.Text;
            IAdminBLL objBLL       = BLLFactory.AdminBLLFactory.CreateAdminBLLObject();

            objBLL.SaveCategory(categoryName);

            lblNewCat.Visible = false;
            btnCat.Visible    = false;
            txtnewCat.Visible = false;
            List <IItemCategory> itemList = objBLL.GetCategoryList();

            ddlCategory.DataSource     = itemList;
            ddlCategory.DataTextField  = "CategoryName";
            ddlCategory.DataValueField = "CategoryID";
            ddlCategory.DataBind();
        }