<%@ Page Language="C#" MasterPageFile="~/Themes/Default/Site.Master" AutoEventWireup="true"
    CodeBehind="GetFree.aspx.cs" Inherits="Aspx1.User.GetFree" Title="用户中心" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="panel ym_h_rt ym_line">
    <ul class="ym_head">
        <li class="title">兑换源码</li>
    </ul>
    <div style="display:block">
        <asp:Panel ID="pnlList" runat="server">
            <asp:Repeater ID="Repeater1" runat="server">
                <HeaderTemplate>
                    <table cellpadding="2px" cellspacing="2px" class="Usertableborder">
                        <tr>
                            <td style="width: 200px;" class="Usertablerow1">
                                <b>商品名称</b>
                            </td>
                            <td class="Usertablerow1">
                                <b>价格</b>
                            </td>
                            <td class="Usertablerow1">
                                <b>所需积分</b>
                            </td>
                            <td class="Usertablerow1">
                                <b>发布者</b>
                            </td>
                            <td class="Usertablerow1">
                                <b>更新时间</b>
                            </td>
                            <td class="Usertablerow1">
                                <b>兑换</b>
                            </td>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td>
                            <a href="<%#Aspx1.BLL.Product.GetPath(int.Parse(Eval("ProductID").ToString()))%>"
                                target="_blank">
                                <%#Eval("title")%></a>
                        </td>
                        <td>
                            <%#Eval("Price")%>元
                        </td>
                        <td>
                            <%#int.Parse(Eval("Price").ToString())*10%>金币
                        </td>
                        <td>
                            <%#Eval("UserName")%>
                        </td>
                        <td>
                            <%#Eval("UpdateTime")%>
                        </td>
                        <td>
                            <a href="/user/GetFree.aspx?<%#Eval("ProductID")%>">兑换此源码</a>
                        </td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </table>
                    <div id="tnt_pagination">
                        <%=PageStr %></div>
                </FooterTemplate>
            </asp:Repeater>
            您现在拥有<asp:Label ID="lblBalance" runat="server" Text="" Font-Bold="true"></asp:Label>个金币,
            您可以用这些金币换取您需要的源码！</asp:Panel>
        <asp:Panel ID="pnlSure" Visible="false" runat="server">
            <br />
            <table  class="Usertableborder">
                <tr>
                    <td>
                        要兑换的源码名称：
                    </td>
                    <td>
                        <asp:HyperLink ID="hlTitle" runat="server"></asp:HyperLink>
                    </td>
                </tr>
                <tr>
                    <td>
                        需要花费的金币数量：
                    </td>
                    <td>
                        <asp:Label ID="lblPrice" runat="server" Text=""></asp:Label>个金币
                    </td>
                </tr>
                <tr>
                    <td>
                        您现有的金币数量：
                    </td>
                    <td>
                        <asp:Label ID="lblBalance2" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                        <asp:Button ID="btnDown" runat="server" Text="确定兑换" OnClick="btnDown_Click" />
                    </td>
                </tr>
            </table>
            <asp:HyperLink ID="hlDownURL" runat="server" Target="_blank" Font-Size="Large" Font-Bold="true"></asp:HyperLink>
        </asp:Panel>
    </div></div>
</asp:Content>
