private void butEditEmail_Click(object sender, EventArgs e)
        {
            FormEmailEdit formEE = new FormEmailEdit();

            formEE.MarkupText   = _emailPlainText;
            formEE.IsRawAllowed = false;
            formEE.ShowDialog();
            if (formEE.DialogResult != DialogResult.OK)
            {
                return;
            }
            _emailPlainText = formEE.MarkupText;
            RefreshEmail();
        }
        private void butEditEmail_Click(object sender, EventArgs e)
        {
            FormEmailEdit formEmailEdit = new FormEmailEdit();

            formEmailEdit.MarkupText           = _emailText;
            formEmailEdit.DoCheckForDisclaimer = true;
            formEmailEdit.IsRawAllowed         = false;
            formEmailEdit.ShowDialog();
            if (formEmailEdit.DialogResult != DialogResult.OK)
            {
                return;
            }
            _emailText = formEmailEdit.MarkupText;
            RefreshEmail();
        }
Beispiel #3
0
        private void WebSchedNotify_EditEmail(WebBrowser emailBody, PrefName prefName)
        {
            FormEmailEdit formEmailEdit = new FormEmailEdit {
                MarkupText           = WebSchedVerify_GetTemplateVal(prefName),
                DoCheckForDisclaimer = true,
                IsRawAllowed         = false,
            };

            formEmailEdit.ShowDialog();
            if (formEmailEdit.DialogResult != DialogResult.OK)
            {
                return;
            }
            WebSchedVerify_UpdateClinicPref(prefName, formEmailEdit.MarkupText);
            RefreshEmail(emailBody, formEmailEdit.MarkupText);
        }
Beispiel #4
0
        private void butEditWebMailNotificationBody_Click(object sender, EventArgs e)
        {
            FormEmailEdit formEmailEdit = new FormEmailEdit {
                MarkupText           = _webMailNotificationBody,
                DoCheckForDisclaimer = true,
                IsRawAllowed         = false,
            };

            formEmailEdit.ShowDialog();
            if (formEmailEdit.DialogResult != DialogResult.OK)
            {
                return;
            }
            _webMailNotificationBody = formEmailEdit.MarkupText;
            RefreshEmail(browserWebMailNotificatonBody, _webMailNotificationBody);
        }
        private void butEditHtml_Click(object sender, EventArgs e)
        {
            //get the most current version of the "plain" text from the emailPreview text box.
            FormEmailEdit formEE = new FormEmailEdit();

            formEE.MarkupText = textBodyText.Text;          //Copy existing text in case user decided to compose HTML after starting their email.
            formEE.IsRaw      = _isRaw;
            formEE.ShowDialog();
            if (formEE.DialogResult != DialogResult.OK)
            {
                return;
            }
            textBodyText.Text = formEE.MarkupText;
            _hasTextChanged   = true;
            _isRaw            = formEE.IsRaw;
            ChangeView(true);
        }
Beispiel #6
0
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            PrefName prefName = (PrefName)gridMain.ListGridRows[e.Row].Tag;
            string   curPrefValue;

            if (_selectedClinicNum == 0)
            {
                curPrefValue = PrefC.GetString(prefName);
            }
            else
            {
                ClinicPref clinicPref = ClinicPrefs.GetPref(prefName, _selectedClinicNum);
                if (clinicPref == null || string.IsNullOrEmpty(clinicPref.ValueString))
                {
                    curPrefValue = PrefC.GetString(prefName);
                }
                else
                {
                    curPrefValue = clinicPref.ValueString;
                }
            }
            string newPrefValue;
            bool   isHtmlTemplate = prefName == PrefName.WebSchedAsapEmailTemplate;

            if (isHtmlTemplate)
            {
                FormEmailEdit formEmailEdit = new FormEmailEdit {
                    MarkupText           = curPrefValue,
                    DoCheckForDisclaimer = true,
                    IsRawAllowed         = false,
                };
                formEmailEdit.ShowDialog();
                if (formEmailEdit.DialogResult != DialogResult.OK)
                {
                    return;
                }
                newPrefValue = formEmailEdit.MarkupText;
            }
            else
            {
                FormRecallMessageEdit FormR = new FormRecallMessageEdit(prefName);
                FormR.MessageVal = curPrefValue;
                FormR.ShowDialog();
                if (FormR.DialogResult != DialogResult.OK)
                {
                    return;
                }
                newPrefValue = FormR.MessageVal;
            }
            if (_selectedClinicNum == 0)
            {
                if (Prefs.UpdateString(prefName, newPrefValue))
                {
                    DataValid.SetInvalid(InvalidType.Prefs);
                }
            }
            else
            {
                if (ClinicPrefs.Upsert(prefName, _selectedClinicNum, newPrefValue))
                {
                    DataValid.SetInvalid(InvalidType.ClinicPrefs);
                }
            }
            FillPrefs();
        }