<%
    //-----------------------------------------------------------
    // 文件名称: Tool_Admin_Manage.aspx
    // 页面名称: 管理员管理
    //
    // 描    述:
    //
    // 创建标识: Add By 吴建春 2008-05-12
    // 修改标识: Add By 钟治宇 2008-11-17
    //-----------------------------------------------------------
%>

<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Tool_Admin_Manage, V5Shop.Shop.Tool" culture="auto" uiculture="auto" meta:resourcekey="PageResource1" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="cc1" %>
<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc2" %>
<%@ Register Src="control/ManageHeader.ascx" TagName="ManageHeader" 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">
    <title></title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/control.css" rel="stylesheet" type="text/css" />
    <link href="css/css_list.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript" src="js/Common.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <uc3:ManageHeader ID="PageHead" runat="server" />
            <div id="search">
                <!-- 查询部 -->
                <div style="padding-right: 20px; padding-left: 20px; padding-bottom: 20px; padding-top: 20px; border-bottom: #f7f7f7 4px solid">
                    &nbsp;&nbsp;
                    <!-- 姓名 -->
                    <asp:Label ID="lblAdminName" runat="server" Text="姓名:" meta:resourcekey="lblAdminNameResource"></asp:Label>
                    <asp:TextBox ID="txtAdminName" runat="server"></asp:TextBox>&nbsp;&nbsp;
                    <!-- 部门 -->
                    <asp:Label ID="lblDept" runat="server" Text="部门" meta:resourcekey="lblDeptResource"></asp:Label>
                    <asp:DropDownList ID="ddlDept" runat="server" meta:resourcekey="ddlDeptResource">
                        <asp:ListItem Value="-1">全部</asp:ListItem>
                    </asp:DropDownList>&nbsp;&nbsp;
                    <!-- 状态 -->
                    <asp:Label ID="Label2" runat="server" Text="状态" meta:resourcekey="lblDeptResource"></asp:Label>
                    <asp:DropDownList ID="ddlIsDel" runat="server" meta:resourcekey="ddlIsDelResource">
                        <asp:ListItem Value="-1">全部</asp:ListItem>
                        <asp:ListItem Value="0">未删除</asp:ListItem>
                        <asp:ListItem Value="1">已删除</asp:ListItem>
                    </asp:DropDownList>&nbsp;&nbsp;
                    <!-- 锁定状态 -->
                    <asp:Label ID="Label1" runat="server" Text="锁定状态" meta:resourcekey="lblDeptResource"></asp:Label>
                    <asp:DropDownList ID="ddlIsLock" runat="server" meta:resourcekey="ddlIsLockResource">
                        <asp:ListItem Value="-1">全部</asp:ListItem>
                        <asp:ListItem Value="0">未锁定</asp:ListItem>
                        <asp:ListItem Value="1">已锁定</asp:ListItem>
                    </asp:DropDownList>&nbsp;&nbsp;
                    <!-- 查询按钮 -->
                    <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="查询" meta:resourcekey="btnSearchResource" CssClass="button" CausesValidation="False" />
                </div>
            </div>
            <div id="content">
                <!-- 明细数据编辑栏 -->
                <div style="padding-right: 25px; padding-left: 25px; padding-bottom: 3px; color: #4b6888; padding-top: 3px; border-bottom: #cccccc 1px solid">
                    <input id="CheckAllBox" onclick="CheckAll()" type="checkbox" class="checkbox" />全选 &nbsp;&nbsp;
                    <asp:LinkButton ID="btnAdd" runat="server" ForeColor="#4B6888" meta:resourcekey="btnAddResource2" OnClick="btnAdd_Click"><img src="images/icon/key_add.gif" alt="Read/Write Property"/> 添加</asp:LinkButton>
                    &nbsp;&nbsp;
                    <asp:LinkButton ID="btnEdit" runat="server" ForeColor="#4B6888" meta:resourcekey="btnEditResource2" OnClick="btnEdit_Click" OnClientClick="return CheckEdit()" CausesValidation="False"><img src="images/icon/key_edit.gif" alt="Read/Write Property"/> 编辑</asp:LinkButton>
                    &nbsp;&nbsp;
                    <asp:LinkButton ID="btnDelStatus" runat="server" CausesValidation="False" ForeColor="#4B6888" meta:resourcekey="btnDelResource2" OnClick="btnDelStatus_Click" OnClientClick="return CheckDel()"><img src="images/icon/key_delete.gif" alt="Read/Write Property"/> 删除</asp:LinkButton>
                    &nbsp;&nbsp;
                    <asp:LinkButton ID="btnDel" runat="server" CausesValidation="False" ForeColor="#4B6888" meta:resourcekey="btnDelResource2" OnClick="btnDel_Click" OnClientClick="return CheckDel()"><img src="images/icon/key_cdelete.gif" alt="Read/Write Property"/> 彻底删除</asp:LinkButton></div>
                <!-- 明细数据 -->
                <div class="listborder">
                    <cc1:V5ShopGridView ID="GridViewShow" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CssClass="datalist" PageSize="12" HeaderStyle-ForeColor="#000000">
                        <PagerSettings Mode="NumericFirstLast" />
                        <Columns>
                            <asp:TemplateField meta:resourcekey="DetilData" ItemStyle-Width="5%">
                                <itemtemplate>
                                <input runat="server" value='<%# Eval("ID") %>' id="CheckBoxID" type="checkbox" class="checkbox"
                                    onmouseover="this.mouse='over'" onmouseout="this.mouse='out'" />
                            </itemtemplate>
                                <itemstyle horizontalalign="Center" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="ID" HeaderText="ID" ItemStyle-Width="5%" />
                            <asp:BoundField HeaderText="用户名" DataField="Name" SortExpression="Name" ItemStyle-Width="8%" />
                            <asp:BoundField HeaderText="姓名" DataField="TrueName" SortExpression="TrueName" ItemStyle-Width="7%" />
                            <asp:BoundField HeaderText="部门" DataField="DeptName" SortExpression="Age" ItemStyle-Width="5%" />
                            <asp:BoundField HeaderText="年龄" DataField="Age" SortExpression="DeptName" ItemStyle-Width="5%" />
                            <asp:TemplateField meta:resourcekey="DetilData" HeaderText="性别" SortExpression="Sex" ItemStyle-Width="5%">
                                <itemtemplate>
                                    <asp:Label ID="lblSex" runat="server" Text='<%# FormatSex(DataBinder.Eval(Container, "DataItem(Sex)","{0}")) %>'> id="lblSex"></asp:Label>
                            </itemtemplate>
                            </asp:TemplateField>
                            <asp:BoundField HeaderText="工号" DataField="No" ItemStyle-Width="5%" />
                            <asp:BoundField HeaderText="Email" DataField="Email" ItemStyle-Width="15%" />
                            <asp:BoundField HeaderText="电话" DataField="Tel" ItemStyle-Width="10%" />
                            <asp:BoundField HeaderText="创建人" DataField="Creator" ItemStyle-Width="10%" />
                            <asp:BoundField HeaderText="时间" DataField="AddDate" SortExpression="AddDate" ItemStyle-Width="9%" />
                            <asp:TemplateField meta:resourcekey="DetilData" HeaderText="锁定状态" SortExpression="IsLock" ItemStyle-Width="6%">
                                <itemtemplate>
                                    <asp:Label ID="lblLockState" runat="server" Text='<%# FormatLockState(DataBinder.Eval(Container, "DataItem(IsLock)","{0}")) %>'> id="lblLockState"></asp:Label>
                            </itemtemplate>
                            </asp:TemplateField>
                            <asp:TemplateField meta:resourcekey="DetilData" HeaderText="状态" SortExpression="IsDel" ItemStyle-Width="5%">
                                <itemtemplate>
                                    <asp:Label ID="lblDelState" runat="server" Text='<%# FormatDelState(DataBinder.Eval(Container, "DataItem(IsDel)","{0}")) %>'> id="lblDelState"></asp:Label>
                            </itemtemplate>
                            </asp:TemplateField>
                        </Columns>
                        <HeaderStyle CssClass="category" />
                    </cc1:V5ShopGridView>
                </div>
                <asp:Panel runat="server" ID="PanelShow" Visible="False" Width="100%">
                    <div style="text-align: center; background: #F7F7F7" align="center">
                        <table cellpadding="0" cellspacing="0" style="width: 800px" align="center">
                            <!-- 用户名 -->
                            <tr>
                                <td align="right" style="height: 30px; width: 103px;">
                                    <cc1:HelpCtrl ID="HelpCtrl1" runat="server" FontColor="red" Header="用户名" HideSelects="False" ImageURL="images/help.gif" Text="用户名是用来登录的，不能重复。" />
                                    <asp:Label ID="lblName" runat="server" Text="用户名：" Width="50px" Height="15px" />
                                </td>
                                <td align="left" style="height: 30px; width: 297px;">
                                    <asp:TextBox ID="txtName" runat="server" Width="140px" MaxLength="50" />
                                    &nbsp;<span class="NeedMsg">*</span>
                                    <asp:RequiredFieldValidator ID="rfvName" runat="server" ControlToValidate="txtName" Display="Dynamic" ErrorMessage="不能为空">
                                    </asp:RequiredFieldValidator>
                                </td>
                                <td align="right" style="height: 30px;">
                                    <asp:Label ID="lblAge" runat="server" Text="年龄：" Width="88px" />
                                </td>
                                <td align="left" style="width: 297px; height: 30px;">
                                    <cc1:NumberBox ID="txtAge" runat="server" IsInt="True" MaxLength="3" Width="140px" />
                                </td>
                            </tr>
                            <!-- 密码 -->
                            <tr>
                                <td align="right" style="height: 30px; width: 103px;">
                                    <asp:Label ID="lblPass01" runat="server" Text="密码：" Width="88px" />
                                </td>
                                <td align="left" style="height: 30px;">
                                    <asp:TextBox ID="txtPass01" runat="server" TextMode="Password" Width="140px" MaxLength="50" />
                                </td>
                                <td align="right" style="height: 30px;">
                                    <cc1:HelpCtrl ID="HelpCtrl4" runat="server" FontColor="red" Header="工号" HideSelects="False" ImageURL="images/help.gif" Text="为了方便企业用户用，如果您是企业用户的话，可以在此填入该员工的工号,如果是个人用户，工号可以随便填写,工号不能重复。" />
                                    <asp:Label ID="lblNo" runat="server" Text="工号：" Width="42px" Height="15px" />
                                </td>
                                <td align="left" style="width: 297px;">
                                    <asp:TextBox ID="txtNo" runat="server" Width="140px" MaxLength="50" />
                                    &nbsp;<span class="NeedMsg">*</span>&nbsp;
                                    <asp:RequiredFieldValidator ID="rfvNo" runat="server" ControlToValidate="txtNo" Display="Dynamic" ErrorMessage="不能为空"></asp:RequiredFieldValidator></td>
                            </tr>
                            <!-- 确认密码 -->
                            <tr>
                                <td align="right" style="height: 30px; width: 103px;">
                                    <asp:Label ID="lblPass02" runat="server" Text="确认密码：" Width="88px" />
                                </td>
                                <td align="left" style="height: 30px; width: 297px;">
                                    <asp:TextBox ID="txtPass02" runat="server" TextMode="Password" Width="140px" MaxLength="50" />
                                    <asp:CompareValidator ID="cvCompPass" runat="server" ControlToCompare="txtPass01" ControlToValidate="txtPass02" Display="Dynamic" ErrorMessage="两次输入的密码不一致."></asp:CompareValidator>&nbsp;
                                </td>
                                <td align="right" style="height: 30px;">
                                    <cc1:HelpCtrl ID="HelpCtrl2" runat="server" FontColor="red" Header="Email" HideSelects="False" ImageURL="images/help.gif" Text="操作员的电子邮件，系统发邮件的时候会用到,不能重复。" />
                                    <asp:Label ID="lblEmail" runat="server" Text="Email：" Width="40px" />
                                </td>
                                <td align="left" style="width: 297px;">
                                    <asp:TextBox ID="txtEmail" runat="server" Width="140px" MaxLength="50" />
                                    &nbsp;<span style="color: Red;">*</span>&nbsp;
                                    <asp:RequiredFieldValidator ID="rfvEmail" runat="server" ControlToValidate="txtEmail" Display="Dynamic" ErrorMessage="不能为空"></asp:RequiredFieldValidator></td>
                            </tr>
                            <!-- 姓名 -->
                            <tr>
                                <td align="right" style="height: 30px; width: 103px;">
                                    <cc1:HelpCtrl ID="HelpCtrl6" runat="server" FontColor="red" Header="姓名" HideSelects="False" ImageURL="images/help.gif" Text="操作员的真实姓名。" />
                                    <asp:Label ID="lblTrueName" runat="server" Text="姓名：" Width="42px" Height="16px"></asp:Label>
                                </td>
                                <td align="left" style="height: 30px; width: 297px;">
                                    <asp:TextBox ID="txtTrueName" runat="server" Width="140px" MaxLength="50"></asp:TextBox>
                                    &nbsp;<span class="NeedMsg">*</span>
                                    <asp:RequiredFieldValidator ID="rfvTrueName" runat="server" ControlToValidate="txtTrueName" Display="Dynamic" ErrorMessage="不能为空"></asp:RequiredFieldValidator></td>
                                <td align="right" style="height: 30px;">
                                    <asp:Label ID="lblTel" runat="server" Text="电话：" Width="88px" />
                                </td>
                                <td align="left" style="width: 297px;">
                                    <asp:TextBox ID="txtTel" runat="server" Width="140px" MaxLength="50" />
                                </td>
                            </tr>
                            <!-- 性别 -->
                            <tr>
                                <td align="right" style="height: 30px; width: 103px;">
                                    <asp:Label ID="lblSexAdd" runat="server" Text="性别：" Width="88px" />
                                </td>
                                <td align="left" style="width: 297px;">
                                    <asp:DropDownList ID="ddlSex" runat="server" Width="144px">
                                 <%--   2008-11-17--%>
                                        <asp:ListItem Value="0" Selected="True">请选择</asp:ListItem>
                                        <asp:ListItem Value="1">男</asp:ListItem>
                                        <asp:ListItem Value="2">女</asp:ListItem>
                                    </asp:DropDownList>
                                    &nbsp;<span class="NeedMsg">*</span>
                                    <asp:CompareValidator ID="cvSex" runat="server" ControlToValidate="ddlSex" Display="Dynamic" ErrorMessage="必须选择" Operator="NotEqual" ValueToCompare="-1"></asp:CompareValidator></td>
                                <td align="right" style="height: 30px;">
                                    <cc1:HelpCtrl ID="HelpCtrl3" runat="server" FontColor="red" Header="锁定状态" HideSelects="False" ImageURL="images/help.gif" Text="锁定过的操作员不能登录后台，只有未锁定过的才能登录。" />
                                    <asp:Label ID="lblIsLockAdd" runat="server" Text="锁定状态：" Width="64px" Height="16px"></asp:Label>
                                </td>
                                <td align="left" style="height: 30px; width: 297px;">
                                    <asp:DropDownList ID="ddlIsLockAdd" runat="server" Width="144px">
                                        <asp:ListItem Value="-1" Selected="True">请选择 </asp:ListItem>
                                        <asp:ListItem Value="0">未锁定</asp:ListItem>
                                        <asp:ListItem Value="1">已锁定</asp:ListItem>
                                    </asp:DropDownList>
                                    &nbsp;<span class="NeedMsg">*</span>&nbsp;
                                    <asp:CompareValidator ID="cvIsLockAdd" runat="server" ControlToValidate="ddlIsLockAdd" Display="Dynamic" ErrorMessage="必须选择" Operator="NotEqual" ValueToCompare="-1"></asp:CompareValidator></td>
                            </tr>
                            <!-- 部门 -->
                            <tr>
                                <td align="right" style="height: 30px; width: 103px;">
                                    <cc1:HelpCtrl ID="HelpCtrl5" runat="server" FontColor="red" Header="部门" HideSelects="False" ImageURL="images/help.gif" Text="员工所属部门,方便企业用户使用。" />
                                    <asp:Label ID="lblDeptAdd" runat="server" Text="部门：" Width="38px" Height="14px" />
                                </td>
                                <td align="left" style="width: 297px;">
                                    <asp:DropDownList ID="ddlDeptAdd" runat="server" Width="144px">
                                        <asp:ListItem Value="-1" Selected="True">请选择</asp:ListItem>
                                    </asp:DropDownList>
                                    &nbsp;<span class="NeedMsg">*</span>
                                    <asp:CompareValidator ID="cvDeptAdd" runat="server" ControlToValidate="ddlDeptAdd" Display="Dynamic" ErrorMessage="必须选择" Operator="NotEqual" ValueToCompare="-1"></asp:CompareValidator>
                                </td>
                                <td align="right" style="height: 30px;">
                                    <asp:Label ID="lblLoginDate" runat="server" Text="上次登录时间：" Width="88px" />
                                </td>
                                <td align="left" style="width: 297px;">
                                    <asp:Label ID="lblLoginDateAdd" runat="server" Width="144px" />
                                </td>
                            </tr>
                            <!-- 确定/更新/重置 -->
                            <tr>
                                <td align="center" style="height: 36px;" colspan="4">
                                    <asp:Button ID="btnAddSubmit" runat="server" meta:resourcekey="btnAddResource1" OnClick="btnAddSubmit_Click" Text="确定" CssClass="button" />
                                    <asp:Button ID="btnEditSubmit" runat="server" meta:resourcekey="btnEditResource1" OnClick="btnEditSubmit_Click" Text="更新" Visible="False" CssClass="button" />
                                    <input id="iptReset" runat="server" type="reset" value="重置" class="button" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </asp:Panel>
            </div>
            <div id="hiddenfield">
                <asp:HiddenField ID="CheckedIDS" runat="server" Value="0" />
                <asp:HiddenField ID="PageIndex" runat="server" Value="0" />
                <asp:HiddenField ID="MaxPageIndex" runat="server" Value="0" />
                <uc1:HiddenField ID="Alert" runat="server" />
                <cc1:ActiveControl ID="ActiveControl" runat="server" Width="1px" />
            </div>
            <uc2:PageBottom ID="PageBottom1" runat="server" />
        </div>
    </form>
</body>
</html>
