Exemplo n.º 1
0
        public DrugAdmin()
        {
            drugMgr = new DrugMgr();
            InitializeComponent();
            DSP_addSubDrug.setDSPform(this);
            DSP_addSubDrug.setSubDrugEnabled(true);
            DSP_addSubDrug.setSubDrugSelectionEnabled(false);
            DSP_addSubDrug.setSubDrugInclNotSpecified(false);
            DSP_addSubDrug.setShowDeletedItemCB(false);
            DSP_addSubDrug.setShowDeletedItem(false);

            DSP_amdDrug.setDSPform(this);
            DSP_amdDrug.setSubDrugEnabled(true);
            DSP_amdDrug.setSubDrugSelectionEnabled(true);
            DSP_amdDrug.setSubDrugInclNotSpecified(true);
            DSP_amdDrug.setShowDeletedItemCB(true);
            DSP_amdDrug.setShowDeletedItem(false);

            DSP_incompatibleWith.setDSPform(this);
            DSP_incompatibleWith.setSubDrugEnabled(false);
            DSP_incompatibleWith.setSubDrugSelectionEnabled(false);
            DSP_incompatibleWith.setSubDrugInclNotSpecified(false);
            DSP_incompatibleWith.setShowDeletedItemCB(false);
            DSP_incompatibleWith.setShowDeletedItem(true);
        }
Exemplo n.º 2
0
 private void tabPage3_Enter(object sender, EventArgs e)
 {
     textBox_incompatible_drugName.Clear();
     DSP_incompatibleWith.refresh();
     listBox_selectedIncompatibleDrug.Items.Clear();
     selectedDrug = null;
 }
Exemplo n.º 3
0
        private void button_selectIncompatibleDrug_Click(object sender, EventArgs e)
        {
            PermissibleValueObj DSPselectedDrug = DSP_incompatibleWith.getSelectedDrug();

            if (DSPselectedDrug != null)
            {
                if (DSPselectedDrug.Value == selectedDrug.Value)
                {
                    MessageBox.Show("同一藥物必能配伍", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
                foreach (PermissibleValueObj drug in listBox_selectedIncompatibleDrug.Items)
                {
                    if (DSPselectedDrug.Value == drug.Value)
                    {
                        MessageBox.Show("此項目已被選擇", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }
                }
                listBox_selectedIncompatibleDrug.Items.Add(DSPselectedDrug);
                //DSP_allergic.refresh();
            }
        }