private void RenderModuleList(ModuleCollection module) { bool addEmpty = false; foreach (Module module2 in module) { if (module2.Level == 1) { this.RenderOneLevelRow(module2, addEmpty); addEmpty = true; this.IsFirstSubNode = true; } else { bool bottomNode = module.IndexOf(module2.ModuleCode.Substring(0, module2.ModuleCode.Length - 2)).BottomNode; if (module2.ChildNum.Trim() != "0") { if (module2.BottomNode) { this.RenderEndChildNode(module2, bottomNode); } else { this.RenderNoEndChildNode(module2, bottomNode); } } else { if (module2.BottomNode) { this.RenderEndLeafNode(module2, bottomNode); } else { this.RenderNoEndLeafNode(module2, bottomNode); } } } } HtmlTableRow htmlTableRow = new HtmlTableRow(); HtmlTableCell htmlTableCell = new HtmlTableCell(); htmlTableRow = new HtmlTableRow(); htmlTableCell = new HtmlTableCell(); htmlTableCell.Attributes["class"] = "menuTr1"; htmlTableCell.Height = "1"; htmlTableCell.ColSpan = 187; htmlTableRow.Cells.Add(htmlTableCell); this.ModuleList.Controls.Add(htmlTableRow); }