예제 #1
0
 public void CascadingDropdown()
 {
     companyDropDownList.DataSource     = stockOutManager.GetAllCompany();
     companyDropDownList.DataTextField  = "CompanyName";
     companyDropDownList.DataValueField = "Id";
     companyDropDownList.DataBind();
     companyDropDownList.Items.Insert(0, new ListItem("Select  company", "0"));
     itemDropDownList.Items.Insert(0, new ListItem("Select  item", "0"));
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                companyDropDownList.DataTextField  = "CompanyName";
                companyDropDownList.DataValueField = "CompanyID";
                companyDropDownList.DataSource     = stockOutManager.GetAllCompany();
                companyDropDownList.DataBind();
                companyDropDownList.Items.Insert(0, new ListItem("<Select Subject>", "0"));

                int    companyId    = Convert.ToInt32(companyDropDownList.SelectedValue);
                int    itemId       = Convert.ToInt32(itemDropDownList.SelectedValue);
                string sellQuantity = stockOutTextBox.Text;
            }
        }