Пример #1
0
 private void tabPage3_Enter(object sender, EventArgs e)
 {
     textBox_incompatible_drugName.Clear();
     DSP_incompatibleWith.refresh();
     listBox_selectedIncompatibleDrug.Items.Clear();
     selectedDrug = null;
 }
Пример #2
0
 public bool Equals(DrugObj x)
 {
     if (this == null && x == null)
     {
         return(true);
     }
     if (this == null || x == null)
     {
         return(false);
     }
     return(this.getValue() == x.getValue());
 }
Пример #3
0
        private void button_addFromDSP_Click(object sender, EventArgs e)
        {
            //DGV 0=BUTTON, 1=DRUG_ID, 2=DRUG_NAME, 3=DOSAGE, 4=UNIT
            PermissibleValueObjWithDelFlag subDrug = DSP.getSelectedSubDrug();
            DrugObj drug = DSP.getSelectedDrug();

            if (subDrug == null || subDrug.getValue().Split(new String[] { "||" }, StringSplitOptions.None)[1] == "0")
            {
                addDrugToDGV(drug);
            }
            else
            {
                addDrugToDGV(subDrug);
            }
        }
Пример #4
0
        public void DSPselectedDrugChanged(DrugObj drug)
        {
            int selectedTabIdx = tabControl1.SelectedIndex;

            if (selectedTabIdx == 0)
            {
                selectedDrug    = drug;
                selectedSubDrug = null;
                textBox_addDrug_selectedDrugName.Text     = drug.getName();
                textBox_addDrug_selectedDrugName.ReadOnly = true;
            }
            else if (selectedTabIdx == 1)
            {
                selectedDrug    = drug;
                selectedSubDrug = null;
                textBox_amdDrug_drugName.ReadOnly         = false;
                textBox_amdDrug_subDrugName.ReadOnly      = true;
                textBox_amdDrug_minDoseVal.ReadOnly       = false;
                comboBox_amdDrug_minDoseUnit.Enabled      = true;
                textBox_amdDrug_maxDoseVal.ReadOnly       = false;
                comboBox_amdDrug_maxDoseUnit.Enabled      = true;
                comboBox_amdDrug_pri_type.Enabled         = true;
                comboBox_amdDrug_sec_type.Enabled         = true;
                groupBox_amdDrug4q5w.Enabled              = true;
                groupBox_amdDrug_contraindication.Enabled = true;
                textBox_amdDrug_drugName.Text             = drug.getName();
                textBox_amdDrug_subDrugName.Clear();
                textBox_amdDrug_minDoseVal.Text = drug.MinDoseVal.ToString();
                Utilities.SelectItemByValue(comboBox_amdDrug_minDoseUnit, drug.MinDoseUnit.ToString());
                textBox_amdDrug_maxDoseVal.Text = drug.MaxDoseVal.ToString();
                Utilities.SelectItemByValue(comboBox_amdDrug_maxDoseUnit, drug.MaxDoseUnit.ToString());
                Utilities.SelectItemByValue(comboBox_amdDrug_pri_type, drug.PriType.ToString());
                Utilities.SelectItemByValue(comboBox_amdDrug_sec_type, drug.SecType.ToString());
                checkBox_amdDrug_q1.Checked = drug.Q1;
                checkBox_amdDrug_q2.Checked = drug.Q2;
                checkBox_amdDrug_q3.Checked = drug.Q3;
                checkBox_amdDrug_q4.Checked = drug.Q4;
                checkBox_amdDrug_w1.Checked = drug.W1;
                checkBox_amdDrug_w2.Checked = drug.W2;
                checkBox_amdDrug_w3.Checked = drug.W3;
                checkBox_amdDrug_w4.Checked = drug.W4;
                checkBox_amdDrug_w5.Checked = drug.W5;
                checkBox_amdDrug_w6.Checked = drug.W6;
                Utilities.SelectItemByValue(comboBox_amdDrug_preg_contra, drug.PregContra.ToString());
                Utilities.SelectItemByValue(comboBox_amdDrug_g6pd_contra, drug.G6pdContra.ToString());
                checkBox_amdDrug_deleteItem.Checked = drug.Deleted;
            }
        }
Пример #5
0
 public void setSelectedDrug(DrugObj drug)
 {
     selectedDrug = drug;
 }