<%@ Page Language="C#" AutoEventWireup="false" %>
<%@ Register TagPrefix="Hishop" Namespace="Hishop.Web.Controls" Assembly="Hishop.Web.Controls" %>
<%@ Register TagPrefix="Hishop" Namespace="Hishop.Web.Management" Assembly="Hishop.Web.Management" %>
<%@ Register TagPrefix="Hishop" Namespace="Hishop.Web.Validator" Assembly="Hishop.Web.Validator" %>
<%@ Register TagPrefix="UI" Namespace="ASPNET.WebControls" Assembly="ASPNET.WebControls" %>
<%@ Import Namespace="Hishop.SystemServices" %>

<!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>
    <Hishop:HeadContainer ID="HeadContainer1" runat="server" />
    <Hishop:PageTitle ID="PageTitle1" runat="server" />
    <link rel="stylesheet" href="../../utility/validate/pagevalidator.css" type="text/css" />
    <link rel="stylesheet" href="../css/Hishopv5.css" type="text/css" />
    <script type="text/javascript" src="../../utility/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="../../utility/validate/pagevalidator.js"></script>
    
    <script type="text/javascript" src="../js/Hishopv5.js"></script>
    <script type="text/javascript" src="../../utility/Calendar/WdatePicker.js" ></script>
    <script type="text/javascript" src="../js/DropDonwList.js"></script>
</head>
<body>
    <form id="form1" runat="server">

        <div>
       
            <div class="PageTitleArea">
                <div class="PageTitle">
                    <asp:Literal ID="lblPageTitle" runat="server" Text="<%$ Resources:ManageMembers, IDS_PageTitle %>"></asp:Literal>
                </div>
                <div style="width: 80%;">
                    <asp:Literal ID="lblPageDesc" runat="server"  Text="<%$ Resources:ManageMembers, IDS_PageDesc %>"></asp:Literal>
                </div>
            </div>
            
            <Hishop:ManageMembers ID="ManageMembers" runat="server">
                <SkinTemplate>

<Hishop:StatusMessage id="Status" runat="server" Visible="False" />

<Hishop:MemberSearch ID="memberSearch" runat="server" >
<SkinTemplate>
<fieldset class="AdminSearchform">
    <legend>
        <asp:Literal ID="litSelectQuery" runat="server" Text="<%$ Resources:MemberSearch, IDS_FromField_litSelectQuery %>"></asp:Literal></legend>
    <table width="75%" border="0" cellspacing="0" cellpadding="0" style="margin-left: 18px">
        <tr>
            <td class="searchTableLeftTD">
                <nobr>
                    <asp:Label ID="lblSearchText" runat="server" Text="<%$ Resources:MemberSearch, IDS_FromField_Keywords %>"></asp:Label>：</nobr>
            </td>
            <td class="searchTableControlTD">
                <asp:TextBox ID="txtSearchText" runat="server"></asp:TextBox></td>
            <td class="searchTableLeftTD">
                <nobr>
                    <asp:Label ID="lblMemberRank" runat="server" Text="<%$ Resources:MemberSearch, IDS_FromField_lblMemberRank %>"></asp:Label>：</nobr>
            </td>
            <td class="searchTableControlTD">
                <Hishop:MemberRankDropDownList ID="rankList" runat="server" AllowNull="true" NullToDisplay="<%$ Resources:MemberSearch, IDS_MemberRankDropDownList_NullText %>" />
            </td>
            <td class="searchTableLeftTD">
                <nobr>
                    <asp:Label ID="lblUserState" runat="server" Text="<%$ Resources:MemberSearch, IDS_FromField_lblUserState %>"></asp:Label>：</nobr>
            </td>
            <td class="searchTableControlTD">
                <Hishop:AccountStatusDropDownList ID="dropUserStateList" runat="server" /></td>
            <td class="searchTableLeftTD">
                <nobr>
                    <asp:Label ID="lblPageSize" runat="server" Text="<%$ Resources:MemberSearch, IDS_FromField_PageSize %>"></asp:Label>：</nobr>
            </td>
            <td class="searchTableControlTD">
                <Hishop:PageSizeDropDownList ID="dropPageSize" runat="server" />
            </td>
            <td class="bottonTD">
                <asp:Button ID="btnSearchButton" runat="server" Text="<%$ Resources:MemberSearch, IDS_Button_Search %>"
                    CssClass="inp_L1" />
            </td>
        </tr>
    </table>
