<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Course.Admin.UserVIPCardItem" Codebehind="KS.UserVIPCardItem.aspx.cs" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.BLL" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" Runat="Server">
  
    <asp:Panel ID="listPanel" runat="server" Width="100%">
      <div class="listedit">
        <ul>
            <asp:LinkButton ID="LinkButton2" runat="server"  OnClientClick="return(GetIDS('del'));" OnClick="LinkButton2_Click" CssClass="button">批量删除会员卡</asp:LinkButton>
            <asp:LinkButton ID="addclass" runat="server" OnClientClick="window.print()" CssClass="button">打 印 </asp:LinkButton>
            <a href="KS.UserVIPCardPub.aspx?VIPCardID=<%=VipCardID %>" class="button">生成会员卡</a>
            <a href="?VIPCardID=<%=VipCardID %>&action=excel" class="button mr20">导出Excel</a>
        </ul>     
      </div>     
	<div class="content-area mt20">     
	     <div class="myTitle"><a href="KS.UserVIPCard.aspx" class="fr button">返回</a>查看[<asp:Label ID="LabUserName" runat="server" Text="Label"></asp:Label>]下的会员卡列表   </div> 
         <div class="quickSearch clearfix">
            <div class="SearchBox fl">
                <asp:DropDownList ID="Condition" runat="server" style="margin-right:8px;">
                    <asp:ListItem Value="1">用户名</asp:ListItem>
                </asp:DropDownList>
                <asp:TextBox onfocus="keyWordFocus();" onblur="keyWordBlur();" Style="color: #ccc" Text="" CssClass="textbox" ID="KeyWord" runat="server" Width="180px"></asp:TextBox>
    
                <asp:Button ID="Button4" runat="server" CssClass="button" OnClick="Button1_Click" Text="开始搜索" />
            </div>
            <div class="property">
                <div class="name button ml15">筛选</div>
                <div class="propertyBox">
                	<ul class="tabs"> 
                        <span class="screen fl">使用状态：</span>
                        <li <%=KSCMS.S("UseFlag")==""?" class='active'":string.Empty %>><a href="KS.UserVIPCardItem.Aspx?vipCardId=<%=VipCardID %>"><span>会员卡列表</span></a></li>
                        <li <%=KSCMS.S("UseFlag")=="0"?" class='active'":string.Empty %>><a href="KS.UserVIPCardItem.Aspx?vipCardId=<%=VipCardID %>&UseFlag=0"><span>未使用</span></a></li>
                        <li <%=KSCMS.S("UseFlag")=="1"?" class='active'":string.Empty %>><a href="KS.UserVIPCardItem.Aspx?vipCardId=<%=VipCardID %>&UseFlag=1"><span>已使用</span></a></li>
                
                    </ul>
                </div>
            </div>
		</div>
    <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("userid") %>" />
                </itemtemplate>
              </asp:TemplateField>
              <asp:TemplateField HeaderText="用户名">
                <itemtemplate>
                   <%#Eval("UserName") %>
                </itemtemplate>
              </asp:TemplateField>

             <asp:BoundField DataField="cardpassword" HeaderText="初始密码">
                <itemstyle  horizontalalign="Center" />
                </asp:BoundField>
              <asp:TemplateField HeaderText="使用情况">
                <itemstyle horizontalalign="Center" width="250px" />
                <itemtemplate>
                <%# Eval("LoginTimes").ToString()=="0"?"未使用":"<span style='color:green'>已使用</span>" %>
                </itemtemplate>
              </asp:TemplateField>
               <asp:TemplateField HeaderText="最后登录时间">
                <itemstyle horizontalalign="Center" width="250px" />
                <itemtemplate>
                <%# Eval("LoginTimes").ToString()=="0"?"未使用":Eval("lastlogintime") %>
                </itemtemplate>
              </asp:TemplateField>
                <asp:TemplateField HeaderText="绑定分销商">
                <itemstyle horizontalalign="Center" width="250px" />
                <itemtemplate>
                <%# Eval("LoginTimes").ToString()=="0"?"未使用":UserManage.GetUserInfo(Utils.StrToInt(Eval("puserid"))).UserName %>
                </itemtemplate>
              </asp:TemplateField>
                <asp:TemplateField HeaderText="管理操作">
                <itemtemplate>
                     <asp:LinkButton runat="server" id="delete" commandargument=<%#Eval("userid") %> commandname="del">删除</asp:LinkButton>
               </itemtemplate>
                <itemstyle horizontalalign="Center" width="100px" />
                </asp:TemplateField>
            </Columns>
            <HeaderStyle CssClass="CTitle" />
            <EmptyDataRowStyle CssClass="emptycss" />
        </KS:KSGV>
        </div>
        
          <KS:Page ID="Page1" runat="server" />
        
        
          <br />
        <script type="text/javascript">
            showtips('<span class="state"><strong>说明：</strong><br /></span>您可以在这里批量删除会员卡或是打印会员卡等管理操作!');
		</script>
     </asp:Panel>
    
	</div>    

</asp:Content>