private void butPickHyg_Click(object sender, EventArgs e) { FormProviderPick FormPP = new FormProviderPick(comboHyg.Items.GetAll <Provider>()); FormPP.SelectedProvNum = comboHyg.GetSelectedProvNum(); FormPP.ShowDialog(); if (FormPP.DialogResult != DialogResult.OK) { return; } comboHyg.SetSelectedProvNum(FormPP.SelectedProvNum); }
private void butPickProvider_Click(object sender, EventArgs e) { //for dental schools FormProviderPick FormPP = new FormProviderPick(comboProv.Items.GetAll <Provider>()); FormPP.SelectedProvNum = comboProv.GetSelectedProvNum(); FormPP.ShowDialog(); if (FormPP.DialogResult != DialogResult.OK) { return; } comboProv.SetSelectedProvNum(FormPP.SelectedProvNum); }
private void butOK_Click(object sender, System.EventArgs e) { string phone = textPhone.Text; if (!TelephoneNumbers.IsNumberValidTenDigit(ref phone)) { MessageBox.Show(Lan.g(this, "Invalid phone. Must contain exactly ten digits.")); return; } string fax = textFax.Text; if (!TelephoneNumbers.IsNumberValidTenDigit(ref fax)) { MessageBox.Show(Lan.g(this, "Invalid fax. Must contain exactly ten digits.")); return; } if (radioInsBillingProvSpecific.Checked && comboInsBillingProv.SelectedIndex == -1) { MsgBox.Show(this, "You must select a provider."); return; } if (comboProv.Items.Count == 0) { MsgBox.Show(this, "Database must have at least one provider entered, first."); return; } if (comboProv.SelectedIndex == -1) //practice really needs a default prov { comboProv.SelectedIndex = 0; } if (Providers.GetProv(comboProv.GetSelectedProvNum()).FeeSched == 0) { MsgBox.Show(this, "The selected provider must have a fee schedule set before they can be the default provider."); return; } bool changed = false; if (Prefs.UpdateBool(PrefName.PracticeIsMedicalOnly, checkIsMedicalOnly.Checked) | Prefs.UpdateString(PrefName.PracticeTitle, textPracticeTitle.Text) | Prefs.UpdateString(PrefName.PracticeAddress, textAddress.Text) | Prefs.UpdateString(PrefName.PracticeAddress2, textAddress2.Text) | Prefs.UpdateString(PrefName.PracticeCity, textCity.Text) | Prefs.UpdateString(PrefName.PracticeST, textST.Text) | Prefs.UpdateString(PrefName.PracticeZip, textZip.Text) | Prefs.UpdateString(PrefName.PracticePhone, phone) | Prefs.UpdateString(PrefName.PracticeFax, fax) | Prefs.UpdateBool(PrefName.UseBillingAddressOnClaims, checkUseBillingAddressOnClaims.Checked) | Prefs.UpdateString(PrefName.PracticeBillingAddress, textBillingAddress.Text) | Prefs.UpdateString(PrefName.PracticeBillingAddress2, textBillingAddress2.Text) | Prefs.UpdateString(PrefName.PracticeBillingCity, textBillingCity.Text) | Prefs.UpdateString(PrefName.PracticeBillingST, textBillingST.Text) | Prefs.UpdateString(PrefName.PracticeBillingZip, textBillingZip.Text) | Prefs.UpdateString(PrefName.PracticePayToAddress, textPayToAddress.Text) | Prefs.UpdateString(PrefName.PracticePayToAddress2, textPayToAddress2.Text) | Prefs.UpdateString(PrefName.PracticePayToCity, textPayToCity.Text) | Prefs.UpdateString(PrefName.PracticePayToST, textPayToST.Text) | Prefs.UpdateString(PrefName.PracticePayToZip, textPayToZip.Text) | Prefs.UpdateString(PrefName.PracticeBankNumber, textBankNumber.Text)) { changed = true; } if (CultureInfo.CurrentCulture.Name.EndsWith("CH")) //CH is for switzerland. eg de-CH { if (Prefs.UpdateString(PrefName.BankRouting, textBankRouting.Text) | Prefs.UpdateString(PrefName.BankAddress, textBankAddress.Text)) { changed = true; } } if (Prefs.UpdateLong(PrefName.PracticeDefaultProv, comboProv.GetSelectedProvNum())) { changed = true; } if (listBillType.SelectedIndex != -1) { if (Prefs.UpdateLong(PrefName.PracticeDefaultBillType , _listBillingTypeDefs[listBillType.SelectedIndex].DefNum)) { changed = true; } } if (Prefs.UpdateLong(PrefName.DefaultProcedurePlaceService, listPlaceService.SelectedIndex)) { changed = true; } if (radioInsBillingProvDefault.Checked) //default=0 { if (Prefs.UpdateLong(PrefName.InsBillingProv, 0)) { changed = true; } } else if (radioInsBillingProvTreat.Checked) //treat=-1 { if (Prefs.UpdateLong(PrefName.InsBillingProv, -1)) { changed = true; } } else { if (Prefs.UpdateLong(PrefName.InsBillingProv, comboInsBillingProv.GetSelectedProvNum())) { changed = true; } } if (changed) { DataValid.SetInvalid(InvalidType.Prefs); } FormEServicesSetup.UploadPreference(PrefName.PracticeTitle); DialogResult = DialogResult.OK; }