<%@ Page language="c#" Codebehind="Manager.aspx.cs" AutoEventWireup="false" Inherits="XpShop.WebUI.Admin.Manager" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
	<HEAD>
	    <!--#include file="inc/head.inc"-->
		<title>Manager</title>
	</HEAD>
	<body>
	    <div class="container">
		<div class="sub_container">
		<div class="sub_container_title"><a href="../default.aspx" target="_blank">桌面</a><img src="images/admin_title.jpg" height=9px width=8px align="absmiddle" />
		    <% if(this.Request.QueryString["Action"] == "Manage"){%>管理员列表<%}if(this.Request.QueryString["Action"] == "Add" | this.Request.QueryString["Action"] == "Modify"){%>管理员添加<%}%>
	    </div>
		<div class="sub_container_content">
		<form id="Form1" method="post" runat="server">
		    <div class="frame">
		        <div class="frame_title"><asp:Label id="lblAction" runat="server" CssClass="tableHeaderText"></asp:Label></div>
		        <div class="frame_content">
		            <% if(this.Request.QueryString["Action"] == "Manage"){%>
			        <table class="tableBorder" cellSpacing="0" cellPadding="0" width="98%" align="center" border="0">
				        <tr>
					        <td height="23" class="forumRowHighlight">
						        <asp:datagrid id="dgAdmin" runat="server" AllowPaging="False" PagerStyle-Mode="NumericPages" AutoGenerateColumns="False"
							        DataKeyField="AdminID" Width="100%" HorizontalAlign="Center" HeaderStyle-CssClass="summary-title">
							        <HeaderStyle Font-Bold="True"></HeaderStyle>
							        <Columns>
								        <asp:TemplateColumn HeaderText="序号">
									        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Left" Width="60px"></ItemStyle>
									        <ItemTemplate>
										        <%# DataBinder.Eval(Container.DataItem, "AdminID") %>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="会员帐号">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center" Width="100px"></ItemStyle>
									        <ItemTemplate>
										        <%# GetMemberAccount(DataBinder.Eval(Container.DataItem, "MemberID").ToString()) %>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="级别">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center" Width="80px"></ItemStyle>
									        <ItemTemplate>
										        <%# DataBinder.Eval(Container.DataItem, "Flag").ToString() == "3" ? "超级管理员" : "普通管理员" %>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="权限">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center"></ItemStyle>
									        <ItemTemplate>
										        <a href='ManagerPower.aspx?AdminID=<%# DataBinder.Eval(Container.DataItem, "AdminID") %>'>管理</a>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="所管理订单">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center" Width="100px"></ItemStyle>
									        <ItemTemplate>
										        <a href='OrderList.aspx?AdminMemberID=<%# DataBinder.Eval(Container.DataItem, "MemberID") %>'>查看所管理订单</a>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:ButtonColumn Text="&lt;div id=&quot;de&quot; onclick=&quot;javascript:return confirm('确认删除吗？')&quot;&gt;删除&lt;/div&gt;"
									        CommandName="Delete">
									        <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
								        </asp:ButtonColumn>
							        </Columns>
							        <PagerStyle Mode="NumericPages"></PagerStyle>
						        </asp:datagrid>
					        </td>
				        </tr>
			        </table>
			        <%}if(this.Request.QueryString["Action"] == "Add" | this.Request.QueryString["Action"] == "Modify"){%>
			        <table class="tableBorder" cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
				        <tr>
					        <td height="23">
						        <table class="tableBorder" cellSpacing="0" cellPadding="0" width="95%" align="center" border="0">
							        <tr>
								        <td align="right">
									        会员名：
								        </td>
								        <td>
									        <asp:TextBox id="txtMemberAccount" runat="server"></asp:TextBox><font color="red">*请输入系统会员名称</font>
								        </td>
							        </tr>
							        <tr>
								        <td align="center" colspan="2"><br>
									        <asp:Button id="btnSave" runat="server" Text="保存"></asp:Button>
									        <asp:Button id="btnCancel" runat="server" Text="取消" CausesValidation="False"></asp:Button></td>
							        </tr>
						        </table>
					        </td>
				        </tr>
			        </table>
			        <%}%>
		        </div>
	        </div>
		</form>
		</div>
		</div>
		</div>
	</body>
</HTML>
