<%@ page language="C#" autoeventwireup="true" inherits="Admin_AdvancedMember_List, GroupTGWeb_deploy" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ShopNum1" %>
<%@ Register Assembly="ShopNum1.Control" Namespace="ShopNum1.Control" TagPrefix="cc1" %>
<%@ Register Src="UserControl/MessageShow.ascx" TagName="MessageShow" TagPrefix="ShopNum1" %>
<!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 type="text/css" rel="Stylesheet" href="css/index.css" />
    <link href="../css/Num1GridView.css" rel="stylesheet" type="text/css">

    <script type="text/javascript" language="javascript" src="../js/CommonJS.js"></script>

</head>
<body style="padding: 0; background-image: url(images/Bg_right.gif); background-repeat: repeat;">
    <form id="form1" runat="server">
    <ShopNum1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnableScriptGlobalization="True"
        EnableScriptLocalization="True" />
    <div class="navigator">
        【 VIP会员列表 】</div>
    <div class="query">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td align="right">
                    <asp:Label ID="LabelSMemLoginID" runat="server" Text="会员名："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBoxMemLoginID" runat="server" CssClass="input1"></asp:TextBox>
                </td>
                <td align="right">
                    <asp:Label ID="LabelIsUsed" runat="server" Text="订单付款状态："></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="DropdownListIsUsed" runat="server" AutoPostBack="True" CssClass="select1">
                        <asp:ListItem Value="-1" Selected="True">-全部-</asp:ListItem>
                        <asp:ListItem Value="0 ">未付款</asp:ListItem>
                        <asp:ListItem Value="1">付款中</asp:ListItem>
                        <asp:ListItem Value="2">已付款</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td rowspan="3">
                    <asp:Button ID="ButtonSearch" runat="server" OnClick="ButtonSearch_Click" Text="查询"
                        CssClass="bt2" />
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="LabelRealName" runat="server" Text="会员姓名："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBoxRealName" runat="server" CssClass="input1"></asp:TextBox>
                </td>
                <td align="right">
                    <asp:Label ID="LabelSSex" runat="server" Text="性别："></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="DropDownListSex" runat="server" AutoPostBack="True" CssClass="select1">
                        <asp:ListItem Selected="True" Value="-1">-全部-</asp:ListItem>
                        <asp:ListItem Value="1">男</asp:ListItem>
                        <asp:ListItem Value="0">女</asp:ListItem>
                        <asp:ListItem Value="2">保密</asp:ListItem>
                       
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="LabelSEmail" runat="server" Text="电子邮件："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBoxEmail" runat="server" CssClass="input1"></asp:TextBox>
                </td>
                <td align="right">
                    <asp:Label ID="LabelExpirationDate1" runat="server" Text="到期时间："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBoxExpirationDate1" runat="server" CssClass="input1"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorStartDate" runat="server"
                        ControlToValidate="TextBoxExpirationDate1" Display="Dynamic" ErrorMessage="时间格式不正确"
                        ValidationExpression="^\d{4}-(\d{2}|\d{1})-(\d{2}|\d{1})( (\d{2}|\d{1}):(\d{2}|\d{1}):(\d{2}|\d{1}))*"></asp:RegularExpressionValidator>
                    <img id="imgRegDate1" alt="" src="images/Calendar.png" style="width: 16px; height: 18px;"
                        align="absmiddle" />
                    <ShopNum1:CalendarExtender ID="CalendarExtender3" runat="server" TargetControlID="TextBoxExpirationDate1"
                        PopupButtonID="imgRegDate1" CssClass="ajax__calendar">
                    </ShopNum1:CalendarExtender>
                    &nbsp; -<asp:TextBox ID="TextBoxExpirationDate2" runat="server" CssClass="input1"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorEndDate" runat="server"
                        ControlToValidate="TextBoxExpirationDate2" Display="Dynamic" ErrorMessage="时间格式不正确"
                        ValidationExpression="^\d{4}-(\d{2}|\d{1})-(\d{2}|\d{1})( (\d{2}|\d{1}):(\d{2}|\d{1}):(\d{2}|\d{1}))*"></asp:RegularExpressionValidator>
                    <img id="imgRegDate2" alt="" src="images/Calendar.png" style="width: 16px; height: 18px;"
                        align="absmiddle" />
                    <ShopNum1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TextBoxExpirationDate2"
                        PopupButtonID="imgRegDate2" CssClass="ajax__calendar">
                    </ShopNum1:CalendarExtender>
                </td>
            </tr>
        </table>
    </div>
    <table style="width: 100%">
        <tr>
            <td align="left">
                <cc1:Num1GridView ID="Num1GridViewShow" runat="server" AutoGenerateColumns="False"
                    AllowPaging="True" AllowSorting="True" AscendingImageUrl="~/images/SortAsc.gif"
                    DescendingImageUrl="~/images/SortDesc.gif" Width="100%" AddSequenceColumn="False"
                    AllowMultiColumnSorting="False" BorderColor="#CCDDEF" BorderStyle="Solid" BorderWidth="1px"
                    CellPadding="4" Del="False" DeletePromptText="确实要删除指定的记录吗？" Edit="False" FixHeader="False"
                    GridViewSortDirection="Ascending" PagingStyle="None" Style="margin-left: 2px;"
                    TableName="" Font-Size="Small" DataSourceID="ObjectDataSourceData" OnRowDataBound="Num1GridViewShow_RowDataBound">
                    <HeaderStyle HorizontalAlign="Center" BackColor="#6699CC" Font-Bold="True" ForeColor="#FFFFFF">
                    </HeaderStyle>
                    <PagerStyle HorizontalAlign="Left" BackColor="#EEEEEE" ForeColor="#6699CC"></PagerStyle>
                    <Columns>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <input id="checkboxAll" onclick="javascript:SelectAllCheckboxes(this);" type="checkbox" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%--<input ID="checkboxItem"   onclick="GetItmeValue(this)" type="checkbox" />--%>
                                <input id="checkboxItem" value='<%# Eval("Guid") %>' type="checkbox" />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" Width="30px" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="Guid" HeaderText="Guid" Visible="False" />
                        <asp:BoundField DataField="MemLoginID" HeaderText="会员ID" SortExpression="MemLoginID">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="VIP卡号" SortExpression="MemberCard">
                            <ItemTemplate>
                                <asp:Label ID="LabelMemberCard" runat="server" Text='<%# Eval("MemberCard") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="OrderNumber" HeaderText="订单号" SortExpression="OrderNumber">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="会员等级" SortExpression="Name">
                            <ItemTemplate>
                                <asp:Label ID="LabelRankName" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="RealName" HeaderText="会员姓名" SortExpression="RealName">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="性别" SortExpression="Sex">
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# ChangeAge(DataBinder.Eval(Container, "DataItem(Sex)","{0}")) %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="电子邮件" DataField="Email" SortExpression="Email">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="手机号码" DataField="Mobile" SortExpression="Mobile">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="购买时间" DataField="BuyTime" SortExpression="BuyTime">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="到期时间" SortExpression="ExpirationDate">
                            <ItemTemplate>
                                <asp:Label ID="LabelExpirationDate" runat="server" Text='<%# Eval("ExpirationDate") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="发卡状态" SortExpression="Name">
                            <ItemTemplate>
                                <asp:LinkButton ID="LinkButtonCard" runat="server" Text='<%# Eval("Name") %>' CommandArgument='<%# Eval("Guid") %>'
                                    CausesValidation="false" OnClick="LinkButtonCard_Click1"></asp:LinkButton>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="付款状态" SortExpression="PaymentStatus">
                            <ItemTemplate>
                                <asp:Label ID="LabelUsed" runat="server" Text='<%# ChangeIsUsed(DataBinder.Eval(Container, "DataItem(PaymentStatus)","{0}")) %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                    </Columns>
                </cc1:Num1GridView>
            </td>
        </tr>
        <tr>
            <td align="left">
                <div class="vote">
                    <asp:Button ID="ButtonUplevel" runat="server" OnClientClick="return EditButton()"
                        Text="VIP发卡" CausesValidation="False" CssClass="bt3" OnClick="ButtonUplevel_Click" />                   
                    <br />
                    <ShopNum1:MessageShow ID="MessageShow" runat="server" Visible="False" />
                </div>
            </td>
        </tr>
    </table>
    <%--<input ID="checkboxItem"   onclick="GetItmeValue(this)" type="checkbox" />--%><br />
    <asp:ObjectDataSource ID="ObjectDataSourceData" runat="server" SelectMethod="SearchAdvancedMember"
        TypeName="GroupFlyTG.BusinessLogic.GroupFlyTG_Member_Action" OldValuesParameterFormatString="original_{0}">
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBoxMemLoginID" Name="memLoginID" PropertyName="Text"
                Type="String" />
            <asp:ControlParameter ControlID="TextBoxRealName" Name="realName" PropertyName="Text"
                Type="String" />
            <asp:ControlParameter ControlID="TextBoxEmail" Name="email" PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxExpirationDate1" Name="ExpirationDate1" PropertyName="Text"
                Type="String" DefaultValue="-1" />
            <asp:ControlParameter ControlID="TextBoxExpirationDate2" Name="ExpirationDate2" PropertyName="Text"
                Type="String" DefaultValue="-1" />
            <asp:ControlParameter ControlID="DropdownListIsUsed" DefaultValue="-1" Name="isUsed"
                PropertyName="SelectedValue" Type="String" />
            <asp:ControlParameter ControlID="DropDownListSex" DefaultValue="-1" Name="sex" PropertyName="SelectedValue"
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:HiddenField ID="CheckGuid" runat="server" Value="0" />
    <asp:HiddenField ID="HiddenFieldIsMember" Value="0" runat="server" />
    <asp:HiddenField ID="HiddenFieldGuid" Value="0" runat="server" />
    <asp:Panel ID="PanelCardDiv" runat="server" Visible="false">
        <div style="border-style: solid; border-color: inherit; border-width: 1px; position: absolute;
            background-color: #ccc; cursor: hand; left: 30%; top: 50%; margin: -50px 0 0 -50px;">
            <br />
            <table>
                <tr>
                    <td align="right">
                        会员ID：
                    </td>
                    <td>
                        <asp:Label ID="LabelMemLoginid" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        会员VIP卡号：
                    </td>
                    <td>
                        <asp:TextBox ID="TextBoxVIPCard" runat="server" MaxLength="25"></asp:TextBox>
                        <asp:Label ID="Label2" runat="server" Text="*" ForeColor="red"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <br />
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBoxVIPCard"
                            Display="Dynamic" ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidatorTextBoxMemLoginIDValue"
                            runat="server" ControlToValidate="TextBoxVIPCard" ErrorMessage="只能输入数字" ValidationExpression="^[0-9_@]+"
                            Display="Dynamic"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="text-align: center;">
                        <asp:Button ID="ButtonOk" runat="server" Text="确定" CssClass="bt2" OnClick="ButtonOk_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Button ID="ButtonCel" runat="server" Text="取消" CssClass="bt2" OnClick="ButtonCel_Click"
                            CausesValidation="false" />
                        <asp:HiddenField ID="HiddenFieldVipCard" runat="server" Value ="0" Visible="false" />
                    </td>
                </tr>
            </table>
            <br />
        </div>
    </asp:Panel>
    </form>

    <script type="text/javascript" language="javascript" src="../js/CommonJS.js"></script>

</body>
</html>
