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); } msTest.Items.Add(new ListItem("Null", "Null")); DojoTestManager testManager = new DojoTestManager(); DojoTestCollection testCollection = testManager.GetCollection(string.Empty, string.Empty, null); foreach(DojoTest test in testCollection) { ListItem i = new ListItem(test.ToString(), test.ID.ToString()); msTest.Items.Add(i); } msPromotionRank.Items.Add(new ListItem("Null", "Null")); DojoRankManager promotionRankManager = new DojoRankManager(); DojoRankCollection promotionRankCollection = promotionRankManager.GetCollection(string.Empty, string.Empty, null); foreach(DojoRank promotionRank in promotionRankCollection) { ListItem i = new ListItem(promotionRank.ToString(), promotionRank.ID.ToString()); msPromotionRank.Items.Add(i); } msLastRank.Items.Add(new ListItem("Null", "Null")); DojoRankManager lastRankManager = new DojoRankManager(); DojoRankCollection lastRankCollection = lastRankManager.GetCollection(string.Empty, string.Empty, null); foreach(DojoRank lastRank in lastRankCollection) { ListItem i = new ListItem(lastRank.ToString(), lastRank.ID.ToString()); msLastRank.Items.Add(i); } msStatus.Items.Add(new ListItem("Null", "Null")); DojoPromotionStatusManager statusManager = new DojoPromotionStatusManager(); DojoPromotionStatusCollection statusCollection = statusManager.GetCollection(string.Empty, string.Empty); foreach(DojoPromotionStatus status in statusCollection) { ListItem i = new ListItem(status.ToString(), status.ID.ToString()); msStatus.Items.Add(i); } #endregion }
/// <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) { DojoPromotionStatusManager m = new DojoPromotionStatusManager(); DojoPromotionStatusCollection dojoPromotionStatusCollection = m.GetCollection(string.Empty, string.Empty); // Render Header Row this.headerLockEnabled = true; RenderRow(this.HeaderRowCssClass, ); bool rowflag = false; string rowCssClass; // // Render Records // foreach (DojoPromotionStatus dojoPromotionStatus in dojoPromotionStatusCollection) { if (rowflag) { rowCssClass = defaultRowCssClass; } else { rowCssClass = alternateRowCssClass; } rowflag = !rowflag; output.WriteBeginTag("tr"); output.WriteAttribute("i", dojoPromotionStatus.ID.ToString()); output.WriteLine(HtmlTextWriter.TagRightChar); output.Indent++; output.Indent--; output.WriteEndTag("tr"); output.WriteLine(); } }