public RenderControl ( System.Web.UI.HtmlTextWriter writer ) : void | ||
writer | System.Web.UI.HtmlTextWriter | The |
return | void |
/// <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> /// 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> public override void RenderControl(HtmlTextWriter writer) { string inactiveCss = _cbActivityIsComplete.Checked ? string.Empty : " workflow-activity-inactive"; writer.AddAttribute(HtmlTextWriterAttribute.Class, "panel panel-widget workflow-activity" + inactiveCss); writer.AddAttribute("data-key", _hfActivityGuid.Value); writer.AddAttribute(HtmlTextWriterAttribute.Id, this.ID + "_section"); writer.RenderBeginTag("section"); writer.AddAttribute(HtmlTextWriterAttribute.Class, "panel-heading clearfix clickable"); writer.RenderBeginTag("header"); // Hidden Field to track expansion writer.AddAttribute(HtmlTextWriterAttribute.Class, "filter-expanded"); _hfExpanded.RenderControl(writer); writer.AddAttribute(HtmlTextWriterAttribute.Class, "filter-toggle pull-left"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.AddAttribute("class", "panel-title"); writer.RenderBeginTag(HtmlTextWriterTag.H3); _lblActivityTypeName.RenderControl(writer); // H3 tag writer.RenderEndTag(); _lblActivityTypeDescription.RenderControl(writer); // Name/Description div writer.RenderEndTag(); writer.AddAttribute(HtmlTextWriterAttribute.Class, "pull-right activity-controls"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.WriteLine(string.Format("<a class='btn btn-xs btn-link'><i class='workflow-activity-state fa {0}'></i></a>", Expanded ? "fa fa-chevron-up" : "fa fa-chevron-down")); if (CanEdit && IsDeleteEnabled) { _lbDeleteActivityType.Visible = true; _lbDeleteActivityType.RenderControl(writer); } else { _lbDeleteActivityType.Visible = false; } // Add/ChevronUpDown/Delete div writer.RenderEndTag(); _lblStatus.RenderControl(writer); // header div writer.RenderEndTag(); if (!Expanded) { // hide details if the activity and actions are valid writer.AddStyleAttribute("display", "none"); } writer.AddAttribute(HtmlTextWriterAttribute.Class, "panel-body"); writer.RenderBeginTag(HtmlTextWriterTag.Div); // activity edit fields writer.AddAttribute(HtmlTextWriterAttribute.Class, "row"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-md-6"); writer.RenderBeginTag(HtmlTextWriterTag.Div); if (CanEdit) { _ppAssignedToPerson.ValidationGroup = ValidationGroup; _ppAssignedToPerson.RenderControl(writer); _gpAssignedToGroup.ValidationGroup = ValidationGroup; _gpAssignedToGroup.RenderControl(writer); _ddlAssignedToRole.ValidationGroup = ValidationGroup; _ddlAssignedToRole.RenderControl(writer); } else { if (!string.IsNullOrWhiteSpace(_lAssignedToPerson.Text)) { _lAssignedToPerson.RenderControl(writer); } if (!string.IsNullOrWhiteSpace(_lAssignedToGroup.Text)) { _lAssignedToGroup.RenderControl(writer); } if (!string.IsNullOrWhiteSpace(_lAssignedToRole.Text)) { _lAssignedToRole.RenderControl(writer); } } writer.RenderEndTag(); // col-md-4 writer.AddAttribute(HtmlTextWriterAttribute.Class, "col-md-6"); writer.RenderBeginTag(HtmlTextWriterTag.Div); _cbActivityIsComplete.Enabled = CanEdit; _cbActivityIsComplete.ValidationGroup = ValidationGroup; _cbActivityIsComplete.RenderControl(writer); writer.AddAttribute(HtmlTextWriterAttribute.Class, "form-group"); writer.RenderBeginTag(HtmlTextWriterTag.Div); writer.AddAttribute(HtmlTextWriterAttribute.Class, "control-label"); writer.RenderBeginTag(HtmlTextWriterTag.Label); writer.Write(" "); writer.RenderEndTag(); // control-label _lState.RenderControl(writer); writer.RenderEndTag(); // form-group writer.RenderEndTag(); // col-md-6 writer.RenderEndTag(); // row _phAttributes.RenderControl(writer); // actions writer.RenderBeginTag("fieldset"); writer.RenderBeginTag("legend"); writer.WriteLine("Actions"); writer.RenderEndTag(); writer.AddAttribute(HtmlTextWriterAttribute.Class, "grid-table table table-condensed table-light"); writer.RenderBeginTag(HtmlTextWriterTag.Table); writer.RenderBeginTag(HtmlTextWriterTag.Thead); writer.RenderBeginTag(HtmlTextWriterTag.Tr); writer.AddAttribute(HtmlTextWriterAttribute.Scope, "col"); writer.RenderBeginTag(HtmlTextWriterTag.Th); writer.Write("Action"); writer.RenderEndTag(); writer.AddAttribute(HtmlTextWriterAttribute.Scope, "col"); writer.RenderBeginTag(HtmlTextWriterTag.Th); writer.Write("Last Processed"); writer.RenderEndTag(); writer.AddAttribute(HtmlTextWriterAttribute.Scope, "col"); writer.RenderBeginTag(HtmlTextWriterTag.Th); writer.Write("Completed"); writer.RenderEndTag(); writer.AddAttribute(HtmlTextWriterAttribute.Scope, "col"); writer.RenderBeginTag(HtmlTextWriterTag.Th); writer.RenderEndTag(); writer.RenderEndTag(); // tr writer.RenderEndTag(); // thead writer.AddAttribute(HtmlTextWriterAttribute.Class, "workflow-formfield-list"); writer.RenderBeginTag(HtmlTextWriterTag.Tbody); foreach (WorkflowActionEditor workflowActionEditor in this.Controls.OfType <WorkflowActionEditor>()) { workflowActionEditor.ValidationGroup = ValidationGroup; workflowActionEditor.RenderControl(writer); } writer.RenderEndTag(); // tbody writer.RenderEndTag(); // table // actions fieldset writer.RenderEndTag(); // widget-content div writer.RenderEndTag(); // section tag writer.RenderEndTag(); }