<%@ Page language="c#" Codebehind="RecommenderManage.aspx.cs" AutoEventWireup="True" Inherits="DreamerShop.Admin.RecommenderManage" %>
<%@ Register TagPrefix="uc1" TagName="LanguagesDeal" Src="LanguagesDeal.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>
			<%=myLanguagesDeal.GetMyString("RecommenderTextUserList")%>
			－<%=mConfigInf.strWebTitle%>
		</title>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="C#" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<META content="<%=mConfigInf.strDescription%>" name=description>
		<META content="<%=mConfigInf.strKeywords%>" name=keywords>
		<LINK href="../StyleSheet1.css" rel="stylesheet">
		<SCRIPT language="javascript" id="clientEventHandlersJS">
		<!--

		
		function selall()
		{	
			var a = document.getElementsByTagName("input");
		
			var str;
			var len;
			var state;
			for (var i=0; i<a.length; i++)
			{
				if (a[i].type == "checkbox") 
				{
					str=a[i].id;
					len=str.lastIndexOf("ckSelAll");
					if((len * 1)>=1)
					{
						state=a[i].checked;
						break;
						}
				}
			}
			for (var i=0; i<a.length; i++)
			{
				if (a[i].type == "checkbox") 
				{
					str=a[i].id;
					len=str.lastIndexOf("ckSelItem");
					if((len * 1)>=1)
						a[i].checked=state;
				}
			}
		}
		
		
		function imgHelp_onclick() {
			popUpWin("DSHelp/UserManage.html","Help",100,100,800,600);
			}
		
		function popUpWin(URLStr,WinName, left, top, width, height)
		{
			var popUpWin=0;
			if(popUpWin)

			{

			if(!popUpWin.closed) popUpWin.close();

			}

			popUpWin = open(URLStr, WinName, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
		}
		//-->
		</SCRIPT>
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form id="Form1" method="post" runat="server">
			<asp:Label id="lbEditID" runat="server" Visible="False"></asp:Label><uc1:languagesdeal id="myLanguagesDeal" runat="server" Visible="False"></uc1:languagesdeal>
			<table cellSpacing="0" cellPadding="0" width="97%" align="center" border="0">
				<TBODY>
					<tr>
						<td vAlign="top" height="262">
							<table cellSpacing="0" cellPadding="0" width="100%" border="0">
								<TBODY>
									<tr>
										<td vAlign="top" bgColor="#ffffff" height="300"><FONT face="宋体"><asp:panel id="Pan1" runat="server">
													<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
														<TR>
															<TD class="p12black"><SPAN class="p9orange"><IMG height="11" src="IMAGES/icon_1.gif" width="12" align="absMiddle">&nbsp;<%=myLanguagesDeal.GetMyString("RecommenderTextUserList")%></SPAN>&nbsp;</TD>
															<TD></TD>
															<TD>
																<asp:ImageButton id="ImageButton1" runat="server" ImageUrl="../Images/Admin/fb-save.gif" onclick="ImageButton1_Click"></asp:ImageButton><%=myLanguagesDeal.GetMyString("TextSaveSelect")%><!--保存所选--></TD>
														</TR>
													</TABLE>
													<HR noShade SIZE="1">
													<TABLE align="center" border="0">
														<TR>
															<TD>
																<TABLE cellSpacing="1" cellPadding="1" border="0">
																	<TR>
																		<TD>
																			<asp:dropdownlist id="drlFindGrade" runat="server"></asp:dropdownlist></TD>
																		<TD>
																			<asp:DropDownList id="drlFindKeyType" runat="server">
																				<asp:ListItem Value="0">登陆名</asp:ListItem>
																				<asp:ListItem Value="1">用户姓名</asp:ListItem>
																				<asp:ListItem Value="2">电话</asp:ListItem>
																				<asp:ListItem Value="3">地址</asp:ListItem>
																				<asp:ListItem Value="4">邮箱</asp:ListItem>
																				<asp:ListItem Value="5">积分></asp:ListItem>
																				<asp:ListItem Value="6">积分&lt;</asp:ListItem>
																				<asp:ListItem Value="7">积分=</asp:ListItem>
																				<asp:ListItem Value="8">存款></asp:ListItem>
																				<asp:ListItem Value="9">存款&lt;</asp:ListItem>
																				<asp:ListItem Value="10">存款=</asp:ListItem>
																				<asp:ListItem Value="11">消费总额></asp:ListItem>
																				<asp:ListItem Value="12">消费总额&lt;</asp:ListItem>
																				<asp:ListItem Value="13">消费总额=</asp:ListItem>
																			</asp:DropDownList>
																			<asp:TextBox id="txtFindKey" runat="server" CssClass="wenbenkuang" Width="80px"></asp:TextBox></TD>
																		<TD>
																			<asp:DropDownList id="drlFindOrder" runat="server">
																				<asp:ListItem Value="0">按注册时间</asp:ListItem>
																				<asp:ListItem Value="1">按登陆时间</asp:ListItem>
																				<asp:ListItem Value="2">按登陆名称</asp:ListItem>
																				<asp:ListItem Value="3">按用户姓名</asp:ListItem>
																				<asp:ListItem Value="4">按剩余积分</asp:ListItem>
																				<asp:ListItem Value="5">按用户存款</asp:ListItem>
																				<asp:ListItem Value="6">按消费总额</asp:ListItem>
																				<asp:ListItem Value="7">按登陆次数</asp:ListItem>
																			</asp:DropDownList></TD>
																		<TD>
																			<asp:RadioButtonList id="rblFindOrderMode" runat="server" RepeatDirection="Horizontal">
																				<asp:ListItem Value="0" Selected="True">降序</asp:ListItem>
																				<asp:ListItem Value="1">升序</asp:ListItem>
																			</asp:RadioButtonList></TD>
																		<TD>
																			<asp:checkbox id="ckIsCommender" runat="server" Text="推荐资格"></asp:checkbox></TD>
																		<TD>
																			<asp:Button id="btFind" runat="server" CssClass="go-wenbenkuang" Text="用户查找" onclick="btFind_Click"></asp:Button></TD>
																		<TD></TD>
																	</TR>
																</TABLE>
															</TD>
														</TR>
													</TABLE>
													<asp:datagrid id="dgList" runat="server" CssClass="table-shangxia" Width="100%" AllowPaging="True"
														AutoGenerateColumns="False" DataKeyField="UserID">
														<HeaderStyle HorizontalAlign="Center" BackColor="#F1F1F1"></HeaderStyle>
														<Columns>
															<asp:BoundColumn DataField="RecommendNumber" HeaderText="RecommenderTextNumber">
																<HeaderStyle></HeaderStyle>
																<ItemStyle HorizontalAlign="Center"></ItemStyle>
															</asp:BoundColumn>
															<asp:BoundColumn DataField="UserName" HeaderText="MemberTextUserName">
																<HeaderStyle></HeaderStyle>
																<ItemStyle HorizontalAlign="Center"></ItemStyle>
															</asp:BoundColumn>
															<asp:BoundColumn DataField="TrueName" HeaderText="MemberTextTrueName">
																<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
																<ItemStyle HorizontalAlign="Center"></ItemStyle>
															</asp:BoundColumn>
															<asp:BoundColumn DataField="Tel" HeaderText="MemberTel">
																<HeaderStyle></HeaderStyle>
																<ItemStyle HorizontalAlign="Center"></ItemStyle>
															</asp:BoundColumn>
															<asp:BoundColumn DataField="RecommenderGrade" HeaderText="RecommenderTextGrade">
																<HeaderStyle></HeaderStyle>
																<ItemStyle HorizontalAlign="Center"></ItemStyle>
															</asp:BoundColumn>
															<asp:TemplateColumn HeaderText="RecommenderTextSwitch">
																<HeaderStyle></HeaderStyle>
																<ItemStyle HorizontalAlign="Center"></ItemStyle>
																<ItemTemplate>
																	<asp:CheckBox id="ckRecommender" runat="server" Checked= '<%# DataBinder.Eval(Container.DataItem, "IsRecommender")%>'>
																	</asp:CheckBox>
																</ItemTemplate>
															</asp:TemplateColumn>
															<asp:TemplateColumn HeaderText="TextOperation">
																<HeaderStyle></HeaderStyle>
																<ItemStyle HorizontalAlign="Center"></ItemStyle>
																<ItemTemplate>
																	<asp:Button id="btUpdate" Text="更新" CssClass="go-wenbenkuang" CommandName="Update" Runat="server"></asp:Button>
																	<asp:Button id="btEdit" Text="修改" CssClass="go-wenbenkuang" CommandName="Edit" Runat="server"></asp:Button>
																</ItemTemplate>
															</asp:TemplateColumn>
															<asp:TemplateColumn>
																<HeaderStyle></HeaderStyle>
																<HeaderTemplate>
																	<asp:CheckBox id="ckSelAll" runat="server" onClick="selall()"></asp:CheckBox>
																</HeaderTemplate>
																<ItemStyle HorizontalAlign="Center"></ItemStyle>
																<ItemTemplate>
																	<asp:CheckBox id="ckSelItem" runat="server"></asp:CheckBox>
																</ItemTemplate>
															</asp:TemplateColumn>
														</Columns>
														<PagerStyle Visible="False" NextPageText="下一页" PrevPageText="上一页" HorizontalAlign="Right"></PagerStyle>
													</asp:datagrid>
													<TABLE class="table-zuoyou" id="Table1" width="100%" align="center" border="0">
														<TR align="center" bgColor="#f1f1f1">
															<TD>
																<asp:button id="btFirst" runat="server" CssClass="go-wenbenkuang" Text=" 首 页" BorderStyle="Groove" onclick="btFirst_Click"></asp:button>&nbsp;
																<asp:button id="btPre" runat="server" CssClass="go-wenbenkuang" Text="上一页" BorderStyle="Groove" onclick="btPre_Click"></asp:button>&nbsp;
																<asp:button id="btNext" runat="server" CssClass="go-wenbenkuang" Text="下一页" BorderStyle="Groove" onclick="btNext_Click"></asp:button>&nbsp;
																<asp:button id="btLast" runat="server" CssClass="go-wenbenkuang" Text=" 尾 页" BorderStyle="Groove" onclick="btLast_Click"></asp:button>&nbsp;
																<asp:label id="lbPage" runat="server"></asp:label>&nbsp;
																<%=myLanguagesDeal.GetMyString("TextGotoPage")%>
																<asp:textbox id="txtPageNum" runat="server" CssClass="wenbenkuang" Width="30px" MaxLength="3"></asp:textbox>
																<asp:CompareValidator id="CompareValidator2" runat="server" Operator="DataTypeCheck" Type="Integer" ControlToValidate="txtPageNum"
																	Display="Dynamic" ErrorMessage="输入数字" ForeColor="#FF0000"></asp:CompareValidator><%=myLanguagesDeal.GetMyString("TextPages")%>
																<asp:button id="btGo" runat="server" CssClass="go-wenbenkuang" Text="Go" onclick="btGo_Click"></asp:button></TD>
														</TR>
													</TABLE>
													<TABLE width="100%" align="center" border="0">
														<TR align="center">
															<TD><%=myLanguagesDeal.GetMyString("MemberTextMsg1")%><!--点击登陆名可以查看用户详细信息，点击真实姓名可以查看用户交易明细--></TD>
														</TR>
													</TABLE>
												</asp:panel></FONT><asp:panel id="Pan2" runat="server" Visible="False">
												<TABLE class="p9black" cellSpacing="0" cellPadding="0" width="100%" border="0">
													<TR>
														<TD style="WIDTH: 711px">
															<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
																<TR>
																	<TD class="p12black" align="left"><SPAN class="p9orange"><IMG height="11" src="IMAGES/icon_1.gif" width="12" align="absMiddle">&nbsp;<%=myLanguagesDeal.GetMyString("RecommenderTextUserList")%>--&gt;
																			<asp:Label id="lbMessage" runat="server"></asp:Label></SPAN>&nbsp;</TD>
																	<TD align="right" width="50"><!--BUTTON_BEGIN-->
																		<TABLE>
																			<TR>
																				<TD vAlign="bottom" noWrap>
																					<asp:ImageButton id="ibtReturn" runat="server" ImageUrl="../Images/Admin/fb-cancel.gif" CausesValidation="False" onclick="ibtReturn_Click"></asp:ImageButton><%=myLanguagesDeal.GetMyString("TextReturn")%></TD>
																			</TR>
																		</TABLE> <!--BUTTON_END--></TD>
																</TR>
															</TABLE>
														</TD>
													</TR>
												</TABLE>
												<HR noShade SIZE="1">
												<TABLE cellSpacing="1" cellPadding="5" width="80%" align="center" bgColor="#cccccc" border="0">
													<TR bgColor="#ffffff">
														<TD align="right" width="30%"><%=myLanguagesDeal.GetMyString("RecommenderTextNumber")%><%=myLanguagesDeal.GetMyString("TextColonCharacter")%><!--：--></TD>
														<TD class="pad">
															<asp:TextBox id="txtRecommendNumber" runat="server" CssClass="wenbenkuang" Width="100px" MaxLength="50"
																EnableViewState="False" ></asp:TextBox>
															<asp:RequiredFieldValidator id="rfvNumber" runat="server" ControlToValidate="txtRecommendNumber" ErrorMessage="请输入编号" ForeColor="#FF0000"></asp:requiredfieldvalidator></TD>
													</TR>
													<TR bgColor="#ffffff">
														<TD align="right" width="30%"><%=myLanguagesDeal.GetMyString("RecommenderTextSwitch")%><%=myLanguagesDeal.GetMyString("TextColonCharacter")%><!--：--></TD>
														<TD class="pad">
															<asp:RadioButtonList id="rblIsRecommender" runat="server" RepeatDirection="Horizontal" EnableViewState="False"
																Height="8px">
																<asp:ListItem Value="0" Selected="True">关</asp:ListItem>
																<asp:ListItem Value="1">开</asp:ListItem>
															</asp:RadioButtonList></TD>
													</TR>
													<TR bgColor="#ffffff">
														<TD align="right" width="30%"><%=myLanguagesDeal.GetMyString("RecommenderTextGrade")%><%=myLanguagesDeal.GetMyString("TextColonCharacter")%><!--等级：--></TD>
														<TD class="pad"><FONT color="red">
																<asp:DropDownList id="drlRecommendGradeInf" runat="server"></asp:DropDownList></FONT></TD>
													</TR>
													<TR bgColor="#ffffff">
														<TD align="right" width="30%"><%=myLanguagesDeal.GetMyString("MemberTextUserName")%><%=myLanguagesDeal.GetMyString("TextColonCharacter")%><!--用 户 名：--></TD>
														<TD class="pad" width="70%"><asp:Label id="lbUserName" runat="server"></asp:Label></TD>
													</TR>
													<TR bgColor="#ffffff">
														<TD align="right" width="30%"><%=myLanguagesDeal.GetMyString("MemberTextTrueName")%><%=myLanguagesDeal.GetMyString("TextColonCharacter")%><!--真实姓名：--></TD>
														<TD class="pad">
															<asp:Label id="lbTrueName" runat="server"></asp:Label></TD>
													</TR>
													<TR bgColor="#ffffff">
														<TD align="right" width="30%"><%=myLanguagesDeal.GetMyString("RecommenderTextUrl")%><%=myLanguagesDeal.GetMyString("TextColonCharacter")%><!----></TD>
														<TD class="pad">
															<asp:Label id="lbRecommendUrl" runat="server"></asp:Label></TD>
													</TR>
													<TR bgColor="#ffffff">
														<TD align="right" width="20%"></TD>
														<TD class="pad">
															<asp:Button id="btSubmit" runat="server" CssClass="go-wenbenkuang" Text="提交修改信息" onclick="btSubmit_Click"></asp:Button></TD>
													</TR>
													<TR bgColor="#ffffff">
														<TD align="center" colSpan="2">
															<asp:Label id="lbErrMessage" runat="server" Font-Bold="True" ForeColor="Red"></asp:Label></TD>
													</TR>
												</TABLE>
											</asp:panel></td>
									</tr>
								</TBODY>
							</table>
						</td>
					</tr>
				</TBODY>
			</table>
		</form>
	</body>
</HTML>
