<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Member.aspx.cs" Inherits="AngelShop.ManageWeb.Member" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>会员管理</title>
    <link href="Css/StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form2" runat="server">
    <div>
        <table border="0" cellspacing="1" cellpadding="3" height="1" class="table" width="98%">
            <tr>
                <td width="100%" class="title" align="center">
                    会员管理
                </td>
            </tr>
      <tr>
        <td align="center" class="td" colspan="2" style="height: 25px">
          <asp:TextBox ID="txtKeywords" runat="server"></asp:TextBox>
          &nbsp;
          <asp:Button ID="Button2" runat="server" Text="  搜　索　" onclick="Button2_Click" />
        </td>
      </tr>



        </table>
        <table border="0" cellspacing="1" cellpadding="3" height="1" class="table" width="98%">
            <tr>
                <td colspan="7" class="title">
                    会员列表
                </td>
            </tr>
            <tr>
                <td colspan="7" class="td">
                    <div align="center">
                        <asp:GridView ID="myGridView" runat="server" AutoGenerateColumns="False" BorderStyle="None"
                            DataKeyNames="ID" Width="100%">
                            <HeaderStyle Font-Bold="True" Wrap="False" ForeColor="White" CssClass="title" BackColor="#799AE1"
                                Height="25px"></HeaderStyle>
                            <Columns>
                                <asp:TemplateField HeaderText="选择">
                                    <ItemStyle HorizontalAlign="Center" CssClass="td" Width="4%" />
                                    <HeaderStyle CssClass="td" />
                                    <ItemTemplate>
                                        <asp:CheckBox ID="CheckBoxID" runat="server" name="CheckBoxID" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="会员账号">
                                    <ItemStyle HorizontalAlign="Center" CssClass="td" Width="10%" />
                                    <HeaderStyle CssClass="td" />
                                    <ItemTemplate>
                                        <asp:Label ID="lbIDS" runat="server" Text='<%#Eval("EmailAccount")%>'></asp:Label>

     <a href="UserOrder.aspx?UserName=<%#Eval("EmailAccount")%>" target="main" style="color:Red">订单</a>


                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="会员名字">
                                    <ItemStyle CssClass="td" Width="10%"/>
                                    <HeaderStyle CssClass="td" />
                                    <ItemTemplate>
                                        <%#Eval("FirstName")%>
                                        <%#Eval("LastName")%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="国家">
                                    <ItemStyle HorizontalAlign="Center" CssClass="td" Width="10%" />
                                    <HeaderStyle CssClass="td" />
                                    <ItemTemplate>
                                        <%#Eval("Country")%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="会员等级">
                                    <ItemStyle HorizontalAlign="Center" CssClass="td" Width="10%" />
                                    <HeaderStyle CssClass="td" />
                                    <ItemTemplate>
                                        <%#Eval("MembershipLevels")%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="操作">
                                    <ItemStyle HorizontalAlign="Center" CssClass="td" Width="15%" />
                                    <ItemTemplate>
                                        <a href="MemberList.aspx?ID=<%#Eval("ID")%>"
                                            target="main">会员详细</a>
                                        <a style="margin-left:6px;" href="MemberAmount.aspx?UserID=<%#Eval("ID")%>"
                                            target="main">获取/消费金券记录</a>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <HeaderStyle CssClass="title" />
                        </asp:GridView>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="7" class="td">
                    <div align="right">
                        <webdiyer:AspNetPager ID="myAspNetPager" runat="server" HorizontalAlign="Right" OnPageChanged="myAspNetPager_PageChanged"
                            ShowCustomInfoSection="Left" SubmitButtonText=" G O  " CustomInfoHTML="Page  <font color='red'><b>%CurrentPageIndex%</b></font> of  %PageCount%&nbsp;&nbsp;Order %StartRecordIndex%-%EndRecordIndex%"
                            PageSize="20" AlwaysShow="True">
                        </webdiyer:AspNetPager>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="7" class="td">
                    <table>
                        <tr>
                            <td style="width: 167px">
                                <input name="chkAll" type="checkbox" id="Checkbox1" onclick="SelAll();" value="checkbox"
                                    style="border: 0px; background-color: #eeeeee;">
                                选择所有&nbsp;&nbsp; 操作：
                            </td>
                            <td>
                                <asp:RadioButtonList ID="RadManageType" runat="server" RepeatDirection="Horizontal">
                                    <asp:ListItem Value="0">更改为Vip 会员</asp:ListItem>
                                    <asp:ListItem Value="1">更改为普通会员</asp:ListItem>
                                    <asp:ListItem Value="2">删除会员</asp:ListItem>
                                </asp:RadioButtonList>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td height="35" colspan="7" class="td">
                    <div align="center">
                        &nbsp;<asp:Button ID="Button1" runat="server" Text=" 执行操作 " OnClick="Button1_Click" /></div>
                </td>
            </tr>
        </table>
    </div>

    <script type="text/javascript" language="javascript">
function SelAll(){
  oEl = event.srcElement;
  for(i = 0;i < document.all.length; i++){
    // datagrid将生成层次名+id作为客户端id
    if(document.all(i).id.indexOf("CheckBoxID") != -1){
      if(oEl.checked)
        document.all(i).checked = true;
    else
      document.all(i).checked = false;
    }
  }
}
    </script>

    </form>
</body>
</html>
