<%@ page language="C#" autoeventwireup="true" inherits="_Admin_J1_User, App_Web_j1_user.aspx.3fe22f10" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!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>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />

    <script language="javascript" src="../../window/jquery/jquery.min.js" type="text/javascript"></script>
    <script language="javascript" src="../../window/jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
    <script language="javascript" src="../../window/message/jquery.message.js" type="text/javascript"></script>
    <script language="javascript" src="../../window/checked/jquery.checked.js" type="text/javascript"></script>
    <script language="javascript" src="../../window/maxInput/jquery.maxInput.js" type="text/javascript"></script>
    <script language="javascript" src="../../window/My97DatePicker/WdatePicker.js" type="text/javascript"></script>

    <script language="javascript" src="../../window/TableRowFocus/jquery.RowFocus.js" type="text/javascript"></script>

    <link href="../../window/_css/jquery-ui.custom.css" rel="stylesheet" type="text/css" />
    <link href="../../window/_css/window.css" rel="stylesheet" type="text/css" />
    <link href="../../css/listpage.css" rel="stylesheet" type="text/css" />
    <title>用户</title>

    <script language="javascript" type="text/javascript">
    var finder = null;
    $(function(){
        $("#insertPanel").dialog({
                autoOpen:false,
                width:600,
                height:350
        });
        $("#editPanel").dialog({
                autoOpen:false,
                      width:600,
                height:350
        });
        
        $("#btnAdd").click(function(){
           $("#insertPanel").dialog({ title: '录入' });
           $("#insertPanel").dialog("open");
           
           $("#insertPanel :text").val("");
  
           $("#hfEditID").val("");
        });
        if(isEdit){
 
          $("#editPanel").dialog("open");
        }
        $("#chk_all").checkedAll("ViewData",0);
        $("#chk_Rev").checkedRev("ViewData",0);
        
        $("#txtur_note").maxInput(255,"#noteCount");
        $("#editNoteCount").maxInput(255,"#txteditnote");
        
         
    });
    
    var isEdit = false;
    function ShowEdit(){
        isEdit = true;
    }
    </script>

    <style type="text/css">