</fieldset>
</SkinTemplate>
</Hishop:MemberSearch>
<div class="grdGroupFormList">
    <div class="grdHeaderStyle">
        <ul>
            <li class="addUser"><a href='<%= SiteUrls.Instance().UrlData.FormatUrl("admin_AddMember")%>'>
                <asp:Label ID="lblAddMember" runat="server" Text="<%$ Resources:ManageMembers, IDS_FromField_AddMember %>"></asp:Label></a></li>
            <li class="spirtLines">|</li>
            <li class="userGroupCheckAll"><a href="#" onclick="CheckClickAll()">
                <asp:Label ID="lblCheckAll" runat="server" Text="<%$ Resources:Resources, IDS_Label_CheckAll %>"></asp:Label></a></li>
            <li class="spirtLines">|</li>
            <li class="userGroupReverseCheck"><a href="#" onclick="CheckReverse()">
                <asp:Label ID="lblCheckReverse" runat="server" Text="<%$ Resources:Resources, IDS_Label_CheckReverse %>"></asp:Label></a></li>
            <li class="spirtLines">|</li>
            <li class="userGroupDelCheck">
                <Hishop:ImageLinkButton ID="lkbDelectCheck" runat="server" OnClientClick=""
                    Text="<%$ Resources:Resources, IDS_Button_DeleteCheck %>"></Hishop:ImageLinkButton></li>
            <li class="spirtLines">|</li>
            <li class="addProductClass_Manage">
                <asp:LinkButton ID="lkbtnSave" runat="server" Text="<%$ Resources:ManageMembers, IDS_Button_Save %>"></asp:LinkButton>
            </li>
        </ul>
    </div>

            <div class="grdGroupListLi">
                <Hishop:CustomGridView ID="grdMemberList" runat="server" AutoGenerateColumns="false"
                    ShowHeader="true" DataKeyNames="hi_UserId" CssClass="GridViewStyle" GridLines="None"
                    RowStyle-CssClass="grdrow" HeaderStyle-CssClass="GridViewHeaderStyle" AllowSorting="true" SortOrderBy="CreateDate" SortOrder="DESC">
                    <Columns>
                        <Hishop:CheckBoxColumn />
                        <asp:TemplateField HeaderText="<%$ Resources:ManageMembers, IDS_Header_Name %>" SortExpression="UserName">                            
                            <itemtemplate>
	                              <asp:Label ID="lblUserName" runat="server" Text='<%# Eval("UserName") %>'></asp:Label>
                             </itemtemplate>
                        </asp:TemplateField>
                        
                        <asp:TemplateField HeaderText="<%$ Resources:ManageMembers, IDS_Title_Balance %>"  ItemStyle-Width="100px" SortExpression="Balance" >                            
                            <itemtemplate>
                                <Hishop:FormatedMoneyLabelForAdmin Money='<%# Eval("UserBalance") %>' runat="server" />
                            </itemtemplate>
                        </asp:TemplateField>
                        
                        <asp:TemplateField HeaderText="<%$ Resources:ManageMembers, IDS_Title_DeductValues %>"  ItemStyle-Width="80px" SortExpression="DeductMoney"  >                            
                            <itemtemplate>
                                <Hishop:FormatedMoneyLabelForAdmin Money='<%# Eval("DeductMoney") %>' runat="server"  />
                            </itemtemplate>
                        </asp:TemplateField>
                        
                        <asp:TemplateField HeaderText="<%$ Resources:ManageMembers, IDS_Title_OrderNumb %>"   SortExpression="OrderNumber"  >                            
                            <itemtemplate>
                                <a href='<%# Globals.GetSiteUrls().UrlData.FormatUrl("admin_ManageOrder")+"?Username=" + Eval("UserName") %>'
                                style="text-decoration:underline;"><asp:Label id="lblOrderNumberBandField" text='<%# Eval("OrderNumber") %>' runat="server"></asp:Label></a>
                            </itemtemplate>
                        </asp:TemplateField>
                                               
                        <asp:BoundField HeaderText="<%$ Resources:ManageMembers, IDS_Header_Points %>" DataField="UserPoints" SortExpression="UserPoints" />
                        
                          <Hishop:DropdownColumn HeaderText="<%$ Resources:ManageMembers, IDS_Header_UserRank %>" 
                            JustForEditItem="false" ID="dropUserRank" DataKey="UserRank" DataTextField="Name"
                            DataValueField="RankId" AllowNull="false" ClientOnChangeEventScript="var c=this.parentNode.parentNode.getElementsByTagName('td').item(0).getElementsByTagName('input').item(0);c.checked=true;CheckChanged();"
                            SortExpression="UserRank">
                        </Hishop:DropdownColumn>  
                        
                        <asp:TemplateField HeaderText="<%$ Resources:ManageMembers, IDS_Header_CreateDate %>"
                            SortExpression="CreateDate">
                            <itemtemplate>
                               <nobr><Hishop:FormatedTimeLabel ID="lblCreateDate" Time='<%# Bind("CreateDate") %>' runat="server"></Hishop:FormatedTimeLabel></nobr>
                            </itemtemplate>
                        </asp:TemplateField>

                            <asp:TemplateField HeaderText="<%$ Resources:Resources, IDS_Header_Options %>">
                                <ItemStyle/>
                                <ItemTemplate>
		                           <a href='<%# Globals.GetSiteUrls().UrlData.FormatUrl("admin_EditMember",Eval("hi_UserId")) %>' class="SmallCommonTextButton"><asp:Literal ID="lblEdit" runat="server" Text="<%$ Resources:Resources, IDS_Button_Edit %>"></asp:Literal></a>
		                           <Hishop:DeleteImageLinkButton runat="server" CssClass="SmallCommonTextButton" ID="Delete" Text="<%$ Resources:Resources, IDS_Button_Delete %>" CommandName="Delete" OnClientClick=""></Hishop:DeleteImageLinkButton>
                                   <a href="#" class="selectHandlist" onmouseover="showmenu(this,'show','bottom')" onmouseout="showmenu(this,'hide','bottom')" style="cursor: pointer;">更多操作</a>
                                    <div class="mdiv">
                                    <ul>
			                             <li><asp:HyperLink runat="server" ID="lkbAccountSummary" Text="<%$ Resources:ManageMembers, IDS_FormField_AccountSummary %>" NavigateUrl='<%#Globals.GetSiteUrls().UrlData.FormatUrl("admin_AccountSummary",Eval("hi_UserId"))%>' /></li>
			                             <li><asp:HyperLink runat="server" ID="lkbReCharge" Text="<%$ Resources:ManageMembers, IDS_FormField_ReCharge %>" NavigateUrl='<%#Globals.GetSiteUrls().UrlData.FormatUrl("admin_ReCharge",Eval("hi_UserId"))%>' /></li>
		                                 <li><asp:HyperLink runat="server" ID="lklDeductDetails" Text="<%$ Resources:ManageMembers, IDS_FormField_DeductDetails %>" NavigateUrl='<%#Globals.GetSiteUrls().UrlData.FormatUrl("admin_DeductDetails",Eval("hi_UserId"))%>' /></li>
		                                 <li><a id="lkbToAgent" onclick="$.myfunction.OpenWindow(<%# Eval("hi_UserId") %>)" href="#">升级为代理商</a></li>
                                    </ul>
                                    </div>
                                </ItemTemplate>
                            </asp:TemplateField>
                            
                    </Columns>
                </Hishop:CustomGridView>
            </div>
            <!--分页开始-->
            <div class="grdGroupTabhead">
                <UI:Pager runat="server" ListToPaging="grdMemberList" ID="pager" />
            </div>
            <!--分页结束-->
            <div class="PageTitleArea" style="margin-top:10px; ">
                <span style="margin-right:10px;"><strong><asp:Label Text="<%$ Resources:ManageMembers, IDS_Title_PageCollect %>" runat="server"></asp:Label></strong>：<asp:Label ID="Label4" Text="<%$ Resources:ManageMembers, IDS_Title_Balance %>" runat="server"></asp:Label>：<span style="color:red;"><asp:Label id="lblBalance" runat="server"></asp:Label></span> &nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="Label5" Text="<%$ Resources:ManageMembers, IDS_Title_DeductValues %>" runat="server"></asp:Label>：<span style="color:red;"><asp:Label id="lblDeductValues" runat="server"></asp:Label></span> &nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="Label6" Text="<%$ Resources:ManageMembers, IDS_Title_OrderNumb %>" runat="server"></asp:Label>：<span style="color:red;"><asp:Label id="lblOrderNumb" runat="server"></asp:Label></span></span>
                <strong><asp:Label Text="<%$ Resources:ManageMembers, IDS_Title_SearchCollect %>" runat="server"></asp:Label></strong>：<asp:Label ID="Label1" Text="<%$ Resources:ManageMembers, IDS_Title_Balance %>" runat="server"></asp:Label>：<span style="color:red;"><asp:Label id="lblAllBalance" runat="server"></asp:Label></span> &nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="Label2" Text="<%$ Resources:ManageMembers, IDS_Title_DeductValues %>" runat="server"></asp:Label>：<span style="color:red;"><asp:Label id="lblAllDeductValues" runat="server"></asp:Label></span> &nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="Label3" Text="<%$ Resources:ManageMembers, IDS_Title_OrderNumb %>" runat="server"></asp:Label>：<span style="color:red;"><asp:Label id="lblAllOrderNumb" runat="server"></asp:Label></span>
            </div>
