Beispiel #1
0
        ///<summary>Checks the currently selected radio button for the given PrefName and groupBox, based on the radio button tags.</summary>
        private void WebSchedVerify_SetRadioButtonVal(PrefName prefName, GroupBox groupBox)
        {
            WebSchedVerifyType type        = (WebSchedVerifyType)PIn.Int(WebSchedVerify_GetTemplateVal(prefName));
            RadioButton        buttonMatch = groupBox.Controls.OfType <RadioButton>().FirstOrDefault(x => (WebSchedVerifyType)x.Tag == type);

            buttonMatch.Checked = true;
        }
Beispiel #2
0
        ///<summary>Event handler for RadioButtons check changed.</summary>
        private void WebSchedVerify_RadioButtonCheckChanged(object sender, EventArgs e)
        {
            RadioButton buttonCur = (RadioButton)sender;
            GroupBox    groupBox  = (GroupBox)buttonCur.Parent;

            if (buttonCur.Checked)
            {
                PrefName           prefName   = (PrefName)groupBox.Tag;
                WebSchedVerifyType verifyType = (WebSchedVerifyType)buttonCur.Tag;
                if (_listWebSchedVerifyClinicPrefs.Any(x => x.ClinicNum == comboClinicVerify.SelectedClinicNum))
                {
                    //We only want to do this part when the user manually checked this, not when the check-defaults forced it to change
                    WebSchedVerify_UpdateClinicPref(prefName, POut.Int((int)verifyType));
                }
            }
        }