示例#1
0
        private void loadIntoForm()
        {
            CategoryBL categoryBL = new CategoryBL();
            cmbCategory.DataSource = categoryBL.GetCategories();
            cmbCategory.DataTextField = "name";
            cmbCategory.DataValueField = "categoryID";
            cmbCategory.DataBind();

            SupplierBL supplierBL = new SupplierBL();
            cmbSupplier.DataSource = supplierBL.GetSuppliers(true);
            cmbSupplier.DataTextField = "name";
            cmbSupplier.DataValueField = "supplierID";
            cmbSupplier.DataBind();

            cmbApproved.Items.Add("Sve");
            cmbApproved.Items.Add("Odobrene");
            cmbApproved.Items.Add("Neodobrene");

            cmbActive.Items.Add("Sve");
            cmbActive.Items.Add("Aktivne");
            cmbActive.Items.Add("Neaktivne");

            cmbPageSize.Items.Add("10");
            cmbPageSize.Items.Add("20");
            cmbPageSize.Items.Add("50");
            cmbPageSize.Items.Add("100");
            cmbPageSize.Items.Add("Sve");

            BrandBL brandBL = new BrandBL();
            cmbBrand.DataSource = brandBL.GetBrands(true);
            cmbBrand.DataTextField = "name";
            cmbBrand.DataValueField = "brandID";
            cmbBrand.DataBind();
        }
示例#2
0
 private void loadBrands()
 {
     BrandBL brandBL = new BrandBL();
     cmbBrand.DataSource = brandBL.GetBrands(false);
     cmbBrand.DataTextField = "name";
     cmbBrand.DataValueField = "brandID";
     cmbBrand.DataBind();
 }