<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_ShopViewVIPCard, HoWaveVGO" title="查看会员卡" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"/>
<script type="text/javascript" src="js/function.js"></script>
<script type="text/javascript">
function select_no(){
  var spanChk = document.getElementById("ctl00_ContentPlaceHolder1_GridView1_ctl01_chkAll");
　var oItem = spanChk.children;
　var theBox=(spanChk.type=="checkbox")?spanChk:spanChk.children.item[0];
　xState=theBox.checked;
　elm=theBox.form.elements;
　for(i=0;i<elm.length;i++)
　if(elm[i].type=="checkbox" && elm[i].id!=theBox.id)
　{
　　elm[i].checked = !elm[i].checked;
　}
}
</script>
<table class="adminheading">
       <tr>
          <th valign="middle" class="cpane" >商家的会员信息列表</th>
          <td align="right">
          &nbsp; </td>
            <td class="rtdw"></td>
        </tr>
 </table>

 <table class="nick"><tr><td colspan="4" class="tit">快速查找</td></tr>
    <tr><td class="ltd"></td><td class="rtd" style="width:35%"></td>
        <tr><td class="ltd">店铺:</td><td class="rtd" style="width:35%"><asp:TextBox ID="TxtShopName" runat="server" AutoPostBack="True" Width="88px"></asp:TextBox>
            </td>
        <td class="ltd">卖家昵称:</td><td class="rtd" style="width:35%"><asp:TextBox ID="TxtNickName" runat="server" AutoPostBack="True" CausesValidation="True" Width="84px"/></td></tr>
    <tr><td class="ltd">会员等级:</td><td class="rtd" style="width:35%"><asp:DropDownList ID="DropShopLevel" runat="server" Height="22px" Width="92px" AutoPostBack="True" CausesValidation="True">
            <asp:ListItem Selected="True">所有</asp:ListItem>
           <asp:ListItem>高级会员</asp:ListItem>
           <asp:ListItem>VIP会员</asp:ListItem>
            </asp:DropDownList></td>
        <td class="ltd">&nbsp;</td><td class="rtd" style="width:35%">&nbsp;</td>
</tr>
        </table><br />
     <asp:UpdatePanel ID="UpdatePanel1" runat="server" >
         <ContentTemplate>
          <asp:GridView ID="GridView1" OnRowDataBound="GridView1_RowDataBound" class="adminlist" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1" AllowPaging="True" DataKeyNames="VIPID">
                <Columns>
                    <asp:TemplateField HeaderText="选择">
                        <ItemTemplate>
                            <asp:CheckBox ID="CheckBox1" runat="server" />
                        </ItemTemplate>
                        <HeaderTemplate>
                           <input id="chkAll" onclick="SelectAllCheckboxes(this);" runat="server" type="checkbox" />                                     
                        </HeaderTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="VIPID" HeaderText="编号" />
                    <asp:BoundField DataField="VIPLevel" HeaderText="级别" />
                    <asp:HyperLinkField DataNavigateUrlFields="ShopID" DataTextField="shopname" HeaderText="店铺" DataNavigateUrlFormatString="Admin_UpdateShop.aspx?ShopID={0}" />　
              <asp:BoundField DataField="PresentPoint" HeaderText="点数" />
                                <asp:BoundField DataField="TransCount" HeaderText="交易次数" />
                                <asp:BoundField DataField="TransMoney" HeaderText="交易额" />
                                <asp:BoundField DataField="PresentExp" HeaderText="积分" />
                                <asp:TemplateField HeaderText="删除">
                                   <ItemTemplate>
                                      <asp:LinkButton ID="cl" runat="server" OnClientClick="if(confirm('确定删除吗？'))return true;return false;" CommandName="Delete" Text="删除"/>
                                   </ItemTemplate>
                                </asp:TemplateField>
                </Columns>
                <EmptyDataTemplate>
                          <tr>
                            <th>选择</th>
                            <th>编号</th>
                            <th>级别</th>
                            <th>店铺</th>
                            <th>点数</th>
                            <th>交易次数</th>
                            <th>交易额</th>
                            <th>积分</th>
                            <th>交删除</th>
                        </tr>
                        <tr><td colspan="9">暂无信息！</td></tr>
                </EmptyDataTemplate>
            </asp:GridView>
         </ContentTemplate>
          <Triggers>
         <asp:AsyncPostBackTrigger EventName="Click" ControlID="Button2" /> 
         <%--<asp:AsyncPostBackTrigger ControlID="DropShopLevel" PropertyName="SelectedValue" />
         <asp:AsyncPostBackTrigger ControlID="TxtNickName" PropertyName="Text" />
         <asp:AsyncPostBackTrigger ControlID="TxtShopName" PropertyName="Text" />--%></Triggers>
          
     </asp:UpdatePanel>
     <br />
     &nbsp;<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetVIPByUserIDShopNameLevel"
         TypeName="Shop_VIP" DeleteMethod="DeleteVIPS" UpdateMethod="GetVIPByUserIDShopNameLevel" OldValuesParameterFormatString="{0}">
         <SelectParameters>
             <asp:Parameter DefaultValue="-1" Name="UserID" Type="Int32" />
             <asp:ControlParameter ControlID="TxtShopName" Name="ShopName" PropertyName="Text"
                 Type="String" />
             <asp:ControlParameter ControlID="TxtNickName" Name="NickName" PropertyName="Text"
                 Type="String" />
             <asp:ControlParameter ControlID="DropShopLevel" DefaultValue="所有" Name="Level" PropertyName="SelectedValue"
                 Type="String" />
         </SelectParameters>
         <DeleteParameters>
             <asp:Parameter Name="VIPID" Type="String" />
         </DeleteParameters>
         <UpdateParameters>
             <asp:Parameter Name="UserID" Type="Int32" />
             <asp:Parameter Name="ShopName" Type="String" />
             <asp:Parameter Name="NickName" Type="String" />
             <asp:Parameter Name="Level" Type="String" />
         </UpdateParameters>
     </asp:ObjectDataSource>
  
  <div class="div_btm">
     <input ID="Button3" type="button" onClick="return select_no()" value="反选" />
     <asp:Button ID="Button2"  OnClientClick="if(confirm('确定删除吗？'))return true;return false;"  runat="server" Text="删除" OnClick="Button2_Click" />
 </div>
 
 
 
 <div class="helpStyle">
     您只要成功购买过卖家的商品，就有可能获得该卖家的会员卡，会员卡可以打折的哦！<br />
     卖家可以通过设定会员卡标准将您设定为高级会员或VIP会员。 
 </div> 
</asp:Content>

