 <%@ page language="C#" validaterequest="false" masterpagefile="../ShopMasterPage/MyShop.master" enableeventvalidation="false" autoeventwireup="true" inherits="Shop_Manage_Shop_MyVIPUser, HoWaveVGO" title="会员管理" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"/>
<div class="pageTitle">VIP卡会员管理</div>
<br />
   <table  class="SearchTableStyle" style="width:98%">
      <tr>
         <td>买家店铺：</td>
         <td><asp:TextBox ID="TxtShopName" runat="server" /></td>
         <td>买家昵称：</td>
         <td><asp:TextBox ID="TxtNickName" runat="server" /></td>
         <td><asp:Button ID="QuickSearchButton" Text="查询" runat="server" /></td>        
      </tr>
   </table>
   <br />
   <div class="SearchTableStyle" style="height:24px;"><span>你现在查看的是：</span>
     <span><asp:DropDownList ID="DropShopLevel" runat="server" AutoPostBack="True" Width="92px">
                    <asp:ListItem Selected="True">所有</asp:ListItem>
                    <asp:ListItem>高级会员</asp:ListItem>
                    <asp:ListItem>VIP会员</asp:ListItem>
                    <asp:ListItem>普通会员</asp:ListItem>
                </asp:DropDownList></span>
   </div>
   <br /><br />
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" >
            <ContentTemplate>
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                    DataKeyNames="VIPID" DataSourceID="ObjectDataSource1"  CssClass="tableHead">
                    <Columns>
                        <asp:TemplateField HeaderText="选择">
                            <ItemTemplate>
                                <asp:CheckBox ID="CheckBox1" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="VIPID" HeaderText="编号" />
                        <asp:BoundField DataField="VIPLevel" HeaderText="级别" />
                        <asp:HyperLinkField DataNavigateUrlFields="ShopID" DataNavigateUrlFormatString="../../Shop/Shop1/MyShop.aspx?ShopID={0}"
                          target="_blank"   DataTextField="shopname" HeaderText="店铺" />
                        <asp:TemplateField HeaderText="买家">
                            <ItemTemplate>
                                <asp:HyperLink  target="_blank" ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("UserID", "../../Shop/Shop1/Shop_ShopIntro.aspx?UserID={0}") %>'
                                    Text='<%# Eval("UserName") %>'></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="PresentPoint" HeaderText="点数" />
                        <asp:BoundField DataField="TransCount" HeaderText="交易次数" />
                        <asp:BoundField DataField="TransMoney" HeaderText="交易额" />
                        <asp:BoundField DataField="PresentExp" HeaderText="积分" />
                        <asp:CommandField HeaderText="删除" ShowDeleteButton="True" />
                    </Columns>
                    <EmptyDataTemplate>
                        <div align="center" style="font: 13px red;">
                            没有会员卡！</div>
                    </EmptyDataTemplate>
                   
                </asp:GridView>
            </ContentTemplate>
            <Triggers>
            <asp:AsyncPostBackTrigger ControlID="Button5" EventName="Click" />　
                <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />　
                <asp:AsyncPostBackTrigger ControlID="Button4" EventName="Click" />
                <asp:AsyncPostBackTrigger ControlID="Button2" EventName="Click" />
                <asp:AsyncPostBackTrigger ControlID="Button3" EventName="Click" />
                <asp:AsyncPostBackTrigger ControlID="DropShopLevel"  />
                <asp:AsyncPostBackTrigger ControlID="TxtNickName"  />
                <asp:AsyncPostBackTrigger ControlID="TxtShopName"  />
            </Triggers>
            
        </asp:UpdatePanel>
    <br />
  
    <div class="SearchTableStyle">
    <span>  
            <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="全选" CausesValidation="False" />
            <asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="反选" CausesValidation="False" />
            <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="删除" CausesValidation="False" />
            &nbsp;<asp:DropDownList ID="DropDownList1" runat="server" Width="78px">
                    <asp:ListItem>高级会员</asp:ListItem>
                    <asp:ListItem>VIP会员</asp:ListItem>
                    <asp:ListItem>普通会员</asp:ListItem>
                </asp:DropDownList>
                <asp:Button ID="Button4" runat="server" OnClick="Button4_Click" Text="升级" CausesValidation="False" />
                <asp:Button ID="Button5" runat="server" OnClick="Button5_Click" Text="给买家发现金券"  />
                <asp:TextBox ID="TxtMoney" runat="server" Width="40px">0.01</asp:TextBox>元   
              <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtMoney"
                        ErrorMessage="不能空"/>
                        <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="TxtMoney"
                        ErrorMessage="数字类型" MaximumValue="999999999" MinimumValue="0.0001" Type="Double"/>      
                 
    </span>            
    </div>
    <br />
    <div class="tips_onclick"  style="width:94%; height:40px">
        您只要成功购买过卖家的商品，就有可能获得该卖家的会员卡，会员卡可以打折的哦！ 卖家可以通过设定会员卡标准将您设定为高级会员或VIP会员。
    </div>
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="DeleteVIPS"
            OldValuesParameterFormatString="{0}" SelectMethod="GetVIPBySalerIDShopNameUserNameNickNameLevel"
            TypeName="Shop_VIP" UpdateMethod="GetVIPBySalerIDShopNameUserNameNickNameLevel">
            <DeleteParameters>
                <asp:Parameter Name="VIPID" Type="String" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="SalerID" Type="Int32" />
                <asp:Parameter Name="ShaopName" Type="String" />
                <asp:Parameter Name="NickName" Type="String" />
                <asp:Parameter Name="Level" Type="String" />
            </UpdateParameters>
            <SelectParameters>
                <asp:SessionParameter Name="SalerID" SessionField="Howave_UserID" Type="Int32" />
                <asp:ControlParameter ControlID="TxtShopName" DefaultValue="" Name="ShaopName" PropertyName="Text"
                    Type="String" />
                <asp:ControlParameter ControlID="TxtNickName" DefaultValue="" Name="NickName" PropertyName="Text"
                    Type="String" />
                <asp:ControlParameter ControlID="DropShopLevel" DefaultValue="所有" Name="Level" PropertyName="SelectedValue"
                    Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>   
</asp:Content>

