protected override void OnInit(EventArgs e) { DetailsXFormControl.FormDefinition = XForm.CreateInstance(new Guid((CurrentData as EventPageBase).RegistrationForm.Id.ToString())); string email = Request.QueryString["email"]; string code = Request.QueryString["code"]; HiddenCode.Value = code; HiddenEmail.Value = email; if (!string.IsNullOrEmpty(email) && !string.IsNullOrEmpty(code)) { IParticipant participant = AttendRegistrationEngine.GetParticipant(email, code); if (participant != null) { SerializableXmlDocument xmlDoc = new SerializableXmlDocument(); xmlDoc.LoadXml(participant.XForm); DetailsXFormControl.Data.Data = xmlDoc; } } SessionsPanel.Controls.Add(AttendSessionEngine.GetSessionsControl(CurrentData.ContentLink, null)); SessionsPanel.DataBind(); base.OnInit(e); }
protected void Page_Init(object sender, EventArgs e) { bool UseForms = BVNetwork.Attend.Business.API.AttendRegistrationEngine.UseForms; var eventPage = Locate.ContentRepository().Get <EventPageBase>(CurrentBlock.EventPage); if (UseForms == false) { DetailsXFormControl.FormDefinition = XForm.CreateInstance(new Guid(eventPage.RegistrationForm.Id.ToString())); PopulateForm(); DetailsXFormControl.DataBind(); } else { FormData = BVNetwork.Attend.Business.API.AttendRegistrationEngine.GetFormData(CurrentBlock); FormElementsRepeater.DataSource = FormData; FormElementsRepeater.DataBind(); } XFormContainer.Visible = !UseForms; FormContainer.Visible = UseForms; SessionList.Controls.Add(AttendSessionEngine.GetSessionsControl(CurrentData.EventPage, CurrentData)); }