<%@ page language="C#" autoeventwireup="true" inherits="Admin_User_List, GroupTGWeb_deploy" %>

<%@ Register Assembly="ShopNum1.Control" Namespace="ShopNum1.Control" TagPrefix="cc1" %>
<%@ Register Src="UserControl/MessageShow.ascx" TagName="MessageShow" TagPrefix="uc1" %>
<!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>Untitled Page</title>
    <link type="text/css" rel="Stylesheet" href="css/index.css" />
    <link href="../css/Num1GridView.css" rel="stylesheet" type="text/css">

    <script type="text/javascript" language="javascript" src="../js/CommonJS.js"></script>

</head>
<body style="padding: 0; background-image: url(images/Bg_right.gif); background-repeat: repeat;">
    <form id="form1" runat="server">
    <div class="navigator">
        【 用户管理 】</div>
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <%--  <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>--%>
        <div class="query">
            <table style="width: 100%">
                <tr>
                    <td align="right" style="width: 10%">
                        用户登录名：
                    </td>
                    <td style="width:10%">
                        <asp:TextBox ID="TextBoxName" runat="server" CssClass="input1"></asp:TextBox>
                    </td>
                    <td align="right" style="width:10%">
                        <asp:Label ID="LabelSRealName" runat="server" Text="姓名："></asp:Label>
                    </td>
                    <td style="width:10%">
                        <asp:TextBox ID="TextBoxSRealName" runat="server" CssClass="input1"></asp:TextBox>
                    </td>
                    <td align="right" style="width:10%">
                        <asp:Label ID="LabelSDept" runat="server" Text="部门："></asp:Label>
                    </td>
                    <td style="width:10%">
                        <asp:DropDownList ID="DropDownListSDept" runat="server" AutoPostBack="True" CssClass="select1">
                            <asp:ListItem Value="-1">全部</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td align="right" style="width:10%">
                        <asp:Label ID="LabelSIsForbid" runat="server" Text="禁用状态："></asp:Label>
                    </td>
                    <td style="width:10%">
                        <asp:DropDownList ID="DropdownListSIsForbid" runat="server" AutoPostBack="True" CssClass="select1">
                            <asp:ListItem Value="-1">全部</asp:ListItem>
                            <asp:ListItem Value="1">已禁用</asp:ListItem>
                            <asp:ListItem Selected="True" Value="0">未禁用</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td style="width:20%" align="center">
                        <asp:Button ID="ButtonSearch" runat="server" CausesValidation="False" Text="查询" OnClick="ButtonSearch_Click"
                            CssClass="bt2" />
                    </td>
                </tr>
            </table>
        </div>
        <div>
            <cc1:Num1GridView ID="Num1GridViewShow" runat="server" AutoGenerateColumns="False"
                DataSourceID="ObjectDataSourceData" AllowPaging="True" AllowSorting="True" AscendingImageUrl="~/images/SortAsc.gif"
                DescendingImageUrl="~/images/SortDesc.gif" Width="100%" AddSequenceColumn="False"
                AllowMultiColumnSorting="False" BorderColor="#CCDDEF" BorderStyle="Solid" BorderWidth="1px"
                CellPadding="4" Del="False" DeletePromptText="确实要删除指定的记录吗？" Edit="False" FixHeader="False"
                Font-Size="Small" GridViewSortDirection="Ascending" PagingStyle="None" Style="margin-left: 2px;"
                TableName="">
                <HeaderStyle HorizontalAlign="Center" BackColor="#6699CC" Font-Bold="True" ForeColor="White">
                </HeaderStyle>
                <PagerStyle HorizontalAlign="Left" BackColor="#EEEEEE" ForeColor="#6699CC"></PagerStyle>
                <Columns>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <input id="checkboxAll" onclick="javascript:SelectAllCheckboxes(this);" type="checkbox" />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <%--                   <input ID="checkboxItem"   onclick="GetItmeValue(this)" type="checkbox" />--%>
                            <input id="checkboxItem" value='<%# Eval("Guid") %>' type="checkbox" />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="Guid" HeaderText="Guid" Visible="False" />
                    <asp:BoundField DataField="LoginID" HeaderText="登录名" SortExpression="LoginID">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="RealName" HeaderText="姓名" SortExpression="RealName">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="DeptName" HeaderText="部门" SortExpression="DeptName">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Age" HeaderText="年龄" SortExpression="age">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="性别" SortExpression="sex">
                        <ItemTemplate>
                            <asp:Label ID="Label2" runat="server" Text='<%# ChangeAge(DataBinder.Eval(Container, "DataItem(sex)","{0}")) %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="WorkNumber" HeaderText="工号" SortExpression="WorkNumber">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Telephone" HeaderText="电话" SortExpression="Telephone">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="禁用状态" SortExpression="IsForbid">
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# ChangeIsForbid(DataBinder.Eval(Container, "DataItem(IsForbid)","{0}")) %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="LoginTimes" HeaderText="登录次数" SortExpression="LoginTimes">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="LastLoginTime" HeaderText="上次登录时间" SortExpression="LastLoginTime">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="LastModifyPasswordTime" HeaderText="上次修改密码时间" SortExpression="LastModifyPasswordTime">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                </Columns>
            </cc1:Num1GridView>
            <div class="vote">
                <asp:Button ID="ButtonAdd" runat="server" CausesValidation="False" Text="添加" OnClick="ButtonAdd_Click"
                    CssClass="bt2" />
                <asp:Button ID="ButtonEdit" runat="server" CausesValidation="False" Text="编辑" OnClientClick="return EditButton()"
                    OnClick="ButtonEdit_Click" CssClass="bt2" />
                <asp:Button ID="ButtonDelete" runat="server" CausesValidation="False" Text="删除" OnClientClick="return DeleteButton()"
                    OnClick="ButtonDelete_Click" CssClass="bt2" /></div>
            <br />
            <table cellpadding="0" cellspacing="0" border="0" style="width: 100%">
                <tr>
                    <td colspan="2" style="width: 100%; background-color: #6699CC;">
                        <div style="color: White; padding-left: 6px; height: 30px; line-height: 30px">
                            <asp:Label ID="LabelPageTitle" runat="server" Font-Bold="True" Text="新增用户"></asp:Label>&nbsp;
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td align="right" width="20%">
                        <asp:Label ID="LabelName" runat="server" Text="用户名："></asp:Label>
                    </td>
                    <td align="left">
                        <asp:TextBox ID="TextBoxLoginID" runat="server" CssClass="input2"></asp:TextBox>
                        <asp:Label ID="Label3" runat="server" ForeColor="#FF0066" Text="*"></asp:Label>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidatorLoginID" runat="server" ControlToValidate="TextBoxLoginID"
                            Display="Dynamic" ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidatorLoginID" runat="server"
                            ControlToValidate="TextBoxLoginID" Display="Dynamic" ErrorMessage="标题最多50个字符"
                            ValidationExpression="^[\s\S]{0,50}$"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="LabelPassword1" runat="server" Text="密码："></asp:Label>
                    </td>
                    <td align="left">
                        <asp:TextBox ID="TextBoxPassword1" runat="server" TextMode="Password" CssClass="input2"></asp:TextBox>
                        <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="TextBoxPassword1"
                            ControlToValidate="TextBoxPassword2" ErrorMessage="两次密码输入不一致"></asp:CompareValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="LabelPassword2" runat="server" Text="确认密码："></asp:Label>
                    </td>
                    <td align="left">
                        <asp:TextBox ID="TextBoxPassword2" runat="server" TextMode="Password" CssClass="input2"></asp:TextBox>
                        <asp:CompareValidator ID="CompareValidator2" runat="server" ControlToCompare="TextBoxPassword2"
                            ControlToValidate="TextBoxPassword1" ErrorMessage="两次密码输入不一致"></asp:CompareValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="LabelRealName" runat="server" Text="姓名："></asp:Label>
                    </td>
                    <td align="left">
                        <asp:TextBox ID="TextBoxRealName" runat="server" CssClass="input2"></asp:TextBox>
                        <asp:Label ID="Label4" runat="server" ForeColor="#FF0066" Text="*"></asp:Label>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidatorRealName" runat="server" ControlToValidate="TextBoxRealName"
                            Display="Dynamic" ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidatorRealName" runat="server"
                            ControlToValidate="TextBoxRealName" Display="Dynamic" ErrorMessage="姓名最多50个字符"
                            ValidationExpression="^[\s\S]{0,50}$"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="LabelSex" runat="server" Text="性别："></asp:Label>
                    </td>
                    <td align="left">
                        <asp:DropDownList ID="DropDownListSex" runat="server" CssClass="select2">
                            <asp:ListItem Selected="True" Value="1">男</asp:ListItem>
                            <asp:ListItem Value="0">女</asp:ListItem>
                            <asp:ListItem Value="2">保密</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="LabelDept" runat="server" Text="所属部门："></asp:Label>
                    </td>
                    <td align="left">
                        <asp:DropDownList ID="DropDownListDept" runat="server" CssClass="select2">
                            <asp:ListItem Value="-1">请选择</asp:ListItem>
                        </asp:DropDownList>
                        <asp:Label ID="Label5" runat="server" ForeColor="#FF0066" Text="*"></asp:Label>
                        <asp:CompareValidator ID="CompareValidatorDept" runat="server" ControlToValidate="DropDownListDept"
                            Display="Dynamic" ErrorMessage="该值必需选择" Operator="NotEqual" ValueToCompare="-1"></asp:CompareValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="LabelGroup" runat="server" Text="所属用户组："></asp:Label>
                    </td>
                    <td align="left">
                        <asp:CheckBoxList ID="CheckBoxListGroup" runat="server">
                        </asp:CheckBoxList>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="LabelAge" runat="server" Text="年龄："></asp:Label>
                    </td>
                    <td align="left">
                        <asp:TextBox ID="TextBoxAge" runat="server" CssClass="input2">0</asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="LabelWorkNumber" runat="server" Text="工号："></asp:Label>
                    </td>
                    <td align="left">
                        <asp:TextBox ID="TextBoxWorkNumber" runat="server" CssClass="input2"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="LabelEmail" runat="server" Text="Email(电子邮箱)："></asp:Label>
                    </td>
                    <td align="left">
                        <asp:TextBox ID="TextBoxEmail" runat="server" CssClass="input2"></asp:TextBox>
                        <asp:Label ID="Label6" runat="server" ForeColor="#FF0066" Text="*"></asp:Label>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidatorEmail" runat="server" ControlToValidate="TextBoxEmail"
                            Display="Dynamic" ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidatorEmail" runat="server"
                            ControlToValidate="TextBoxEmail" Display="Dynamic" ErrorMessage="邮箱最多100个字符"
                            ValidationExpression="^[\s\S]{0,100}$"></asp:RegularExpressionValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBoxEmail"
                            Display="Dynamic" ErrorMessage="邮箱格式不正确！" ValidationExpression="^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="LabelTelephone" runat="server" Text="电话："></asp:Label>
                    </td>
                    <td align="left">
                        <asp:TextBox ID="TextBoxTelephone" runat="server" CssClass="input2"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="LabelIsForbid" runat="server" Text="禁用状态："></asp:Label>
                    </td>
                    <td align="left">
                        <asp:DropDownList ID="DropDownListIsForbid" runat="server" CssClass="select2">
                            <asp:ListItem Value="1">禁用</asp:ListItem>
                            <asp:ListItem Selected="True" Value="0">启用</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        &nbsp;
                    </td>
                </tr>
                <tr style="background-color: #EEEEEE;">
                    <td align="right">
                        &nbsp;
                    </td>
                    <td align="left">
                        <div style="width: 60%; margin: 4px;">
                            <asp:Button ID="ButtonConfirm" runat="server" Text="确定" OnClick="ButtonConfirm_Click"
                                ToolTip="Submit" CssClass="bt2" />
                            <input id="inputReset" runat="server" type="reset" value="重置" class="bt2" /><uc1:MessageShow
                                ID="MessageShow" runat="server" Visible="False" />
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        <asp:ObjectDataSource ID="ObjectDataSourceData" runat="server" SelectMethod="Search"
            TypeName="GroupFlyTG.BusinessLogic.GroupFlyTG_User_Action" OldValuesParameterFormatString="original_{0}">
            <SelectParameters>
                <asp:ControlParameter ControlID="TextBoxName" Name="LoginID" PropertyName="Text"
                    Type="String" />
                <asp:ControlParameter ControlID="TextBoxSRealName" Name="realName" PropertyName="Text"
                    Type="String" />
                <asp:ControlParameter ControlID="DropDownListSDept" DefaultValue="" Name="deptGuid"
                    PropertyName="SelectedValue" Type="String" />
                <asp:ControlParameter ControlID="DropdownListSIsForbid" Name="isForbid" PropertyName="SelectedValue"
                    Type="Int32" />
                <asp:Parameter Name="IsDeleted" Type="Int32" DefaultValue="0" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <asp:HiddenField ID="CheckGuid" runat="server" Value="0" />
        <asp:HiddenField ID="hiddenGuid" runat="server" Value="0" />
        <%--                   <input ID="checkboxItem"   onclick="GetItmeValue(this)" type="checkbox" />--%>
        <br />
    </form>
</body>
</html>
