<%@ Page Language="C#" MasterPageFile="MasterPage.Master" AutoEventWireup="true" CodeBehind="EmailSend.aspx.cs" Inherits="SocoShop.Web.Admin.EmailSend" %>
<%@ Import Namespace="SocoShop.Entity" %>
<%@ Import Namespace="SocoShop.Common" %>
<%@ Register Namespace="SkyCES.EntLib" Assembly="SkyCES.EntLib" TagPrefix="SkyCES"%>
<asp:Content ID="MasterContent" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
<div class="position"><img src="/Admin/Style/Images/PositionIcon.png"  alt=""/>发送列表 </div>	
<ul class="listHead">
	<li style="width:5%">ID</li>
	<li style="width:40%; text-align:left;text-indent:8px;">名称</li>
	<li style="width:15%">添加时间</li>    
	<li style="width:15%">发送时间</li>    
	<li style="width:10%">状态</li>        
	<li style="width:10%">管理</li>         
	<li style="width:5%">选择</li>        
</ul>
<asp:Repeater ID="RecordList" runat="server">
	<ItemTemplate>	     
        	<ul class="listMain" onmousemove="ChangeColor(this,'#FFFDD7')" onmouseout="ChangeColor(this,'#FFF')">
			<li style="width:5%"><%# Eval("ID") %></li>
			<li style="width:40%; text-align:left;text-indent:8px;"><%# Eval("Name")%></li>
			<li style="width:15%"><%# Eval("AddDate")%></li>    
	        <li style="width:15%" id="SendDate<%# Eval("ID") %>"><%#ShowSendDate(Convert.ToInt32(Eval("Status")), Eval("SendDate").ToString())%></li>    
	        <li style="width:10%" id="SendStatus<%# Eval("ID") %>"><%# EnumHelper.ReadEnumChineseName<SendStatus>(Convert.ToInt32(Eval("Status")))%></li>     
			<li style="width:10%;">
			    <span id="Operate<%#Eval("ID")%>"><%# ShowEdit(Convert.ToInt32(Eval("Status")), Convert.ToInt32(Eval("ID")))%></span>
			    <a href="javascript:pop('EmailSendDetail.aspx?ID=<%# Eval("ID") %>',800,600,'营销详细','EmailSendDetail')"><img src="Style/Images/list.gif" alt="详细" title="详细" /></a>
			</li>
			<li style="width:5%"><input type="checkbox" name="SelectID" value="<%# Eval("ID") %>" /></li> 	        
		</ul>
        </ItemTemplate>
</asp:Repeater>
<div class="listPage"><SkyCES:CommonPager ID="MyPager" runat="server" /></div>
<div class="action">
        <input type="button"  value=" 添 加 " class="button" onclick="pop('EmailSendAdd.aspx',600,300,'Email营销','EmailSendAdd')"/>&nbsp;<asp:Button CssClass="button" ID="DeleteButton" Text=" 删 除 " OnClientClick="return checkSelect()" runat="server"  OnClick="DeleteButton_Click"/>&nbsp;<input type="checkbox" name="All" onclick="selectAll(this)" />全选/取消
</div>
<script language="javascript" type="text/javascript">
var tempID;
function sendEmail(id){
    tempID=id;
    o("SendStatus"+id).innerHTML="发送中";
    o("Operate"+id).innerHTML=""; 
    Ajax.requestURL("EmailSend.aspx?Action=Send&ID="+id,dealSendEmail);  
}
function dealSendEmail(data){
    o("SendDate"+tempID).innerHTML=data;
    o("SendStatus"+tempID).innerHTML="发送完成";
}
</script>
</asp:Content>
