Inheritance: System.Web.UI.WebControls.CompositeControl, IRockControl
Exemplo n.º 1
0
        /// <summary>
        /// Creates the control(s) necessary for prompting user for a new value
        /// </summary>
        /// <param name="configurationValues">The configuration values.</param>
        /// <param name="id"></param>
        /// <returns>
        /// The control
        /// </returns>
        public override System.Web.UI.Control EditControl( Dictionary<string, ConfigurationValue> configurationValues, string id )
        {
            var personPicker = new PersonPicker { ID = id };
            if ( configurationValues.ContainsKey( ENABLE_SELF_SELECTION_KEY ) )
            {
                personPicker.EnableSelfSelection = configurationValues[ENABLE_SELF_SELECTION_KEY].Value.AsBoolean();
            }

            return personPicker;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.
        /// </summary>
        protected override void CreateChildControls()
        {
            if (!_controlsLoaded)
            {
                Controls.Clear();

                _tbName          = new RockTextBox();
                _tbName.ID       = this.ID + "_tbName";
                _tbName.Label    = "Registration Instance Name";
                _tbName.Help     = "The name will be used to describe the registration on the registration screens and emails.";
                _tbName.Required = true;
                Controls.Add(_tbName);

                _cbIsActive       = new RockCheckBox();
                _cbIsActive.ID    = this.ID + "_cbIsActive";
                _cbIsActive.Label = "Active";
                _cbIsActive.Text  = "Yes";
                Controls.Add(_cbIsActive);

                _tbUrlSlug         = new RockTextBox();
                _tbUrlSlug.ID      = this.ID + "_tbUrlSlug";
                _tbUrlSlug.Label   = "URL Slug";
                _tbUrlSlug.Visible = false;
                Controls.Add(_tbUrlSlug);


                _ceDetails              = new CodeEditor();
                _ceDetails.ID           = this.ID + "_ceDetails";
                _ceDetails.Label        = "Details";
                _ceDetails.EditorMode   = CodeEditorMode.Html;
                _ceDetails.EditorTheme  = CodeEditorTheme.Rock;
                _ceDetails.EditorHeight = "100";
                _ceDetails.Visible      = false; // hiding this out for now. Struggling where we'd even use this, but instead of removing it we'll just comment it out for now.
                Controls.Add(_ceDetails);


                _dtpStart       = new DateTimePicker();
                _dtpStart.ID    = this.ID + "_dtpStart";
                _dtpStart.Label = "Registration Starts";
                Controls.Add(_dtpStart);

                _dtpEnd       = new DateTimePicker();
                _dtpEnd.ID    = this.ID + "_dtpEnd";
                _dtpEnd.Label = "Registration Ends";
                Controls.Add(_dtpEnd);

                _nbMaxAttendees            = new NumberBox();
                _nbMaxAttendees.ID         = this.ID + "_nbMaxAttendees";
                _nbMaxAttendees.Label      = "Maximum Attendees";
                _nbMaxAttendees.NumberType = ValidationDataType.Integer;
                Controls.Add(_nbMaxAttendees);

                _wtpRegistrationWorkflow       = new WorkflowTypePicker();
                _wtpRegistrationWorkflow.ID    = this.ID + "_wtpRegistrationWorkflow";
                _wtpRegistrationWorkflow.Label = "Registration Workflow";
                _wtpRegistrationWorkflow.Help  = "An optional workflow type to launch when a new registration is completed.";
                Controls.Add(_wtpRegistrationWorkflow);

                _cbCost       = new CurrencyBox();
                _cbCost.ID    = this.ID + "_cbCost";
                _cbCost.Label = "Cost";
                _cbCost.Help  = "The cost per registrant";
                Controls.Add(_cbCost);

                _cbMinimumInitialPayment       = new CurrencyBox();
                _cbMinimumInitialPayment.ID    = this.ID + "_cbMinimumInitialPayment";
                _cbMinimumInitialPayment.Label = "Minimum Initial Payment";
                _cbMinimumInitialPayment.Help  = "The minimum amount required per registrant. Leave value blank if full amount is required.";
                Controls.Add(_cbMinimumInitialPayment);

                _cbDefaultPaymentAmount       = new CurrencyBox();
                _cbDefaultPaymentAmount.ID    = this.ID + "_cbDefaultPaymentAmount";
                _cbDefaultPaymentAmount.Label = "Default Payment Amount";
                _cbDefaultPaymentAmount.Help  = "The default payment amount per registrant. Leave value blank to default to the full amount. NOTE: This requires that a Minimum Initial Payment is defined.";
                Controls.Add(_cbDefaultPaymentAmount);

                _apAccount          = new AccountPicker();
                _apAccount.ID       = this.ID + "_apAccount";
                _apAccount.Label    = "Account";
                _apAccount.Required = true;
                Controls.Add(_apAccount);

                _ppContact                     = new PersonPicker();
                _ppContact.ID                  = this.ID + "_ppContact";
                _ppContact.Label               = "Contact";
                _ppContact.SelectPerson       += _ppContact_SelectPerson;
                _ppContact.EnableSelfSelection = true;
                Controls.Add(_ppContact);

                _pnContactPhone       = new PhoneNumberBox();
                _pnContactPhone.ID    = this.ID + "_pnContactPhone";
                _pnContactPhone.Label = "Contact Phone";
                Controls.Add(_pnContactPhone);

                _ebContactEmail       = new EmailBox();
                _ebContactEmail.ID    = this.ID + "_ebContactEmail";
                _ebContactEmail.Label = "Contact Email";
                Controls.Add(_ebContactEmail);

                _dtpSendReminder       = new DateTimePicker();
                _dtpSendReminder.ID    = this.ID + "_dtpSendReminder";
                _dtpSendReminder.Label = "Send Reminder Date";
                Controls.Add(_dtpSendReminder);

                _cbReminderSent       = new RockCheckBox();
                _cbReminderSent.ID    = this.ID + "_cbReminderSent";
                _cbReminderSent.Label = "Reminder Sent";
                _cbReminderSent.Text  = "Yes";
                Controls.Add(_cbReminderSent);

                _htmlRegistrationInstructions         = new HtmlEditor();
                _htmlRegistrationInstructions.ID      = this.ID + "_htmlRegistrationInstructions";
                _htmlRegistrationInstructions.Toolbar = HtmlEditor.ToolbarConfig.Light;
                _htmlRegistrationInstructions.Label   = "Registration Instructions";
                _htmlRegistrationInstructions.Help    = "These instructions will appear at the beginning of the registration process when selecting how many registrants for the registration. These instructions can be provided on the registration template also. Any instructions here will override the instructions on the template.";
                _htmlRegistrationInstructions.Height  = 200;
                Controls.Add(_htmlRegistrationInstructions);

                _htmlAdditionalReminderDetails         = new HtmlEditor();
                _htmlAdditionalReminderDetails.ID      = this.ID + "_htmlAdditionalReminderDetails";
                _htmlAdditionalReminderDetails.Toolbar = HtmlEditor.ToolbarConfig.Light;
                _htmlAdditionalReminderDetails.Label   = "Additional Reminder Details";
                _htmlAdditionalReminderDetails.Help    = "These confirmation details will be appended to those from the registration template when displayed at the end of the registration process.";
                _htmlAdditionalReminderDetails.Height  = 200;
                Controls.Add(_htmlAdditionalReminderDetails);

                _htmlAdditionalConfirmationDetails         = new HtmlEditor();
                _htmlAdditionalConfirmationDetails.ID      = this.ID + "_htmlAdditionalConfirmationDetails";
                _htmlAdditionalConfirmationDetails.Toolbar = HtmlEditor.ToolbarConfig.Light;
                _htmlAdditionalConfirmationDetails.Label   = "Additional Confirmation Details";
                _htmlAdditionalConfirmationDetails.Help    = "These confirmation details will be appended to those from the registration template when displayed at the end of the registration process.";
                _htmlAdditionalConfirmationDetails.Height  = 200;
                Controls.Add(_htmlAdditionalConfirmationDetails);

                _controlsLoaded = true;
            }
        }
        /// <summary>
        /// Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.
        /// </summary>
        protected override void CreateChildControls()
        {
            if (!_controlsLoaded)
            {
                Controls.Clear();

                _tbName          = new RockTextBox();
                _tbName.ID       = this.ID + "_tbName";
                _tbName.Label    = "Registration Instance Name";
                _tbName.Help     = "The name will be used to describe the registration on the registration screens and emails.";
                _tbName.Required = true;
                Controls.Add(_tbName);

                _cbIsActive       = new RockCheckBox();
                _cbIsActive.ID    = this.ID + "_cbIsActive";
                _cbIsActive.Label = "Active";
                _cbIsActive.Text  = "Yes";
                Controls.Add(_cbIsActive);

                _tbUrlSlug         = new RockTextBox();
                _tbUrlSlug.ID      = this.ID + "_tbUrlSlug";
                _tbUrlSlug.Label   = "URL Slug";
                _tbUrlSlug.Visible = false;
                Controls.Add(_tbUrlSlug);


                _ceDetails              = new CodeEditor();
                _ceDetails.ID           = this.ID + "_ceDetails";
                _ceDetails.Label        = "Details";
                _ceDetails.EditorMode   = CodeEditorMode.Html;
                _ceDetails.EditorTheme  = CodeEditorTheme.Rock;
                _ceDetails.EditorHeight = "100";
                _ceDetails.Visible      = false; // hiding this out for now. Struggling where we'd even use this, but instead of removing it we'll just comment it out for now.
                Controls.Add(_ceDetails);


                _dtpStart       = new DateTimePicker();
                _dtpStart.ID    = this.ID + "_dtpStart";
                _dtpStart.Label = "Registration Starts";
                Controls.Add(_dtpStart);

                _dtpEnd       = new DateTimePicker();
                _dtpEnd.ID    = this.ID + "_dtpEnd";
                _dtpEnd.Label = "Registration Ends";
                Controls.Add(_dtpEnd);

                _nbMaxAttendees            = new NumberBox();
                _nbMaxAttendees.ID         = this.ID + "_nbMaxAttendees";
                _nbMaxAttendees.Label      = "Maximum Attendees";
                _nbMaxAttendees.NumberType = ValidationDataType.Integer;
                Controls.Add(_nbMaxAttendees);

                _apAccount          = new AccountPicker();
                _apAccount.ID       = this.ID + "_apAccount";
                _apAccount.Label    = "Account";
                _apAccount.Required = true;
                Controls.Add(_apAccount);

                _ppContact                     = new PersonPicker();
                _ppContact.ID                  = this.ID + "_ppContact";
                _ppContact.Label               = "Contact";
                _ppContact.SelectPerson       += _ppContact_SelectPerson;
                _ppContact.EnableSelfSelection = true;
                Controls.Add(_ppContact);

                _pnContactPhone       = new PhoneNumberBox();
                _pnContactPhone.ID    = this.ID + "_pnContactPhone";
                _pnContactPhone.Label = "Contact Phone";
                Controls.Add(_pnContactPhone);

                _ebContactEmail       = new EmailBox();
                _ebContactEmail.ID    = this.ID + "_ebContactEmail";
                _ebContactEmail.Label = "Contact Email";
                Controls.Add(_ebContactEmail);

                _dtpSendReminder       = new DateTimePicker();
                _dtpSendReminder.ID    = this.ID + "_dtpSendReminder";
                _dtpSendReminder.Label = "Send Reminder Date";
                Controls.Add(_dtpSendReminder);

                _cbReminderSent       = new RockCheckBox();
                _cbReminderSent.ID    = this.ID + "_cbReminderSent";
                _cbReminderSent.Label = "Reminder Sent";
                _cbReminderSent.Text  = "Yes";
                Controls.Add(_cbReminderSent);

                _htmlAdditionalReminderDetails         = new HtmlEditor();
                _htmlAdditionalReminderDetails.ID      = this.ID + "_htmlAdditionalReminderDetails";
                _htmlAdditionalReminderDetails.Toolbar = HtmlEditor.ToolbarConfig.Light;
                _htmlAdditionalReminderDetails.Label   = "Additional Reminder Details";
                _htmlAdditionalReminderDetails.Help    = "These confirmation details will be appended to those from the registration template when displayed at the end of the registration process.";
                _htmlAdditionalReminderDetails.Height  = 200;
                Controls.Add(_htmlAdditionalReminderDetails);

                _htmlAdditionalConfirmationDetails         = new HtmlEditor();
                _htmlAdditionalConfirmationDetails.ID      = this.ID + "_htmlAdditionalConfirmationDetails";
                _htmlAdditionalConfirmationDetails.Toolbar = HtmlEditor.ToolbarConfig.Light;
                _htmlAdditionalConfirmationDetails.Label   = "Additional Confirmation Details";
                _htmlAdditionalConfirmationDetails.Help    = "These confirmation details will be appended to those from the registration template when displayed at the end of the registration process.";
                _htmlAdditionalConfirmationDetails.Height  = 200;
                Controls.Add(_htmlAdditionalConfirmationDetails);

                _controlsLoaded = true;
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.
        /// </summary>
        protected override void CreateChildControls()
        {
            Controls.Clear();

            _hfExpanded = new HiddenField();
            Controls.Add(_hfExpanded);
            _hfExpanded.ID    = this.ID + "_hfExpanded";
            _hfExpanded.Value = "False";

            _hfActivityGuid = new HiddenField();
            Controls.Add(_hfActivityGuid);
            _hfActivityGuid.ID = this.ID + "_hfActivityTypeGuid";

            _lblActivityTypeName = new Label();
            Controls.Add(_lblActivityTypeName);
            _lblActivityTypeName.ClientIDMode = ClientIDMode.Static;
            _lblActivityTypeName.ID           = this.ID + "_lblActivityTypeName";

            _lblActivityTypeDescription = new Label();
            Controls.Add(_lblActivityTypeDescription);
            _lblActivityTypeDescription.ClientIDMode = ClientIDMode.Static;
            _lblActivityTypeDescription.ID           = this.ID + "_lblActivityTypeDescription";

            _lblStatus = new Label();
            Controls.Add(_lblStatus);
            _lblStatus.ClientIDMode = ClientIDMode.Static;
            _lblStatus.ID           = this.ID + "_lblInactive";
            _lblStatus.CssClass     = "pull-right";

            _lbDeleteActivityType = new LinkButton();
            Controls.Add(_lbDeleteActivityType);
            _lbDeleteActivityType.CausesValidation = false;
            _lbDeleteActivityType.ID       = this.ID + "_lbDeleteActivityType";
            _lbDeleteActivityType.CssClass = "btn btn-xs btn-square btn-danger js-activity-delete";
            _lbDeleteActivityType.Click   += lbDeleteActivityType_Click;
            _lbDeleteActivityType.Controls.Add(new LiteralControl {
                Text = "<i class='fa fa-times'></i>"
            });

            _cbActivityIsComplete = new RockCheckBox {
                Text = "Complete"
            };
            Controls.Add(_cbActivityIsComplete);
            _cbActivityIsComplete.ID    = this.ID + "_cbActivityTypeIsActive";
            _cbActivityIsComplete.Label = "Activity Completed";
            _cbActivityIsComplete.Text  = "Yes";

            _ppAssignedToPerson    = new PersonPicker();
            _ppAssignedToPerson.ID = this.ID + "_ppAssignedToPerson";
            Controls.Add(_ppAssignedToPerson);
            _ppAssignedToPerson.Label = "Assign to Person";

            _lAssignedToPerson    = new RockLiteral();
            _lAssignedToPerson.ID = this.ID + "_lAssignedToPerson";
            Controls.Add(_lAssignedToPerson);
            _lAssignedToPerson.Label = "Assigned to Person";

            _gpAssignedToGroup    = new GroupPicker();
            _gpAssignedToGroup.ID = this.ID + "_gpAssignedToGroup";
            Controls.Add(_gpAssignedToGroup);
            _gpAssignedToGroup.Label = "Assign to Group";

            _lAssignedToGroup    = new RockLiteral();
            _lAssignedToGroup.ID = this.ID + "_lAssignedToGroup";
            Controls.Add(_lAssignedToGroup);
            _lAssignedToGroup.Label = "Assigned to Group";

            _ddlAssignedToRole = new RockDropDownList();
            Controls.Add(_ddlAssignedToRole);
            _ddlAssignedToRole.ID    = this.ID + "_ddlAssignedToRole";
            _ddlAssignedToRole.Label = "Assign to Security Role";

            _lAssignedToRole    = new RockLiteral();
            _lAssignedToRole.ID = this.ID + "_lAssignedToRole";
            Controls.Add(_lAssignedToRole);
            _lAssignedToRole.Label = "Assigned to Security Role";

            _lState = new Literal();
            Controls.Add(_lState);
            _lState.ID = this.ID + "_lState";

            _ddlAssignedToRole.Items.Add(new ListItem(string.Empty, "0"));
            var roles = new GroupService(new RockContext()).Queryable().Where(g => g.IsSecurityRole).OrderBy(t => t.Name);

            if (roles.Any())
            {
                foreach (var role in roles)
                {
                    _ddlAssignedToRole.Items.Add(new ListItem(role.Name, role.Id.ToString()));
                }
            }

            _phAttributes = new PlaceHolder();
            Controls.Add(_phAttributes);
            _phAttributes.ID = this.ID + "_phAttributes";
        }
Exemplo n.º 5
0
        /// <summary>
        /// Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.
        /// </summary>
        protected override void CreateChildControls()
        {
            Controls.Clear();

            _hfExpanded = new HiddenField();
            Controls.Add( _hfExpanded );
            _hfExpanded.ID = this.ID + "_hfExpanded";
            _hfExpanded.Value = "False";

            _hfActivityGuid = new HiddenField();
            Controls.Add( _hfActivityGuid );
            _hfActivityGuid.ID = this.ID + "_hfActivityTypeGuid";

            _lblActivityTypeName = new Label();
            Controls.Add( _lblActivityTypeName );
            _lblActivityTypeName.ClientIDMode = ClientIDMode.Static;
            _lblActivityTypeName.ID = this.ID + "_lblActivityTypeName";
            
            _lblActivityTypeDescription = new Label();
            Controls.Add( _lblActivityTypeDescription );
            _lblActivityTypeDescription.ClientIDMode = ClientIDMode.Static;
            _lblActivityTypeDescription.ID = this.ID + "_lblActivityTypeDescription";

            _lblStatus = new Label();
            Controls.Add( _lblStatus );
            _lblStatus.ClientIDMode = ClientIDMode.Static;
            _lblStatus.ID = this.ID + "_lblInactive";
            _lblStatus.CssClass = "label label-important pull-right";

            _lbDeleteActivityType = new LinkButton();
            Controls.Add( _lbDeleteActivityType );
            _lbDeleteActivityType.CausesValidation = false;
            _lbDeleteActivityType.ID = this.ID + "_lbDeleteActivityType";
            _lbDeleteActivityType.CssClass = "btn btn-xs btn-danger js-activity-delete";
            _lbDeleteActivityType.Click += lbDeleteActivityType_Click;
            _lbDeleteActivityType.Controls.Add( new LiteralControl { Text = "<i class='fa fa-times'></i>" } );

            _cbActivityIsComplete = new RockCheckBox { Text = "Complete" };
            Controls.Add( _cbActivityIsComplete );
            _cbActivityIsComplete.ID = this.ID + "_cbActivityTypeIsActive";

            _ppAssignedToPerson = new PersonPicker();
            _ppAssignedToPerson.ID = this.ID + "_ppAssignedToPerson";
            Controls.Add( _ppAssignedToPerson );
            _ppAssignedToPerson.Label = "Assign to Person";

            _gpAssignedToGroup = new GroupPicker();
            _gpAssignedToGroup.ID = this.ID + "_gpAssignedToGroup";
            Controls.Add( _gpAssignedToGroup );
            _gpAssignedToGroup.Label = "Assign to Group";

            _ddlAssignedToRole = new RockDropDownList();
            Controls.Add( _ddlAssignedToRole );
            _ddlAssignedToRole.ID = this.ID + "_ddlAssignedToRole";
            _ddlAssignedToRole.Label = "Assign to Security Role";
            _lState = new Literal();
            Controls.Add( _lState );
            _lState.ID = this.ID + "_lState";

            _ddlAssignedToRole.Items.Add( new ListItem( string.Empty, "0" ) );
            var roles = new GroupService( new RockContext() ).Queryable().Where( g => g.IsSecurityRole ).OrderBy( t => t.Name );
            if ( roles.Any() )
            {
                foreach ( var role in roles )
                {
                    _ddlAssignedToRole.Items.Add( new ListItem( role.Name, role.Id.ToString() ) );
                }
            }

            _phAttributes = new PlaceHolder();
            Controls.Add( _phAttributes );
            _phAttributes.ID = this.ID + "_phAttributes";
        }
Exemplo n.º 6
0
        protected void btnSaveEvent_Click(object sender, EventArgs e)
        {
            //Set Variables from form
            person = ppPerson;
            //campusString = cpCampus.SelectedCampusId.ToString();
            startDateTime = Convert.ToDateTime(dtpDateTime.SelectedDateTime);
            eventName = ddlEvent.SelectedValue.ToString();

            int? newCampusId = cpCampus.SelectedCampusId;
            if (newCampusId.HasValue)
            {
            var campus = CampusCache.Read(newCampusId.Value);
            if (campus != null)
            {
                campusString = newCampusId.ToString();
                campusName = cpCampus.SelectedItem.ToString();
            }
            }

            selectedCampus = campusString;
            //selectedGroup = group.SelectedValue.ToString();
            //selectedLocation = location.Location.ToStringSafe();
            selectedStartDateTimeString = startDateTime.ToString();

            Session["person"] = person.SelectedValue.ToString();
            //Session["location"] = location;
            Session["campus"] = campusString;
            Session["campusName"] = campusName;
            Session["startDateTime"] = startDateTime;
            Session["eventName"] = eventName;
            //Session["schedule"] = schedule;
            //Session["group"] = group;

            //Set Panel Visability
            pnlEventDetails.Visible = true;
            pnlEvent.Visible = false;
            pnlPeople.Visible = true;

            //Set Variables based on Campus and Event selected

            //Discover Groups
            if (Session["eventName"].ToString() == "Discover Groups (Combined)")
            {
                //schedule = 10;
                Session["schedule"] = 10;

                if (Session["campusName"].ToString() == "Akron Campus")
                {
                    nbWarningMessage.Text = "Discover Groups (Combined) is not available at this Campus.";
                    nbWarningMessage.Visible = true;
                }
                else if (Session["campusName"].ToString() == "Canton Campus")
                {
                    Session["group"] = 60035;
                    Session["location"] = 18;
                }
                else if (Session["campusName"].ToString() == "Coshocton Campus")
                {
                    nbWarningMessage.Text = "Discover Groups (Combined) is not available at this Campus.";
                    nbWarningMessage.Visible = true;
                }
                else if (Session["campusName"].ToString() == "Dover Campus")
                {
                    Session["group"] = 62721;
                    Session["location"] = 2;
                }
                else if (Session["campusName"].ToString() == "Millersburg Campus")
                {
                    Session["group"] = 68287;
                    Session["location"] = 23;
                }
                else if (Session["campusName"].ToString() == "Wooster Campus")
                {
                    nbWarningMessage.Text = "Discover Groups (Combined) is not available at this Campus.";
                    nbWarningMessage.Visible = true;
                }

                Session["person"] = person.SelectedValue.ToString();

            }

            //Discover Group - Intimacy with God
            if (Session["eventName"].ToString() == "Discover Group - Intimacy with God")
            {
                //schedule = 10;
                Session["schedule"] = 10;

                if (Session["campusName"].ToString() == "Akron Campus")
                {
                    nbWarningMessage.Text = "Discover Group - Intimacy with God is not available at this Campus.";
                    nbWarningMessage.Visible = true;
                }
                else if (Session["campusName"].ToString() == "Canton Campus")
                {
                    Session["group"] = 37264;
                    Session["location"] = 18;
                }
                else if (Session["campusName"].ToString() == "Coshocton Campus")
                {
                    Session["group"] = 37282;
                    Session["location"] = 20;
                }
                else if (Session["campusName"].ToString() == "Dover Campus")
                {
                    Session["group"] = 58652;
                    Session["location"] = 2;
                }
                else if (Session["campusName"].ToString() == "Millersburg Campus")
                {
                    Session["group"] = 37295;
                    Session["location"] = 23;
                }
                else if (Session["campusName"].ToString() == "Wooster Campus")
                {
                    Session["group"] = 72674;
                    Session["location"] = 60;
                }

                Session["person"] = person.SelectedValue.ToString();

            }

            //Discover Group - Involvement in Community
            if (Session["eventName"].ToString() == "Discover Group - Involvement in Community")
            {
                //schedule = 10;
                Session["schedule"] = 10;

                if (Session["campusName"].ToString() == "Akron Campus")
                {
                    nbWarningMessage.Text = "Discover Group - Intimacy with God is not available at this Campus.";
                    nbWarningMessage.Visible = true;
                }
                else if (Session["campusName"].ToString() == "Canton Campus")
                {
                    Session["group"] = 37266;
                    Session["location"] = 18;
                }
                else if (Session["campusName"].ToString() == "Coshocton Campus")
                {
                    Session["group"] = 37280;
                    Session["location"] = 20;
                }
                else if (Session["campusName"].ToString() == "Dover Campus")
                {
                    Session["group"] = 58651;
                    Session["location"] = 2;
                }
                else if (Session["campusName"].ToString() == "Millersburg Campus")
                {
                    Session["group"] = 60241;
                    Session["location"] = 23;
                }
                else if (Session["campusName"].ToString() == "Wooster Campus")
                {
                    Session["group"] = 72673;
                    Session["location"] = 60;
                }

                Session["person"] = person.SelectedValue.ToString();

            }

            //Discover Group - Influence In Your World
            if (Session["eventName"].ToString() == "Discover Group - Influence In Your World")
            {
                //schedule = 10;
                Session["schedule"] = 10;

                if (Session["campusName"].ToString() == "Akron Campus")
                {
                    nbWarningMessage.Text = "Discover Group - Influence In Your World is not available at this Campus.";
                    nbWarningMessage.Visible = true;
                }
                else if (Session["campusName"].ToString() == "Canton Campus")
                {
                    Session["group"] = 37277;
                    Session["location"] = 18;
                }
                else if (Session["campusName"].ToString() == "Coshocton Campus")
                {
                    Session["group"] = 37279;
                    Session["location"] = 20;
                }
                else if (Session["campusName"].ToString() == "Dover Campus")
                {
                    Session["group"] = 58653;
                    Session["location"] = 2;
                }
                else if (Session["campusName"].ToString() == "Millersburg Campus")
                {
                    Session["group"] = 48732;
                    Session["location"] = 23;
                }
                else if (Session["campusName"].ToString() == "Wooster Campus")
                {
                    Session["group"] = 72675;
                    Session["location"] = 60;
                }

                Session["person"] = person.SelectedValue.ToString();

            }

            //New to NewPointe
            if (Session["eventName"].ToString() == "New to NewPointe")
            {
                //schedule = 10;
                Session["schedule"] = 10;

                if (Session["campusName"].ToString() == "Akron Campus")
                {
                    Session["group"] = 68292;
                    Session["location"] = 27;
                }
                else if (Session["campusName"].ToString() == "Canton Campus")
                {
                    Session["group"] = 68293;
                    Session["location"] = 18;
                }
                else if (Session["campusName"].ToString() == "Coshocton Campus")
                {
                    Session["group"] = 37294;
                    Session["location"] = 20;
                }
                else if (Session["campusName"].ToString() == "Dover Campus")
                {
                    Session["group"] = 68294;
                    Session["location"] = 2;
                }
                else if (Session["campusName"].ToString() == "Millersburg Campus")
                {
                    Session["group"] = 68295;
                    Session["location"] = 23;
                }
                else if (Session["campusName"].ToString() == "Wooster Campus")
                {
                    Session["group"] = 68296;
                    Session["location"] = 60;
                }

                Session["person"] = person.SelectedValue.ToString();

            }

            //KidsLife
            if (Session["eventName"].ToString() == "KidsLife")
            {
                //schedule = 10;
                Session["schedule"] = 10;

                if (Session["campusName"].ToString() == "Akron Campus")
                {
                    nbWarningMessage.Text = "KidsLife is not available at this Campus.";
                    nbWarningMessage.Visible = true;

                }
                else if (Session["campusName"].ToString() == "Canton Campus")
                {
                    Session["group"] = 71045;
                    Session["location"] = 18;
                }
                else if (Session["campusName"].ToString() == "Coshocton Campus")
                {
                    nbWarningMessage.Text = "KidsLife is not available at this Campus.";
                    nbWarningMessage.Visible = true;
                }
                else if (Session["campusName"].ToString() == "Dover Campus")
                {
                    Session["group"] = 72745;
                    Session["location"] = 2;
                }
                else if (Session["campusName"].ToString() == "Millersburg Campus")
                {
                    nbWarningMessage.Text = "KidsLife is not available at this Campus.";
                    nbWarningMessage.Visible = true;
                }
                else if (Session["campusName"].ToString() == "Wooster Campus")
                {
                    nbWarningMessage.Text = "KidsLife is not available at this Campus.";
                    nbWarningMessage.Visible = true;
                }

                Session["person"] = person.SelectedValue.ToString();

            }
        }
Exemplo n.º 7
0
        /// <summary>
        /// Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.
        /// </summary>
        protected override void CreateChildControls()
        {
            if ( !_controlsLoaded )
            {
                Controls.Clear();

                _tbName = new RockTextBox();
                _tbName.ID = this.ID + "_tbName";
                _tbName.Label = "Registration Instance Name";
                _tbName.Help = "The name will be used to describe the registration on the registration screens and emails.";
                _tbName.Required = true;
                Controls.Add( _tbName );

                _cbIsActive = new RockCheckBox();
                _cbIsActive.ID = this.ID + "_cbIsActive";
                _cbIsActive.Label = "Active";
                _cbIsActive.Text = "Yes";
                Controls.Add( _cbIsActive );

                _tbUrlSlug = new RockTextBox();
                _tbUrlSlug.ID = this.ID + "_tbUrlSlug";
                _tbUrlSlug.Label = "URL Slug";
                _tbUrlSlug.Visible = false;
                Controls.Add( _tbUrlSlug );

                _ceDetails = new CodeEditor();
                _ceDetails.ID = this.ID + "_ceDetails";
                _ceDetails.Label = "Details";
                _ceDetails.EditorMode = CodeEditorMode.Html;
                _ceDetails.EditorTheme = CodeEditorTheme.Rock;
                _ceDetails.EditorHeight = "100";
                _ceDetails.Visible = false; // hiding this out for now. Struggling where we'd even use this, but instead of removing it we'll just comment it out for now.
                Controls.Add( _ceDetails );

                _dtpStart = new DateTimePicker();
                _dtpStart.ID = this.ID + "_dtpStart";
                _dtpStart.Label = "Registration Starts";
                Controls.Add( _dtpStart );

                _dtpEnd = new DateTimePicker();
                _dtpEnd.ID = this.ID + "_dtpEnd";
                _dtpEnd.Label = "Registration Ends";
                Controls.Add( _dtpEnd );

                _nbMaxAttendees = new NumberBox();
                _nbMaxAttendees.ID = this.ID + "_nbMaxAttendees";
                _nbMaxAttendees.Label = "Maximum Attendees";
                _nbMaxAttendees.NumberType = ValidationDataType.Integer;
                Controls.Add( _nbMaxAttendees );

                _apAccount = new AccountPicker();
                _apAccount.ID = this.ID + "_apAccount";
                _apAccount.Label = "Account";
                _apAccount.Required = true;
                Controls.Add( _apAccount );

                _ppContact = new PersonPicker();
                _ppContact.ID = this.ID + "_ppContact";
                _ppContact.Label = "Contact";
                _ppContact.SelectPerson += _ppContact_SelectPerson;
                _ppContact.EnableSelfSelection = true;
                Controls.Add( _ppContact );

                _pnContactPhone = new PhoneNumberBox();
                _pnContactPhone.ID = this.ID + "_pnContactPhone";
                _pnContactPhone.Label = "Contact Phone";
                Controls.Add( _pnContactPhone );

                _ebContactEmail = new EmailBox();
                _ebContactEmail.ID = this.ID + "_ebContactEmail";
                _ebContactEmail.Label = "Contact Email";
                Controls.Add( _ebContactEmail );

                _dtpSendReminder = new DateTimePicker();
                _dtpSendReminder.ID = this.ID + "_dtpSendReminder";
                _dtpSendReminder.Label = "Send Reminder Date";
                Controls.Add( _dtpSendReminder );

                _cbReminderSent = new RockCheckBox();
                _cbReminderSent.ID = this.ID + "_cbReminderSent";
                _cbReminderSent.Label = "Reminder Sent";
                _cbReminderSent.Text = "Yes";
                Controls.Add( _cbReminderSent );

                _ceAdditionalReminderDetails = new CodeEditor();
                _ceAdditionalReminderDetails.ID = this.ID + "_ceAdditionalReminderDetails";
                _ceAdditionalReminderDetails.Label = "Additional Reminder Details";
                _ceAdditionalReminderDetails.Help = "These reminder details will be appended to those in the registration template when sending the reminder email.";
                _ceAdditionalReminderDetails.EditorMode = CodeEditorMode.Html;
                _ceAdditionalReminderDetails.EditorTheme = CodeEditorTheme.Rock;
                _ceAdditionalReminderDetails.EditorHeight = "100";
                Controls.Add( _ceAdditionalReminderDetails );

                _ceAdditionalConfirmationDetails = new CodeEditor();
                _ceAdditionalConfirmationDetails.ID = this.ID + "_ceAdditionalConfirmationDetails";
                _ceAdditionalConfirmationDetails.Label = "Additional Confirmation Details";
                _ceAdditionalConfirmationDetails.Help = "These confirmation details will be appended to those from the registration template when displayed at the end of the registration process.";
                _ceAdditionalConfirmationDetails.EditorMode = CodeEditorMode.Html;
                _ceAdditionalConfirmationDetails.EditorTheme = CodeEditorTheme.Rock;
                _ceAdditionalConfirmationDetails.EditorHeight = "100";
                Controls.Add( _ceAdditionalConfirmationDetails );

                _controlsLoaded = true;
            }
        }