<%@ Page Language="C#" AutoEventWireup="false" %>
<%@ Register TagPrefix="Hishop" Namespace="Hishop.Web.Controls" Assembly="Hishop.Web.Controls" %>
<%@ Register TagPrefix="Hishop" Namespace="Hishop.Web.Management" Assembly="Hishop.Web.Management" %>
<%@ Register TagPrefix="UI" Namespace="ASPNET.WebControls" Assembly="ASPNET.WebControls" %>
<%@ Register TagPrefix="Hishop" Namespace="Hishop.Web.Validator" Assembly="Hishop.Web.Validator" %>
<%@ Import Namespace="Hishop.SystemServices" %>

<!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>
    <Hishop:HeadContainer ID="HeadContainer1" runat="server" />
    <Hishop:PageTitle ID="PageTitle1" runat="server" />
    <link rel="stylesheet" href="../../utility/validate/pagevalidator.css" type="text/css" />
    <link rel="stylesheet" href="../css/Hishopv5.css" type="text/css" />
    <script type="text/javascript" src="../../utility/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="../../utility/validate/pagevalidator.js"></script>
    
    <script type="text/javascript" src="../js/Hishopv5.js"></script>
    <script type="text/javascript" src="../js/DropDonwList.js"></script>
</head>
<body>
    <form id="form1" runat="server">

        <div>         

            <div class="PageTitleArea">
                <div class="PageTitle">
                    <asp:Literal ID="lblPageTitle" runat="server" Text="<%$ Resources:EngagedCoupons,IDS_PageTitle %>"></asp:Literal>
                </div>
                <div style="width: 80%;">
                    <asp:Literal ID="lblPageDesc" runat="server" Text="<%$ Resources:EngagedCoupons,IDS_PageDesc %>"></asp:Literal>
                </div>
            </div>
            <div>
                <ul class="anchors clearfix">
                    <li><a href='<%= Globals.GetSiteUrls().UrlData.FormatUrl("admin_newcoupons")%>'><img src="../images/nojihuoyouhuiquan.gif" alt="" /><asp:Label runat="server" id="lblNewCoupons" Text="<%$ Resources:Coupons, IDS_DataField_NewCoupons %>" /></a></li>
                    <li class="tabs-selected"><a href='<%= Globals.GetSiteUrls().UrlData.FormatUrl("admin_engagedcoupons")%>'><img src="../images/shiyoudeyouhuijuan.gif" alt="" /><asp:Label runat="server" id="lblEngagedCoupons" Text="<%$ Resources:Coupons, IDS_DataField_EngagedCoupons %>" /></a></li>
                    <li><a href='<%= Globals.GetSiteUrls().UrlData.FormatUrl("admin_overduecoupons")%>'><img src="../images/guoqiyouhuijuan.gif" alt="" /><asp:Label runat="server" id="lblOverdueCoupons" Text="<%$ Resources:Coupons, IDS_DataField_OverdueCoupons %>" /></a></li>
                </ul>
                </div>
                <Hishop:EngagedCoupons ID="engagteCouponts" runat="server">
                    <SkinTemplate>

	                            <Hishop:StatusMessage id="Status" runat="server" Visible="False" />

                        <div class="grdGroupFormList"> 
                            <div class="grdHeaderStyle">
                                <ul>
		                            <li class="userGroupAddadmin"><a href='<%= Globals.GetSiteUrls().UrlData.FormatUrl("admin_addcoupons")%>'><asp:Label ID="lblAddEngagedCouponts" runat="server" Text="<%$ Resources:EngagedCoupons, IDS_Button_AddEngagedCouponts %>"></asp:Label></a>
	                            </ul>   
                            </div>
                            <div class="grdGroupList">      
                                <Hishop:CustomGridView ID="grdCoupons" runat="server" AutoGenerateColumns="False" DataKeyNames="CouponId" CssClass="GridViewStyle" GridLines="None" ShowHeader="true" AllowSorting="true" RowStyle-CssClass="grdrow" HeaderStyle-CssClass="GridViewHeaderStyle" SortOrderBy="CouponId" SortOrder="DESC">
                                    <Columns>
                                           <Hishop:CheckBoxColumn  ShowHead="false"  Text="<%$ Resources:Resources, IDS_Header_Check %>"></Hishop:CheckBoxColumn>            
                                           <asp:TemplateField HeaderText="<%$ Resources:EngagedCoupons, IDS_Header_CouponName %>" SortExpression="Name">
                                              <ItemTemplate>
                                                 <Hishop:SubStringLabel ID="lblCouponName" StrLength="20" StrReplace="..." ToolTip='<%#Eval("Name") %>' Text='<%#Eval("Name") %>' runat="server" style="display: block; text-align:left; line-height:20px;width:180px; padding:2px; height:20px; font-family: Tahoma; font-size: 12px;font-weight:normal;"></Hishop:SubStringLabel>
                                              </ItemTemplate>
                                           </asp:TemplateField>
                                           <asp:TemplateField HeaderText="<%$ Resources:EngagedCoupons, IDS_Header_ClosingTime %>" SortExpression="ClosingTime">
                                              <ItemTemplate>
                                                <Hishop:FormatedTimeLabel ID="lblClosingTimes" Time='<%#Eval("ClosingTime")%>' runat="server" ></Hishop:FormatedTimeLabel>
                                              </ItemTemplate>
                                           </asp:TemplateField>
                                           <asp:TemplateField HeaderText="<%$ Resources:EngagedCoupons,IDS_Header_DiscountValue %>">
                                            <itemtemplate>
                                                <Hishop:FormatedMoneyLabelForAdmin Money='<%#Eval("DiscountValue") %>' runat="server" ></Hishop:FormatedMoneyLabelForAdmin>
                                            </itemtemplate>
                                          </asp:TemplateField>
                                           <asp:BoundField DataField="SentCount" HeaderText="<%$ Resources:EngagedCoupons, IDS_Header_Send %>" HtmlEncode="false"></asp:BoundField>
                                           <asp:BoundField DataField="UsedCount" HeaderText="<%$ Resources:EngagedCoupons, IDS_Header_UserCount %>" HtmlEncode="false"></asp:BoundField>   
                                           <asp:TemplateField HeaderText="兑换所需积分" SortExpression="NeedPoint">
                                                <itemtemplate>
                                                    <asp:Literal runat="server" ID="litNeedPoint" Text='<%# Eval("NeedPoint") %>' />
                                                </itemtemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="<%$ Resources:Resources, IDS_Header_Options %>">
                                                <ItemStyle/>
                                                <ItemTemplate>
                                                  <a href="#" class="selectHandlist" onmouseover="showmenu(this,'show','bottom')" onmouseout="showmenu(this,'hide','bottom')" style="cursor: pointer;">操作项</a>
                                                    <div class="mdiv" style="width:130px;">
                                                    <ul>
                                                        <li><a href='<%# Globals.GetSiteUrls().UrlData.FormatUrl("admin_sendCouponsAgent",Eval("CouponId"))%>'><asp:Label runat="server" ID="lblSendCouponsToAgent" Text="<%$ Resources:NewCoupons, IDS_FormField_SendCouponsToAgent %>" ></asp:Label></a></li>
                                                        <li><a href='<%# Globals.GetSiteUrls().UrlData.FormatUrl("admin_sendCouponsToUser", Eval("couponId"))%>'><asp:Label runat="server" ID="lblSendCouponsToMember" Text="<%$ Resources:NewCoupons, IDS_FormField_SendCouponsToMember %>"></asp:Label></a></li>
                                                        <li><a href='<%# Globals.GetSiteUrls().UrlData.FormatUrl("admin_sendCouponsToEmail",Eval("couponId")) %>'><asp:Label runat="server" ID="lblSendCouponsToEmail" Text="<%$ Resources:NewCoupons, IDS_FormField_SendCouponsToEmail %>" ></asp:Label></a></li>
                                                    </ul>
                                                    </div>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                    </Columns>
                             </Hishop:CustomGridView>
                             <div class="grdGroupTabhead">
                                <UI:Pager runat="server" ListToPaging="grdCoupons" ID="pager" />
                           </div>
                          </div>
                        </div>
                    </SkinTemplate>
                </Hishop:EngagedCoupons>
        </div>
        <br />
        <div class="botCopyInfo">
            <hr style="width:500px;" />
            <Hishop:SiteCopyright ID="SiteCopyright1" runat="server" />
        </div>
        <br />
        <Hishop:ValidatorContainer runat="server" ID="ValidatorContainer" />
    </form>
</body>
</html>