public void LoadDefaults() { DojoAccessControlGroupCollection accessControls; DojoAttendanceEntryCollection attendanceEntries; DojoBulkAttendanceEntryCollection bulkAttendances; DojoClassCollection classes; DojoClassDefinitionCollection classDefinitions; DojoMemberCollection members; DojoMembershipCollection memberships; DojoMembershipTemplateCollection membershipTemplates; DojoMemberTypeCollection memberTypes; DojoMemberTypeTemplateCollection memberTypeTemplates; DojoOrganizationCollection organizations; DojoPromotionCollection promotions; DojoPromotionFlagCollection promotionFlags; DojoPromotionStatusCollection promotionStatuses; DojoRankCollection ranks; DojoTestCollection tests; DojoTestListCollection testLists; DojoTestListJournalEntryCollection testListJournalEntries; DojoTestListJournalEntryTypeCollection testListJournalEntryTypes; DojoTestListStatusCollection testListStatuses; DojoSeminarCollection seminars; DojoSeminarOptionCollection seminarOptions; DojoSeminarRegistrationCollection seminarRegistrations; DojoSeminarRegistrationOptionCollection seminarRegistrationOptions; GreyFoxContactCollection locations; accessControls = new DojoAccessControlGroupCollection(); attendanceEntries = new DojoAttendanceEntryCollection(); bulkAttendances = new DojoBulkAttendanceEntryCollection(); classes = new DojoClassCollection(); classDefinitions = new DojoClassDefinitionCollection(); members = new DojoMemberCollection(); memberships = new DojoMembershipCollection(); membershipTemplates = new DojoMembershipTemplateCollection(); memberTypes = new DojoMemberTypeCollection(); memberTypeTemplates = new DojoMemberTypeTemplateCollection(); organizations = new DojoOrganizationCollection(); promotions = new DojoPromotionCollection(); promotionFlags = new DojoPromotionFlagCollection(); promotionStatuses = new DojoPromotionStatusCollection(); ranks = new DojoRankCollection(); tests = new DojoTestCollection(); testLists = new DojoTestListCollection(); testListJournalEntries = new DojoTestListJournalEntryCollection(); testListJournalEntryTypes = new DojoTestListJournalEntryTypeCollection(); testListStatuses = new DojoTestListStatusCollection(); seminars = new DojoSeminarCollection(); seminarOptions = new DojoSeminarOptionCollection(); seminarRegistrations = new DojoSeminarRegistrationCollection(); seminarRegistrationOptions = new DojoSeminarRegistrationOptionCollection(); locations = new GreyFoxContactCollection(); organizations = new DojoOrganizationManager().GetCollection(string.Empty, string.Empty, null); memberTypes = new DojoMemberTypeManager().GetCollection(string.Empty, string.Empty); memberTypeTemplates = new DojoMemberTypeTemplateManager().GetCollection(string.Empty, string.Empty, null); ranks = new DojoRankManager().GetCollection(string.Empty, string.Empty, null); membershipTemplates = new DojoMembershipTemplateManager().GetCollection(string.Empty, string.Empty, null); Dictionary <string, DojoMemberType> memberTypesDictionary = new Dictionary <string, DojoMemberType>(); foreach (DojoMemberType memberType in memberTypes) { memberTypesDictionary.Add(memberType.Name, memberType); } Dictionary <string, DojoMemberTypeTemplate> memberTypeTemplatesDictionary = new Dictionary <string, DojoMemberTypeTemplate>(); foreach (DojoMemberTypeTemplate typeTemplate in memberTypeTemplates) { memberTypeTemplatesDictionary.Add(typeTemplate.Name, typeTemplate); } Dictionary <string, DojoRank> ranksDictionary = new Dictionary <string, DojoRank>(); foreach (DojoRank rank in ranks) { ranksDictionary.Add(rank.Name, rank); } Dictionary <string, DojoMembershipTemplate> membershipTemplatesDictionary = new Dictionary <string, DojoMembershipTemplate>(); foreach (DojoMembershipTemplate template in membershipTemplates) { membershipTemplatesDictionary.Add(template.Name, template); } CsvParser.CsvStream csv = CsvParser.StreamParse(Localization.Defaults.Defaults_en_US, false); string rowType; string[] r = csv.GetNextRow(); while (r != null) { rowType = r[0]; if (rowType == Localization.Defaults.CSVMembershipTemplate) { DojoMembershipTemplate template = TessenFactory.MembershipTemplate( r[1], r[2], bool.Parse(r[3]), bool.Parse(r[4]), bool.Parse(r[5]), decimal.Parse(r[6]), decimal.Parse(r[7]), (DojoMembershipDayType)Enum.Parse(typeof(DojoMembershipDayType), r[8]), (DojoMembershipDayType)Enum.Parse(typeof(DojoMembershipDayType), r[9]), DojoOrganization.NewPlaceHolder(0), 1, int.Parse(r[11]), int.Parse(r[12]), decimal.Parse(r[13]), (DojoMembershipDayType)Enum.Parse(typeof(DojoMembershipDayType), r[14]), int.Parse(r[15]), int.Parse(r[16]), decimal.Parse(r[17]), (DojoMembershipDayType)Enum.Parse(typeof(DojoMembershipDayType), r[18]), int.Parse(r[19]), int.Parse(r[20]), decimal.Parse(r[21]), (DojoMembershipDayType)Enum.Parse(typeof(DojoMembershipDayType), r[22]), int.Parse(r[23]), int.Parse(r[24]), int.Parse(r[25]), int.Parse(r[26]), ranksDictionary.ContainsKey(r[27]) ? ranksDictionary[r[27]] : null, ranksDictionary.ContainsKey(r[28]) ? ranksDictionary[r[28]] : null); membershipTemplates.Add(template); membershipTemplatesDictionary.Add(template.Name, template); template.Save(); } else if (rowType == Localization.Defaults.CSVMemberTypeTemplate) { DojoMemberTypeTemplate template = TessenFactory.MemberTypeTemplate( r[1], r[2], memberTypeTemplatesDictionary.ContainsKey(r[3].ToString()) ? memberTypeTemplatesDictionary[r[3]] : null, memberTypesDictionary.ContainsKey(r[4]) ? memberTypesDictionary[r[4]] : null, bool.Parse(r[5]), bool.Parse(r[6]), bool.Parse(r[7]), bool.Parse(r[8]), int.Parse(r[9]), int.Parse(r[10]), int.Parse(r[11]), int.Parse(r[12]), ranksDictionary.ContainsKey(r[13]) ? ranksDictionary[r[13]] : null, ranksDictionary.ContainsKey(r[14]) ? ranksDictionary[r[14]] : null, membershipTemplatesDictionary.ContainsKey(r[15]) ? membershipTemplatesDictionary[r[15]] : null, membershipTemplatesDictionary.ContainsKey(r[16]) ? membershipTemplatesDictionary[r[16]] : null, membershipTemplatesDictionary.ContainsKey(r[17]) ? membershipTemplatesDictionary[r[17]] : null, membershipTemplatesDictionary.ContainsKey(r[18]) ? membershipTemplatesDictionary[r[18]] : null, membershipTemplatesDictionary.ContainsKey(r[19]) ? membershipTemplatesDictionary[r[19]] : null); memberTypeTemplates.Add(template); memberTypeTemplatesDictionary.Add(template.Name, template); template.Save(); } r = csv.GetNextRow(); } }
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 bindDropDownLists() { #region Bind General Child Data 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); } msPublicContact.Items.Add(new ListItem("Null", "Null")); GreyFoxContactManager publicContactManager = new GreyFoxContactManager("kitTessen_Members_PublicContacts"); GreyFoxContactCollection publicContactCollection = publicContactManager.GetCollection(string.Empty, string.Empty); foreach (GreyFoxContact publicContact in publicContactCollection) { ListItem i = new ListItem(publicContact.ToString(), publicContact.ID.ToString()); msPublicContact.Items.Add(i); } msParentMember.Items.Add(new ListItem("Null", "Null")); DojoMemberManager parentMemberManager = new DojoMemberManager(); DojoMemberCollection parentMemberCollection = parentMemberManager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMember parentMember in parentMemberCollection) { ListItem i = new ListItem(parentMember.ToString(), parentMember.ID.ToString()); msParentMember.Items.Add(i); } #endregion #region Bind Membership Child Data msPrimaryOrgMembership.Items.Add(new ListItem("Null", "Null")); DojoMembershipManager primaryOrgMembershipManager = new DojoMembershipManager(); DojoMembershipCollection primaryOrgMembershipCollection = primaryOrgMembershipManager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMembership primaryOrgMembership in primaryOrgMembershipCollection) { ListItem i = new ListItem(primaryOrgMembership.ToString(), primaryOrgMembership.ID.ToString()); msPrimaryOrgMembership.Items.Add(i); } msParentOrgMembership.Items.Add(new ListItem("Null", "Null")); DojoMembershipManager parentOrgMembershipManager = new DojoMembershipManager(); DojoMembershipCollection parentOrgMembershipCollection = parentOrgMembershipManager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMembership parentOrgMembership in parentOrgMembershipCollection) { ListItem i = new ListItem(parentOrgMembership.ToString(), parentOrgMembership.ID.ToString()); msParentOrgMembership.Items.Add(i); } #endregion #region Bind Attendance Child Data msInstructor1.Items.Add(new ListItem("Null", "Null")); DojoMemberManager instructor1Manager = new DojoMemberManager(); DojoMemberCollection instructor1Collection = instructor1Manager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMember instructor1 in instructor1Collection) { ListItem i = new ListItem(instructor1.ToString(), instructor1.ID.ToString()); msInstructor1.Items.Add(i); } msInstructor2.Items.Add(new ListItem("Null", "Null")); DojoMemberManager instructor2Manager = new DojoMemberManager(); DojoMemberCollection instructor2Collection = instructor2Manager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMember instructor2 in instructor2Collection) { ListItem i = new ListItem(instructor2.ToString(), instructor2.ID.ToString()); msInstructor2.Items.Add(i); } msInstructor3.Items.Add(new ListItem("Null", "Null")); DojoMemberManager instructor3Manager = new DojoMemberManager(); DojoMemberCollection instructor3Collection = instructor3Manager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMember instructor3 in instructor3Collection) { ListItem i = new ListItem(instructor3.ToString(), instructor3.ID.ToString()); msInstructor3.Items.Add(i); } #endregion #region Bind Activity Child Data msPromotionFlags.Items.Add(new ListItem("Null", "Null")); DojoPromotionFlagManager promotionFlagsManager = new DojoPromotionFlagManager(); DojoPromotionFlagCollection promotionFlagsCollection = promotionFlagsManager.GetCollection(string.Empty, string.Empty); foreach (DojoPromotionFlag promotionFlags in promotionFlagsCollection) { ListItem i = new ListItem(promotionFlags.ToString(), promotionFlags.ID.ToString()); msPromotionFlags.Items.Add(i); } msRank.Items.Add(new ListItem("Null", "Null")); DojoRankManager rankManager = new DojoRankManager(); DojoRankCollection rankCollection = rankManager.GetCollection(string.Empty, string.Empty, null); foreach (DojoRank rank in rankCollection) { ListItem i = new ListItem(rank.ToString(), rank.ID.ToString()); msRank.Items.Add(i); } #endregion #region Bind Security Child Data #endregion #region Bind Rappahanock Child Data msCustomer.Items.Add(new ListItem("Null", "Null")); RHCustomerManager customerManager = new RHCustomerManager(); RHCustomerCollection customerCollection = customerManager.GetCollection(string.Empty, string.Empty, null); foreach (RHCustomer customer in customerCollection) { ListItem i = new ListItem(customer.ToString(), customer.ID.ToString()); msCustomer.Items.Add(i); } #endregion }
private void bind() { GreyFoxContactManager locationManager = new GreyFoxContactManager("kitTessen_Locations"); GreyFoxContactCollection locationCollection = locationManager.GetCollection(string.Empty, string.Empty); foreach (GreyFoxContact itemObject in locationCollection) { ComponentArt.Web.UI.ComboBoxItem item = new ComponentArt.Web.UI.ComboBoxItem(); item.Text = itemObject.BusinessName; item.Value = itemObject.ID.ToString(); comboLocation.Items.Add(item); } DojoMemberTypeManager dojoMemberTypeManager = new DojoMemberTypeManager(); DojoMemberTypeCollection dojoMemberTypeCollection = dojoMemberTypeManager.GetCollection(string.Empty, string.Empty); foreach (DojoMemberType itemObject in dojoMemberTypeCollection) { ComponentArt.Web.UI.ComboBoxItem item = new ComponentArt.Web.UI.ComboBoxItem(); item.Text = itemObject.Name; item.Value = itemObject.ID.ToString(); comboListMemberType1.Items.Add(item); } foreach (DojoMemberType itemObject in dojoMemberTypeCollection) { ComponentArt.Web.UI.ComboBoxItem item = new ComponentArt.Web.UI.ComboBoxItem(); item.Text = itemObject.Name; item.Value = itemObject.ID.ToString(); comboListMemberType2.Items.Add(item); } foreach (DojoMemberType itemObject in dojoMemberTypeCollection) { ComponentArt.Web.UI.ComboBoxItem item = new ComponentArt.Web.UI.ComboBoxItem(); item.Text = itemObject.Name; item.Value = itemObject.ID.ToString(); comboListMemberType3.Items.Add(item); } DojoMemberManager dojoMemberManager = new DojoMemberManager(); DojoMemberCollection dojoMemberCollection = dojoMemberManager.GetCollection( "UserAccountID IS NOT NULL", string.Empty); ddPanelChief.Items.Add(new ListItem(" ", "null")); foreach (DojoMember itemObject in dojoMemberCollection) { ddPanelChief.Items.Add(new ListItem(itemObject.ToString(), itemObject.ID.ToString())); } foreach (DojoMember itemObject in dojoMemberCollection) { ComponentArt.Web.UI.ComboBoxItem item = new ComponentArt.Web.UI.ComboBoxItem(); item.Text = itemObject.UserAccount.UserName; item.Value = itemObject.ID.ToString(); comboPanelMembers.Items.Add(item); } DojoTestListStatusManager dojoTestListStatusManager = new DojoTestListStatusManager(); DojoTestListStatusCollection dojoTestListStatusCollection = dojoTestListStatusManager.GetCollection(string.Empty, string.Empty); foreach (DojoTestListStatus itemObject in dojoTestListStatusCollection) { ComponentArt.Web.UI.ComboBoxItem item = new ComponentArt.Web.UI.ComboBoxItem(); item.Text = itemObject.ToString(); item.Value = itemObject.ID.ToString(); comboStatus.Items.Add(item); } DojoTestListManager dojoTestListManager = new DojoTestListManager(); DojoTestListCollection dojoTestListCollection = dojoTestListManager.GetCollection(string.Empty, string.Empty); ddActiveTestList.Items.Add(new ListItem(" ", "null")); foreach (DojoTestList itemObject in dojoTestListCollection) { ddActiveTestList.Items.Add(new ListItem(itemObject.ToString(), itemObject.ID.ToString())); } RHItemManager rHItemManager = new RHItemManager(); RHItemCollection rHItemCollection = rHItemManager.GetCollection(string.Empty, string.Empty); foreach (RHItem itemObject in rHItemCollection) { ComponentArt.Web.UI.ComboBoxItem item = new ComponentArt.Web.UI.ComboBoxItem(); item.Text = itemObject.ToString(); item.Value = itemObject.ID.ToString(); comboItem.Items.Add(item); } }
private void bindDropDownLists() { #region Bind Default Child Data msLocation.Items.Add(new ListItem("Null", "Null")); GreyFoxContactManager locationManager = new GreyFoxContactManager("kitTessen_Locations"); GreyFoxContactCollection locationCollection = locationManager.GetCollection(string.Empty, string.Empty); foreach (GreyFoxContact location in locationCollection) { ListItem i = new ListItem(location.ToString(), location.ID.ToString()); msLocation.Items.Add(i); } #endregion #region Bind List Generator Child Data msListMemberType1.Items.Add(new ListItem("Null", "Null")); DojoMemberTypeManager listMemberType1Manager = new DojoMemberTypeManager(); DojoMemberTypeCollection listMemberType1Collection = listMemberType1Manager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMemberType listMemberType1 in listMemberType1Collection) { ListItem i = new ListItem(listMemberType1.ToString(), listMemberType1.ID.ToString()); msListMemberType1.Items.Add(i); } msListMemberType2.Items.Add(new ListItem("Null", "Null")); DojoMemberTypeManager listMemberType2Manager = new DojoMemberTypeManager(); DojoMemberTypeCollection listMemberType2Collection = listMemberType2Manager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMemberType listMemberType2 in listMemberType2Collection) { ListItem i = new ListItem(listMemberType2.ToString(), listMemberType2.ID.ToString()); msListMemberType2.Items.Add(i); } msListMemberType3.Items.Add(new ListItem("Null", "Null")); DojoMemberTypeManager listMemberType3Manager = new DojoMemberTypeManager(); DojoMemberTypeCollection listMemberType3Collection = listMemberType3Manager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMemberType listMemberType3 in listMemberType3Collection) { ListItem i = new ListItem(listMemberType3.ToString(), listMemberType3.ID.ToString()); msListMemberType3.Items.Add(i); } #endregion #region Bind Administration Child Data msPanelChief.Items.Add(new ListItem("Null", "Null")); DojoMemberManager panelChiefManager = new DojoMemberManager(); DojoMemberCollection panelChiefCollection = panelChiefManager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMember panelChief in panelChiefCollection) { ListItem i = new ListItem(panelChief.ToString(), panelChief.ID.ToString()); msPanelChief.Items.Add(i); } msPanelMember1.Items.Add(new ListItem("Null", "Null")); DojoMemberManager panelMember1Manager = new DojoMemberManager(); DojoMemberCollection panelMember1Collection = panelMember1Manager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMember panelMember1 in panelMember1Collection) { ListItem i = new ListItem(panelMember1.ToString(), panelMember1.ID.ToString()); msPanelMember1.Items.Add(i); } msPanelMember2.Items.Add(new ListItem("Null", "Null")); DojoMemberManager panelMember2Manager = new DojoMemberManager(); DojoMemberCollection panelMember2Collection = panelMember2Manager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMember panelMember2 in panelMember2Collection) { ListItem i = new ListItem(panelMember2.ToString(), panelMember2.ID.ToString()); msPanelMember2.Items.Add(i); } msPanelMember3.Items.Add(new ListItem("Null", "Null")); DojoMemberManager panelMember3Manager = new DojoMemberManager(); DojoMemberCollection panelMember3Collection = panelMember3Manager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMember panelMember3 in panelMember3Collection) { ListItem i = new ListItem(panelMember3.ToString(), panelMember3.ID.ToString()); msPanelMember3.Items.Add(i); } msPanelMember4.Items.Add(new ListItem("Null", "Null")); DojoMemberManager panelMember4Manager = new DojoMemberManager(); DojoMemberCollection panelMember4Collection = panelMember4Manager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMember panelMember4 in panelMember4Collection) { ListItem i = new ListItem(panelMember4.ToString(), panelMember4.ID.ToString()); msPanelMember4.Items.Add(i); } msPanelMember5.Items.Add(new ListItem("Null", "Null")); DojoMemberManager panelMember5Manager = new DojoMemberManager(); DojoMemberCollection panelMember5Collection = panelMember5Manager.GetCollection(string.Empty, string.Empty, null); foreach (DojoMember panelMember5 in panelMember5Collection) { ListItem i = new ListItem(panelMember5.ToString(), panelMember5.ID.ToString()); msPanelMember5.Items.Add(i); } #endregion #region Bind System Child Data msStatus.Items.Add(new ListItem("Null", "Null")); DojoTestListStatusManager statusManager = new DojoTestListStatusManager(); DojoTestListStatusCollection statusCollection = statusManager.GetCollection(string.Empty, string.Empty, null); foreach (DojoTestListStatus status in statusCollection) { ListItem i = new ListItem(status.ToString(), status.ID.ToString()); msStatus.Items.Add(i); } msActiveTestList.Items.Add(new ListItem("Null", "Null")); DojoTestListManager activeTestListManager = new DojoTestListManager(); DojoTestListCollection activeTestListCollection = activeTestListManager.GetCollection(string.Empty, string.Empty, null); foreach (DojoTestList activeTestList in activeTestListCollection) { ListItem i = new ListItem(activeTestList.ToString(), activeTestList.ID.ToString()); msActiveTestList.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 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 }