コード例 #1
0
        protected void CategoriesDropDownList_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                int id = Convert.ToInt32(CategoriesDropDownList.SelectedValue);

                ItemsDropDownList.DataSource     = _PurchaseRepository.GetAllItemsByCategories(id);
                ItemsDropDownList.DataTextField  = "Name";
                ItemsDropDownList.DataValueField = "Code";
                ItemsDropDownList.DataBind();

                ItemsDropDownList.Items.Insert(0, new ListItem("Chose Items", "0"));
            }
            catch
            {
            }
        }
コード例 #2
0
 protected void CategoriesDropDownList_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         int Id = Convert.ToInt32(CategoriesDropDownList.SelectedValue);
         ItemsDropDownList.DataSource     = _ItemSalesRepository.GetAllItemsByCategories(Id);
         ItemsDropDownList.DataTextField  = "Name";
         ItemsDropDownList.DataValueField = "Id";
         ItemsDropDownList.DataBind();
         ItemsDropDownList.Items.Insert(0, new System.Web.UI.WebControls.ListItem("Select Items", "0"));
         txtItemPrice.Text       = "";
         lblCategories.ForeColor = Color.Black;
     }
     catch
     {
     }
 }
コード例 #3
0
        protected void SizeDropDownList_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                int    Id   = Convert.ToInt32(CategoriesDropDownList.SelectedValue);
                string Size = SizeDropDownList.SelectedItem.ToString();
                ItemsDropDownList.DataSource     = _StocksInRepository.GetItemsByCtgndSze(Id, Size);
                ItemsDropDownList.DataTextField  = "Name";
                ItemsDropDownList.DataValueField = "Id";
                ItemsDropDownList.DataBind();

                ItemsDropDownList.Items.Insert(0, new System.Web.UI.WebControls.ListItem("Select Items", "0"));

                txtCode.Text = "";
            }
            catch
            {
            }
        }