protected override void RenderContent(HtmlTextWriter output) { if (dojoMembershipID == 0) { output.WriteFullBeginTag("tr"); output.WriteBeginTag("td"); output.WriteAttribute("class", "row1"); output.WriteAttribute("colspan", "2"); output.Write(HtmlTextWriter.TagRightChar); output.Write("The DojoMembership selected does not exist."); output.WriteEndTag("td"); output.WriteEndTag("tr"); return; } output.WriteFullBeginTag("tr"); output.WriteBeginTag("td"); output.WriteAttribute("class", "row1"); output.WriteAttribute("colspan", "2"); output.Write(HtmlTextWriter.TagRightChar); output.Write("<strong>Warning:</strong> This action deletes the selected ." + "<em>Use with caution, this option cannot be undone.</em>"); output.WriteEndTag("td"); output.WriteEndTag("tr"); output.WriteFullBeginTag("tr"); output.WriteBeginTag("td"); output.WriteAttribute("class", "row1"); output.WriteAttribute("nowrap", "true"); output.WriteAttribute("valign", "top"); output.Write(HtmlTextWriter.TagRightChar); output.Write(" to delete: "); output.WriteEndTag("td"); output.WriteBeginTag("td"); output.WriteAttribute("class", "row1"); output.WriteAttribute("width", "100%"); output.Write(HtmlTextWriter.TagRightChar); output.Write(dojoMembership.ToString()); output.WriteEndTag("td"); output.WriteEndTag("tr"); output.WriteFullBeginTag("tr"); output.WriteBeginTag("td"); output.WriteAttribute("colspan", "2"); output.WriteAttribute("align", "right"); output.WriteAttribute("class", "row1"); output.Write(HtmlTextWriter.TagRightChar); btOk.RenderControl(output); output.Write(" "); btCancel.RenderControl(output); output.WriteEndTag("td"); output.WriteEndTag("tr"); }
protected override void OnPreRender(EventArgs e) { if (dojoMembershipID != 0) { dojoMembership = new DojoMembership(dojoMembershipID); text = "Delete - " + dojoMembership.ToString(); } else { text = "Delete "; } }
protected override void OnPreRender(EventArgs e) { if (dojoMembershipID != 0) { dojoMembership = new DojoMembership(dojoMembershipID); #region Bind Default Folder // // Set Field Entries // ltStartDate.Text = dojoMembership.StartDate.ToString(); ltEndDate.Text = dojoMembership.EndDate.ToString(); ltOrganizationMemberID.Text = dojoMembership.OrganizationMemberID.ToString(); // // Set Children Selections // // Member if (dojoMembership.Member != null) { ltMember.Text = dojoMembership.Member.ToString(); } else { ltMember.Text = string.Empty; } // MemberType if (dojoMembership.MemberType != null) { ltMemberType.Text = dojoMembership.MemberType.ToString(); } else { ltMemberType.Text = string.Empty; } // Organization if (dojoMembership.Organization != null) { ltOrganization.Text = dojoMembership.Organization.ToString(); } else { ltOrganization.Text = string.Empty; } // ParentMembership if (dojoMembership.ParentMembership != null) { ltParentMembership.Text = dojoMembership.ParentMembership.ToString(); } else { ltParentMembership.Text = string.Empty; } // SourceTemplate if (dojoMembership.SourceTemplate != null) { ltSourceTemplate.Text = dojoMembership.SourceTemplate.ToString(); } else { ltSourceTemplate.Text = string.Empty; } #endregion #region Bind _system Folder // // Set Field Entries // // // Set Children Selections // #endregion #region Bind Rappahanock Folder // // Set Field Entries // // // Set Children Selections // // InvoiceLine if (dojoMembership.InvoiceLine != null) { ltInvoiceLine.Text = dojoMembership.InvoiceLine.ToString(); } else { ltInvoiceLine.Text = string.Empty; } #endregion text = "View - " + dojoMembership.ToString(); } }
protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); if (loadFlag) { if (dojoMembershipID > 0) { obj = new DojoMembership(dojoMembershipID); headerText.Text = "Edit - " + obj.ToString(); } else if (dojoMembershipID <= 0) { obj = new DojoMembership(); headerText.Text = "Add "; } // Bind General Data if (obj.Member != null) { comboMember.Text = obj.Member.ToString(); foreach (ComponentArt.Web.UI.ComboBoxItem item in comboMember.Items) { if (item.Value == obj.Member.ID.ToString()) { comboMember.SelectedItem = item; break; } } } else { // Necissary to clear prior ViewState - if only we don't need it. comboMember.Text = string.Empty; comboMember.SelectedItem = null; } deStartDate.Date = obj.StartDate; deEndDate.Date = obj.EndDate; if (obj.Organization != null) { comboOrganization.Text = obj.Organization.ToString(); foreach (ComponentArt.Web.UI.ComboBoxItem item in comboOrganization.Items) { if (item.Value == obj.Organization.ID.ToString()) { comboOrganization.SelectedItem = item; break; } } } else { // Necissary to clear prior ViewState - if only we don't need it. comboOrganization.Text = string.Empty; comboOrganization.SelectedItem = null; } tbOrganizationMemberID.Text = obj.OrganizationMemberID; if (obj.Parent != null) { foreach (ListItem item in ddParent.Items) { item.Selected = obj.Parent.ID.ToString() == item.Value; } } else if (ddParent.Items.Count > 0) { ddParent.SelectedIndex = 0; } if (obj.MemberTypeTemplate != null) { comboMemberTypeTemplate.Text = obj.MemberTypeTemplate.ToString(); foreach (ComponentArt.Web.UI.ComboBoxItem item in comboMemberTypeTemplate.Items) { if (item.Value == obj.MemberTypeTemplate.ID.ToString()) { comboMemberTypeTemplate.SelectedItem = item; break; } } } else { // Necissary to clear prior ViewState - if only we don't need it. comboMemberTypeTemplate.Text = string.Empty; comboMemberTypeTemplate.SelectedItem = null; } if (obj.MembershipTemplate != null) { comboMembershipTemplate.Text = obj.MembershipTemplate.ToString(); foreach (ComponentArt.Web.UI.ComboBoxItem item in comboMembershipTemplate.Items) { if (item.Value == obj.MembershipTemplate.ID.ToString()) { comboMembershipTemplate.SelectedItem = item; break; } } } else { // Necissary to clear prior ViewState - if only we don't need it. comboMembershipTemplate.Text = string.Empty; comboMembershipTemplate.SelectedItem = null; } ltSessionID.Text = obj.SessionID.ToString(); tbFee.Text = obj.Fee.ToString(); ltPriorMembership.Text = obj.PriorMembership != null? obj.PriorMembership.ToString() : Localization.Strings.StartupMembership; tbPaymentAmount.Text = obj.PaymentAmount.ToString(); cbIsProRated.Checked = obj.IsProRated; // Bind Rappahanock Data if (obj.InvoiceLine != null) { foreach (ListItem item in ddInvoiceLine.Items) { item.Selected = obj.InvoiceLine.ID.ToString() == item.Value; } } else if (ddInvoiceLine.Items.Count > 0) { ddInvoiceLine.SelectedIndex = 0; } tabstrip.SelectedTab = tabstrip.Tabs[0]; multipage.SelectedIndex = 0; } }
protected override void OnPreRender(EventArgs e) { if (loadFlag) { if (dojoMembershipID > 0) { obj = new DojoMembership(dojoMembershipID); text = "Edit - " + obj.ToString(); } else if (dojoMembershipID <= 0) { obj = new DojoMembership(); text = "Add "; } // // Set Field Entries // deStartDate.Date = obj.StartDate; deEndDate.Date = obj.EndDate; tbOrganizationMemberID.Text = obj.OrganizationMemberID; // // Set Children Selections // if (obj.Member != null) { foreach (ListItem item in msMember.Items) { item.Selected = obj.Member.ID.ToString() == item.Value; } } else { msMember.SelectedIndex = 0; } if (obj.MemberType != null) { foreach (ListItem item in msMemberType.Items) { item.Selected = obj.MemberType.ID.ToString() == item.Value; } } else { msMemberType.SelectedIndex = 0; } if (obj.Organization != null) { foreach (ListItem item in msOrganization.Items) { item.Selected = obj.Organization.ID.ToString() == item.Value; } } else { msOrganization.SelectedIndex = 0; } if (obj.ParentMembership != null) { foreach (ListItem item in msParentMembership.Items) { item.Selected = obj.ParentMembership.ID.ToString() == item.Value; } } else { msParentMembership.SelectedIndex = 0; } if (obj.SourceTemplate != null) { foreach (ListItem item in msSourceTemplate.Items) { item.Selected = obj.SourceTemplate.ID.ToString() == item.Value; } } else { msSourceTemplate.SelectedIndex = 0; } if (obj.InvoiceLine != null) { foreach (ListItem item in msInvoiceLine.Items) { item.Selected = obj.InvoiceLine.ID.ToString() == item.Value; } } else { msInvoiceLine.SelectedIndex = 0; } } }