<%@ page language="C#" masterpagefile="~/member/MemberMasterPage.master" autoeventwireup="true" inherits="V5Shop.NewMember.User_Coupon_Manage, V5Shop.Member" title="我的优惠卡" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>
<%@ Register Src="UserControl/PageList.ascx" TagName="PageList" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div style="float: left; width: 759px;">
        <div>
            <img src="images/list/top-1.gif" /></div>
        <div style="border-right: #c5dce7 1px solid; padding-right: 10px; padding-left: 10px;
            padding-bottom: 10px; width: 738px; padding-top: 10px; height:330px">
            <div style="padding-left: 20px; background: url(images/list/tab-bg.gif) repeat-x 50% bottom;
                height: 27px">
                <div style="font-weight: bold; background: url(images/list/tab-1.gif) no-repeat;
                    float: left; width: 76px; color: #111; line-height: 27px; margin-right: 3px;
                    height: 27px; text-align: center">
                    我的优惠卡 </div>
            </div>
            <div>
            <table>
               <tr>
                    <td style="border: 1px #CCCCCC solid; padding: 20px; text-align: left; background: #F9F9F9;">
                        <asp:Label ID="Label1" runat="server" Text="绑定优惠券：" Font-Bold="True"></asp:Label>
                        <asp:Label ID="Label2" runat="server" Text="将优惠券挂记到自己的名下，别人将无法将使用该优惠券。优惠券格式为：AAAA-BBBB-CCCC-DDDD"></asp:Label>
                        <br />
                        <asp:Label ID="Label3" runat="server" Text="请输入要绑定的优惠券券号：" Font-Bold="True"></asp:Label>
                        <asp:TextBox ID="txtNumber" runat="server" Width="200px" CssClass="input2" />
                        <asp:Button ID="btnBind" runat="server" CssClass="input_bg2" Text="绑定优惠券" OnClick="btnBind_Click" /></td>
                </tr>
            </table>
            </div>
           <div style="background:url(images/list/bg_2.gif) repeat-x; height:30px; line-height:30px">
	        <div style="float:left; width:130px; text-align:center">名称 </div>
		    <div style="float:left; width:150px; text-align:center">券号</div>
		    <div style="float:left; width:100px; text-align:center">面值 </div>
		    <div style="float:left; width:100px; text-align:center">开始时间</div>
		     <div style="float:left; width:150px; text-align:center">结束时间</div>
		      <div style="float:left; width:100px; text-align:center">使用状态</div>
	      </div>
            <div style="border-top: #dedee0 1px solid; margin-top: 2px; background: #f3f3f3;
                line-height: 28px; border-bottom: #dedee0 1px solid; height: 28px">
                <input id="CheckAllBox" class="checkbox" name="checkbox" onclick="CheckAll()" type="checkbox" />
                全选
                <asp:Button ID="BtnDelete2" runat="server" CssClass="input_bg" OnClick="BtnDelete_Click"
                    Text="删除" />
            </div>
            <div class="list2_div1">
                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                  <asp:Repeater ID="rpShopCardList" runat="server">
                        <ItemTemplate>
                            <tr>
                                <td width="20">
                                        <asp:CheckBox ID="chkChoose" runat="server" />
                                        <asp:HiddenField ID="CheckBoxID" runat="server" Value='<%# Eval("ID") %>' />
                                </td>
                                <td align="center" width="130px">
                                    <%# V5Shop.Common.utils.left(Convert.ToString( Eval("Name")),10)%>
                                </td>
                                <td align="center" width="150px">
                                   &nbsp;<a href="User_Coupon_View.aspx?id=<%# Eval("ID") %>"><%# Eval("Number")%></a> 
                                </td>
                                <td align="center" width="100px">
                                    <%# Eval("MinusPrice")%>
                                </td>
                               <td align="center" width="120px">
                                    <%# Eval("StartDate")%>
                                </td>
                                
                                  <td align="center" width="130px">
                                    <%# Eval("EndDate")%>
                                </td>
                                  <td align="center" width="130px">
                                  &nbsp;  <%# FormatIsUsedState(DataBinder.Eval(Container, "DataItem(IsUsed)","{0}")) %>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </table>
            </div>
            <div style="border-top: #dedee0 1px solid; margin-top: 2px; background: #f3f3f3;
                line-height: 28px; border-bottom: #dedee0 1px solid; height: 28px;">
                <div style="float: left">
                    <input id="CheckAllBox2" class="checkbox" name="checkbox1" onclick="CheckAll2()"
                        type="checkbox" />
                    &nbsp;全选
                    <asp:Button ID="BtnDelete" runat="server" CssClass="input_bg" OnClick="BtnDelete_Click"
                        Text="删除" />
                </div>
                <uc1:pagelist id="PageList1" runat="server"></uc1:pagelist>
            </div>
        </div>
        <div>
            <img src="images/list/bottom-1.gif" /></div>
    </div>
    
    <script language="javascript" type="text/javascript">
    ShowOrHidden(1);
    ShowOrHidden(3);
    </script>
    
    <asp:Label ID="lblSuccess" runat="server" Text="绑定成功！" Visible="false" ></asp:Label>
      <asp:Label ID="lblParam" runat="server" Text="参数错误" Visible="false" ></asp:Label>
    <asp:Label ID="lblDelete" runat="server" Text="您确定要删除吗?" Visible="false" ></asp:Label>
    <asp:Label ID="lblYouhuiHao" runat="server" Text="请输入优惠券券号！" Visible="false" ></asp:Label>
    <asp:Label ID="lblBind" runat="server" Text="优惠券无法绑定，可能是以下原因:\n   1.已被别人绑定.\n   2.该优惠券不存在.\n   3.该优惠券已过期.\n" Visible="false" ></asp:Label>
</asp:Content>

