コード例 #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
ファイル: FormAsapSetup.cs プロジェクト: royedwards/DRDNet
        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
ファイル: FormRecallSetup.cs プロジェクト: nampn/ODental
 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
ファイル: FormAsapSetup.cs プロジェクト: ChemBrain/OpenDental
        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();
        }