<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="sms_send_taketemplate.aspx.cs" Inherits="VA.Modules.JDingMember.sms.sms_send_taketemplate" %>

<%@ Import Namespace="System.Data"%>

<!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>
<title>发送短信-选择模板</title>    
    <!--#include virtual="/include/css/editlist.aspx"-->
    <!--#include virtual="/include/js/editlist.aspx"--> 
    <script type="text/javascript">

        //选择
        function select(templateContent) {            

            templateContent = templateContent.replace(/{单引号}/g, "'");
            templateContent = templateContent.replace(/{双引号}/g, "\"");
            templateContent = templateContent.replace(/<br>/g, "\n");
            templateContent = templateContent.replace(/&lt;/g, "<");
            templateContent = templateContent.replace(/&gt;/g, ">");
            templateContent = templateContent.replace(/&nbsp;/g, " ");
            window.parent.finishTakeTemplate(templateContent);
        }

        function JTongSmartListTable_trClick(trObj) {
            var content = trObj.cells[1].innerHTML;
            content = content.replace("'", "{单引号}");
            content = content.replace("\"", "{双引号}");
            select(content);
        }

        $(function () {
            initListPage();
        });

    </script>

    <style type="text/css">
        #toolBar{    
            border-top:solid 1px #B9CAD3;
        }
    </style>

</head>
<body>
<!--说明：该页面是以 employee_editlist_nofresh_5.aspx 为原型封装的结果-->
<form id="Form1" method="post" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

<div id="pageWrapper" class="pageWrapper">   
    
   <%-- <div id="toolBar">    
        <a href="javascript:refresh()" class="jtongui-toolbarbutton" icon="icon-reload">刷新</a>            
    </div><!--toolBar.END--> --%>  
                     
    <div id="searchBar">
    
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>

        <asp:DropDownList ID="ddlSMSTemplateStatus" runat="server"
             AutoPostBack="true" 
            onselectedindexchanged="ddlSMSTemplateStatus_SelectedIndexChanged">             
        </asp:DropDownList>
        
        <asp:DropDownList ID="ddlCategory" runat="server" 
             AutoPostBack="true"
             OnSelectedIndexChanged="ddlCategory_SelectedIndexChanged">           
        </asp:DropDownList>                       

        <asp:TextBox ID="txtKeyWords" runat="server"
            CssClass="input"
            Width="150px" />
   
        <asp:Button ID="btnSearch" runat="server" 
             CssClass="simpleBtn"
             Text="搜索" 
             Onclick="btnSearch_Click" />
        
    </ContentTemplate>
    </asp:UpdatePanel>

    </div><!--searchBar.END-->    

    <div id="dataBar">

    <!--MainList.Start-->    
    <div class="jtongui-smartlisttable" id="jtongui-smartlisttable">

    <table cellpadding="3" cellspacing="0" class="tableheader" id="tb1_header" >
    <thead>
    <tr>
        <%--<td style="width:30px;text-align:center;"><input type="checkbox" id="ckb_selectAll"/></td>--%>
        <td style="width:30px;text-align:center;">No.</td>
        <td style="width:600px;text-align:center;">模板</td>
        <td style="width:30px;text-align:center;">选择</td>	      
        <td></td>
    </tr>    
    </thead>
    </table>

    <div id="dataBody">
    <asp:Repeater ID="myRepeater" Runat="server" EnableViewState="False"  >
    <HeaderTemplate>    
    <div class="bodyContainer">
    <% = base.ShowNoRecordInfo() %>
    <table cellpadding="3" cellspacing="0" class="tablebody" tbHeader="tb1_header">
    </HeaderTemplate>
    <ItemTemplate>
    <tr>
        <%--<td style="text-align:center;"><input type="checkbox" name="ckb_dataItem" value="<%# Eval("RID")%>" /></td>        --%>
        <td align="center"><%# (base.currPage - 1)*base.PageSize + Container.ItemIndex + 1%></td>
        <td align="left"><%# Eval("Content")%></td>
        <td align="center">
            <a href="#" onclick="javascript:select('<%# FormatContent(Eval("Content").ToString())%>');"><img src="/app_themes/icons/ok.png" alt="选择"/>  </a>
        </td>     
        <td></td>
    </tr>
    </ItemTemplate>
    <FooterTemplate>
    </table>
    </div><!--bodyContainer.END-->        

    <div id="divPagerInfo" style="display:none">
        <%=base.pageInfo%>
    </div>

    <input type="hidden" id="hidden_pageCnt" value="<% = base.PageCnt%>" />
    <input type="hidden" id="hidden_rdCnt" value="<% = base.RdCnt%>" />
    <input type="hidden" name="chkNum" value="<%=chkNum%>" />

    </FooterTemplate>
    </asp:Repeater>    
    </div><!--dataBody.END-->

    </div><!--jtongui-smartlisttable.END-->        
    <!--MainList.End-->  

    </div><!--dataBar.END-->

    <div id="pagerBar">
       ……
    </div><!--pageNavBar.END-->
    
    <asp:HiddenField runat="server" ID="hfCurrPage" EnableViewState="true" />
    
</div>

</form>
</body>
</html> 