<%@ Page Language="c#" CodeBehind="User.aspx.cs" AutoEventWireup="True" Inherits="MTCUN.Mobile.Admin.User"
    Title="用户设置-系统" %>

<%@ Import Namespace="MTCUN" %>
<%@ Register Src="../User_Col/col_Header.ascx" TagName="col_Header" TagPrefix="uc3" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link id="mobileCss" runat="server" href="../themes/mobile.css" rel="stylesheet"
        type="text/css" />

    <script type="text/javascript">
        function OpenSearch() {
            if (setContent.style.display == 'none') {
                setContent.style.display = 'block';
                setControl.innerHTML = '▲增加员工';
                __mt__setSearchCookie(1);
            }
            else {
                setContent.style.display = 'none';
                setControl.innerHTML = '▼增加员工';
                __mt__setSearchCookie(0);
            }
        }

        function defaultSearchState() {
            var num = __mt__getSearchCookie();
            if (num == 1) {
                setContent.style.display = 'block';
                setControl.innerHTML = '▲增加员工';
            }
            else {
                setContent.style.display = 'none';
                setControl.innerHTML = '▼增加员工';
            }
        }
    </script>
</head>
<body onload="defaultSearchState()">
    <form id="Form1" method="post" runat="server">
        <uc3:col_Header ID="col_Header1" runat="server" />


        <div id="web_page_contents">
            <div class="search biao_zhun_suo_jin">


                <div class="setandsearch">
                    <ul class="searchtool">
                        <li>
                            <div id="setControl" onclick="OpenSearch()">
                                ▼增加员工
                            </div>
                        </li>
                    </ul>

                    <div id="setContent" style="display: none">
                        <h1>增加员工</h1>
                        <table class="table" cellspacing="0" width="100%" border="0">
                            <tr>
                                <td style="width:85px">登录名：
                                </td>
                                <td>
                                    <asp:TextBox ID="tbxUserName" runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>姓名：
                                </td>
                                <td>
                                    <asp:TextBox ID="tbxTrueName" runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>校区：
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlSchool" runat="server" DataValueField="SchoolID" DataTextField="SchoolName">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" align="center">
                                    <label class="lab_button">
                                        <asp:Button ID="btnFound" runat="server" Text="查找" OnClick="btnFound_Click"></asp:Button>
                                    </label>
                                    <label class="lab_button">
                                        <asp:Button ID="btnAdd" runat="server" Text="增加" OnClick="btnAdd_Click"></asp:Button>
                                    </label>
                                </td>
                            </tr>
                        </table>

                    </div>
                </div>

                <div class="divpanel">
                    <asp:GridView ID="GridView1" runat="server" CssClass="gridview" DataKeyNames="UserID"
                        AutoGenerateColumns="False" OnRowDataBound="GridView1_RowDataBound" OnRowDeleting="GridView1_RowDeleting">
                        <Columns>
                            <asp:BoundField DataField="UserID" ReadOnly="True" HeaderText="工号"></asp:BoundField>
                            <asp:TemplateField HeaderText="姓名">
                                <ItemTemplate>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="登录名">
                                <ItemTemplate>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="状态">
                                <ItemTemplate>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="校区名称">
                                <ItemTemplate>
                                    <%#Eval("SchoolName")%>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="档案">
                                <ItemTemplate>
                                    <asp:HyperLink ID="hlkEdit4" runat="server" Text="档案" NavigateUrl='<%# string.Format("../Personnel/PostUser.aspx?UserID={0}&GetURL={1}",Eval("UserID"),swq.Web.PathAndQuery()) %>'></asp:HyperLink>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="权限">
                                <ItemTemplate>
                                    <asp:HyperLink ID="hlkEdit5" runat="server" Text="查看" NavigateUrl='<%# string.Format("PurviewShow.aspx?UserID={0}&GetURL={1}",Eval("UserID"),swq.Web.PathAndQuery()) %>'></asp:HyperLink>|
                        <asp:HyperLink ID="hlkEdit3" runat="server" Text="编辑" NavigateUrl='<%# string.Format("PostUser.aspx?UserID={0}&GetURL={1}",Eval("UserID"),swq.Web.PathAndQuery()) %>'></asp:HyperLink>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="删除">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lbnDelete" runat="server" Text="删除" CommandName="Delete" OnClientClick="<%# Rs.Messages.确定删除%>"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </div>

                <div class="divpanel">

                    <asp:Repeater ID="repBlock" runat="server">
                        <ItemTemplate>
                            <asp:Panel ID="plItem" runat="server" CssClass="kuai">

                                <h1 class="auto_length_title"><%# ShowUser(Eval("TrueName"), Eval("UserFace"), Eval("SignInID"), Eval("MobileTel"), Eval("FingerState"), Eval("FingerCode"), string.Format("PostUser.aspx?UserID={0}&GetURL={1}", Eval("UserID"), swq.Web.PathAndQuery()), Eval("LastAppLoginTime"))%>
                                </h1>

                                <table class="table_simple_kuan">
                                    <tr>
                                        <td style="width: 60px">工号：</td>
                                        <td style="width: auto">
                                            <%# Eval("UserID") %></td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">登录名：</td>
                                        <td style="width: auto">
                                            <asp:HyperLink ID="hlkLogin" runat="server" Text='<%# Eval("UserName") %>' NavigateUrl='<%# string.Format("PostUser.aspx?UserID={0}&GetURL={1}",Eval("UserID"),swq.Web.PathAndQuery()) %>'></asp:HyperLink>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">状态：</td>
                                        <td style="width: auto">
                                            <%# Rs.Items.GetLockState(Eval("LockState"))%>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width: auto">校区：</td>
                                        <td style="width: auto">
                                            <%#Eval("SchoolName")%>
                                        </td>
                                    </tr>
                                </table>

                                <table style="width: 100%;" cellpadding="0" cellspacing="2">
                                    <tr>
                                        <td>
                                            <div class="lab_button">
                                                <asp:HyperLink ID="hlkEdit" runat="server" Text="编辑" NavigateUrl='<%# string.Format("PostUser.aspx?UserID={0}&GetURL={1}",Eval("UserID"),swq.Web.PathAndQuery()) %>'></asp:HyperLink>
                                            </div>
                                        </td>
                                    </tr>
                                </table>


                            </asp:Panel>
                        </ItemTemplate>
                    </asp:Repeater>
                </div>

                <div class="pager_button">
                    <asp:Literal ID="litPagerButton" runat="server"></asp:Literal>
                </div>
            </div>
        </div>
    </form>
</body>
</html>