</div>

<script type="text/javascript">
    $(document).ready(function() {
        jQuery.myfunction = {
            OpenWindow: function(userId) {
                if (!dlgToAgent.get_isShowing()) {
                    dlgToAgent.Show();
                    document.getElementById("ManageMembers_txtUserId").value = userId;
                }
            },
            Close: function() {
                dlgToAgent.Close();
                document.getElementById("ManageMembers_txtUserId").value = "";
            }
        }
    });
</script>

<asp:TextBox ID="txtUserId" runat="server" style="display:none"></asp:TextBox>


<!-- 转为代理商对话框 -->
       <UI:Dialog AnimationType="Live" ShowTransition="Fade" AnimationSlide="ExponentialDecelerate"
            CloseTransition="Fade" AnimationDuration="600" Modal="true"
            AllowDrag="true" Alignment="MiddleCentre" Title="<%$ Resources:ManageMembers,IDS_FormField_MemberToAgent%>"
            ID="dlgToAgent" runat="server" Width="400px" Height="300px">
            <Content>
            <table cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td style="background-color:white;font-size:12px;font-family:Arial;">
                        <table width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                            <td style="padding:5px;" align="left" valign="middle">
                            <div style="padding-left:5px;font-size:14px;">  
                                <nobr>&nbsp;&nbsp;<asp:Label ID="lblReplyAskTitle" runat="server" Text="<%$ Resources:ManageMembers,IDS_FormField_ConfirmToAgent%>"></asp:Label></nobr>                    
                            </div>
                                <asp:Label ID="lblSaveConsultationId" runat="server" Visible="false" ></asp:Label>   
                                <table border="0" style="margin-top: 10px; text-align: left;">
                                <tr>
                                    <td style="padding: 5px; white-space: nowrap;">
                                        <nobr>&nbsp;&nbsp;<asp:Label ID="lblReplyTextForm" runat="server" Text="<%$ Resources:ManageMembers,IDS_FormField_AentRank%>"></asp:Label>：</nobr> 
                                    </td>
                                    <td>
                                        <Hishop:AgentialRankDropDownList ID="dropAgent" runat="server" AllowNull="false" />
                                    </td>
                                </tr>
                                <tr>
                                    <td style="padding: 5px; white-space: nowrap;">
                                        <nobr>&nbsp;&nbsp;<asp:Literal ID="Literal4" runat="server" Text="<%$ Resources:EditUserControl, IDS_FromField_Expires %>"></asp:Literal>：</nobr>
                                    </td>
                                    <td>
                                        <Hishop:Calendar ID="calendrExpires" runat="server" />
                                    </td>
                                </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" class="diog_bottom" align="right">
                                <asp:Button ID="btnToAgent" runat="server" Text="<%$ Resources:ManageMembers, IDS_Button_ToAgent%>"  CssClass="inp_L1" />
                                <input type="button" value="取消" id="btnBack" onclick="$.myfunction.Close()" class="inp_L1" />
                             </td>
                         </tr>
                         </table>
                     </td>
                </tr>
            </table>
            </Content>
        </UI:Dialog>
       

                </SkinTemplate>
            </Hishop:ManageMembers>
            
        </div>
        <br />
        <div style="text-align:center">
            <hr style="width:500px;" />
            <Hishop:SiteCopyright runat="server" />
        </div>
        <br />
        <Hishop:ValidatorContainer runat="server" ID="ValidatorContainer" />
<%--        <div id="loading">
            <div><img src="../images/spinner.gif" alt="" style="margin-right:5px;"/>正在载入中...</div>
        </div>--%>
    </form>
</body>
</html>
 
