<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeBehind="KS.LogCashback.aspx.cs" Inherits="Kesion.NET.WebSite.Course.Admin.Course.KS_LogCashback" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.Publics" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" Runat="Server">
 
    <asp:Panel ID="listPanel" runat="server" Width="100%">
      <div class="listedit">
        <ul>
          	<asp:LinkButton ID="delclassbutton" runat="server" OnClientClick="return(GetIDS('del'));" OnClick="delclassbutton_Click" CssClass="button">删除</asp:LinkButton>
        </ul>     
      </div>     
	<div class="content-area mt20">      
    	<div class="myTitle">
        	<div class="fr headOperation ">
                <ul>
                    <li id="p2" class="fl"><asp:LinkButton ID="addclass" runat="server" OnClientClick="window.print()" CssClass="button">打印本页</asp:LinkButton> </li>
                    <li id="p18" class="fl"><asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click" CssClass="button">导出Excel</asp:LinkButton></li>
                </ul>
            </div>
            学员返现管理
        </div>       
        <div class="l_height36 md20">
            <span>使用情况：</span>
            <a href="KS.LogCashback.aspx" <%=KSCMS.S("UseFlag")==""?" class='greenFont'":string.Empty %>><span class="ml15">所有</span></a>
            <a href="KS.LogCashback.aspx?UseFlag=0" <%=KSCMS.S("UseFlag")=="0"?" class='greenFont'":string.Empty %>><span class="ml15">未使用</span></a>
            <a href="KS.LogCashback.aspx?UseFlag=1" <%=KSCMS.S("UseFlag")=="1"?" class='greenFont'":string.Empty %>><span class="ml15">已使用</span></a>
        </div>
	    <KS:KSGV ID="ProListView" runat="server" AutoGenerateColumns="False" DataKeyNames="FieldID" GridLines="None"
                OnRowDataBound="FieldListView_RowDataBound" PagerType="CustomNumeric" Width="99%" EnableTheming="True" OnRowCommand="FieldListView_RowCommand" CssClass="CTable" EmptyDataText="没有记录!">
                <Columns>
                 <asp:TemplateField HeaderText="&lt;input type='checkbox' name='chkall' id='chkall' onClick='CheckAll(this.form);'/&gt;">
                    <itemstyle horizontalalign="Center" width="50px" />
                    <itemtemplate>
                        <input type="checkbox"  name="ids" id="ids" value="<%#Eval("id") %>" <%#Eval("flag").ToString()=="0"?"":"disabled" %>/>
                    </itemtemplate>
                  </asp:TemplateField>
                  <asp:TemplateField HeaderText="返现课程">
                    <itemstyle />
                    <itemtemplate>
                    <a href="<%# GetUrl(Utils.StrToInt(Eval("OrderType").ToString()),Utils.StrToInt(Eval("CourseID").ToString())) %>" target="_blank"><%#GetCourseName(Utils.StrToInt(Eval("CourseID").ToString ()),Utils.StrToInt(Eval("ordertype").ToString ())) %></a>
                    </itemtemplate>
                  </asp:TemplateField>
                  <asp:BoundField DataField="money" DataFormatString="{0:C2}" HeaderText="返现金额">
                    <itemstyle width="150px" horizontalalign="Center" />
                  </asp:BoundField>
                  <asp:BoundField DataField="UserName" HeaderText="使用人">
                    <itemstyle width="150px" horizontalalign="Center" />
                  </asp:BoundField>
                  <asp:TemplateField HeaderText="限制时间">
                    <itemstyle horizontalalign="Center" width="150px" />
                    <itemtemplate>
                    <%#Eval ("type").ToString()=="0"?"不限制":Convert.ToDateTime(Eval("logdate").ToString()).ToString("yyyy-MM-dd") %>
                    </itemtemplate>
                  </asp:TemplateField>
                  <asp:TemplateField HeaderText="使用情况">
                    <itemstyle horizontalalign="Center" width="150px" />
                    <itemtemplate>
                    <%#Eval ("flag").ToString()=="1"?"<font>已使用<a class=\'greenFont\' href='javascript:;' onclick=\"KesionJS.Alert('<div class=mtips>用于订单" + Eval("payOrderID") + "</div>');\" >（详情）</a></font><br/>"+Eval("userDate").ToString()==""||Eval("userDate").ToString()==string.Empty?"":Convert.ToDateTime(Eval("userDate").ToString()).ToString("yyyy-MM-dd")+"":"<font class=\'redFont\'>未使用</font>" %>
                    </itemtemplate>
                  </asp:TemplateField>
                  <asp:TemplateField HeaderText="操作">
                    <itemtemplate>
                       <asp:LinkButton runat="server" id="delete" commandargument=<%#Eval("id") %> commandname="del"  Visible='<%# Eval("flag").ToString()=="1"? false:true %>' CssClass="greenFont">删除</asp:LinkButton>
                    </itemtemplate>
                    <itemstyle horizontalalign="Center" width="180px" />
                  </asp:TemplateField>
                </Columns>
                <HeaderStyle CssClass="CTitle" />
                <EmptyDataRowStyle CssClass="emptycss" />
            </KS:KSGV>
        
          <KS:Page ID="Page1" runat="server" />

     
     </asp:Panel>
    
   </div> 

</asp:Content>