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"; cmbSlider.DataSource = new SliderBL().GetSliders(true); cmbSlider.DataTextField = "name"; cmbSlider.DataValueField = "sliderID"; cmbSlider.DataBind(); }
private void loadAttributes() { AttributeBL attributeBL = new AttributeBL(); dgvAttributes.DataSource = (cmbCategory.SelectedIndex > 0) ? attributeBL.GetAttributesForCategory(int.Parse(cmbCategory.SelectedValue)) : attributeBL.GetAllAttributes(); dgvAttributes.DataBind(); }