private void FillClinics()
        {
            List <int> listSelectedItems = new List <int>();

            _listClinics = Clinics.GetForUserod(Security.CurUser);
            comboBoxMultiClinics.Items.Add(Lan.g(this, "All"));
            if (!Security.CurUser.ClinicIsRestricted)
            {
                comboBoxMultiClinics.Items.Add(Lan.g(this, "Unassigned"));
                listSelectedItems.Add(1);
            }
            for (int i = 0; i < _listClinics.Count; i++)
            {
                int curIndex = comboBoxMultiClinics.Items.Add(_listClinics[i].Abbr);
                if (Clinics.ClinicNum == 0)
                {
                    listSelectedItems.Add(curIndex);
                }
                if (_listClinics[i].ClinicNum == Clinics.ClinicNum)
                {
                    listSelectedItems.Clear();
                    listSelectedItems.Add(curIndex);
                }
            }
            foreach (int index in listSelectedItems)
            {
                comboBoxMultiClinics.SetSelected(index, true);
            }
        }
示例#2
0
 private void FillProvs()
 {
     comboBoxMultiProv.Items.Add(new ODBoxItem <Provider>(Lan.g(this, "All")));           //tag = null
     foreach (Provider provCur in Providers.GetListReports())
     {
         comboBoxMultiProv.Items.Add(new ODBoxItem <Provider>(provCur.GetLongDesc(), provCur));
     }
     comboBoxMultiProv.SetSelected(0, true);
 }