示例#1
0
        protected void ButtonSignup_Click(object sender, EventArgs e)
        {
            if (!Page.IsValid)
            {
                return; // no action
            }

            // Sign up this attendee, and create event to send confirmation mail

            ParleyAttendee newAttendee = _parley.CreateAttendee(this.TextNameFirst.Text, this.TextNameLast.Text, this.TextEmail.Text, false);

            // Add options

            ParleyOptions options = _parley.Options;

            foreach (ParleyOption option in options)
            {
                CheckBox checkOption = (CheckBox)this.PlaceholderOptions.FindControl("CheckOption" + option.Identity.ToString());
                if (checkOption.Checked)
                {
                    newAttendee.AddOption(option);
                }
            }

            PWEvents.CreateEvent(EventSource.SignupPage, EventType.ParleyAttendeeCreated, newAttendee.PersonId,
                                 _parley.OrganizationId, _parley.GeographyId, newAttendee.PersonId, newAttendee.Identity,
                                 string.Empty);

            if (Request.UserLanguages.Length > 0)
            {
                newAttendee.Person.PreferredCulture = Request.UserLanguages[0];
            }

            this.PanelSignupCompleted.Visible = true;
            this.PanelSignup.Visible          = false;
        }