private void loadIntoForm() { CategoryBL categoryBl = new CategoryBL(); cmbParent.DataSource = categoryBl.GetNestedCategoriesDataTable(true, true); cmbParent.DataTextField = "name"; cmbParent.DataValueField = "categoryID"; cmbParent.DataBind(); AttributeBL attributeBL = new AttributeBL(); cmbAttribute.DataSource = attributeBL.GetAllAttributes(); cmbAttribute.DataTextField = "name"; cmbAttribute.DataValueField = "attributeID"; cmbAttribute.DataBind(); cmbCriterion.Items.Add("Novi"); cmbCriterion.Items.Add("Ceni"); cmbCriterion.Items.Add("Slučajni"); txtPricePercent.Text = "0,00"; txtWebPricePercent.Text = "0,00"; cmbSlider.DataSource = new SliderBL().GetSliders(true); cmbSlider.DataTextField = "name"; cmbSlider.DataValueField = "sliderID"; cmbSlider.DataBind(); cmbCategoryBanner.DataSource = new CategoryBannerBL().GetCategoryBanners(true); cmbCategoryBanner.DataValueField = "categoryBannerID"; cmbCategoryBanner.DataTextField = "name"; cmbCategoryBanner.DataBind(); cmbExtraMenu.DataSource = new CategoryExtraMenuBL().GetCategoryExtraMenus(true); cmbExtraMenu.DataTextField = "name"; cmbExtraMenu.DataValueField = "categoryExtraMenuID"; cmbExtraMenu.DataBind(); cmbBrand.DataSource = new BrandBL().GetBrands(true); cmbBrand.DataTextField = "name"; cmbBrand.DataValueField = "brandID"; cmbBrand.DataBind(); chkUpdateProductsFromExternalApplication.Visible = bool.Parse(ConfigurationManager.AppSettings["updateProductsFromExternalApplication"]); chkExportProducts.Visible = bool.Parse(ConfigurationManager.AppSettings["exportProducts"]); cmbCategoryBrand.DataSource = new BrandBL().GetBrands(false); cmbCategoryBrand.DataTextField = "name"; cmbCategoryBrand.DataValueField = "brandID"; cmbCategoryBrand.DataBind(); }
private void loadIntoForm() { CategoryBL categoryBl = new CategoryBL(); cmbParent.DataSource = categoryBl.GetCategories(); cmbParent.DataTextField = "name"; cmbParent.DataValueField = "categoryID"; cmbParent.DataBind(); AttributeBL attributeBL = new AttributeBL(); cmbAttribute.DataSource = attributeBL.GetAllAttributes(); cmbAttribute.DataTextField = "name"; cmbAttribute.DataValueField = "attributeID"; cmbAttribute.DataBind(); cmbCriterion.Items.Add("Novi"); cmbCriterion.Items.Add("Ceni"); cmbCriterion.Items.Add("Slučajni"); txtPricePercent.Text = "0,00"; txtWebPricePercent.Text = "0,00"; cmbCategoryBanner.DataSource = new CategoryBannerBL().GetCategoryBanners(true); cmbCategoryBanner.DataValueField = "categoryBannerID"; cmbCategoryBanner.DataTextField = "name"; cmbCategoryBanner.DataBind(); cmbExtraMenu.DataSource = new CategoryExtraMenuBL().GetCategoryExtraMenus(true); cmbExtraMenu.DataTextField = "name"; cmbExtraMenu.DataValueField = "categoryExtraMenuID"; cmbExtraMenu.DataBind(); cmbBrand.DataSource = new BrandBL().GetBrands(true); cmbBrand.DataTextField = "name"; cmbBrand.DataValueField = "brandID"; cmbBrand.DataBind(); }
private void loadAttributes() { AttributeBL attributeBL = new AttributeBL(); dgvAttributes.DataSource = (cmbCategory.SelectedIndex > 0) ? attributeBL.GetAttributesForCategory(int.Parse(cmbCategory.SelectedValue)) : attributeBL.GetAllAttributes(); dgvAttributes.DataBind(); }