<%@ 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" %>
<%@ Import Namespace="System.Web.UI.WebControls" %>

<!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>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <div class="PageTitleArea">
                <div class="PageTitle">
                    <asp:Literal ID="litManagerTop" runat="server" Text="团购活动" ></asp:Literal>
                </div>
                <div style="width: 80%;">
                    <asp:Literal ID="litManagerDisciption" runat="server" Text="管理所有团购活动" ></asp:Literal>
                </div>
            </div>
            
            <Hishop:GroupBuys ID="GroupBuys" runat="server" >
            <SkinTemplate>
<!-- 操作提示 -->
        <Hishop:StatusMessage id="Status" runat="server" Visible="False" />
<fieldset class="AdminSearchform">
    <legend>
        <asp:Literal ID="litSelectQuery" runat="server" Text="<%$ Resources:ProductSearch, IDS_FormField_litSelectQuery %>"></asp:Literal></legend>
    <table width="25%" border="0" cellspacing="0" cellpadding="0" style="margin-left: 18px">
        <tr>
            <td class="searchTableLeftTD">
                <nobr>
                    <asp:Label ID="lblSearchText" runat="server" Text="<%$ Resources:ProductSearch, IDS_FormField_lblSearchText %>"></asp:Label>：</nobr>
            </td>
            <td class="searchTableControlTD">
                <asp:TextBox ID="txtSearchText" runat="server" Width="110" ToolTip="<%$ Resources:ProductSearch, IDS_FormField_lblSearchText_ToolTip %>"></asp:TextBox></td>
                <td class="searchTableControlTD">
                <asp:Button ID="btnSearch" runat="server" Text="<%$ Resources:ProductSearch, IDS_Button_Search %>"
                    CssClass="inp_L1" /></td>             
        </tr>      
          
    </table>
</fieldset>

<div class="grdHeaderStyle">
    <ul>
        <li class="userGroupCheckAll">
            <asp:LinkButton ID="Button2" runat="server" OnClientClick="CheckClickAll();return false;"
                Text="<%$ Resources:ProductOnSales, IDS_Button_CheckAll %>" />
        </li>
        <li class="spirtLines">|</li>
        <li class="userGroupReverseCheck">
            <asp:LinkButton ID="CheckReverse" runat="server" OnClientClick="CheckReverse();return false;"
                Text="<%$ Resources:ProductOnSales, IDS_Button_CheckReverse %>" />
        </li> 
        <li class="spirtLines">|</li>
        <li class="userGroupDelCheck">
            <Hishop:DeleteImageLinkButton ID="btnDelete" runat="server" Text="删除选定" /></li>
       
    </ul>
</div>
<div id="big_image" style="display:none;position:absolute;z-index:1; background-color:White; border: 0px solid #f4f4f4;"></div>

<div class="grdGroupList">
    <div class="grdGroupListLi">
                <Hishop:CustomGridView runat="server" ID="grdGroupBuys" CssClass="GridNoBorder" Width="100%"
                    AllowSorting="false" ShowOrderIcons="true" GridLines="None" DataKeyNames="GroupBuyId"
                    SortOrderBy="DisplaySequence" SortOrder="DESC" RowStyle-CssClass="grdrow" HeaderStyle-CssClass="GridViewHeaderStyle"
                    AutoGenerateColumns="false" ForeColor="#333333">
                    <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                    <HeaderStyle BackColor="#EEF8FF" Height="25" CssClass="GridViewHeaderStyle" Font-Bold="True" ForeColor="#314E9F" />
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <Hishop:CheckBoxField HeadWidth="35" />
                        <asp:BoundField HeaderText="排序" DataField="DisplaySequence" ItemStyle-Width="45px" />                       
                        
                         <asp:TemplateField SortExpression="ProductName" HeaderText="商品名称">
                            <itemtemplate>
                             <div style="color:Blue"> <a href='<%# Globals.GetSiteUrls().UrlData.FormatUrl("groupBuyProductDetails",Eval("ProductId")) %>' target="_blank">
                                <asp:Literal ID="litName" runat="server" Text='<%# Eval("ProductName") %>'></asp:Literal></a></div>
                            </itemtemplate>
                        </asp:TemplateField>
                       
                 <asp:TemplateField HeaderText="状态" ItemStyle-Width="10%" SortExpression="Status">
                       <ItemTemplate>
                          <Hishop:GroupBuyStatusLabel GroupBuyStatusCode='<%#Eval("Status") %>' runat="server" ID="GroupBuyStatusLabel" />
                        </ItemTemplate>
                 </asp:TemplateField>
                 <asp:TemplateField HeaderText="结束时间"  ItemStyle-Width="16%"  SortExpression="EndDate" >
                       <ItemTemplate>
                           <Hishop:FormatedTimeLabel ID="lblEndDate" Time='<%#Eval("EndDate") %>' runat="server"></Hishop:FormatedTimeLabel>
                       </ItemTemplate>
                 </asp:TemplateField>
                  <Hishop:MoneyColumnForAdmin HeaderText="违约金"
                            ItemStyle-Width="80" SortExpression="NeedPrice" DataField="NeedPrice" ItemStyle-HorizontalAlign="Center" />
                  <asp:TemplateField HeaderText="限购" SortExpression="MaxCount" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Center">
                            <itemtemplate>
                             <asp:Label ID="lblMaxCount" runat="server" Text='<%# Eval("MaxCount") %>' Width="25"></asp:Label>
                          </itemtemplate>
                  </asp:TemplateField>
                  <asp:TemplateField HeaderText="订购商品"  SortExpression="ProdcutQuantity" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Center">
                  <itemtemplate>
                             <asp:Label ID="lblProdcutQuantity" runat="server" Text='<%# Eval("ProdcutQuantity") %>' Width="25"></asp:Label>
                   </itemtemplate>
                  </asp:TemplateField>
                 <asp:TemplateField HeaderText="订单"  ItemStyle-Width="100"  ItemStyle-HorizontalAlign="Center" SortExpression="OrderCount">
                       <ItemTemplate>
                          <a target="_blank" href='<%# Globals.GetSiteUrls().UrlData.FormatUrl("admin_GroupBuyOrder",Eval("GroupBuyId"))%>'><%#Eval("OrderCount")%></a>
                       </ItemTemplate>
                 </asp:TemplateField>
                  <Hishop:MoneyColumnForAdmin HeaderText="当前价格"
                            ItemStyle-Width="80" SortExpression="Price" DataField="Price" ItemStyle-HorizontalAlign="Center" />  
                    <Hishop:SortImageColumn  HeaderText="排序" ReadOnly="true"/>               
                <Hishop:GroupBuyEditColumn ItemStyle-Width="30" />
                    </Columns>
                </Hishop:CustomGridView>
                <!--分页开始-->
                <div class="grdGroupTabhead">
                    <UI:Pager runat="server"  ListToPaging="grdProducts" RunningMode="Get" ID="pager" />
                </div>
    </div>
</div>
            </SkinTemplate>
            </Hishop:GroupBuys>
            
        </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>