<!--
.center {
	text-align: center;
}
-->
</style>
</head>
<body>
    <form id="form2" runat="server">
  
        <div class="ui-widget-header " style="padding: .4em 1em; margin:2px">
            <span class="ui-dialog-title" >学校用户列表</span>
        </div>
        <div class="panel">
            所在学校：<asp:DropDownList ID="ddlQuerySchool" runat="server" Width="163px">
            </asp:DropDownList>&nbsp; 用户名(模糊查询)：
            <asp:TextBox ID="txtdyName" runat="server" MaxLength="50" Width="164px"></asp:TextBox>&nbsp;
            <asp:Button ID="btnQuery" runat="server" CssClass="search" Text="查询" OnClick="btnQuery_Click" />
        </div>
        <div class="panel">
            <input id="btnAdd" class="addnew" type="button" value="添加" />
            <asp:Button ID="btnDelete" runat="server" CssClass="delete" OnClick="lbDelete_Click"
                OnClientClick="return confirm('确认删除？');" Text="删除" />
            <asp:Button ID="lbUpdate" runat="server" CssClass="modify" OnClick="lbUpdate_Click"
                Text="修改" />&nbsp;
            <asp:Button ID="btnShowAll" runat="server" CssClass="btn" Text="显示所有" OnClick="btnShowAll_Click" />
            <input id="chk_all" name="chk_all" type="checkbox" />全选 <a id="chk_Rev" href="javascript:void(0)">
                反 选</a>
        </div>
        <asp:GridView ID="ViewData" runat="server" AutoGenerateColumns="False" BackColor="White"
            CssClass="gv" OnRowDataBound="ViewData_RowDataBound" Width="100%">
            <RowStyle CssClass="gvRow" />
            <HeaderStyle CssClass="gvHeader" />
            <AlternatingRowStyle CssClass="gvAlternatingRow" />
                     <EmptyDataRowStyle  CssClass="gvEmpty"/>
            <Columns>
                <asp:TemplateField HeaderText="选择">
                    <ItemTemplate>
                        <input id="cbselect" runat="server" type="checkbox" value='<%#Eval("ur_id") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="序号">
                    <ItemTemplate>
                        <asp:Label ID="labIndex" runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>

                <asp:BoundField DataField="sl_name" HeaderText="所在学校" />
                <asp:BoundField DataField="ur_username" HeaderText="用户名" />
                <asp:TemplateField HeaderText="登录">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbChange" runat="server" OnClick="SetLogin_Click"  CommandArgument='<%#Eval("ur_id") %>'>
                        <%# Convert.ToBoolean(Eval("ur_login")) ? "<font color='green'>允许登录</font>" : "<font color='red'>禁止登录</font>"%>
                        </asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="ur_cdate" HeaderText="创建日期" />
                <asp:BoundField DataField="ur_note" HeaderText="备注" />
            </Columns>
            <EmptyDataTemplate>
                没有任何数据！
            </EmptyDataTemplate>
        </asp:GridView>
        <webdiyer:AspNetPager ID="PagerButtom" runat="server" AlwaysShow="True" BorderColor="Aqua"
            CssClass="paginator" CustomInfoHTML="当前第%CurrentPageIndex%/%PageCount%页 共%RecordCount%条记录 每页%PageSize%条 "
            CustomInfoSectionWidth="" FirstPageText="首页" HorizontalAlign="Right" LastPageText="尾页"
            LayoutType="Table" MoreButtonsClass="" NextPageText="下一页" NumericButtonCount="5"
            OnPageChanged="Pager_PageChanged" PageIndexBoxClass="cpb" PageSize="30" PrevPageText="上一页"
            ShowCustomInfoSection="Right" ShowPageIndexBox="Always">
        </webdiyer:AspNetPager>
        <div id="insertPanel" style="display: none" runat="server">
            <table border="0">
                <tr>
                    <td style="width: 118px">
                        所在学校：</td>
                    <td style="width: 316px">
                        <asp:DropDownList ID="ddlSchool" runat="server" Width="153px">
                        </asp:DropDownList></td>
                    <td style="width: 235px">
                    </td>
                </tr>
                <tr>
                    <td style="width: 118px">
                        <label for="txtur_username">
                            用户名：</label></td>
                    <td colspan="2">
                        <asp:TextBox ID="txtur_username" runat="server" MaxLength="50"></asp:TextBox><asp:RequiredFieldValidator ID="rfvur_username" runat="server" ControlToValidate="txtur_username"
                            ErrorMessage="必填" ValidationGroup="insert"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtur_username"
                            ErrorMessage="数字或英文字母 长度在5和16之间！ " ValidationExpression="[a-zA-Z0-9_\x7f-\xff]{5,16}"
                            ValidationGroup="insert"></asp:RegularExpressionValidator></td>
                </tr>
                <tr>
                    <td style="width: 118px">
                        <label for="txtur_password">
                            密码：</label></td>
                    <td colspan="2">
                        <asp:TextBox ID="txtur_password" runat="server" MaxLength="50" TextMode="Password"></asp:TextBox><asp:RequiredFieldValidator ID="rfvur_password" runat="server" ControlToValidate="txtur_password"
                            ErrorMessage="必填" ValidationGroup="insert"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtur_password"
                            ErrorMessage="数字或英文字母 长度在5和16之间！ " ValidationExpression="[a-zA-Z0-9_\x7f-\xff]{5,16}"
                            ValidationGroup="insert"></asp:RegularExpressionValidator></td>
                </tr>
                <tr>
                    <td style="width: 118px">
                        密码验证：</td>
                    <td colspan="2">
                        <asp:TextBox ID="txtTowPassword" runat="server" MaxLength="50" TextMode="Password"></asp:TextBox><asp:CompareValidator ID="CompareValidator3" runat="server" ControlToCompare="txtur_password"
                            ControlToValidate="txtTowPassword" ErrorMessage="两次输入不一致" ValidationGroup="insert"></asp:CompareValidator></td>
                </tr>
                <tr>
                    <td style="width: 118px; height: 64px">
                        <label for="txtur_note">
                            备注：</label></td>
                    <td style="width: 316px">
                        <asp:TextBox ID="txtur_note" runat="server" MaxLength="50" Height="55px" Width="231px" TextMode="MultiLine"></asp:TextBox>
                        <span id="noteCount">0</span>/255
                    </td>
                    <td style="width: 235px">
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td style="width: 316px">
                        <asp:Button ID="btnSubmit" runat="server" Text="提交" ValidationGroup="insert" Width="102px" OnClick="btnSubmit_Click" /></td>
                    <td style="width: 235px">
                    </td>
                </tr>
            </table>
            <div id="editPanel" style="display:none;" title="编辑对象">
                    <table border="0">
                        <tr>
                            <td style="width: 118px">
                                所在学校：</td>
                            <td style="width: 318px">
                                <asp:DropDownList ID="ddlEditSchool" runat="server" Width="153px">
                                </asp:DropDownList></td>
                            <td style="width: 234px">
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 118px">
                                <label for="txtur_username">
                                    用户名：</label></td>
                            <td colspan="2">
                                <asp:TextBox ID="txteditusername" runat="server" MaxLength="50"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txteditusername"
                                    ErrorMessage="必填" ValidationGroup="edit"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txteditusername"
                                    ErrorMessage="数字或英文字母 长度在5和16之间！ " ValidationExpression="[a-zA-Z0-9_\x7f-\xff]{5,16}"
                                    ValidationGroup="edit"></asp:RegularExpressionValidator></td>
                        </tr>
                        <tr>
                            <td colspan="3" style="height: 18px">
                                *如果要修改密码请填写新的密码，不填写将保持原有密码</td>
                        </tr>
                        <tr>
                            <td style="width: 118px">
                                <label for="txtur_password">
                                    密码：</label></td>
                            <td colspan="2">
                                <asp:TextBox ID="txteditpassword" runat="server" MaxLength="50" TextMode="Password"></asp:TextBox>
                                &nbsp;<asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="txteditpassword"
                                    ErrorMessage="数字或英文字母 长度在5和16之间！ " ValidationExpression="[a-zA-Z0-9_\x7f-\xff]{5,16}"
                                    ValidationGroup="edit"></asp:RegularExpressionValidator></td>
                        </tr>
                        <tr>
                            <td style="width: 118px">
                                密码验证：</td>
                            <td colspan="2">
                                <asp:TextBox ID="txteditTowPassword" runat="server" MaxLength="50" TextMode="Password"></asp:TextBox><asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txteditpassword"
                                    ControlToValidate="txteditTowPassword" ErrorMessage="两次输入不一致" ValidationGroup="edit"></asp:CompareValidator></td>
                        </tr>
                        <tr>
                            <td style="width: 118px; height: 64px">
                                <label for="txtur_note">
                                    备注：</label></td>
                            <td style="width: 318px">
                                <asp:TextBox ID="txteditnote" runat="server" Height="55px" MaxLength="50" Width="231px" TextMode="MultiLine"></asp:TextBox><span
                                    id="editNoteCount">0</span>/255</td> 
                            <td style="width: 234px">
                                <asp:HiddenField ID="hfEditID" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td style="height: 26px">
                            </td>
                            <td style="width: 318px; height: 26px;">
                                <asp:Button ID="Button1" runat="server" Text="提交" ValidationGroup="edit" Width="102px" OnClick="btnSubmit_Click" /></td>
                            <td style="width: 234px; height: 26px;">
                            </td>
                        </tr>
                    </table>
            </div>
        </div>
    </form>
</body>
</html>
<!--powered by 25175-->
