<%@ Page Language="c#" CodeBehind="User.aspx.cs" AutoEventWireup="True" Inherits="MTCUN.Personnel.User"
    Title="员工列表-人事" %>

<%@ Import Namespace="MTCUN" %>
<!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="linkStyle" runat="server" href="../Themes/Blue/css.css" rel="stylesheet"
        type="text/css" />
</head>
<body>
    <form id="Form1" method="post" runat="server">
        <div class="tool_Search">
            ＩＤ卡号：<asp:TextBox ID="tbxSignInID" runat="server" Width="114px"></asp:TextBox>
            工号：<asp:TextBox ID="tbxUserID" runat="server" Width="82px"></asp:TextBox>
            姓名：<asp:TextBox ID="tbxTrueName" runat="server" Width="82px"></asp:TextBox>
            组：<asp:DropDownList ID="ddlUserGroup" runat="server" DataValueField="UserGroupID"
                DataTextField="UserGroupName">
            </asp:DropDownList>
            &nbsp;员工状态：<asp:DropDownList ID="ddlUserState" runat="server">
                <asp:ListItem Value="0">全部</asp:ListItem>
                <asp:ListItem Value="-1">未签约</asp:ListItem>
                <asp:ListItem Value="1">签约</asp:ListItem>
                <asp:ListItem Value="2">签约1月内到期</asp:ListItem>
                <asp:ListItem Value="3">签约已到期</asp:ListItem>
            </asp:DropDownList>
            校区：<asp:DropDownList ID="ddlSchool" runat="server" DataValueField="SchoolID" DataTextField="SchoolName">
            </asp:DropDownList>
            <label class="lab_button">
                <asp:Button ID="btnSearch" runat="server" Text="查找" OnClick="btnSearch_Click"></asp:Button>
            </label>
        </div>
        <div class="both">
        </div>
        <div class="divpanel">
            <asp:GridView ID="GridView1" runat="server" CssClass="gridview" DataKeyNames="UserID"
                AutoGenerateColumns="False" OnRowDeleting="GridView1_RowDeleting" OnRowDataBound="GridView1_RowDataBound">
                <Columns>
                    <asp:BoundField DataField="UserID" ReadOnly="True" HeaderText="工号"></asp:BoundField>
                    <asp:TemplateField HeaderText="姓名">
                        <ItemTemplate>
                            <%--                            <asp:Image runat="server" ID="img" ImageUrl='<%# "../" + swq.UserFacePath + Eval("UserFace")%>'
                                ImageAlign="AbsMiddle"></asp:Image>
                            <%#Eval("TrueName")%>--%>
                            <%# ShowUser(Eval("TrueName"), Eval("UserFace"), Eval("SignInID"), Eval("MobileTel"), Eval("FingerState"), Eval("FingerCode"), "", Eval("LastAppLoginTime"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="基本工资">
                        <ItemTemplate>
                            <%#Eval("BasePay","{0:f2}")%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="课时费">
                        <ItemTemplate>
                            <%#Eval("HourFee","{0:f2}")%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="兼职">
                        <ItemTemplate>
                            <%# Rs.Items.GetYN(Eval("Pluralist"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="合同到期">
                        <ItemTemplate>
                            <%#Eval("ContractDate", "{0:d}")%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="状态">
                        <ItemTemplate>
                            <%# Rs.Items.GetLockState(Eval("LockState"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="浏览">
                        <ItemTemplate>
                            <div class="lab_button_sub" id="divShow" runat="server">
                                <asp:HyperLink ID="hlkShow" runat="server" Text="浏览" NavigateUrl='<%# string.Format("UserShow.aspx?UserID={0}&geturl={1}",Eval("UserID"),swq.Web.PathAndQuery()) %>' />
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="编辑">
                        <ItemTemplate>
                            <div class="lab_button_sub" id="divEdit" runat="server">
                                <asp:HyperLink runat="server" ID="hlkEdit" Text="编辑" NavigateUrl='<%# string.Format("PostUser.aspx?UserID={0}&GetUrl={1}",Eval("UserID"),swq.Web.PathAndQuery()) %>'></asp:HyperLink>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="删除">
                        <ItemTemplate>
                            <div class="lab_button_sub" id="divDelete" runat="server">
                                <asp:LinkButton ID="lbnDelete" runat="server" Text="删除" CommandName="Delete" OnClientClick="<%# Rs.Messages.确定删除%>"></asp:LinkButton>
                            </div>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </div>
        <div class="divpanel">
            <asp:Literal ID="litPagerButton" runat="server"></asp:Literal>
        </div>
    </form>
</body>
</html>
