<%
    //-----------------------------------------------------------
    // 文件名称: Promotions_Activity_Manage.aspx
    // 页面名称: 优惠活动管理
    //
    // 描    述:
    //
    // 创建标识: Add By 吴建春 2008-06-26
    //  
    // 创建标识: Add By 钟治宇 2008-11-10   卷  改  券   
    //-----------------------------------------------------------
%>

<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Promotions_Activity_Manage, V5Shop.Shop.Promotions" culture="auto" uiculture="auto" meta:resourcekey="PageResource1" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc2" %>
<%@ Register Src="control/ManageHeader.ascx" TagName="ManageHeader" TagPrefix="uc3" %>
<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="cc1" %>
<!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></title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/control.css" rel="stylesheet" type="text/css" />
    <link href="css/css_list.css" rel="stylesheet" type="text/css" />
    <link href="js/calendar-system.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" language="javascrip卷t" src="js/Common.js"></script>
    <script type="text/javascript" language="javascript" src="Js/Calendar.js"></script>
    <script type="text/javascript" language="javascript" src="Js/Calendar-Setup.js"></script>
    <script type="text/javascript" language="javascript" src="Js/Calendar-zh.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <uc3:ManageHeader ID="PageHead" runat="server" />
            <div id="search">
                <!-- 查询部 -->
                <div style="padding-right: 20px; padding-left: 20px; padding-bottom: 20px; padding-top: 20px; border-bottom: #f7f7f7 4px solid">
                    <asp:Label ID="lblAdminName" runat="server" meta:resourcekey="lblAdminNameResource" Text="活动名称:"></asp:Label>
                    <asp:TextBox ID="txtName" runat="server" Width="86px"></asp:TextBox>
                    <asp:Label ID="Label2" runat="server" meta:resourcekey="lblAdminNameResource" Text="活动状态:"></asp:Label>
                    <asp:DropDownList ID="ddlIsFinish" runat="server" Width="60px">
                        <asp:ListItem Selected="True" Value="-1">全部</asp:ListItem>
                        <asp:ListItem Value="1">已结束</asp:ListItem>
                        <asp:ListItem Value="0">未结束</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Label ID="Label3" runat="server" meta:resourcekey="lblAdminNameResource" Text="赠送礼品:"></asp:Label>
                    <asp:DropDownList ID="ddlBonusGift" runat="server" Width="60px">
                        <asp:ListItem Selected="True" Value="-1">全部</asp:ListItem>
                        <asp:ListItem Value="1">有</asp:ListItem>
                        <asp:ListItem Value="0">没有</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Label ID="Label6" runat="server" meta:resourcekey="lblAdminNameResource" Text="开始时间："></asp:Label>
                    <asp:TextBox ID="txtMinStart" runat="server" Width="70px" onblur="return CheckDate(this, true, false);" /><img id="ImgMinStart" alt="打开日历" src="images/calendar1.gif" title="打开日历" />
                    -
                    <asp:TextBox ID="txtMaxStart" runat="server" Width="70px" onblur="return CheckDate(this, true, false);"></asp:TextBox><img id="ImgMaxStart" alt="打开日历" src="images/calendar1.gif" title="打开日历" /><br>
                    <asp:Label ID="Label1" runat="server" meta:resourcekey="lblAdminNameResource" Text="活动类型:"></asp:Label>&nbsp;<asp:DropDownList ID="ddlIsBindProduct" runat="server" Width="90px">
                        <asp:ListItem Selected="True" Value="-1">全部</asp:ListItem>
                        <asp:ListItem Value="1">依附商品</asp:ListItem>
                        <asp:ListItem Value="0">不依附商品</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Label ID="Label4" runat="server" meta:resourcekey="lblAdminNameResource" Text="送优惠券:"></asp:Label>
                    <asp:DropDownList ID="ddlBonusCard" runat="server" Width="60px">
                        <asp:ListItem Selected="True" Value="-1">全部</asp:ListItem>
                        <asp:ListItem Value="1">有</asp:ListItem>
                        <asp:ListItem Value="0">没有</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Label ID="Label5" runat="server" meta:resourcekey="lblAdminNameResource" Text="赠送积分:"></asp:Label>
                    <asp:DropDownList ID="ddlBonusScore" runat="server" Width="60px">
                        <asp:ListItem Selected="True" Value="-1">全部</asp:ListItem>
                        <asp:ListItem Value="1">有</asp:ListItem>
                        <asp:ListItem Value="0">没有</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Label ID="Label7" runat="server" meta:resourcekey="lblAdminNameResource" Text="结束时间："></asp:Label>
                    <asp:TextBox ID="txtMinEnd" runat="server" Width="70px" onblur="return CheckDate(this, true, false);"></asp:TextBox><img id="ImgMinEnd" alt="打开日历" src="images/calendar1.gif" title="打开日历" />
                    -
                    <asp:TextBox ID="txtMaxEnd" runat="server" Width="70px" onblur="return CheckDate(this, true, false);"></asp:TextBox><img id="ImgMaxEnd" alt="打开日历" src="images/calendar1.gif" title="打开日历" />
                    <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="查询" meta:resourcekey="btnSearchResource" CssClass="button" /></div>
            </div>
            <div id="content">
                <div style="padding-right: 25px; padding-left: 25px; padding-bottom: 3px; color: #4b6888; padding-top: 3px; border-bottom: #cccccc 1px solid">
                    <input id="CheckAllBox" onclick="CheckAll()" type="checkbox" class="checkbox" />全选&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:LinkButton ID="btnAdd" runat="server" ForeColor="#4B6888" meta:resourcekey="btnAddResource2" OnClick="btnAdd_Click" Width="60px"><img src="images/icon/key_add.gif" alt="Read/Write Property"/> 添加</asp:LinkButton>
                    <asp:LinkButton ID="btnEdit" runat="server" ForeColor="#4B6888" meta:resourcekey="btnEditResource2" OnClick="btnEdit_Click" OnClientClick="return CheckEdit()" CausesValidation="False" Width="60px"><img src="images/icon/key_edit.gif" alt="Read/Write Property"/> 编辑</asp:LinkButton>
                    <asp:LinkButton ID="btnDel" runat="server" CausesValidation="False" ForeColor="#4B6888" meta:resourcekey="btnDelResource2" OnClick="btnDel_Click" OnClientClick="return CheckDel()"><img src="images/icon/key_delete.gif" alt="Read/Write Property"/> 删除</asp:LinkButton>
                </div>
                <!-- 明细数据 -->
                <div class="listborder">
                    <cc1:V5ShopGridView ID="GridViewShow" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CssClass="datalist" PageSize="15" HeaderStyle-ForeColor="#000000" EmptyDataText="没有任何可用信息！">
                        <PagerSettings Mode="NumericFirstLast" />
                        <Columns>
                            <asp:TemplateField meta:resourcekey="DetilData">
                                <itemtemplate>
                                    <input runat="server" value='<%# Eval("ID") %>' id="CheckBoxID" type="checkbox" class="checkbox" onmouseover="this.mouse='over'" onmouseout="this.mouse='out'" />
                                </itemtemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" />
                            <asp:TemplateField HeaderText="活动名称" SortExpression="Name" ItemStyle-Width="20%">
                                <itemtemplate>
                                    <a target="_blank" href='../act.aspx?id=<%# Eval("ID") %>'>
                                        <asp:Label id="lblName" runat="server" text='<%# Eval("Name") %>' />
                                    </a>
                                </itemtemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="StartDate" HeaderText="活动开始时间" SortExpression="StartDate" />
                            <asp:BoundField DataField="EndDate" HeaderText="活动结束时间" SortExpression="EndDate" />
                            <asp:TemplateField meta:resourcekey="DetilData" HeaderText="活动类型" SortExpression="IsBindProduct">
                                <itemtemplate>
                                    <asp:Label ID="lblIsBindProduct" runat="server" Text='<%# FormatState("IsBindProduct", DataBinder.Eval(Container, "DataItem(IsBindProduct)","{0}")) %>'></asp:Label>
                                </itemtemplate>
                            </asp:TemplateField>
                            <asp:TemplateField meta:resourcekey="DetilData" HeaderText="活动状态" SortExpression="IsFinish">
                                <itemtemplate>
                                    <asp:Label ID="lblIsFinish" runat="server" Text='<%# FormatState("IsFinish", DataBinder.Eval(Container, "DataItem(IsFinish)","{0}")) %>' />
                                </itemtemplate>
                            </asp:TemplateField>
                            <asp:TemplateField meta:resourcekey="DetilData" HeaderText="赠送礼品" SortExpression="BonusGift">
                                <itemtemplate>
                                    <asp:Label ID="lblBonusGift" runat="server" Text='<%# FormatState("BonusGift", DataBinder.Eval(Container, "DataItem(BonusGift)","{0}")) %>' />
                                </itemtemplate>
                            </asp:TemplateField>
                            <asp:TemplateField meta:resourcekey="DetilData" HeaderText="赠送优惠券" SortExpression="BonusCard">
                                <itemtemplate>
                                    <asp:Label ID="lblBonusCard" runat="server" Text='<%# FormatState("BonusCard", DataBinder.Eval(Container, "DataItem(BonusCard)","{0}")) %>' />
                                </itemtemplate>
                            </asp:TemplateField>
                            <asp:TemplateField meta:resourcekey="DetilData" HeaderText="赠送积分" SortExpression="BonusScore">
                                <itemtemplate>
                                    <asp:Label ID="lblBonusScore" runat="server" Text='<%# FormatState("BonusScore", DataBinder.Eval(Container, "DataItem(BonusScore)","{0}")) %>' />
                                </itemtemplate>
                            </asp:TemplateField>
                        </Columns>
                        <HeaderStyle CssClass="category" ForeColor="Black" />
                    </cc1:V5ShopGridView>
                </div>
            </div>
            <div id="hiddenfield">
                <asp:HiddenField ID="CheckedIDS" runat="server" Value="0" />
                <asp:HiddenField ID="PageIndex" runat="server" Value="0" />
                <asp:HiddenField ID="MaxPageIndex" runat="server" Value="0" />
                <uc1:HiddenField ID="Alert" runat="server" />
            </div>
            <uc2:PageBottom ID="PageBottom1" runat="server" />
            <script language="javascript" type="text/javascript">
Calendar.setup({
    inputField     :    "txtMinStart",
    ifFormat       :    "%Y-%m-%d", 
    button         :    "ImgMinStart",
    align          :    "Br",
    singleClick    :    true
});
Calendar.setup({
    inputField     :    "txtMaxStart",
    ifFormat       :    "%Y-%m-%d", 
    button         :    "ImgMaxStart",
    align          :    "Br",
    singleClick    :    true
});
Calendar.setup({
    inputField     :    "txtMinEnd",
    ifFormat       :    "%Y-%m-%d", 
    button         :    "ImgMinEnd",
    align          :    "Br",
    singleClick    :    true
});
Calendar.setup({
    inputField     :    "txtMaxEnd",
    ifFormat       :    "%Y-%m-%d", 
    button         :    "ImgMaxEnd",
    align          :    "Br",
    singleClick    :    true
});
            </script>
        </div>
    </form>
</body>
</html>
