<%@ page language="C#" autoeventwireup="true" inherits="Admin_Member_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">
        【 会员列表 】</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="TextBoxSMemLoginID" runat="server" CssClass="input1"></asp:TextBox>
                </td>
                <td align="right">
                </td>
                <td colspan="2">
                </td>
                <td align="right">
                    <asp:Label ID="LabelSIsForbid" runat="server" Text="禁用状态："></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="DropdownListSIsForbid" runat="server" AutoPostBack="True" CssClass="select1">
                        <asp:ListItem Value="-1" Selected="True">-全部-</asp:ListItem>
                        <asp:ListItem Value="1">已禁用</asp:ListItem>
                        <asp:ListItem Value="0">未禁用</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="LabelSRealName" runat="server" Text="会员姓名："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBoxSRealName" runat="server" CssClass="input1"></asp:TextBox>
                </td>
                <td align="right">
                </td>
                <td colspan="2">
                </td>
                <td align="right">
                    <asp:Label ID="LabelSSex" runat="server" Text="性别："></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="DropDownListSex" runat="server" 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="TextBoxSEmail" runat="server" CssClass="input1"></asp:TextBox>
                </td>
                <td>
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td align="right">
                    <asp:Label ID="LabelSMemberRankGuid" runat="server" Text="会员等级："></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="DropDownListSMemberRankGuid" runat="server" CssClass="select1">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="LabelSRegDate" runat="server" Text="注册日期："></asp:Label>
                </td>
                <td colspan="3">
                    <asp:TextBox ID="TextBoxSRegDate1" runat="server" CssClass="input1"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorStartDate" runat="server"
                        ControlToValidate="TextBoxSRegDate1" 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="TextBoxSRegDate1"
                        PopupButtonID="imgRegDate1" CssClass="ajax__calendar">
                    </ShopNum1:CalendarExtender>
                    &nbsp; -<asp:TextBox ID="TextBoxSRegDate2" runat="server" CssClass="input1"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorEndDate" runat="server"
                        ControlToValidate="TextBoxSRegDate2" 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="TextBoxSRegDate2"
                        PopupButtonID="imgRegDate2" CssClass="ajax__calendar">
                    </ShopNum1:CalendarExtender>
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    <asp:Button ID="ButtonSearch" runat="server" OnClick="ButtonSearch_Click" Text="查询"
                        CssClass="bt2" />
                </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">
                    <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="会员ID" SortExpression="MemLoginID">
                            <ItemTemplate>
                                <asp:Label ID="Labelmemloginid" runat="server" Text='<%# ChangeRealName(DataBinder.Eval(Container,"DataItem(MemLoginID)","{0}")) %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" Width="100" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="Name" HeaderText="会员等级" SortExpression="Name">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="MemberCard" HeaderText="VIP卡号" SortExpression="MemberCard">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="到期时间" SortExpression="ExpirationDate">
                            <ItemTemplate>
                                <asp:Label ID="LabelExpirationDate" runat="server" Text='<%# ChangeExpirationDate(DataBinder.Eval(Container, "DataItem(ExpirationDate)","{0}")) %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" Width="130" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="会员姓名" SortExpression="RealName">
                            <ItemTemplate>
                                <asp:Label ID="LabelRealName" runat="server" Text='<%# ChangeRealName(DataBinder.Eval(Container,"DataItem(RealName)","{0}")) %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" Width="100" />
                        </asp:TemplateField>
                        <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 DataField="Age" HeaderText="年龄" SortExpression="Age">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="会员余额" SortExpression="AdvancePayment">
                            <ItemTemplate>
                                &yen;<%# Eval("AdvancePayment") %>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="Score" HeaderText="会员积分" SortExpression="Score">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <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="RegDate" SortExpression="RegDate">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="登录次数" DataField="LoginTime" SortExpression="LoginTime">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="禁用状态" SortExpression="IsForbid">
                            <ItemTemplate>
                                <asp:Label ID="Label2" runat="server" Text='<%# ChangeIsForbid(DataBinder.Eval(Container, "DataItem(IsForbid)","{0}")) %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                    </Columns>
                </cc1:Num1GridView>
            </td>
        </tr>
        <tr>
            <td align="left">
                <div class="vote">
                    <asp:Button ID="ButtonAdd" runat="server" OnClick="ButtonAdd_Click" OnClientClick="GetCheckedBoxValues()"
                        Text="添加" CausesValidation="False" CssClass="bt2" />
                    <asp:Button ID="ButtonEdit" runat="server" OnClick="ButtonEdit_Click" OnClientClick="return EditButton()"
                        Text="编辑" CausesValidation="False" CssClass="bt2" />
                    <asp:Button ID="ButtonDelete" runat="server" OnClick="ButtonDelete_Click" OnClientClick="return DeleteButton()"
                        Text="删除" CausesValidation="False" CssClass="bt2" />
                    <asp:Button ID="ButtonUplevel" runat="server" OnClientClick="return EditButton()"
                        Text="升级VIP" CausesValidation="False" CssClass="bt3" OnClick="ButtonUplevel_Click" />
                    <asp:Button ID="ButtonCelevel" runat="server" OnClientClick="return CelVipButton()"
                        Text="取消VIP" CausesValidation="False" CssClass="bt3" OnClick="ButtonCelevel_Click" />
                    <asp:Button ID="ButtonAdvancePaymentModifyLog" runat="server" OnClick="ButtonAdvancePaymentModifyLog_Click"
                        Text="变更预存款" OnClientClick="return EditButton()" CssClass="bt3" />
                    <asp:Button ID="ButtonAdvancePaymentFreezeLog" runat="server" Visible="false" OnClick="ButtonAdvancePaymentFreezeLog_Click"
                        Text="冻结预存款" OnClientClick="return EditButton()" CssClass="bt3" />
                    <asp:Button ID="ButtonRankScoreModifyLog" runat="server" OnClick="ButtonRankScoreModifyLog_Click"
                        Visible="false" Text="变更等级积分" OnClientClick="return EditButton()" CssClass="bt3" />
                    <asp:Button ID="ButtonScoreModifyLog" runat="server" OnClick="ButtonScoreModifyLog_Click"
                        Text="变更消费积分" OnClientClick="return EditButton()" CssClass="bt3" />
                    <asp:Button ID="ButtonScoreFreezeLog" runat="server" Visible="false" OnClick="ButtonScoreFreezeLog_Click"
                        Text="冻结消费积分" OnClientClick="return EditButton()" CssClass="bt3" />
                    <asp:Button ID="ButtonAddress" runat="server" OnClick="ButtonAddress_Click" Text="查看收货地址"
                        CausesValidation="False" OnClientClick="return EditButton()" CssClass="bt3" />
                    <asp:Button ID="ButtonOrder" runat="server" Text="查看订单" OnClick="ButtonOrder_Click"
                        OnClientClick="return EditButton()" CssClass="bt3" />
                    <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="Search"
        TypeName="GroupFlyTG.BusinessLogic.GroupFlyTG_Member_Action" OldValuesParameterFormatString="original_{0}">
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBoxSMemLoginID" Name="memLoginID" PropertyName="Text"
                Type="String" />
            <asp:ControlParameter ControlID="TextBoxSRealName" Name="realName" PropertyName="Text"
                Type="String" />
            <asp:ControlParameter ControlID="TextBoxSEmail" Name="email" PropertyName="Text"
                Type="String" />
            <asp:ControlParameter ControlID="TextBoxSRegDate1" Name="regDate1" PropertyName="Text"
                Type="String" />
            <asp:ControlParameter ControlID="TextBoxSRegDate2" Name="regDate2" PropertyName="Text"
                Type="String" />
            <asp:ControlParameter ControlID="DropDownListSex" DefaultValue="-1" Name="sex" PropertyName="SelectedValue"
                Type="Int32" />
            <asp:ControlParameter ControlID="DropdownListSIsForbid" DefaultValue="-1" Name="isForbid"
                PropertyName="SelectedValue" Type="Int32" />
            <asp:ControlParameter ControlID="DropDownListSMemberRankGuid" DefaultValue="-1" Name="memberRankGuid"
                PropertyName="SelectedValue" Type="String" />
            <asp:Parameter Name="IsDeleted" Type="Int32" DefaultValue="0" />
            <asp:ControlParameter ControlID="HiddenFieldIsMember" Name="IsAgentOrMember" PropertyName="Value"
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:HiddenField ID="CheckGuid" runat="server" Value="0" />
    <asp:HiddenField ID="HiddenFieldIsMember" 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>
                        会员VIP卡号：
                    </td>
                    <td>
                        <asp:TextBox ID="TextBoxVIPCard" runat="server" MaxLength="25"></asp:TextBox>
                        <asp:Label ID="Label2" runat="server" Text="*" ForeColor="red"></asp:Label>
                        VIP年限：
                        <asp:DropDownList ID="DropDownListUpYear" runat="server">
                            <asp:ListItem Selected="True" Value="1">1年</asp:ListItem>
                            <asp:ListItem Value="2">2年</asp:ListItem>
                            <asp:ListItem Value="3">3年</asp:ListItem>
                            <asp:ListItem Value="4">4年</asp:ListItem>
                            <asp:ListItem Value="5">5年</asp:ListItem>
                        </asp:DropDownList>
                    </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" />
                    </td>
                </tr>
            </table>
            <br />
        </div>
    </asp:Panel>
    </form>

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

</body>
</html>
