/// <summary> /// Outputs server control content to a provided <see cref="T:System.Web.UI.HtmlTextWriter" /> object and stores tracing information about the control if tracing is enabled. /// </summary> /// <param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter" /> object that receives the control content.</param> public override void RenderControl(HtmlTextWriter writer) { if (this.Visible) { writer.AddAttribute("rowid", ID); writer.RenderBeginTag(HtmlTextWriterTag.Tr); writer.AddAttribute("class", "person-name"); writer.RenderBeginTag(HtmlTextWriterTag.Td); writer.Write(PersonName); writer.RenderEndTag(); if (ShowCellPhoneFirst) { RenderCellPhone(writer); RenderHomePhone(writer); } else { RenderHomePhone(writer); RenderCellPhone(writer); } writer.AddAttribute("class", "person-email"); writer.RenderBeginTag(HtmlTextWriterTag.Td); writer.AddAttribute("class", "form-group"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _ebEmail.RenderControl(writer); writer.RenderEndTag(); writer.RenderEndTag(); writer.RenderEndTag(); // Tr } }
/// <summary> /// Outputs server control content to a provided <see cref="T:System.Web.UI.HtmlTextWriter" /> object and stores tracing information about the control if tracing is enabled. /// </summary> /// <param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter" /> object that receives the control content.</param> public override void RenderControl(HtmlTextWriter writer) { if (this.Visible) { writer.AddAttribute("rowid", ID); writer.RenderBeginTag(HtmlTextWriterTag.Tr); writer.RenderBeginTag(HtmlTextWriterTag.Td); writer.Write(PersonName); writer.RenderEndTag(); writer.RenderBeginTag(HtmlTextWriterTag.Td); writer.AddAttribute("class", "form-group"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _pnbHomePhone.RenderControl(writer); writer.RenderEndTag(); writer.RenderEndTag(); writer.RenderBeginTag(HtmlTextWriterTag.Td); writer.AddAttribute("class", "form-group"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _pnbCellPhone.RenderControl(writer); writer.RenderEndTag(); writer.RenderEndTag(); writer.RenderBeginTag(HtmlTextWriterTag.Td); writer.AddAttribute("class", "form-group"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _ebEmail.RenderControl(writer); writer.RenderEndTag(); writer.RenderEndTag(); writer.RenderEndTag(); // Tr } }
/// <summary> /// Writes the <see cref="T:System.Web.UI.WebControls.CompositeControl" /> content to the specified <see cref="T:System.Web.UI.HtmlTextWriter" /> object, for display on the client. /// </summary> /// <param name="writer">An <see cref="T:System.Web.UI.HtmlTextWriter" /> that represents the output stream to render HTML content on the client.</param> protected override void Render(HtmlTextWriter writer) { writer.AddAttribute(HtmlTextWriterAttribute.Class, "row"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-md-6"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _tbName.RenderControl(writer); writer.RenderEndTag(); // col-md-6 writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-md-6"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _cbIsActive.RenderControl(writer); _tbUrlSlug.RenderControl(writer); writer.RenderEndTag(); // col-md-6 writer.RenderEndTag(); // row _ceDetails.RenderControl(writer); writer.AddAttribute(HtmlTextWriterAttribute.Class, "row"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-md-6"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _dtpStart.RenderControl(writer); _dtpEnd.RenderControl(writer); _nbMaxAttendees.RenderControl(writer); _wtpRegistrationWorkflow.RenderControl(writer); writer.AddAttribute(HtmlTextWriterAttribute.Class, "row"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-xs-8"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _dtpSendReminder.RenderControl(writer); writer.RenderEndTag(); // col-xs-6 writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-xs-4"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _cbReminderSent.Visible = _cbReminderSent.Checked; _cbReminderSent.RenderControl(writer); writer.RenderEndTag(); // col-xs-6 writer.RenderEndTag(); // row writer.RenderEndTag(); // col-md-6 writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-md-6"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _ppContact.RenderControl(writer); _pnContactPhone.RenderControl(writer); _ebContactEmail.RenderControl(writer); _cbCost.RenderControl(writer); _cbMinimumInitialPayment.RenderControl(writer); _cbDefaultPaymentAmount.RenderControl(writer); _apAccount.RenderControl(writer); writer.RenderEndTag(); // col-md-6 writer.RenderEndTag(); // row _htmlRegistrationInstructions.RenderControl(writer); _htmlAdditionalReminderDetails.RenderControl(writer); _htmlAdditionalConfirmationDetails.RenderControl(writer); }
/// <summary> /// Outputs server control content to a provided <see cref="T:System.Web.UI.HtmlTextWriter" /> object and stores tracing information about the control if tracing is enabled. /// </summary> /// <param name="writer">The <see cref="T:System.Web.UI.HtmlTextWriter" /> object that receives the control content.</param> public override void RenderControl(HtmlTextWriter writer) { if (this.Visible) { writer.AddAttribute(HtmlTextWriterAttribute.Class, "pull-right"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _lbDelete.RenderControl(writer); writer.RenderEndTag(); writer.RenderBeginTag(HtmlTextWriterTag.H4); writer.Write(Caption); writer.RenderEndTag(); // Relationship writer.AddAttribute(HtmlTextWriterAttribute.Class, "row"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-sm-6"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _ddlRelationshipType.RenderControl(writer); writer.RenderEndTag(); writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-sm-6"); // filler/blocker column writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.RenderEndTag(); writer.RenderEndTag(); // end Relationship row writer.AddAttribute("rowid", ID); writer.AddAttribute(HtmlTextWriterAttribute.Class, "row clearfix"); writer.RenderBeginTag(HtmlTextWriterTag.Div); bool existingPerson = (this.PersonId > 0); _lNickName.Visible = existingPerson; _lLastName.Visible = existingPerson; _tbNickName.Visible = !existingPerson; _tbLastName.Visible = !existingPerson; writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-sm-3"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _lNickName.RenderControl(writer); _tbNickName.RenderControl(writer); writer.RenderEndTag(); writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-sm-3"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _lLastName.RenderControl(writer); _tbLastName.RenderControl(writer); writer.RenderEndTag(); if (this.ShowSuffix) { writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-sm-3"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _ddlSuffix.RenderControl(writer); writer.RenderEndTag(); } if (this.ShowGender) { writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-sm-3"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _ddlGender.RenderControl(writer); writer.RenderEndTag(); } if (this.ShowBirthDate) { writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-sm-3"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _dpBirthdate.RenderControl(writer); writer.RenderEndTag(); } if (this.ShowGrade) { writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-sm-3"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _ddlGradePicker.RenderControl(writer); writer.RenderEndTag(); } if (this.ShowMobilePhone) { writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-sm-3"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _pnbMobile.RenderControl(writer); writer.RenderEndTag(); } if (this.ShowEmailAddress) { writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-sm-6"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _ebEmail.RenderControl(writer); writer.RenderEndTag(); } foreach (Control attributeCtrl in _phAttributes.Controls) { writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-sm-3"); writer.RenderBeginTag(HtmlTextWriterTag.Div); attributeCtrl.RenderControl(writer); writer.RenderEndTag(); } writer.RenderEndTag(); writer.RenderBeginTag(HtmlTextWriterTag.Hr); writer.RenderEndTag(); } }