private void butPickHyg_Click(object sender, EventArgs e) { FormProviderPick FormPP = new FormProviderPick(_listProviders); FormPP.SelectedProvNum = _selectedProvHygNum; FormPP.ShowDialog(); if (FormPP.DialogResult != DialogResult.OK) { return; } _selectedProvHygNum = FormPP.SelectedProvNum; comboHyg.IndexSelectOrSetText(_listProviders.FindIndex(x => x.ProvNum == _selectedProvHygNum), () => { return(Providers.GetAbbr(_selectedProvHygNum)); }); }
private void FormOperatoryEdit_Load(object sender, System.EventArgs e) { textOpName.Text = OpCur.OpName; textAbbrev.Text = OpCur.Abbrev; checkIsHidden.Checked = OpCur.IsHidden; if (PrefC.GetBool(PrefName.EasyNoClinics)) { labelClinic.Visible = false; comboClinic.Visible = false; butPickClin.Visible = false; } _listClinics = new List <Clinic>() { new Clinic() { Abbr = Lan.g(this, "None") } }; //Seed with "None" Clinics.GetForUserod(Security.CurUser).ForEach(x => _listClinics.Add(x)); //do not re-organize from cache. They could either be alphabetizeded or sorted by item order. _listClinics.ForEach(x => comboClinic.Items.Add(x.Abbr)); //Add to UI control //Set Selected nums _selectedClinicNum = OpCur.ClinicNum; //can be 0 _selectedProvNum = OpCur.ProvDentist; _selectedProvHygNum = OpCur.ProvHygienist; //Set comboindexes for compatibility with fillComboProvHyg comboProv.SelectedIndex = -1; comboHyg.SelectedIndex = -1; comboClinic.IndexSelectOrSetText(_listClinics.FindIndex(x => x.ClinicNum == _selectedClinicNum) , () => { return(Clinics.GetAbbr(_selectedClinicNum)); }); if (OpCur.ListWSNPAOperatoryDefNums != null) { //This is an existing operatory with WSNPA appointment types associated. Go get them in order to display to the user. _listWSNPAOperatoryDefs = Defs.GetDefs(DefCat.WebSchedNewPatApptTypes, OpCur.ListWSNPAOperatoryDefNums); } FillWSNPAApptTypes(); FillComboProvHyg(); checkIsHygiene.Checked = OpCur.IsHygiene; checkSetProspective.Checked = OpCur.SetProspective; checkIsWebSched.Checked = OpCur.IsWebSched; }
private void FillComboInsBillingProv() { for (int i = 0; i < _listProviders.Count; i++) { comboInsBillingProv.Items.Add(_listProviders[i].GetLongDesc()); } if (_insBillingProvNum == 0) { radioInsBillingProvDefault.Checked = true; //default=0 } else if (_insBillingProvNum == -1) { radioInsBillingProvTreat.Checked = true; //treat=-1 } else { radioInsBillingProvSpecific.Checked = true; //specific=any number >0. Foreign key to ProvNum comboInsBillingProv.IndexSelectOrSetText(Providers.GetIndex(_insBillingProvNum), () => Providers.GetAbbr(_insBillingProvNum)); } }