<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Admin.Exam.KS_BuySjClassItem" Codebehind="KS.BuySjClassItem.aspx.cs" %>

<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.BLL" %>

<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" runat="Server">
    <asp:Panel ID="ListPanel" runat="server" Width="100%">
        <script src="../../<%=MyCache.GetSJCacheConfig(1) %>/exam.js"></script>
        <script> function SetDate() {
                var today = new Date();
                if ($("#showdate").is(":hidden")) {
                    $("#showdate").show();
                    $('#<%=TxtBeginDate.ClientID%>').val(today.getFullYear() + '-' + (today.getMonth() + 1) + '-01');
                    $('#<%=TxtEndDate.ClientID%>').val(today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate());
                }
                else {
                    $("#showdate").hide();
                    $('#<%=TxtBeginDate.ClientID%>').val('');
                    $('#<%=TxtEndDate.ClientID%>').val('');
                }
            }
        </script>
        <style>
            .categorynav {line-height: 25px;width: 97%;margin: 0 auto;margin-bottom: 10px;border: 1px solid #DEEFFA;background-color: #F7FBFE;padding: 5px 0px 5px 10px;height: 100%;overflow: hidden;}
            ul, li {padding: 0px;margin: 0px}
            .categorynav li {width: 160px;float: left;}
        </style>
        <div class="content-area mt20">
            <div class="myTitle">
                购买考试分类明细管理
            </div>
            <div class="quickSearch clearfix">
                 <div class="longquickSearch">
                     <div class="quickSelect">
                        <asp:DropDownList ID="DrpClassID1" runat="server" onchange="location.href='?classid='+this.value;" Width="120">
                            <asp:ListItem Value="0">--按分类查看--</asp:ListItem>
                        </asp:DropDownList>
                     </div>
                     <div class="SearchBox fl">
                         <asp:DropDownList ID="DrpTJ" runat="server" style="margin-right:8px;">
                             <asp:ListItem Value="1">用户名</asp:ListItem>
                             <asp:ListItem Value="2">分类名称</asp:ListItem>
                         </asp:DropDownList>
                         <asp:TextBox ID="TxtKeyWord" runat="server" CssClass="textbox"  Width="180px"/>
                         <span onclick="SetDate()" class="link-color" style="cursor: pointer">购买日期？</span>
                         <span id="showdate" <%if (this.TxtBeginDate.Text == ""){ %>style="display: none" <%} %>>
                         <asp:TextBox ID="TxtBeginDate" placeholder="格式：YYYY-MM-DD" Width="160px" runat="server" onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});" CssClass="textbox Wdate"></asp:TextBox>至
                         <asp:TextBox ID="TxtEndDate" placeholder="格式：YYYY-MM-DD" Width="160px" runat="server" onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});" CssClass="textbox Wdate"></asp:TextBox>
                         </span>
                         <asp:Button ID="BtnSearch" runat="server" CssClass="button" Text="搜索" OnClick="BtnSearch_Click" />
                     </div>
                     <div class="property">
                        <div class="name button ml15">筛选</div>
                        <div class="propertyBox">
                            <ul class="clearfix">
                                <span class="screen fl">查看记录：</span>
                                <li <%=KSCMS.S("showType")==""?" class='active'":string.Empty %>><a href="KS.BuySjClassItem.Aspx"><span>所有记录</span></a></li>
                                <li <%=KSCMS.S("showType")=="1"?" class='active'":string.Empty %>><a href="KS.BuySjClassItem.Aspx?showType=1">即将到期(最近<font color="red">30</font>天）</a></li>
                                <li <%=KSCMS.S("showType")=="2"?" class='active'":string.Empty %>><a href="KS.BuySjClassItem.Aspx?showType=2">已过期</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
                 <div style="display: <%# bool.Parse((Repeater1.Items.Count>0).ToString())?"":"none"%>" class="fr allPrice l_height36 longliwrap">
					
                        <span class="f14 grayFont">所有合计：</span>
                        <span class="f16 redFont">¥<%=TotalPrice()%></span>   
                </div>
            </div>
            <table width="99%" border="0" cellpadding="1" cellspacing="1" class="CTable mytable">
                <tr class="CTitle topbar">
                    <td height="25" width="48" align="center"><b>序号</b></td>
                    <td width="50" style="text-align: left">&nbsp;&nbsp;<b>分类名称</b></td>
                    <td width="30" align="center"><b>用户名</b></td>
                    <td width="50" align="center"><b>购买时间</b></td>
                    <td width="30" align="center"><b>价格(元）</b></td>
                     <td width="30" align="center"><b>有效期</b></td>
                </tr>
                <asp:Repeater ID="Repeater1" runat="server">
                    <HeaderTemplate>
                    </HeaderTemplate>
                    <ItemTemplate>

                        <tr class="CtrMouseOut" onmouseover="this.className='CtrMouseOver'" onmouseout="this.className='CtrMouseOut'" onclick="chk(this)">
                            <td class="Ctd" width="50" nowrap="nowrap" align="center">
                                <%# Container.ItemIndex + 1 + (CurrPage - 1) * PageSize%>、
                            </td>
                            <td class="Ctd" style="word-break: break-all">
                                <%#Eval("classname").ToString() %>
                            </td>

                            <td class="splittd Ctd" align="center">
                                <%#Eval("username").ToString() %>
                            </td>
                            <td class="splittd Ctd" align="center">
                                <%#Eval("AddDate").ToString() %>
                            </td>
                            <td class="splittd Ctd" align="center">

                                <%#Kesion.APPCode.Public.ReturnShopPrice(Eval("Price").ToString()) %>
			
                            </td>
                            <td class="splittd Ctd" align="center">
                                <%# Utils.StrToInt(Eval("ExpiryMonth").ToString())>0?Eval("ExpiryDate").ToString():"<font color='red'>不限制</font>" %>
                            </td>
                        </tr>


                    </ItemTemplate>
                    <FooterTemplate>
                        <asp:Label ID="lblEmptyZP" Text="<tr class='tdbg'><td height='50' style='text-align:center' colspan=6>没有考试分类的购买明细！！！</td></tr>" CssClass="text_hei_12" runat="server" Visible='<%#bool.Parse((Repeater1.Items.Count==0).ToString())%>'>
                        </asp:Label>

                    </FooterTemplate>
                </asp:Repeater>
            </table>
            <KS:Page ID="Page1" runat="server" />
        
            <asp:Panel ID="Panel1" runat="server" Height="30px" Width="100%">
                <script type="text/javascript">
                    showtips('<span class="state"><strong>操作说明：</strong><br /></span>这个明细是用户在会员中心那边购买考试分类的明细，用户用<font color="red">余额支付</font>您的考试分类的价钱。');
                </script>
            </asp:Panel>
   </div>

</asp:Panel>
</asp:Content>

