<%@ Page Title="管理用户信息" Language="C#" MasterPageFile="~/Manager/Manger.Master" EnableEventValidation="false" AutoEventWireup="true" CodeBehind="MUserList.aspx.cs" Inherits="Stat.web.Manerger.MUserList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    
<script type="text/javascript">

$(document).ready(function(){ 
 $("input[name$='btnSaveUser']").bind('click',CheckFrom); 
 $("a:contains('删除')").bind('click',function(){return confirm('确认要删除吗？');});  
 $("a:contains('Delete')").bind('click',function(){return confirm('确认要删除吗？');});  
});

 function CheckFrom()
 {
    var txtUserPWD1=$("input[name$='txtUserPWD1']").val();  
    var txtUserPWD2=$("input[name$='txtUserPWD2']").val();  
    if(!CheckEqualsValue(txtUserPWD1,txtUserPWD2)){alert("两次密码不相同！");$("input[name$='txtUserPWD2']").focus();return false;} 
 }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpTop" runat="server">
<div style="margin-top: 5px;">
   当前位置：用户管理 &gt; 用户列表
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cpMSG" runat="server">
 <span class="M_b14">小贴士：</span> 你可以管理用户信息。
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cpMain" runat="server">
<br />
        <table align="left" width="100%" cellpadding="0" cellspacing="0">
            <tr>
                <td valign="top" align="center">
                    <asp:Panel ID="pnUserList" runat="server" BackColor="White" Width="100%">
                        <asp:GridView ID="gvUserList" runat="server" AutoGenerateColumns="False" EmptyDataText="没有找到"
                            GridLines="None" OnRowDataBound="gvUserList_RowDataBound" OnRowDeleting="gvUserList_RowDeleting"
                            OnRowEditing="gvUserList_RowEditing" Width="100%" BorderColor="#CEDFEF" BorderWidth="1px" CssClass="tableBorder">
                            <Columns>
                                <asp:BoundField DataField="UserId" HeaderText="ID" SortExpression="WebId">
                                    <HeaderStyle Height="25px" />
                                    <ItemStyle HorizontalAlign="Center" Width="50px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="UserName" HeaderText="用户名" SortExpression="WebName">
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:BoundField>
                                <asp:BoundField DataField="UserGroup" HeaderText="用户组" SortExpression="WebUrl">
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:BoundField>
                                <asp:BoundField DataField="AddTime" HeaderText="注册时间">
                                    <ItemStyle HorizontalAlign="Left" />
                                    <HeaderStyle HorizontalAlign="Left" />
                                </asp:BoundField>
                                <asp:BoundField DataField="UserState" HeaderText="状态">
                                <ItemStyle CssClass="forumRow" HorizontalAlign="Center" Width="40px" />
                                </asp:BoundField>
                                <asp:ButtonField CommandName="Edit" Text="编辑">
                                    <ItemStyle Width="30px" />
                                </asp:ButtonField>
                                <asp:CommandField ShowDeleteButton="True">
                                    <ItemStyle Width="30px" />
                                </asp:CommandField>
                            </Columns>                            
                            <HeaderStyle BackColor="#E9F1FA" Height="20px" />
                        </asp:GridView>
                        <br />                        
                        用户名或者EMAIL或者QQ：<asp:TextBox ID="txtW" runat="server"></asp:TextBox>&nbsp;
         <asp:Button ID="btnSearch" runat="server" Text="查找" onclick="btnSearch_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
         <br />  <br />
         <asp:Literal ID="ltrPageIndex" runat="server"></asp:Literal>
         
        </asp:Panel>                        
                        
                        
                    <asp:Panel ID="pnUserAdd" runat="server" BackColor="White" Visible="False"
                        Width="100%">
                        <table bgcolor="#cedfef" border="0" cellpadding="0" cellspacing="1" class="padding" style="width: 100%">
                            <tr>
                                <td colspan="2" style="height: 3px" bgcolor="#e9f1fa" height="25">
                                    <strong><span style="font-size: 12pt">
                                    修改用户资料</span></strong></td>
                            </tr>
                            <tr>
                                <td style="width: 155px; height: 64px; text-align: right" bgcolor="#ffffff">
                                    用户：</td>
                                <td style="height: 64px; text-align: left" bgcolor="#ffffff">
                                    <asp:TextBox ID="txtUserName" runat="server" Width="150px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtUserName"
                                        Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
                                    <asp:HiddenField ID="hdfUserId" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 155px; text-align: right" bgcolor="#ffffff">
                                    新密码：</td>
                                <td style="text-align: left" bgcolor="#ffffff">
                                    <asp:TextBox ID="txtUserPWD1" runat="server" TextMode="Password" Width="150px"></asp:TextBox>
                                    </td>
                            </tr>
                            <tr>
                                <td style="width: 155px; text-align: right" bgcolor="#ffffff">
                                    确认新密码：</td>
                                <td style="text-align: left" bgcolor="#ffffff">
                                    <asp:TextBox ID="txtUserPWD2" runat="server" TextMode="Password" Width="150px"></asp:TextBox>
                                    </td>
                            </tr>
                            <tr>
                                <td style="width: 155px; height: 22px; text-align: right" bgcolor="#ffffff">
                                    Email：</td>
                                <td style="height: 22px; text-align: left" bgcolor="#ffffff">
                                    <asp:TextBox ID="txtUEmail" runat="server" Width="150px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td bgcolor="#ffffff" style="width: 155px; height: 22px; text-align: right">
                                    QQ：</td>
                                <td bgcolor="#ffffff" style="height: 22px; text-align: left">
                                    <asp:TextBox ID="txtUQQ" runat="server" Width="150px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td bgcolor="#ffffff" style="width: 155px; height: 22px; text-align: right">
                                    状态：</td>
                                <td bgcolor="#ffffff" style="height: 22px; text-align: left">
                                    <asp:RadioButtonList ID="rBtnList" runat="server" RepeatDirection="Horizontal">
                                        <asp:ListItem Selected="True" Value="1">启用</asp:ListItem>
                                        <asp:ListItem Value="0">禁用</asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" bgcolor="#ffffff">
                                    <asp:Button ID="btnSaveUser" runat="server" OnClick="btnSaveUser_Click" Text="修改" />
                                    <asp:HiddenField ID="hdfOldPWD" runat="server" />
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                </td>
            </tr>
        </table> 
</asp:Content>
