protected void itemDropdownList_SelectedIndexChanged(object sender, EventArgs e) { reorderLevelTextBox.Enabled = false; quantityTextBox.Enabled = false; int id = Convert.ToInt32(itemDropdownList.SelectedValue); if (id == 0) { reorderLevelTextBox.Text = 0.ToString(); } else { Item item = stockInManager.GetReorderLevelByItemId(id); reorderLevelTextBox.Text = item.ReorderLevel.ToString(); } StockIn stockIn = stockInManager.GetAvailableQuantityByItemId(id); int quantity = stockIn.AvailableQuantity; if (quantity == 0) { quantityTextBox.Text = 0.ToString(); } else { quantityTextBox.Text = quantity.ToString(); } }