private void Products_SelectedIndexChanged(object sender, EventArgs e) { Quantity.Text = bc.getQuantity(Int32.Parse(Products.SelectedValue.ToString())).ToString(); total = Int32.Parse(Quantity.Text); c = total; if (c == 0) { AddToOutvoice.Enabled = false; } else { AddToOutvoice.Enabled = true; } }