private void FillForm() { textMedName.Text = MedicationCur.MedName; if (!IsNew) { textMedName.ReadOnly = true; } if (MedicationCur.MedicationNum == MedicationCur.GenericNum) { textGenericName.Text = MedicationCur.MedName; textNotes.Text = MedicationCur.Notes; textNotes.ReadOnly = false; Brands = Medications.GetBrands(MedicationCur.MedicationNum); comboBrands.Items.Clear(); comboBrands.Items.AddRange(Brands); if (Brands.Length > 0) { comboBrands.SelectedIndex = 0; } } else { textGenericName.Text = Medications.GetMedication(MedicationCur.GenericNum).MedName; textNotes.Text = Medications.GetMedication(MedicationCur.GenericNum).Notes; textNotes.ReadOnly = true; Brands = new string[0]; comboBrands.Visible = false; labelBrands.Visible = false; } PatNames = Medications.GetPats(MedicationCur.MedicationNum); comboPatients.Items.Clear(); comboPatients.Items.AddRange(PatNames); if (PatNames.Length > 0) { comboPatients.SelectedIndex = 0; } textRxNormDesc.Text = RxNorms.GetDescByRxCui(MedicationCur.RxCui.ToString()); }