示例#1
0
        protected void companyDropDownList_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (companyDropDownList.SelectedIndex != 0)
            {
                int companyId = Convert.ToInt32(companyDropDownList.SelectedItem.Value);
                itemDropDownList.DataSource     = stockInManager.GetItemsByCompanyId(companyId);
                itemDropDownList.DataTextField  = "Name";
                itemDropDownList.DataValueField = "Id";
                itemDropDownList.DataBind();
            }
            else
            {
                itemDropDownList.Items.Clear();
            }

            itemDropDownList.Items.Insert(0, "Select Item");

            reorderTextBox.Text = availableQuantityTextBox.Text = stockInTextBox.Text = "";
        }