예제 #1
0
        private void SaveAlerts()
        {
            if (NotificationsVisible)
            {             //If the employer content dictated that notifications should be visible
                using (Control create = (cuwReview.CreateUserStep.ContentTemplateContainer))
                {         //Setup a temporary object to access the create user step content template container
                    using (CheckBox cbTextAlerts = (create.FindControl("cbTextAlerts") as CheckBox))
                    {     //Setup a temporary object to references as the alerts checkbox
                        if (cbTextAlerts.Checked)
                        { //If the user checked that they wish to receive alerts
                            ThisSession.PatientPhone = String.Concat(
                                Encoder.HtmlEncode((create.FindControl("txtAreaCode") as TextBox).Text),
                                Encoder.HtmlEncode((create.FindControl("txtFirstThree") as TextBox).Text),
                                Encoder.HtmlEncode((create.FindControl("txtLastFour") as TextBox).Text));

                            CheckBox cbEmailAlerts     = (create.FindControl("cbEmailAlerts") as CheckBox),
                                     cbConciergeAlerts = (create.FindControl("cbConciergeAlerts") as CheckBox);

                            using (UpdateUserNotificationSettings uuns = new UpdateUserNotificationSettings())
                            {
                                uuns.CCHID                = ThisSession.CCHID;
                                uuns.OptInEmailAlerts     = cbEmailAlerts.Checked;
                                uuns.OptInTextMsgAlerts   = cbTextAlerts.Checked;
                                uuns.OptInConciergeAlerts = cbConciergeAlerts.Checked;
                                uuns.MobilePhone          = ThisSession.PatientPhone;
                                uuns.PostData();
                            }
                        }
                    }
                }
            }
        }
예제 #2
0
        private void SaveAlerts()
        {
            if (NotificationsVisible)
            {   //If the employer content dictated that notifications should be visible
                using (Control create = (cuwReview.CreateUserStep.ContentTemplateContainer))
                {   //Setup a temporary object to access the create user step content template container
                    using (CheckBox cbTextAlerts = (create.FindControl("cbTextAlerts") as CheckBox))
                    {   //Setup a temporary object to references as the alerts checkbox
                        if (cbTextAlerts.Checked)
                        {   //If the user checked that they wish to receive alerts
                            ThisSession.PatientPhone = String.Concat(
                                Encoder.HtmlEncode((create.FindControl("txtAreaCode") as TextBox).Text),
                                Encoder.HtmlEncode((create.FindControl("txtFirstThree") as TextBox).Text),
                                Encoder.HtmlEncode((create.FindControl("txtLastFour") as TextBox).Text));

                            CheckBox cbEmailAlerts = (create.FindControl("cbEmailAlerts") as CheckBox),
                                cbConciergeAlerts = (create.FindControl("cbConciergeAlerts") as CheckBox);

                            using (UpdateUserNotificationSettings uuns = new UpdateUserNotificationSettings())
                            {
                                uuns.CCHID = ThisSession.CCHID;
                                uuns.OptInEmailAlerts = cbEmailAlerts.Checked;
                                uuns.OptInTextMsgAlerts = cbTextAlerts.Checked;
                                uuns.OptInConciergeAlerts = cbConciergeAlerts.Checked;
                                uuns.MobilePhone = ThisSession.PatientPhone;
                                uuns.PostData();
                            }
                        }
                    }
                }
            }
        }
예제 #3
0
 public async Task HandleAsync(UpdateUserNotificationSettings command)
 => await CreateForAuthenticatedUserAsync(command);