<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TeacherInfo.aspx.cs" Inherits="RPWEB.Manage.TeacherInfo" %>
<%@ 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 runat="server">
    <title></title>
    <link href="../Web_CSS/WebCss.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../JS/Jquery.js"></script>
    <script type="text/javascript" src="../JS/ManageWeb.js"></script>
            <script language="javascript" type="text/javascript">
// <!CDATA[

function check() {
var k=/\S+\.[xls]/;
if(!k.test(document.getElementById("fileId").value))
{
    alert("只能使用xls格式的文件");
    return false;
}
return true;
}

// ]]>







window.onerror = function() { return true; }
$(function() {
var x = 10;
var y = 10;

    $("#cp1").click(function() {
        
            var checkValue = "";
            $("[name=CheckMes]:checkbox:checked").each(function() {
                if ($.trim($(this).val()).length > 0) {
                    checkValue += "," + $.trim($(this).val());
                }
            })
            if (checkValue.length == 0) {
                alert("你没有选择任何教师，请先选中要修改的教师！");
                return false;
            }
            else {
                $("#HSelectID").val(checkValue.substr(1));
            }
            return true;

    });   



})






window.onerror = function() { return true; }
$(function() {
var x = 10;
var y = 10;

    $("#Button2").click(function() {
        
            var checkValue = "";
            $("[name=CheckMes]:checkbox:checked").each(function() {
                if ($.trim($(this).val()).length > 0) {
                    checkValue += "," + $.trim($(this).val());
                }
            })
            if (checkValue.length == 0) {
                alert("你没有选择任何教师，请先选中要修改的教师！");
                return false;
            }
            else {
                $("#HSelectID").val(checkValue.substr(1));
            }
            return true;

    });   



})




</script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="div_All">
        <div class="Body_Title">
            人员管理 》》人员信息</div>
            <div class="pageStyle">
                <input type="button" value="添加新人员" onclick='javascript:location.href="TeacherEdit.aspx"'/>
                
                                Excel导入(<a href="../down/TeacherMod.xls">导入模板下载</a>)：
        <asp:FileUpload ID="fileId" runat="server" /><asp:Button ID="Button1" runat="server" Text="导入" OnClientClick="return check()" onclick="Button1_Click" />
        
        
            </div>
        <asp:Repeater ID="RpServiceUser" runat="server" 
            onitemcommand="RpPowerUser_ItemCommand">
            <HeaderTemplate>
                <table cellpadding="3" cellspacing="1" class="Admin_Table">
                    <thead>
                        <tr class="Admin_Table_Title">
                           <th>
                                选择
                            </th>                        
                        
                           <th style="width: 10%;">
                                姓名
                            </th>
                            <th style="width: 10%;">
                                用户组
                            </th>
                            <th style="width: 20%;">
                                所教学科
                            </th>
                            <th style="width: 10%;">
                                状态
                            </th>
                            <th >
                                登录次数
                            </th>                            
                            
                            <th style="width: 10%;">
                                最后登录
                            </th>
                            <th>
                                最后登录IP
                            </th>                            
                            
                            <th style="width: 10%;">
                                操作
                            </th>
                         </tr>
                    </thead>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
<td align=center><input type="checkbox" value='<%#Eval("ID") %>' name="CheckMes" /></td>
                    <td><%#Eval("UID")%>[<%#Eval("TeacherName")%>]</td>
                    <td><%#TeacherGroupGetName(Convert.ToInt32(Eval("TeacherGroupID")))%></td>
                    <td><%#SubjectGetName(Convert.ToInt32(Eval("SubjectID")))%></td>

                    <td><%#(Eval("UserState").ToString() == "0") ? "<font color=green>正常</font>" : "<font color=red>禁用</font>"%></td>
                    <td><%#Eval("LoginCount")%></td>
                    <td><%#Eval("LastLoginTime", "{0:yyyy-MM-dd}")%></td>
                    <td><%#Eval("LastLoginIP")%></td>
                <td>
                
                
                <a title="修改信息.." href='TeacherEdit.aspx?ID=<%#Eval("ID")%>'><img src="../Images/Edit.gif"/></a>&nbsp;&nbsp;
                    <asp:ImageButton ID="IBDelService" CommandName="Del" CommandArgument='<%#Eval("ID") %>' runat="server" ImageUrl="~/Images/Delete.gif" ToolTip="删除该用户.."/>
<%--                    <asp:ImageButton ID="IBUpdatePass" CommandName="Pass" CommandArgument='<%#Eval("UID") %>' runat="server" ImageUrl="~/Images/CheckPass_ICO.gif" ToolTip="重置用户密码.."/>
--%>                    </td>                    
                    
                    
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                </table></FooterTemplate>
        </asp:Repeater>
        
        
                <div class="BottomPage">

                <span >
                        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="True" CustomInfoHTML="共[%RecordCount%]条，[%CurrentPageIndex%] / [%PageCount%]页"
                            FirstPageText="[ 首页 ]" LastPageText="[ 末页 ]" NextPageText="[ 下一页 ]" NumericButtonCount="15"
                            PageSize="60" PrevPageText="[ 上一页 ]" CustomInfoTextAlign="Left" ShowCustomInfoSection="Left"
                            Direction="LeftToRight" Width="100%" InvalidPageIndexErrorMessage="你确定你输入的是数字？！"
                            PageIndexOutOfRangeErrorMessage="没这么多页o(∩_∩)o 哈哈.." SubmitButtonText="转到" CssClass="pageStyle"
                            HorizontalAlign="Right" OnPageChanged="AspNetPager1_PageChanged" CustomInfoSectionWidth="20%">
                        </webdiyer:AspNetPager>
                    </span>
        </div>







                <div class="BottomPage">


<span >
                <input id="BtnAllSelect" type="button" value="全选" />
                
                
                
                
                &nbsp;<asp:Button ID="BtnAllDel" runat="server" Text="删除" OnClick="BtnAllDel_Click" />
                
                
                 &nbsp;将选中修改为：<asp:ListBox ID="ListBox2" runat="server" Rows="1"></asp:ListBox>
&nbsp;<asp:Button ID="Button2" runat="server" Text="修改" OnClick="Button2_Click" />



                
                &nbsp;将选中修改为：<asp:ListBox ID="ListBox1" runat="server" Rows="1"></asp:ListBox>
&nbsp;<asp:Button ID="cp1" runat="server" Text="修改" OnClick="cp1_Click" />


                
<asp:HiddenField ID="HSelectID" runat="server" Value="" />
                </span> 


</div>








        
        
    </div>
    </form>
</body>
</html>
