Пример #1
0
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            PrefName prefName           = (PrefName)gridMain.Rows[e.Row].Tag;
            FormRecallMessageEdit FormR = new FormRecallMessageEdit(prefName);

            FormR.MessageVal = PrefC.GetString(prefName);
            FormR.ShowDialog();
            if (FormR.DialogResult != DialogResult.OK)
            {
                return;
            }
            Prefs.UpdateString(prefName, FormR.MessageVal);
            //Prefs.RefreshCache();//above line handles it.
            FillGrid();
        }
Пример #2
0
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            PrefName prefName           = gridMain.SelectedTag <PrefName>();
            FormRecallMessageEdit FormR = new FormRecallMessageEdit(prefName);

            FormR.MessageVal = PrefC.GetString(prefName);
            FormR.ShowDialog();
            if (FormR.DialogResult != DialogResult.OK)
            {
                return;
            }
            if (Prefs.UpdateString(prefName, FormR.MessageVal))
            {
                DataValid.SetInvalid(InvalidType.Prefs);
            }
            FillGrid();
        }
Пример #3
0
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            PrefName prefName           = (PrefName)gridMain.Rows[e.Row].Tag;
            FormRecallMessageEdit FormR = new FormRecallMessageEdit(prefName);

            if (_selectedClinicNum == 0)
            {
                FormR.MessageVal = PrefC.GetString(prefName);
            }
            else
            {
                ClinicPref clinicPref = ClinicPrefs.GetPref(prefName, _selectedClinicNum);
                if (clinicPref == null || string.IsNullOrEmpty(clinicPref.ValueString))
                {
                    FormR.MessageVal = PrefC.GetString(prefName);
                }
                else
                {
                    FormR.MessageVal = clinicPref.ValueString;
                }
            }
            FormR.ShowDialog();
            if (FormR.DialogResult != DialogResult.OK)
            {
                return;
            }
            if (_selectedClinicNum == 0)
            {
                if (Prefs.UpdateString(prefName, FormR.MessageVal))
                {
                    DataValid.SetInvalid(InvalidType.Prefs);
                }
            }
            else
            {
                if (ClinicPrefs.Upsert(prefName, _selectedClinicNum, FormR.MessageVal))
                {
                    DataValid.SetInvalid(InvalidType.ClinicPrefs);
                }
            }
            FillPrefs();
        }
Пример #4
0
 private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e)
 {
     PrefName prefName=(PrefName)Enum.Parse(typeof(PrefName),gridMain.Rows[e.Row].Tag.ToString());
     FormRecallMessageEdit FormR=new FormRecallMessageEdit();
     FormR.MessageVal=PrefC.GetString(prefName);
     FormR.ShowDialog();
     if(FormR.DialogResult!=DialogResult.OK) {
         return;
     }
     Prefs.UpdateString(prefName,FormR.MessageVal);
     //Prefs.RefreshCache();//above line handles it.
     FillGrid();
     changed=true;
 }
Пример #5
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();
        }