<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserStudent_List.aspx.cs" Inherits="RM.Web.Training.UserStudents.UserStudent_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("Student_Info_list")%></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>
    <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 () {
   
            divresize(90);
            FixedTableHeader("#table1", $(window).height() - 118);
        })
        //添加
        function add() {
            var url = "/Training/UserStudents/UserStudent_Form.aspx";
            top.openDialog(url, 'UserInfo_Form', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_Index")%> - <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Add")%>', 700, 350, 50, 50);
        }
        //修改
        function edit() {
            var key = CheckboxValue();
            if (IsEditdata(key)) {
                var url = "/Training/UserStudents/UserStudent_Form.aspx?key=" + key;
                top.openDialog(url, 'UserInfo_Form', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_Index")%> - <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Edit")%>', 700, 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)==1) {
                                showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_sqcg")%>！", 2000, 4);
                                windowload();
                            }else if(parseInt(rs)==2)
                            {
                               showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_ashx_NullSysPostemail")%>！", 4000, 5);
                                windowload();
                            }else if(parseInt(rs)==3)
                            {
                              showTipsMsg("<span style='color:red'><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_ashx_Postemail")%></span>", 4000, 5);
                                windowload();
                            }
                            else {
                                showTipsMsg("<span style='color:red'><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_sqsb")%></span>", 4000, 5);
                            }
                        });
                    }
                });
            }
        }
        //导入
        function inport() {
            var url = "/Training/UserStudents/AddUserForm.aspx";
            top.openDialog(url, 'AddUserForm', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_Index")%> - <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Import")%>', 250, 100, 50, 50);
       }
        //锁 定
        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);
                            }
                        });
                    }
                });
            }
        }

        //发送消息（短信）
        function sendmsm(){
            var key = CheckboxValue();
            if (IsEditdata(key)) {
                var url = "/Training/UserStudents/Send_Form.aspx?key=" + key;
                top.openDialog(url, 'UserInfo_Form', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_Index")%> - 消息发送', 700, 350, 50, 50);
            }
        }

        //发送消息（邮件）
        function sendemail(){
            var key = CheckboxValue();
            if (IsEditdata(key)) {
                var url = "/Training/UserStudents/Send_Email.aspx?key=" + key;
                top.openDialog(url, 'UserInfo_Form', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_Index")%> - 消息发送', 780, 400, 50, 50);
            }
        }

        

        var Mywindows = 'UserStudent_List';

    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="btnbartitle">
        <div>
            <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Student_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" />

            <%--<a title="发送短信" onclick="sendmsm();" class="button green"><span class="icon-botton" style="background: url('/Themes/images/16/add.png') no-repeat scroll 0px 4px;"></span>发送短信</a>

            <a title="发送邮件" onclick="sendemail();" class="button green"><span class="icon-botton" style="background: url('/Themes/images/16/add.png') no-repeat scroll 0px 4px;"></span>发送邮件</a>--%>

        </div>
    </div>
    <div class="div-body">
       <%=stutable %>
    </div>
    <uc1:PageControl ID="PageControl1" runat="server" />
    </form>
</body>
</html>
