<%@ Page Language="c#" Inherits="Web.User.managePeople" CodeBehind="managePeople.aspx.cs" %>

<%@ Register Src="~/Module/pageNavi.ascx" TagPrefix="uc1" TagName="pageNavi" %>
<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head>
    <title>managePeople</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--#include file="../Css/head.htm"-->
</head>
<body class="no-skin">
    <form id="newsMange" method="post" runat="server">
        <div class="main-content-inner">
            <div class="breadcrumbs" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li>
                        <i class="ace-icon fa  fa-desktop"></i>
                        <asp:Label ID="lbpageNav" runat="server" Text=""></asp:Label>
                    </li>
                </ul>
            </div>
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <div class="page-content">
                <!-- PAGE CONTENT BEGINS -->
                <div class="page-header clearfix">
                    <div class="action-field">
                        <asp:Button ID="btnSave" class="btn btn-sm btn-primary" runat="server" Text="保 存" OnClick="Btn_Click"></asp:Button>&nbsp;
                        <asp:Button ID="btnAdd" class="btn btn-sm btn-primary" runat="server" Text="添 加" OnClick="Btn_Click"></asp:Button>&nbsp;
                        <asp:Button ID="btnDel" class="btn btn-sm btn-primary" runat="server" Text="删 除" OnClick="Btn_Click"></asp:Button>&emsp;
                        <asp:Label ID="lbTip" runat="server" ForeColor="Red" Text=""></asp:Label>
                    </div>
                    <!--/action-field-->
                </div>
                <div class="row">
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server" >
                        <ContentTemplate>                        
                    <div class="col-xs-12">
                        <!--[if lte IE 7]><div style="zoom:1"><![endif]-->
                        <asp:HiddenField ID="hfidstr" runat="server" />
                        <asp:HiddenField ID="hftitlestr" runat="server" />
                        <asp:GridView ID="GridView1" runat="server" OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound"
                            AllowSorting="True" OnSorting="GridView1_Sorting" AutoGenerateColumns="False" class="table table-striped table-bordered table-hover table-sorting" EmptyDataText="暂无数据…">
                            <Columns>
                                <asp:TemplateField HeaderStyle-CssClass="title text-center" ItemStyle-CssClass="text-center" ItemStyle-Width="36px">
                                    <HeaderTemplate>
                                        <asp:CheckBox ID="cbAll" Text=" " runat="server" onclick="GridSelectAll('GridView1',this.checked)" />
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="cbthis" runat="server" Text=" "></asp:CheckBox>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="pkId" HeaderText="ID号" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden" FooterStyle-CssClass="hidden"></asp:BoundField>
                                <asp:TemplateField HeaderText="标题"  SortExpression="name">
                                    <ItemTemplate>
                                        <span data-placement="right" data-rel="popover" data-content="<%# Eval( "name") %>" data-trigger="hover">
                                            <asp:HyperLink ID="title" runat="server" Text='<%# Eval( "name") %>'
                                                Target="_blank" NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.pkId", "../Wpet/introduce.aspx?pkId={0}") %>'>
                                            </asp:HyperLink>

                                        </span>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="发布人" SortExpression="fullName" >
                                    <ItemTemplate>
                                        <span data-placement="right" data-rel="popover" data-content="发布IP：<%# Eval("updateIp").ToString() %>" data-trigger="hover"><%# Eval("fullName").ToString() %></span>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="发布时间"  SortExpression="updateTime">
                                    <ItemTemplate>
                                        <span data-placement="right" data-rel="popover" data-content="<%# Eval("updateTime") %>" data-trigger="hover">
                                            <asp:Label ID="lbtime" runat="server" Text='<%# Eval("updateTime", "{0:yyyy-M-d}") %>'></asp:Label>
                                        </span>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="固顶"  SortExpression="isTop">
                                    <ItemTemplate>
                                        <asp:DropDownList ID="isTop" runat="server" SelectedValue='<%# Eval( "isTop") %>'>
                                            <asp:ListItem Value="0" Selected="True">取消</asp:ListItem>
                                            <asp:ListItem Value="1">固顶</asp:ListItem>
                                        </asp:DropDownList>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="审核"  SortExpression="passed">
                                    <ItemTemplate>
                                        <asp:DropDownList ID="pass" runat="server" SelectedIndex='<%# Eval( "passed") %>'>
                                            <asp:ListItem Value="0" Selected="True">待审</asp:ListItem>
                                            <asp:ListItem Value="1">通过</asp:ListItem>
                                            <asp:ListItem Value="2">不通过</asp:ListItem>
                                        </asp:DropDownList>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="显示等级" SortExpression="gradeId" >
                                    <ItemTemplate>
                                        <asp:DropDownList ID="grade" runat="server" SelectedValue='<%# Eval("gradeId") %>' DataValueField="pkId" DataTextField="name" DataSource="<%# dt_grade %>" >
                                        </asp:DropDownList>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="浏览权限"  SortExpression="gate">
                                    <ItemTemplate>
                                        <asp:DropDownList ID="gate" runat="server" SelectedValue='<%# Eval("gate") %>'>
                                            <asp:ListItem Value="0" Selected="True">无限制</asp:ListItem>
                                            <asp:ListItem Value="1">仅内网可见</asp:ListItem>
                                            <asp:ListItem Value="2">仅登录可见</asp:ListItem>
                                            <asp:ListItem Value="3">内网或登录可见</asp:ListItem>
                                        </asp:DropDownList>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="管理"  ItemStyle-CssClass="td-a">
                                    <ItemTemplate>
                                        <div class="action-buttons">
                                            <asp:LinkButton ID="edit" runat="server" CommandName="edit" CommandArgument='<%# Eval("pkId") %>' data-toggle="tooltip" data-placement="bottom" title="编辑" Visible="false"><i class="ace-icon fa fa-pencil bigger-120 blue" ></i></asp:LinkButton>
                                            <asp:LinkButton ID="edit1" runat="server" data-toggle="tooltip" data-placement="bottom" title="很抱歉，您没有权限编辑！" Visible="false" Enabled="false"><i class="ace-icon fa fa-pencil bigger-120 grey" ></i></asp:LinkButton>
                                        </div>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField Visible="False" DataField="grade" HeaderText="等级"></asp:BoundField>
                            </Columns>
                        </asp:GridView>
                        <!--[if lte IE 7]></div><![endif]-->
                        <div class="grid-pager">                              
                              <uc1:pageNavi runat="server" id="pageNavi"  dataCtlName="GridView1" />
                        </div>            
                    </div>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </form>
    <!--#include file = "../Css/foot.htm" -->
      <script type="text/javascript">
          jQuery(function ($) {

              $("#btnSave").click(function () {
                  return GridSelectCheck('GridView1', true);
              });

              $("#btnDel").click(function () {
                  return GridSelectCheck('GridView1', true);
              });

          });
    </script>
</body>
</html>
