Example #1
0
        private void butProviders_Click(object sender, EventArgs e)
        {
            List <Provider> listProviders = null;

            ODException.SwallowAnyException(() => {
                listProviders = comboBoxMultiProv.Items.Cast <ODBoxItem <Provider> >()
                                .Where(x => x.Tag != null)
                                .Select(x => x.Tag)
                                .ToList();
            });
            FormProvidersMultiPick FormPMP = new FormProvidersMultiPick(listProviders);

            FormPMP.SelectedProviders = comboBoxMultiProv.SelectedTags <Provider>().FindAll(x => x != null);
            FormPMP.ShowDialog();
            if (FormPMP.DialogResult != DialogResult.OK)
            {
                return;
            }
            List <long> listProvNums = new List <long>();

            foreach (Provider prov in FormPMP.SelectedProviders)
            {
                listProvNums.Add(prov.ProvNum);
            }
            FillProviders(GetProvidersForSelectedClinic(), listProvNums);
        }
Example #2
0
		private void butProvPick_Click(object sender,EventArgs e) {
			FormProvidersMultiPick FormPMP=new FormProvidersMultiPick();
			FormPMP.SelectedProviders=ProviderList;
			FormPMP.ShowDialog();
			if(FormPMP.DialogResult!=DialogResult.OK) {
				return;
			}
			listProviders.Items.Clear();
			for(int i=0;i<FormPMP.SelectedProviders.Count;i++) {
				listProviders.Items.Add(FormPMP.SelectedProviders[i].Abbr);
			}
			ProviderList=FormPMP.SelectedProviders;
			if(pinBoard.SelectedAppt==null) {
				MsgBox.Show(this,"There is no appointment on the pinboard.");
				return;
			}
			DoSearch();
		}