[C#] 纯文本查看 复制代码
<div class="si-main">
<div class="si-block">
<div class="si-form">
<table class="table-form table">
<tr>
<td><a class="btn btn-primary" href="/Sys/AddFunc.aspx" >添加权限</a></td>
</tr>
</table>
<table class="table table-page" id="grid">
<thead>
<tr>
<td>编号</td>
<td>功能名称</td>
<td>父类功能ID</td>
<td>操作</td>
</tr>
</thead>
<tbody>
<%foreach (var funcInfo in parentList)
{ %>
<tr bgcolor="#d8d8d8">
<td>
<%=funcInfo.ID%>
</td>
<td>
<%=funcInfo.FunctionName%>
</td>
<td>
<%=funcInfo.ParentId %>
</td>
<td>
<a href="javascript:;" class="btn btn-success btn-small del" data-value="<%=funcInfo.ID %>">删除</a>
</td>
</tr>
<%
var sonFunList = sonList.Where(m => m.ParentId == funcInfo.ID);
foreach (var sonFunc in sonFunList)
{
%>
<tr>
<td>
<%=sonFunc.ID%>
</td>
<td>
<%=sonFunc.FunctionName%>
</td>
<td>
<%=sonFunc.ParentId%>
</td>
<td>
<a href="javascript:;" class="btn btn-success btn-small del" data-value="<%=sonFunc.ID %>">删除</a>
</td>
</tr>
<% }} %>
</tbody>
</table>
</div>
</div>
</div>