/// <summary> /// 栏目列表信息遍历 /// </summary> /// <param name="ParentId"></param> /// <param name="Line"></param> protected void MenuListBind(int ParentId, string Line) { DataView dv = new DataView(dsList.Tables[0]); dv.RowFilter = "ParentId = " + ParentId; foreach (DataRowView dr in dv) { MenuList += "<tr onMouseOver=\"over()\" onClick=\"change()\" onMouseOut=\"out()\" class=\"td_bg\">\n"; MenuList += "<td align=\"center\">" + dr[0] + "</td>\n"; foreach (string j in GetField()) { MenuList += "<td>"; if (Getnext(Convert.ToInt32(dr[0]))) { MenuList += "<a href='../Model/Model_Manage.aspx?MenuId=" + dr[0] + "'>"; } if (j == "Title") { MenuList += Line + bM.GetMenuIsSub((int)dr[0]); } MenuList += StringDeal.StrFormat(dr[j]); if (Getnext(Convert.ToInt32(dr[0]))) { MenuList += "</a>"; } MenuList += "</td>\n"; } if (MenuId == 0) { MenuList += "<td align=\"center\" nowrap=\"nowrap\"><a href=\"MenuModel_Set.aspx?Id=" + dr[0] + "\" title=\"设置此栏目以及下属栏目的所需要字段\">栏目</a> <a href=\"Model_Set.aspx?Id=" + dr[0] + "\" title=\"设置此栏目以及下属栏目信息的所需要字段\">信息</a></td>"; } MenuList += "<td align=\"center\" nowrap=\"nowrap\">"; MenuList += "<a href=\"?MenuId=" + MenuId + "&Action=up&Id=" + dr[0] + "\">上移</a>"; MenuList += " <a href=\"?MenuId=" + MenuId + "&Action=down&Id=" + dr[0] + "\">下移</a>"; MenuList += " <a href=\"?MenuId=" + MenuId + "&Action=top&Id=" + dr[0] + "\">" + StringDeal.GetTop(StringDeal.ToBool(dr["IsTop"]), "栏目") + "</a>"; MenuList += " <a href=\"?MenuId=" + MenuId + "&Action=lock&Id=" + dr[0] + "\">" + StringDeal.GetLock(StringDeal.ToBool(dr["IsLock"]), "栏目") + "</a>"; MenuList += " <a href=\"Menu_Edit.aspx?MenuId=" + MenuId + "&Id=" + dr[0] + "\">修改</a>"; MenuList += " <a onClick=\"return confirm('确认删除')\" href=\"?MenuId=" + MenuId + "&Action=del&Id=" + dr[0] + "\">删除</a>"; MenuList += "</td>\n</tr>\n"; MenuListBind(StringDeal.ToInt(dr[0]), "<img alt=\"\" src=\"../skin/01/ico/tree_treemiddle.gif\" width=\"18\" height=\"18\" align=\"absmiddle\">" + Line); } Depth++; }