private void LBX_PrescriptionNumber_SelectedIndexChanged(object sender, EventArgs e) { FBTN_Abort.Visible = true; LBX_PrescriptionNumber.Enabled = false; if (LBX_PrescriptionNumber.SelectedIndex >= 0) { foreach (object listItem in LBX_PrescriptionNumber.SelectedItems) { MTBX_PrescriptionNumber.Text = listItem.ToString(); MTBX_PrescriptionNumber.Focus(); if (MTBX_PrescriptionNumber.Text != LBX_PrescriptionNumber.SelectedItem.ToString()) { FBTN_Abort.Visible = true; FBTN_Editer.Visible = true; FBTN_Delete.Visible = false; MTBX_PrescriptionNumber.CausesValidation = false; } else { FBTN_Abort.Visible = true; FBTN_Editer.Visible = false; FBTN_Delete.Visible = true; } } } }
private void LBX_PrescriptionNumber_Click(object sender, EventArgs e) { MTBX_PrescriptionNumber.Select(); }