<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_ShopVIPCard, HoWaveVGO" title=" VIP 卡 管 理 列 表" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<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="templates"  align="left">
           VIP 卡 管 理</th> 
       <td align="right">
       <div style="width:400px">
                店铺名称
                <asp:TextBox ID="ShopName" runat="server" AutoPostBack="True" Width="100"/>
                卖家
                <asp:TextBox ID="UserName" runat="server" AutoPostBack="True" Width="100"/>
       </div>
       </td>
   </tr>                        
</table> 

   <div>
    <asp:GridView　CssClass="adminlist"  ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="card_id"
        DataSourceID="ObjectDataSource1" OnRowDataBound="GridView1_RowDataBound" OnDataBound="GridView1_DataBound">
        <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:TemplateField HeaderText="卖家">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("username") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("username") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="店铺">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("ShopOwnerName") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("ShopOwnerName") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:CheckBoxField DataField="Status" HeaderText="状态" ReadOnly="True" Text="开启" />
            <asp:CheckBoxField DataField="Isupgrade" HeaderText="等级只升不降" ReadOnly="True" Text="是" />
            <asp:BoundField DataField="PresentPoint1" HeaderText="VIP点数" />
            <asp:BoundField DataField="PresentPoint2" HeaderText="点数" />
            <asp:BoundField DataField="TransCount1" HeaderText="VIP交易量" />
            <asp:BoundField DataField="TransMoney1" HeaderText="交易量" />
            <asp:BoundField DataField="PresentExp1" HeaderText="VIP积分" />
            <asp:BoundField DataField="PresentExp2" HeaderText="积分" />
            <asp:BoundField DataField="TransMoney1" HeaderText="VIP交易额" />
            <asp:BoundField DataField="TransMoney1" 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 scope="col">卖家</th><th scope="col">店铺</th><th scope="col">状态</th><th scope="col">等级只升不降</th><th scope="col">VIP点数</th><th scope="col">点数</th><th scope="col">VIP交易量</th><th scope="col">高级会员交易量</th><th scope="col">VIP积分</th><th scope="col">积分</th><th scope="col">VIP交易额</th><th scope="col">交易额</th><th scope="col">操作</th>
               </tr>
               <tr>
                  <td colspan="14">暂无记录</td>
               </tr>
        </EmptyDataTemplate>
    </asp:GridView>
    </div>
    <div class="div_btm">
    
    <asp:Button ID="Button3" OnClientClick="if(confirm('确定删除吗？'))return true;return false;"  runat="server" OnClick="Button3_Click" Text="删除" />
    </div>

    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="DeleteVIPCard"
        SelectMethod="GetVIPCardByUserNameShopName" TypeName="Shop_VIPCard" OldValuesParameterFormatString="{0}">
        <DeleteParameters>
            <asp:Parameter Name="card_id" Type="String" />
        </DeleteParameters>
        <SelectParameters>
            <asp:ControlParameter ControlID="UserName" Name="UserName" PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="ShopName" Name="ShopName" PropertyName="Text" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>

