<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CampaignList.aspx.cs" Inherits="RM.Web.Training.Campaign.CampaignList" %>
<%@ 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("CampaignList")%></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>
    <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>
    <style type="text/css">
        td{max-width:300px;}    
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="btnbartitle">
        <div>
            <span><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CampaignList")%></span>
        </div>
    </div>
     <div class="btnbarcontetn">       
        <div style="text-align: right;">     
           <uc2:LoadButton ID="LoadButton1" runat="server" />          
        </div>
    </div>
    <div class="div-body">
     <%=TableHtml%>
     
    </div>
      <uc1:PageControl ID="PageControl1" runat="server" />
    </form>
    <script type="text/javascript">
        $(function () {
            //一分钟刷新一下页面
//            window.setInterval("timelyFun()", 1000);
            //把分页定位到屏幕下面
            divresize(90);
            FixedTableHeader("#table1", $(window).height() - 121);
            $(".div-body").PullBox({ dv: $(".div-body"), obj: $("#table1").find("tr") });
        })
        function timelyFun() {
            location.reload(true);  
        }
        function add() {
            var url = "/Training/Campaign/CampaignForm.aspx";
            top.openDialog(url, 'CampaignForm_add', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CampaignList")%> - <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("AddCampaign")%>', 800, 480, 50, 50);

        }
        //编辑
        function edit() {
            var arrt = new Array();
            arrt = CheckboxValue().split('|');
            var key = arrt[0];
            if (IsEditdata(CheckboxValue())) {
                var url = "/Training/Campaign/CampaignForm.aspx?key=" + key;
                top.openDialog(url, 'CampaignForm_edit', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CampaignList")%> - <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UpdateCampaign")%>', 800, 480, 50, 50);
            }
        }
        //删除
        function Delete() {
            var key = CheckboxValue();
            if (IsDelData(key)) {
                var delparm = 'action=Delete&module=<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CampaignList")%>&tableName=TKS_Campaign&pkName=Campaign_Id&pkVal=' + key;
                delConfig('/Ajax/Campaign_Del.ashx', delparm)
            }
        }
        //查询人员
        function selectpeople() {
            var key = CheckboxValue();
            if (IsEditdata(CheckboxValue())) {
                window.location.href = "/Training/Campaign/CampaignPeopleList.aspx?key=" + key;
            }
        }
        //展示
        function selectCampaignInfo() {
            var key = CheckboxValue();
            if (IsEditdata(CheckboxValue())) {
                window.open("/Training/Campaign/CampaignReveal.aspx?key=" + key);
            }
        }
        globalSetTags('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CampaignList")%>', 'primaryId');
    </script>
        <script src="/Themes/Scripts/CreateContextJs.js" type="text/javascript"></script>
</body>
</html>
