private void btnCauta_Click(object sender, EventArgs e) { Pharmacy s = adminFarmacie.GetMedicament(txtNume.Text); if (s != null) { lblMesajCauta.Text = s.ConversieLaSir(); /* * foreach (var medicamente in boxFarmacie.Controls) * { * if (medicamente is CheckBox) * { * var disciplinaBox = medicamente as CheckBox; * foreach (String dis in s.Locatie) * if (disciplinaBox.Text.Equals(dis)) * disciplinaBox.Checked = true; * } * } */ } else { lblMesajCauta.Text = "Nu s-a gasit Medicamentul"; } /* * if (txtNume.Enabled == true) * { * txtNume.Enabled = false; * //dezactivare butoane radio * foreach (var button in boxTip.Controls) * { * if (button is RadioButton) * { * var radioButton = button as RadioButton; * radioButton.Enabled = false; * } * } * } * else * { * txtNume.Enabled = true; * //activare butoane radio * foreach (var button in boxTip.Controls) * { * if (button is RadioButton) * { * var radioButton = button as RadioButton; * radioButton.Enabled = true; * } * } * * }*/ }