<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserInfo_List.aspx.cs"
    Inherits="RM.Web.RMBase.SysUser.UserInfo_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 runat="server">
    <title><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_Index")%></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 src="/Template/dongxun/keyfunction.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 = "/RMBase/SysUser/UserInfo_Form.aspx";
            top.openDialog(url, 'UserInfo_Form', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_Index")%>', 800, 350, 50, 50);
        }
        //修改
        function edit() {
            var key = CheckboxValue();
            if (IsEditdata(key)) {
                var url = "/RMBase/SysUser/UserInfo_Form.aspx?key=" + key;
                top.openDialog(url, 'UserInfo_Form', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_Index")%>', 800, 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('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('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 setTime() {
            var key = CheckboxValue();
            if (IsEditdata(key)) {
                var url = "/RMBase/SysUser/SetTime_Form.aspx?key=" + key;
                top.openDialog(url, 'SetTime_Form', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("SetUserTime")%>', 400, 195, 50, 50);
            }
        }
        //U盾激活
        function buykey() { 
             var key = CheckboxValue();
             if (IsEditdata(key)) {
                 $('[type = checkbox]').each(function () {
                     if ($(this).attr("checked")) {
                         var obj = {};
                         obj.id = $(this).val();
                         obj.name = $(this).attr("keyname");
                         bykey(obj);
                     }
                 });
             }
         }
         var Mywindows = 'UserInfo_List';
         globalSetTags('Base_UserInfo', 'User_ID');
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="btnbartitle">
        <div>
            <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_Index")%>
        </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: 80px; text-align: center;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("User_Name")%>
                    </td>
                    <td style="width: 100px; text-align: center;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("User_Accout")%>
                    </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("User_Title")%>
                    </td>
                    
                    <td><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserGroup")%></td>
                    <td><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("user_prov")%></td>
                    <td><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("user_city")%></td>
                    <td><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("user_area")%></td>
                    
                    <td style="width: 50px; text-align: center;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("User_State")%>
                    </td>
                    <td style="width: 250px;  text-align: center;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Startingdate")%>
                    </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")%>" keyname="<%#Eval("User_Name")%>" name="checkbox" />
                            </td>
                            <td style="width: 60px; text-align: center;">
                                <%#Eval("User_Code")%>
                            </td>
                            <td style="width: 80px; text-align: center;">
                                <a href="/Training/UserArchives.aspx?id=<%#Eval("User_ID")%>" target="_blank" title="<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UserInfo_lf")%>">
                                    <%#Eval("User_Name")%></a>
                            </td>
                            <td style="width: 100px; text-align: center;">
                                <%#Eval("User_Account")%>
                            </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("Title")%>
                            </td>
                            <td style="width: 180px; text-align: center;">
                            <%#Eval("UserGroup_Name")%>                            
                            </td>
                            
                            <td style="width: 50px; text-align: center;">
                                <%#Eval("province")%>
                            </td>
                            <td style="width: 50px; text-align: center;">
                                <%#Eval("city")%>
                            </td>
                            <td style="width: 50px; text-align: center;">
                                <%#Eval("area")%>
                            </td>
                            
                            <td style="width: 50px; text-align: center;">
                                <asp:Label ID="lblDeleteMark" runat="server" Text='<%#Eval("DeleteMark")%>'></asp:Label>
                            </td>
                            <td style="width: 250px; text-align: center;">
                                <%#Eval("Start_date")%>--<%#Eval("End_date")%>
                            </td>
                            <td>
                                <%#Eval("User_Remark")%>
                            </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>

    <!--U盾识别-->
    <embed id="s_simnew31"  type="application/npsyunew3-plugin" hidden="true"> </embed>
</body>
</html>
