<%@ Page Title="" Language="C#" MasterPageFile="~/Master/UserMaster.master" CodeBehind="ReservationList.aspx.cs" Inherits="WAP2P.Web.PC.User.Loan.ReservationList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server">
    <div class="m-userbox m-buserbox">
        <div class="m-prompt pl10 pr10 mt20">
            <div class="prompt-left g-left mt10">
                联系专属客服：<div class="mt10 fs14 g-fcenter"><% =CurrentUser.GetService() %></div>
            </div>
            <div class="prompt-small g-right">
                <p>登记资金将快速获取我们为您推荐最佳的投资信息组合，如果以登记过相关信息，我们的客服团队在有新借款产生时，会及时与您联系。</p>
                <p>详细情况具体请查看 <a href="/Help/" target="_blank">帮助中心</a>。</p>
            </div>
        </div>
        <div class="form-big ml150 mt25">
            <form class="js-auto js-vtip" action="?action=offlineApply" method="post" data-onsuccess="$.jSuccess('登记成功，有符合要求的投资信息时，我们客服将及时联系您。', function() { location.reload(); },'登记成功', 450);">
                <div class="input-big js-tip">
                    <label class="leftfont">预计投资金额</label>
                    <input type="text" class="text w218 input-moneyicon" name="amount" data-vtype="money" data-vmsg="请输入预计投资金额。" placeholder="请输入预计投资金额" />
                    <% =existsInfo == null ? string.Empty : string.Format(@"<span class=""prompt"">您已登记了资金：<span class=""fcred-3"">{0}元</span> ,预约期限：<span class=""fcred-3"">{1}</span></span>", existsInfo.Amount.ToMoneyString(), existsInfo.Expires.ToDateString("长期")) %>
                </div>
                <div class="input-big js-tip">
                    <label class="leftfont">有效期</label>
                    <input type="text" class="text w218 ui-date" name="expires" data-vtype="date" data-vmust="false" data-vmsg="请输入正确的日期。" />
                    <span class="prompt">如果不选择有效期，则为长期有效。</span>
                </div>
                <div class="input-big js-tip">
                    <label class="leftfont g-left">备注说明</label>
                    <textarea rows="5" class="w230 g-left ml5" name="remark" placeholder="请输入您的其他说明"></textarea>
                </div>
                <div class="g-clear"></div>
                <div class="btn-submits mt20 ml99">
                    <input type="submit" value="提 交" class="btn-bbord fs16 c-normal w252" data-success-text="登记成功" />
                    <div class="w252"><em class="m-sumtip js-vsum"></em></div>
                </div>
            </form>
        </div>
        <form action="?action=search" method="get" class="search">
        </form>
        <table class="table-normal mt20 js-ajaxlist" width="100%">
            <tr>
                <th style="width: 30%;">预约名称</th>
                <th style="width: 30%;">预约金额</th>
                <th style="width: 20%;">预约时间</th>
                <th style="width: 20%;">状态及操作</th>
            </tr>
        </table>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="list" runat="server">
    <ruson:Repater runat="server" ID="rptList" ItemType="WAP2P.BorrowLoan.ReservationLog">
        <ItemTemplate>
            <tr>
                <td class="g-fleft"><a href="/Borrow/ReservationDetail<% =PageExt %>?id=<%# Item.ReservationId %>" target="_blank"><%# (reservationList.Where(item => item.Id == Item.ReservationId).FirstOrDefault() ?? new WAP2P.BorrowLoan.Reservation()).Name %></a></td>
                <td class="fcred-3"><%# Item.Amount.ToMoneyString() %>元</td>
                <td><%# Item.CreateAt.ToDateTimeString() %></td>
                <td><%# Item.Bided ? "已投标" : "未投标" %><%# !Item.Bided && borrowList.Where(item => item.ReserveId == Item.ReservationId).FirstOrDefault() !=null && borrowList.Where(item => item.ReserveId == Item.ReservationId).FirstOrDefault().ReserveBidEndAt > DateTime.Now  ? string.Format(" <a href=\"{0}\" target=\"_blank\">[投标]</a>", WAP2P.Web.Extensions.GetBorrowUrl(borrowList.Where(item => item.ReserveId == Item.ReservationId).FirstOrDefault().Id)) : string.Empty %></td>
            </tr>
        </ItemTemplate>
        <EmptyTemplate>
            <tr>
                <td colspan="5" class="g-fleft">暂无数据。</td>
            </tr>
        </EmptyTemplate>
    </ruson:Repater>
    <tr class="pager">
        <td colspan="5">
            <div class="ui-pages g-fright">
                <ruson:Pager runat="server" ID="pages" CssClass="pages" />
                <a href="<% =Request.RawUrl.UrlEncodeParam() %>" class="g-hide"></a>
            </div>
        </td>
    </tr>
</asp:Content>
