Exemplo n.º 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
            {
            }
        }
Exemplo n.º 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
     {
     }
 }
Exemplo n.º 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
            {
            }
        }