protected void itemDropDownList_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (itemDropDownList.SelectedIndex == 0)
            {
            }
            else
            {
                int  companyId = Convert.ToInt32(companyDropDownList.SelectedValue);
                int  itemId    = Convert.ToInt32(itemDropDownList.SelectedValue);
                Item aItem     = aItemManager.GetQuantityRLevelByIds(companyId, itemId);
                aItem.CompanyName        = aComanySetupManager.GetCOmpanyById(companyId);
                reorderLevelTextBox.Text = aItem.ReorderLevel.ToString();

                int total = 0;
                int flag  = 0;
                if (ViewState["StockOut"] != null)
                {
                    List <Item> itemList = (List <Item>)ViewState["StockOut"];
                    foreach (Item value in itemList)
                    {
                        if (aItem.Id == value.Id)
                        {
                            total = value.StockOutQuantity + total;
                        }
                    }
                    if (aItem.AvailableQuantity > total)
                    {
                        total = aItem.AvailableQuantity - total;
                        flag  = 1;
                    }
                    if (flag == 0)
                    {
                        availabeQuantityTextBox.Text = aItem.AvailableQuantity.ToString();
                    }
                    else
                    {
                        availabeQuantityTextBox.Text = total.ToString();
                    }
                }
                else
                {
                    availabeQuantityTextBox.Text = aItem.AvailableQuantity.ToString();
                }
            }
        }
 protected void itemDropDownList_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (itemDropDownList.SelectedIndex == 0)
     {
     }
     else
     {
         int companyId = Convert.ToInt32(companyDropDownList.SelectedValue);
         int itemId    = Convert.ToInt32(itemDropDownList.SelectedValue);
         itemIdHiddenField.Value = itemId.ToString();
         Item aItem = aItemManager.GetQuantityRLevelByIds(companyId, itemId);
         aItem.CompanyName            = aComanySetupManager.GetCOmpanyById(companyId);
         reorderLevelTextBox.Text     = aItem.ReorderLevel.ToString();
         availabeQuantityTextBox.Text = aItem.AvailableQuantity.ToString();
     }
 }