protected void companyDropDownList_SelectedIndexChanged(object sender, EventArgs e) { int id = Convert.ToInt32(companyDropDownList.SelectedValue); itemDropDownList.DataSource = stockOutManager.GetAllItemsByCompanyId(id); itemDropDownList.DataTextField = "ItemName"; itemDropDownList.DataValueField = "Id"; itemDropDownList.DataBind(); itemDropDownList.Items.Insert(0, new ListItem("Select item", "0")); }
protected void companyDropdownList_SelectedIndexChanged(object sender, EventArgs e) { int id = Convert.ToInt32(companyDropdownList.SelectedValue); itemDropdownList.DataSource = stockOutManager.GetAllItemsByCompanyId(id); itemDropdownList.DataTextField = "ItemName"; itemDropdownList.DataValueField = "Id"; itemDropdownList.DataBind(); itemDropdownList.Items.Insert(0, new ListItem("-Select item-", "0")); itemDropdownList.Enabled = true; itemDropdownList.SelectedIndex = 0; reorderLevelTextBox.Text = ""; availableQuantityTextBox.Text = ""; stockOutTextBox.Text = ""; messageLabel.Text = ""; }