<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserTeacher_List.aspx.cs" Inherits="RM.Web.Training.UserTeachers.UserTeacher_List" %>

<%@ Register Src="../../UserControl/PageControl.ascx" TagName="PageControl" TagPrefix="uc1" %>
<%@ Register Src="../../UserControl/LoadButton.ascx" TagName="LoadButton" TagPrefix="uc2" %>
<!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 id="Head1" runat="server">
    <title><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Teacher_Info") %></title>
    <link href="/Themes/Styles/Site.css" rel="stylesheet" type="text/css" />
    <script src="/Themes/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/jquery.pullbox.js" type="text/javascript"></script>
            <link href="../../Themes/Scripts/artDialog/skins/opera.css" rel="stylesheet" type="text/css" />
    <script src="../../Themes/Scripts/artDialog/artDialog.js" type="text/javascript"></script>
    <script src="../../Themes/Scripts/artDialog/iframeTools.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/FunctionJS.js" type="text/javascript"></script>
    <script type="text/javascript">
        //回车键
        document.onkeydown = function (e) {
            if (!e) e = window.event; //火狐中是 window.event
            if ((e.keyCode || e.which) == 13) {
                var obtnSearch = document.getElementById("lbtSearch");
                obtnSearch.click();
            }
        }
        $(function () {
            $(".div-body").PullBox({ dv: $(".div-body"), obj: $("#table1").find("tr") });
            divresize(90);
            FixedTableHeader("#table1", $(window).height() - 118);
        })
        //添加
        function add() {
            var url = "/Training/UserTeachers/UserTeacher_Form.aspx";
            top.openDialog(url, 'UserInfo_Form', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_Index") %> - <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Add") %>', 900, 350, 50, 50);
        }
        //修改
        function edit() {
            var key = CheckboxValue();
            if (IsEditdata(key)) {
                var url = "/Training/UserTeachers/UserTeacher_Form.aspx?key=" + key;
                top.openDialog(url, 'UserInfo_Form', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_Index") %> - <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Edit") %>', 900, 350, 50, 50);
            }
        }
        //删除
        function Delete() {
            var key = CheckboxValue();
            if (IsDelData(key)) {
                var delparm = 'action=Virtualdelete&module=<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_Index") %>&tableName=Base_UserInfo&pkName=User_ID&pkVal=' + key;
                delConfig('/Ajax/Common_Ajax.ashx', delparm)
            }
        }
        //授 权
        function accredit() {
            var key = CheckboxValue();
            if (IsEditdata(key)) {
                var parm = 'action=accredit&user_ID=' + key;
                showConfirmMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_sqm") %>', function (r) {
                    if (r) {
                        getAjax('/RMBase/SysUser/UserInfo.ashx', parm, function (rs) {
                            if (parseInt(rs) > 0) {
                                showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_sqcg") %>", 2000, 4);
                                windowload();
                            }
                            else {
                                showTipsMsg("<span style='color:red'><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_sqsb") %></span>", 4000, 5);
                            }
                        });
                    }
                });
            }
        }
        //锁 定
        function lock() {
            var key = CheckboxValue();
            if (IsEditdata(key)) {
                var parm = 'action=lock&user_ID=' + key;
                showConfirmMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_List1") %>', function (r) {
                    if (r) {
                        getAjax('/RMBase/SysUser/UserInfo.ashx', parm, function (rs) {
                            if (parseInt(rs) > 0) {
                                showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_List2") %>", 2000, 4);
                                windowload();
                            }
                            else {
                                showTipsMsg("<span style='color:red'><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_List3") %></span>", 4000, 5);
                            }
                        });
                    }
                });
            }
        }
          var Mywindows = 'UserTeacher_List';
           globalSetTags('Base_UserInfo', 'User_ID');
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="btnbartitle">
        <div>            
            <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Teacher_Info_list")%>
        </div>
    </div>
    <div class="btnbarcontetn">
        <div style="float: left;">
            <select id="Searchwhere" class="Searchwhere" runat="server">
                
            </select>
            <input type="text" id="txt_Search" class="txtSearch SearchImg" runat="server" style="width: 100px;" />
            <asp:LinkButton ID="lbtSearch" runat="server" class="button green" OnClick="lbtSearch_Click"><span class="icon-botton"
            style="background: url('../../Themes/images/Search.png') no-repeat scroll 0px 4px;">
        </span><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("GetButton")%></asp:LinkButton>
        </div>
        <div style="text-align: right">
            <uc2:LoadButton ID="LoadButton1" runat="server" />
        </div>
    </div>
    <div class="div-body">
        <table id="table1" class="grid" singleselect="true">
            <thead>
                <tr>
                    <td style="width: 20px; text-align: left;">
                        <label id="checkAllOff" onclick="CheckAllLine()" title="<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Quanxuan")%>">
                            &nbsp;</label>
                    </td>
                    <td style="width: 60px; text-align: center;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_Form_no")%>
                    </td>
                        <td style="width: 100px; text-align: center;">                        
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("User_Accout")%>                        
                    </td>
                    <td style="width: 80px; text-align: center;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Teacher_Info_username")%>
                    </td>
                
                    <td style="width: 50px; text-align: center;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("User_Sex")%>
                    </td>
                      <td style="width: 200px; text-align: center;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Teacher_CourseNum")%>
                    </td>
                    <td style="width: 200px; text-align: center;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("User_Title")%>
                    </td>
                   
                    <td style="width: 50px; text-align: center;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("User_State")%>                        
                    </td>
                    <td>
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("User_Description")%>
                    </td>
                </tr>
            </thead>
            <tbody>
                <asp:Repeater ID="rp_Item" runat="server" OnItemDataBound="rp_ItemDataBound">
                    <ItemTemplate>
                        <tr>
                            <td style="width: 20px; text-align: left;">
                                <input type="checkbox" value="<%#Eval("User_ID")%>" name="checkbox" />
                            </td>
                            <td style="width: 60px; text-align: center;">
                                <%#Eval("User_Code")%>
                            </td>
                            <td style="width: 100px; text-align: center;">
                                <%#Eval("User_Account")%>
                            </td>
                               <td style="width: 100px; text-align: center;">
                                <%#Eval("User_Name")%>
                            </td>
                            <td style="width: 50px; text-align: center;">
                                <asp:Label ID="lblUser_Sex" runat="server" Text='<%#Eval("User_Sex")%>'></asp:Label>
                            </td>
                               <td style="width: 200px; text-align: center;">
                                <%#Eval("TCount")%>
                            </td>
                            <td style="width: 200px; text-align: center;">
                                <%#Eval("Title")%>
                            </td>
                           
                            <td style="width: 50px; text-align: center;">
                                <asp:Label ID="lblDeleteMark" runat="server" Text='<%#Eval("DeleteMark")%>'></asp:Label>
                            </td>
                            <td>
                            <asp:Label ID="Label1" runat="server" Text='<%#Str(Eval("User_Remark").ToString()) %>'></asp:Label>
                         
                                
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        <% if (rp_Item != null)
                           {
                               if (rp_Item.Items.Count == 0)
                               {
                                   Response.Write("<tr><td colspan='8' style='color:red;text-align:center'>"+RM.Common.DotNetConfig.LanguageHelper.GetKey("Null")+"</td></tr>");
                               }
                           } %>
                    </FooterTemplate>
                </asp:Repeater>
            </tbody>
        </table>
    </div>
    <uc1:PageControl ID="PageControl1" runat="server" />
    </form>
</body>
</html>
