Esempio n. 1
0
        private void butAddThankYou_Click(object sender, EventArgs e)
        {
            if (_ecClinicCur != null && _ecClinicCur.ClinicNum > 0 && _ecClinicCur.IsConfirmDefault)
            {
                if (!SwitchFromDefaults())
                {
                    return;
                }
            }
            ApptReminderRule         arr      = ApptReminderRules.CreateDefaultReminderRule(ApptReminderType.ScheduleThankYou, _ecClinicCur.ClinicNum);
            FormApptReminderRuleEdit FormARRE = new FormApptReminderRuleEdit(arr, _dictClinicRules[_clinicRuleClinicNum]);

            FormARRE.ShowDialog();
            if (FormARRE.DialogResult != DialogResult.OK)
            {
                return;
            }
            if (FormARRE.ApptReminderRuleCur == null || FormARRE.ApptReminderRuleCur.IsNew)           //Delete or Update
            //Nothing to update, this was a new rule.
            {
            }
            else              //Insert
            {
                _dictClinicRules[_clinicRuleClinicNum].Add(FormARRE.ApptReminderRuleCur);
            }
            if (FormARRE.IsPrefsChanged)
            {
                FillConfStatusesGrid();
            }
            FillRemindConfirmData();
        }
Esempio n. 2
0
        private void butAddConfirmation_Click(object sender, EventArgs e)
        {
            if (_ecClinicCur != null && _ecClinicCur.ClinicNum > 0 && _ecClinicCur.IsConfirmDefault)
            {
                if (!SwitchFromDefaults())
                {
                    return;
                }
            }
            ApptReminderRule         arr      = ApptReminderRules.CreateDefaultReminderRule(ApptReminderType.ConfirmationFutureDay, _ecClinicCur.ClinicNum);
            FormApptReminderRuleEdit FormARRE = new FormApptReminderRuleEdit(arr, _dictClinicRules[_clinicRuleClinicNum]);

            FormARRE.ShowDialog();
            if (FormARRE.DialogResult != DialogResult.OK)
            {
                return;
            }
            if (FormARRE.ApptReminderRuleCur == null || FormARRE.ApptReminderRuleCur.IsNew)
            {
                //Delete or Update
                //Nothing to delete or update, this was a new rule.
            }
            else              //Insert
            {
                _dictClinicRules[_clinicRuleClinicNum].Add(FormARRE.ApptReminderRuleCur);
            }
            FillRemindConfirmData();
        }
Esempio n. 3
0
        private void gridRemindersMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.EServicesSetup))
            {
                return;
            }
            if (e.Row < 0 || !(gridRemindersMain.ListGridRows[e.Row].Tag is ApptReminderRule))
            {
                return;                //we did not click on a valid row.
            }
            if (_ecClinicCur != null && _ecClinicCur.ClinicNum > 0 && _ecClinicCur.IsConfirmDefault && !SwitchFromDefaults())
            {
                return;
            }
            ApptReminderRule arr = (ApptReminderRule)gridRemindersMain.ListGridRows[e.Row].Tag;
            int idx = _dictClinicRules[_clinicRuleClinicNum].IndexOf(arr);
            FormApptReminderRuleEdit FormARRE = new FormApptReminderRuleEdit(arr, _dictClinicRules[_clinicRuleClinicNum]);

            FormARRE.ShowDialog();
            if (FormARRE.DialogResult != DialogResult.OK)
            {
                return;
            }
            if (FormARRE.ApptReminderRuleCur == null)           //Delete
            {
                _dictClinicRules[_clinicRuleClinicNum].RemoveAt(idx);
            }
            else if (FormARRE.ApptReminderRuleCur.IsNew)                                  //Insert
            {
                _dictClinicRules[_clinicRuleClinicNum].Add(FormARRE.ApptReminderRuleCur); //should never happen from the double click event
            }
            else                                                                          //Update
            {
                _dictClinicRules[_clinicRuleClinicNum][idx] = FormARRE.ApptReminderRuleCur;
            }
            if (FormARRE.IsPrefsChanged)
            {
                FillConfStatusesGrid();
            }
            FillRemindConfirmData();
        }
        private void gridPatPortalInviteRules_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.EServicesSetup))
            {
                return;
            }
            if (e.Row < 0 || !(gridPatPortalInviteRules.Rows[e.Row].Tag is ApptReminderRule))
            {
                return;                //we did not click on a valid row.
            }
            if (_clinicCurPPInvite != null && _clinicCurPPInvite.ClinicNum > 0 && _useDefaultsPPInvite && !SwitchFromDefaultsPPInvites())
            {
                return;
            }
            ApptReminderRule arr = (ApptReminderRule)gridPatPortalInviteRules.Rows[e.Row].Tag;
            int idx = _listPatPortalInviteRules.IndexOf(arr);
            FormApptReminderRuleEdit FormARRE = new FormApptReminderRuleEdit(arr);

            FormARRE.ShowDialog();
            if (FormARRE.DialogResult != DialogResult.OK)
            {
                return;
            }
            if (FormARRE.ApptReminderRuleCur == null)           //Delete
            {
                _listPatPortalInviteRules.RemoveAt(idx);
            }
            else if (FormARRE.ApptReminderRuleCur.IsNew)                     //Insert
            {
                _listPatPortalInviteRules.Add(FormARRE.ApptReminderRuleCur); //should never happen from the double click event
            }
            else                                                             //Update
            {
                _listPatPortalInviteRules[idx] = FormARRE.ApptReminderRuleCur;
            }
            FillPatPortalInvites();
        }
        private void butAddPPInviteRule_Click(object sender, EventArgs e)
        {
            if (_clinicCurPPInvite.ClinicNum > 0 && _useDefaultsPPInvite && !SwitchFromDefaultsPPInvites())
            {
                return;
            }
            ApptReminderRule         arr      = ApptReminderRules.CreateDefaultReminderRule(ApptReminderType.PatientPortalInvite, _clinicCurPPInvite.ClinicNum);
            FormApptReminderRuleEdit FormARRE = new FormApptReminderRuleEdit(arr);

            FormARRE.ShowDialog();
            if (FormARRE.DialogResult != DialogResult.OK)
            {
                return;
            }
            if (FormARRE.ApptReminderRuleCur == null || FormARRE.ApptReminderRuleCur.IsNew)           //Delete or Update
            //Nothing to delete or update, this was a new rule.
            {
            }
            else              //Insert
            {
                _listPatPortalInviteRules.Add(FormARRE.ApptReminderRuleCur);
            }
            FillPatPortalInvites();
        }