Example #1
0
 private void comboClinicEConfirm_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (_ecListClinics.Count == 0 || _dictClinicRules.Count == 0)
     {
         return;                                             //form load;
     }
     if (_ecClinicCur != null && _ecClinicCur.ClinicNum > 0) //do not update this clinic-pref if we are editing defaults.
     {
         _ecClinicCur.IsConfirmEnabled = checkIsConfirmEnabled.Checked;
         Clinics.Update(_ecClinicCur);
         Signalods.SetInvalid(InvalidType.Providers);
         //no need to save changes here because all Appointment reminder rules are saved to the DB from the edit window.
     }
     if (_ecClinicCur != null)
     {
         ApptReminderRules.SyncByClinicAndTypes(_dictClinicRules[_ecClinicCur.ClinicNum], _ecClinicCur.ClinicNum,
                                                ApptReminderType.Reminder, ApptReminderType.ConfirmationFutureDay);
     }
     if (comboClinicEConfirm.SelectedIndex > -1 && comboClinicEConfirm.SelectedIndex < _ecListClinics.Count)
     {
         _ecClinicCur = _ecListClinics[comboClinicEConfirm.SelectedIndex];
     }
     checkUseDefaultsEC.Checked    = _ecClinicCur != null && _ecClinicCur.IsConfirmDefault;
     checkIsConfirmEnabled.Checked = _ecClinicCur != null && _ecClinicCur.IsConfirmEnabled;
     FillRemindConfirmData();
 }
Example #2
0
 private void SaveTabECR()
 {
     if (comboStatusESent.SelectedIndex != -1)
     {
         Prefs.UpdateLong(PrefName.ApptEConfirmStatusSent, _listDefsApptStatus[comboStatusESent.SelectedIndex].DefNum);
     }
     if (comboStatusEAccepted.SelectedIndex != -1)
     {
         Prefs.UpdateLong(PrefName.ApptEConfirmStatusAccepted, _listDefsApptStatus[comboStatusEAccepted.SelectedIndex].DefNum);
     }
     if (comboStatusEDeclined.SelectedIndex != -1)
     {
         Prefs.UpdateLong(PrefName.ApptEConfirmStatusDeclined, _listDefsApptStatus[comboStatusEDeclined.SelectedIndex].DefNum);
     }
     if (comboStatusEFailed.SelectedIndex != -1)
     {
         Prefs.UpdateLong(PrefName.ApptEConfirmStatusSendFailed, _listDefsApptStatus[comboStatusEFailed.SelectedIndex].DefNum);
     }
     Prefs.UpdateBool(PrefName.ApptConfirmEnableForClinicZero, checkEnableNoClinic.Checked);
     Prefs.UpdateBool(PrefName.ApptEConfirm2ClickConfirmation, radio2ClickConfirm.Checked);
     ApptReminderRules.SyncByClinicAndTypes(_dictClinicRules[_ecClinicCur.ClinicNum], _ecClinicCur.ClinicNum,
                                            ApptReminderType.Reminder, ApptReminderType.ConfirmationFutureDay, ApptReminderType.ScheduleThankYou);
     if (_ecClinicCur != null && _ecClinicCur.ClinicNum != 0)
     {
         _ecClinicCur.IsConfirmEnabled = checkIsConfirmEnabled.Checked;
         Clinics.Update(_ecClinicCur);
     }
 }
Example #3
0
        private void butOK_Click(object sender, System.EventArgs e)
        {
            if (textDescription.Text == "")
            {
                MessageBox.Show(Lan.g(this, "Description cannot be blank."));
                return;
            }
            if (radioInsBillingProvSpecific.Checked && comboInsBillingProv.SelectedIndex == -1)
            {
                MsgBox.Show(this, "You must select a provider.");
                return;
            }
            string phone = textPhone.Text;

            if (Application.CurrentCulture.Name == "en-US")
            {
                phone = phone.Replace("(", "");
                phone = phone.Replace(")", "");
                phone = phone.Replace(" ", "");
                phone = phone.Replace("-", "");
                if (phone.Length != 0 && phone.Length != 10)
                {
                    MessageBox.Show("Invalid phone");
                    return;
                }
            }
            ClinicCur.Description         = textDescription.Text;
            ClinicCur.Phone               = phone;
            ClinicCur.Address             = textAddress.Text;
            ClinicCur.Address2            = textAddress2.Text;
            ClinicCur.City                = textCity.Text;
            ClinicCur.State               = textState.Text;
            ClinicCur.Zip                 = textZip.Text;
            ClinicCur.BankNumber          = textBankNumber.Text;
            ClinicCur.DefaultPlaceService = (PlaceOfService)comboPlaceService.SelectedIndex;
            if (radioInsBillingProvDefault.Checked)            //default=0
            {
                ClinicCur.InsBillingProv = 0;
            }
            else if (radioInsBillingProvTreat.Checked)            //treat=-1
            {
                ClinicCur.InsBillingProv = -1;
            }
            else
            {
                ClinicCur.InsBillingProv = ProviderC.ListShort[comboInsBillingProv.SelectedIndex].ProvNum;
            }
            if (IsNew)
            {
                Clinics.Insert(ClinicCur);
            }
            else
            {
                Clinics.Update(ClinicCur);
            }
            DialogResult = DialogResult.OK;
        }
Example #4
0
        private void menuItemSetup_Click(object sender, EventArgs e)
        {
            FormClinicEdit form = new FormClinicEdit(_clinicCur.Copy());

            form.ShowDialog();
            if (form.DialogResult == DialogResult.OK)
            {
                Clinics.Update(form.ClinicCur, _clinicCur);
                DataValid.SetInvalid(InvalidType.Providers);
                _clinicCur = form.ClinicCur.Copy();
            }
        }