<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Recyclebin_List.aspx.cs"
    Inherits="RM.Web.RMBase.SysPersonal.Recyclebin_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("Recyclebin_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/DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/jquery.pullbox.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/FunctionJS.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $(".div-body").PullBox({ dv: $(".div-body"), obj: $("#table1").find("tr") });
            divresize(90);
            FixedTableHeader("#table1", $(window).height() - 124);
        })
        //点击查看详细
        function Onclickhref(key) {
            var url = 'Recyclebin_Info.aspx?key=' + key;
            Urlhref(url);
        }
        //还原
        function restore() {
            var key = CheckboxValue();
            if (IsDelData(key)) {
                var parm = 'action=restore_Data&pkVal=' + key;
                showConfirmMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Recyclebin_List_hysj")%>[' + key.split(",").length + ']', function (r) {
                    if (r) {
                        getAjax('Recyclebin.ashx', parm, function (rs) {
                            if (parseInt(rs) > 0) {
                                showTipsMsg("Recyclebin_List_hycg！", 2000, 4);
                                windowload();
                            } else if (parseInt(rs) == 0) {
                                showTipsMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Recyclebin_List_hysb0")%>', 3000, 3);
                            }
                            else {
                                showTipsMsg('<span style="color:red"><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Recyclebin_List_hysb")%></span>', 4000, 5);
                            }
                        });
                    }
                });
            }
        }
        //清空
        function Empty() {
            var key = CheckboxValue();
            if (IsDelData(key)) {
                var parm = 'action=restore_Empty&pkVal=' + key;
                showConfirmMsg("此操作不可恢复，您确定要清空当前【" + key.split(",").length + "】条数据吗？", function (r) {
                    if (r) {
                        getAjax('Recyclebin.ashx', parm, function (rs) {
                            if (parseInt(rs) > 0) {
                                showTipsMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("SysLog_Content_cltrue")%>', 2000, 4);
                                windowload();
                            } else if (parseInt(rs) == 0) {
                                showTipsMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Ass")%>', 3000, 3);
                            }
                            else {
                                showTipsMsg('<span style="color:red"><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("False")%></span>', 4000, 5);
                            }
                        });
                    }
                });
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="btnbartitle">
        <div>
            <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Recyclebin_Info")%>
        </div>
    </div>
    <div class="btnbarcontetn">
        <div style="float: left;">
            <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Recyclebin_List_deltime")%>:
            <input type="text" id="BeginBuilTime" class="txt" runat="server" style="width: 115px;"
                onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd 00:00:00' })" />
            <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("To")%>
            <input type="text" id="endBuilTime" class="txt" runat="server" style="width: 115px;"
                onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd 00:00:00' });" />
            <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">
            <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: 250px;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Recyclebin_List_zdz")%>
                    </td>
                    <td style="width: 150px; text-align: center;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Recyclebin_List_yswz")%>
                    </td>
                    <td style="width: 150px; text-align: center;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Recyclebin_List_scyh")%>
                    </td>
                    <td style="width: 150px; text-align: center;">
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Recyclebin_List_deltime")%>
                    </td>
                    <td>
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("User_Description")%>
                    </td>
                </tr>
            </thead>
            <tbody>
                <asp:Repeater ID="rp_Item" runat="server">
                    <ItemTemplate>
                        <tr>
                            <td style="width: 20px; text-align: left;">
                                <input type="checkbox" value="<%#Eval("Recyclebin_ID")%>" name="checkbox" />
                            </td>
                            <td style="width: 250px;">
                                <a href="javascript:void()" onclick="Onclickhref('<%#Eval("Recyclebin_ID")%>')">
                                    <%#Eval("Recyclebin_EventField")%></a>
                            </td>
                            <td style="width: 150px; text-align: center;">
                                <%#Eval("Recyclebin_Name")%>
                            </td>
                            <td style="width: 150px; text-align: center;">
                                <%#Eval("CreateUserName")%>
                            </td>
                            <td style="width: 150px; text-align: center;">
                                <%#Eval("CreateDate")%>
                            </td>
                            <td>
                                <%#Eval("Recyclebin_Remark")%>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        <% if (rp_Item != null)
                           {
                               if (rp_Item.Items.Count == 0)
                               {
                                   Response.Write("<tr><td colspan='6' 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>
