Exemple #1
0
        private void button_change_pres_Click(object sender, EventArgs e)
        {
            if (comboBox_presId.SelectedIndex == -1)
            {
                return;
            }
            PrescriptionForm    pf     = new PrescriptionForm();
            PermissibleValueObj presId = new PermissibleValueObj(comboBox_presId.SelectedItem.ToString(), comboBox_presId.SelectedItem.ToString());

            pf.setPresId(ref presId);
            pf.setPatId(int.Parse(textBox_patId.Text));
            pf.ShowDialog();
        }
Exemple #2
0
        private void button_add_pres_Click(object sender, EventArgs e)
        {
            PrescriptionForm    pf     = new PrescriptionForm();
            PermissibleValueObj presId = new PermissibleValueObj("", "");

            pf.setPresId(ref presId);
            pf.setPatId(int.Parse(textBox_patId.Text));
            pf.ShowDialog();
            comboBox_presId.Items.Add(presId);
            if (comboBox_presId.Items.Count > 0)
            {
                comboBox_presId.SelectedIndex = comboBox_presId.Items.Count - 1;
            }
        }