<%@ Page Title="" Language="C#" MasterPageFile="~/BackStage/SiteMaster.Master" AutoEventWireup="true" CodeBehind="Frm_LimitGroupSiteList.aspx.cs" Inherits="AndroidSevice.Web.BackStage.WLTGL.Frm_LimitGroupSiteList" %>
<%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        function ShowDataHelp(_url, _title, _handler) {
            layer.open({
                type: 2,
                area: ['60%', '75%'],
                fix: false, //不固定
                maxmin: true,
                content: _url,
                end: function () {
                  location.reload();
                  }
            });
        }
        function ShowDataHelp2(_url, _title, _handler) {
            layer.open({
                type: 2,
                area: ['80%', '90%'],
                fix: false, //不固定
                maxmin: true,
                content: _url,
                end: function () {
                    location.reload();
                }
            });
        }
        function sAlert(info) {
            var message = info;
            layer.alert(message, 8); //风格一，layer弹出层特效
        }
        function sAlertok(info) {
            layer.alert(info, { closeBtn: 0
            }, function () {
                parent.location.reload(); //刷新父页面
            });
        }
        function sAlertOut(info) {
            layer.alert(info, { closeBtn: 0
            }, function () {
                window.location.href = '../../default.aspx'; //刷新父页面
            });
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="content-header">
				<div class="btn-group">
				</div>
</div>
<div id="breadcrumb">
				<a href="#" title="Go to Home" class="tip-bottom"><i class="icon-home"></i>物联通管理</a>
				<a href="#" class="current">权限组设置</a>
</div>
<div class="container-fluid">
				<div class="row-fluid">
					<div class="span12">
						<div class="widget-box">
							<div class="widget-title">
								<span class="icon">
									<i class="icon-th-list"></i>
								</span>
								<h5>权限组设置</h5>
							</div>
							<div class="widget-content">                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             <div class="container-fluid">
                                    <div class="row-fluid">
					                <div class="span6" style="width:40%">
						                <div class="widget-box">
							                <div class="widget-title">
								                <span class="icon">
									                <i class="icon-eye-open"></i>
								                </span>
								                <h5>权限组</h5>
                                                 <div class="buttons">
									                    <button type="button" onclick=ShowDataHelp('Frm_AddLimitGroup.aspx?','','') class="btn btn-mini" ><i class="icon-plus-sign"></i>新增权限组</button>
                                                     <asp:HiddenField ID="HiddenField1" runat="server" />
                                                     <asp:HiddenField ID="HiddenField2" runat="server" />
                                                    </div>
							                </div>
							                <div class="widget-content nopadding">
								                <table class="table table-bordered table-striped table-hover">
									                <thead>
										                <tr>
											                <th style=" width:25px">序号</th>
                                                            <th>编号</th>
											                <th>权限组名称</th>
                                                            <th>操作</th>
										                </tr>
									                </thead>
									                <tbody>
                                                    <%if (dtGroup != null && dtGroup.Rows.Count != 0)
                                                      {
                                                          for (int i = 0; i < dtGroup.Rows.Count; i++)
                                                          {
                                                          %>
										                <tr>
                                                             <td style="width:25px"><%=i+1 %></td>
                                                             <td><%=dtGroup.Rows[i]["LimitCode"].ToString()%></td>
											                <td><a href="Frm_LimitGroupSiteList.aspx?id=<%=dtGroup.Rows[i]["Id"].ToString() %>&name=<%=dtGroup.Rows[i]["LimitName"].ToString()%>"><%=dtGroup.Rows[i]["LimitName"].ToString()%></a></td>
										                    <td>
                                                                <button type="button" onclick=ShowDataHelp('Frm_AddLimitGroup.aspx?id=<%=dtGroup.Rows[i]["Id"].ToString() %>','','') class="btn" >编辑</button>
                                                                <button type="button" onclick="javaScript:if(confirm('您确定要删除吗？')) window.location.href='Frm_LimitGroupSiteList.aspx?sub=del&id=<%=dtGroup.Rows[i]["Id"].ToString() %>'" class="btn"><i class="icon-trash"></i>删除</button>
                                                            </td>
                                                        </tr>
                                                        <%
                                                          }
                                                      }
                                                             %>
									                </tbody>
								                </table>
							                </div>
						                </div>
                                            <webdiyer:aspnetpager ID="AspNetPager1" runat="server" FirstPageText="首页" 
                                            LastPageText="尾页" PrevPageText="上一页" NextPageText="下一页" 
                                            onpagechanging="AspNetPager1_PageChanging"
                                            PageSize="20" NumericButtonCount="3" AlwaysShow="True" />
					                </div>
					                 <div class="span6"  style="width:45%">
						                    <div class="widget-box">
							                    <div class="widget-title">
								                    <span class="icon">
									                    <i class="icon-arrow-right"></i>
								                    </span>
								                    <h5>权限组&nbsp;&nbsp;(<%=_GroupName %>)</h5>
                                                    <div class="buttons">
									                    <button type="button" onclick=ShowDataHelp2('Frm_LimitGroupSet.aspx?groupid=<%=_GroupId %>','','') class="btn btn-mini" ><i class="icon-plus-sign"></i>选择权限</button>
                                                    </div>
							                    </div>
							                    <div class="widget-content nopadding">
								                    <table class="table table-bordered table-striped table-hover">
									                    <thead>
										                    <tr>
											                    <th style=" width:25px">序号</th>
                                                                
											                    <th>权限</th>
                                                                 <th>操作</th>
										                    </tr>
									                    </thead>
									                    <tbody>
                                                        <%if (dtSet != null && dtSet.Rows.Count != 0)
                                                          {
                                                              for (int i = 0; i < dtSet.Rows.Count; i++)
                                                              { %>
										                    <tr>
                                                                  <td style="width:25px"><%=i+1 %></td>
											                    <td><%=dtSet.Rows[i]["LimitName"].ToString()%></td>
                                                                <td><button type="button"  onclick="javaScript:if(confirm('您确定要删除吗？')) window.location.href='Frm_LimitGroupSiteList.aspx?sub=del2&name=<%=dtSet.Rows[i]["Name"].ToString()%>&limitId=<%=dtSet.Rows[i]["LimitId"].ToString() %>&limitType=<%=dtSet.Rows[i]["limitType"].ToString() %>&num=<%=dtSet.Rows[i]["num"].ToString() %>'" class="btn btn-mini"><i class="icon-trash"></i>删除</button></td>
										                    </tr>
                                                        <% }
                                                          }%>
									                    </tbody>
								                    </table>
							                    </div>
						                    </div>
                                                <webdiyer:aspnetpager ID="AspNetPager2" runat="server" FirstPageText="首页" 
                                                        LastPageText="尾页" PrevPageText="上一页" NextPageText="下一页" 
                                                onpagechanging="AspNetPager2_PageChanging"
                                                PageSize="20" NumericButtonCount="10" AlwaysShow="True" />
					                    </div>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
					                </div>
				                </div>
							</div>
						</div>
					</div>
				</div>
			</div>
</asp:Content>
