/// <summary> /// Render this control to the output parameter specified. /// </summary> /// <param name="output"> The HTML writer to write out to </param> protected override void RenderContent(HtmlTextWriter output) { DojoMembershipTemplateManager m = new DojoMembershipTemplateManager(); DojoMembershipTemplateCollection dojoMembershipTemplateCollection = m.GetCollection(string.Empty, string.Empty, null); // Render Header Row this.headerLockEnabled = true; RenderRow(this.HeaderRowCssClass, "Name"); bool rowflag = false; string rowCssClass; // // Render Records // foreach (DojoMembershipTemplate dojoMembershipTemplate in dojoMembershipTemplateCollection) { if (rowflag) { rowCssClass = defaultRowCssClass; } else { rowCssClass = alternateRowCssClass; } rowflag = !rowflag; output.WriteBeginTag("tr"); output.WriteAttribute("i", dojoMembershipTemplate.ID.ToString()); output.WriteLine(HtmlTextWriter.TagRightChar); output.Indent++; output.WriteBeginTag("td"); output.WriteAttribute("class", rowCssClass); output.Write(HtmlTextWriter.TagRightChar); output.WriteLine(dojoMembershipTemplate.Name); output.WriteEndTag("td"); output.Indent--; output.WriteEndTag("tr"); output.WriteLine(); } }
private void bindDropDownLists() { #region Bind General Child Data msParentTemplate.Items.Add(new ListItem("Null", "Null")); DojoMembershipTemplateManager parentTemplateManager = new DojoMembershipTemplateManager(); DojoMembershipTemplateCollection parentTemplateCollection = parentTemplateManager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMembershipTemplate parentTemplate in parentTemplateCollection) { ListItem i = new ListItem(parentTemplate.ToString(), parentTemplate.ID.ToString()); msParentTemplate.Items.Add(i); } #endregion #region Bind Member Types Child Data msMemberType1.Items.Add(new ListItem("Null", "Null")); DojoMemberTypeManager memberType1Manager = new DojoMemberTypeManager(); DojoMemberTypeCollection memberType1Collection = memberType1Manager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMemberType memberType1 in memberType1Collection) { ListItem i = new ListItem(memberType1.ToString(), memberType1.ID.ToString()); msMemberType1.Items.Add(i); } msMemberType2.Items.Add(new ListItem("Null", "Null")); DojoMemberTypeManager memberType2Manager = new DojoMemberTypeManager(); DojoMemberTypeCollection memberType2Collection = memberType2Manager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMemberType memberType2 in memberType2Collection) { ListItem i = new ListItem(memberType2.ToString(), memberType2.ID.ToString()); msMemberType2.Items.Add(i); } msMemberType3.Items.Add(new ListItem("Null", "Null")); DojoMemberTypeManager memberType3Manager = new DojoMemberTypeManager(); DojoMemberTypeCollection memberType3Collection = memberType3Manager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMemberType memberType3 in memberType3Collection) { ListItem i = new ListItem(memberType3.ToString(), memberType3.ID.ToString()); msMemberType3.Items.Add(i); } msMemberType4.Items.Add(new ListItem("Null", "Null")); DojoMemberTypeManager memberType4Manager = new DojoMemberTypeManager(); DojoMemberTypeCollection memberType4Collection = memberType4Manager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMemberType memberType4 in memberType4Collection) { ListItem i = new ListItem(memberType4.ToString(), memberType4.ID.ToString()); msMemberType4.Items.Add(i); } msMemberType5.Items.Add(new ListItem("Null", "Null")); DojoMemberTypeManager memberType5Manager = new DojoMemberTypeManager(); DojoMemberTypeCollection memberType5Collection = memberType5Manager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMemberType memberType5 in memberType5Collection) { ListItem i = new ListItem(memberType5.ToString(), memberType5.ID.ToString()); msMemberType5.Items.Add(i); } msMemberType6.Items.Add(new ListItem("Null", "Null")); DojoMemberTypeManager memberType6Manager = new DojoMemberTypeManager(); DojoMemberTypeCollection memberType6Collection = memberType6Manager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMemberType memberType6 in memberType6Collection) { ListItem i = new ListItem(memberType6.ToString(), memberType6.ID.ToString()); msMemberType6.Items.Add(i); } msMemberType7.Items.Add(new ListItem("Null", "Null")); DojoMemberTypeManager memberType7Manager = new DojoMemberTypeManager(); DojoMemberTypeCollection memberType7Collection = memberType7Manager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMemberType memberType7 in memberType7Collection) { ListItem i = new ListItem(memberType7.ToString(), memberType7.ID.ToString()); msMemberType7.Items.Add(i); } msMemberType8.Items.Add(new ListItem("Null", "Null")); DojoMemberTypeManager memberType8Manager = new DojoMemberTypeManager(); DojoMemberTypeCollection memberType8Collection = memberType8Manager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMemberType memberType8 in memberType8Collection) { ListItem i = new ListItem(memberType8.ToString(), memberType8.ID.ToString()); msMemberType8.Items.Add(i); } #endregion #region Bind Rappahanock Child Data msItem.Items.Add(new ListItem("Null", "Null")); RHItemManager itemManager = new RHItemManager(); RHItemCollection itemCollection = itemManager.GetCollection(string.Empty, string.Empty, null); foreach (RHItem item in itemCollection) { ListItem i = new ListItem(item.ToString(), item.ID.ToString()); msItem.Items.Add(i); } #endregion }
private void bind() { DojoMemberManager dojoMemberManager = new DojoMemberManager(); DojoMemberCollection dojoMemberCollection = dojoMemberManager.GetCollection(string.Empty, string.Empty); foreach (DojoMember itemObject in dojoMemberCollection) { ComponentArt.Web.UI.ComboBoxItem item = new ComponentArt.Web.UI.ComboBoxItem(); item.Text = itemObject.ToString(); item.Value = itemObject.ID.ToString(); comboMember.Items.Add(item); } DojoOrganizationManager dojoOrganizationManager = new DojoOrganizationManager(); DojoOrganizationCollection dojoOrganizationCollection = dojoOrganizationManager.GetCollection(string.Empty, string.Empty); foreach (DojoOrganization itemObject in dojoOrganizationCollection) { ComponentArt.Web.UI.ComboBoxItem item = new ComponentArt.Web.UI.ComboBoxItem(); item.Text = itemObject.ToString(); item.Value = itemObject.ID.ToString(); comboOrganization.Items.Add(item); } DojoMembershipManager dojoMembershipManager = new DojoMembershipManager(); DojoMembershipCollection dojoMembershipCollection = dojoMembershipManager.GetCollection(string.Empty, string.Empty); ddParent.Items.Add(new ListItem(" ", "null")); foreach (DojoMembership itemObject in dojoMembershipCollection) { ddParent.Items.Add(new ListItem(itemObject.ToString(), itemObject.ID.ToString())); } DojoMemberTypeTemplateManager dojoMemberTypeTemplateManager = new DojoMemberTypeTemplateManager(); DojoMemberTypeTemplateCollection dojoMemberTypeTemplateCollection = dojoMemberTypeTemplateManager.GetCollection(string.Empty, string.Empty); foreach (DojoMemberTypeTemplate itemObject in dojoMemberTypeTemplateCollection) { ComponentArt.Web.UI.ComboBoxItem item = new ComponentArt.Web.UI.ComboBoxItem(); item.Text = itemObject.ToString(); item.Value = itemObject.ID.ToString(); comboMemberTypeTemplate.Items.Add(item); } DojoMembershipTemplateManager dojoMembershipTemplateManager = new DojoMembershipTemplateManager(); DojoMembershipTemplateCollection dojoMembershipTemplateCollection = dojoMembershipTemplateManager.GetCollection(string.Empty, string.Empty); foreach (DojoMembershipTemplate itemObject in dojoMembershipTemplateCollection) { ComponentArt.Web.UI.ComboBoxItem item = new ComponentArt.Web.UI.ComboBoxItem(); item.Text = itemObject.ToString(); item.Value = itemObject.ID.ToString(); comboMembershipTemplate.Items.Add(item); } RHInvoiceLineManager rHInvoiceLineManager = new RHInvoiceLineManager(); RHInvoiceLineCollection rHInvoiceLineCollection = rHInvoiceLineManager.GetCollection(string.Empty, string.Empty); ddInvoiceLine.Items.Add(new ListItem(" ", "null")); foreach (RHInvoiceLine itemObject in rHInvoiceLineCollection) { ddInvoiceLine.Items.Add(new ListItem(itemObject.ToString(), itemObject.ID.ToString())); } }
private void bindDropDownLists() { #region Bind Default Child Data msMember.Items.Add(new ListItem("Null", "Null")); DojoMemberManager memberManager = new DojoMemberManager(); DojoMemberCollection memberCollection = memberManager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMember member in memberCollection) { ListItem i = new ListItem(member.ToString(), member.ID.ToString()); msMember.Items.Add(i); } msMemberType.Items.Add(new ListItem("Null", "Null")); DojoMemberTypeManager memberTypeManager = new DojoMemberTypeManager(); DojoMemberTypeCollection memberTypeCollection = memberTypeManager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMemberType memberType in memberTypeCollection) { ListItem i = new ListItem(memberType.ToString(), memberType.ID.ToString()); msMemberType.Items.Add(i); } msOrganization.Items.Add(new ListItem("Null", "Null")); DojoOrganizationManager organizationManager = new DojoOrganizationManager(); DojoOrganizationCollection organizationCollection = organizationManager.GetCollection(string.Empty, string.Empty, null); foreach (DojoOrganization organization in organizationCollection) { ListItem i = new ListItem(organization.ToString(), organization.ID.ToString()); msOrganization.Items.Add(i); } msParentMembership.Items.Add(new ListItem("Null", "Null")); DojoMembershipManager parentMembershipManager = new DojoMembershipManager(); DojoMembershipCollection parentMembershipCollection = parentMembershipManager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMembership parentMembership in parentMembershipCollection) { ListItem i = new ListItem(parentMembership.ToString(), parentMembership.ID.ToString()); msParentMembership.Items.Add(i); } msSourceTemplate.Items.Add(new ListItem("Null", "Null")); DojoMembershipTemplateManager sourceTemplateManager = new DojoMembershipTemplateManager(); DojoMembershipTemplateCollection sourceTemplateCollection = sourceTemplateManager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMembershipTemplate sourceTemplate in sourceTemplateCollection) { ListItem i = new ListItem(sourceTemplate.ToString(), sourceTemplate.ID.ToString()); msSourceTemplate.Items.Add(i); } #endregion #region Bind Rappahanock Child Data msInvoiceLine.Items.Add(new ListItem("Null", "Null")); RHInvoiceLineManager invoiceLineManager = new RHInvoiceLineManager(); RHInvoiceLineCollection invoiceLineCollection = invoiceLineManager.GetCollection(string.Empty, string.Empty, null); foreach (RHInvoiceLine invoiceLine in invoiceLineCollection) { ListItem i = new ListItem(invoiceLine.ToString(), invoiceLine.ID.ToString()); msInvoiceLine.Items.Add(i); } #endregion }