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

<%@ 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("Affichet_management")%></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 src="/Training/Affichet/JavaScript/AffichetJs.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            FixedTableHeader("#table1", $(window).height() - 121);
            affichet.init($("#affichetBar"));
        });
    </script>
    <style type="text/css">
        
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="btnbartitle">
        <div>
           <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Affichet_management")%>
        </div>
    </div>
    <div class="btnbarcontetn">
        <div style="text-align: right">
            <uc2:LoadButton ID="LoadButton1" runat="server" />
        </div>
    </div>
    <div class="div-body">
        <%=pageHtml.ToString()%>
    </div>
    <uc1:PageControl ID="PageControl1" runat="server" />
    </form>
    <script type="text/javascript">
        $(function () { //把分页定位到屏幕下面
            divresize(89);
            FixedTableHeader("#table1", $(window).height() - 80);
            $('.linkEdit').click(function () {
                //编辑
                var url = "/Training/Affichet/Affichet_List_Form.aspx?key=" + $(this).attr('data');
                top.openDialog(url, 'editAffichet_ListForm', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Affichet_management")%>', 850, 400, 50, 50);
            });
            $(".linkDetail").click(function (e) {
                //查看公告明细
                affichet.showDetail(e, $(this).attr('data'));
                return false;
            });
            $('.linkDelete').click(function () {
                ajaxUpdateData('/Training/Affichet/Affichet_Delete.ashx', { key: $(this).attr('data'), action: "0" }, function (data) {
                    switch (data) {
                        case 0: //正确
                            showTipsMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CG")%>', 1500, 4);
                            setTimeout(function () {
                                //刷新页面
                                Loading(true);
                                window.location.reload();
                            }, 1500);
                            break;
                        case 1:
                            showTipsMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("SB")%>', 1500, 5);
                            break;
                        case 2:
                            showTipsMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("SB")%>', 4000, 5);
                            break;
                        case 3:
                            showTipsMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("SB")%>', 4000, 5);
                            break;
                        case 4:
                            showTipsMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("SB")%>', 4000, 5);
                            break;
                        case 5:
                            showTipsMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("SB")%>', 4000, 5);
                            break;
                        default:
                            showTipsMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("SB")%>', 4000, 5);
                            break;
                    }
                }, function () {
                    showTipsMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Abnormal network connection")%>', 4000, 3);
                }, '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("want to delete")%>');
                return false;
            });
        });

        function add() {
            //添加公告
            var url = "/Training/Affichet/Affichet_List_Form.aspx";
            top.openDialog(url, 'affichet_ListForm', ' <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Affichet_management")%>', 850, 400, 50, 50);
        } 
    </script>
</body>
</html>
