<%@ Page language="c#" Codebehind="ADCategory.aspx.cs" AutoEventWireup="false" Inherits="XpShop.WebUI.Admin.ADCategory" %>
<!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>ADCategory</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">广告类别管理</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><asp:button id="btnDeleteUp" Text="删除选定类别" Runat="server"></asp:button></td>
				        </tr>
				        <tr>
					        <td class="forumRowHighlight" height="23"><asp:datagrid id="dgCategoryList" runat="server" AllowPaging="False" PagerStyle-Mode="NumericPages"
							        AutoGenerateColumns="False" DataKeyField="ADCategoryID" Width="100%" HorizontalAlign="Center" HeaderStyle-CssClass="summary-title">
							        <HeaderStyle Font-Bold="True"></HeaderStyle>
							        <Columns>
								        <asp:TemplateColumn>
									        <HeaderTemplate>
										        <asp:CheckBox id="chkAll" runat="server"></asp:CheckBox>
									        </HeaderTemplate>
									        <ItemTemplate>
										        <asp:CheckBox id="chkItem" runat="server"></asp:CheckBox>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="类别名称" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">
									        <ItemTemplate>
										        <%# DataBinder.Eval(Container.DataItem, "ADCategoryName") %>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="" ItemStyle-Width="30" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
									        <HeaderStyle></HeaderStyle>
									        <ItemTemplate>
										        <a href='ADCategory.aspx?Action=Modify&ADCategoryID=<%# DataBinder.Eval(Container.DataItem, "ADCategoryID") %>'>
											        修改</a>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:ButtonColumn ItemStyle-Width="30" ItemStyle-HorizontalAlign="Center" Text="&lt;div id=&quot;de&quot; onclick=&quot;javascript:return confirm('真的要删除吗？此操作将删除属于该类别的所有文章！')&quot;&gt;删除&lt;/div&gt;"
									        HeaderText="" CommandName="Delete"></asp:ButtonColumn>
							        </Columns>
						        </asp:datagrid></td>
				        </tr>
			        </table>
			        <%}if(this.Request.QueryString["Action"] == "Add" | this.Request.QueryString["Action"] == "Modify"){%>
			        <table class="tableBorder" cellSpacing="0" cellPadding="0" width="98%" align="center"
				        border="0">
				        <tr>
					        <td height="23">
						        <table class="tableBorder" cellSpacing="0" cellPadding="0" width="95%" align="center" border="0"
							        valign="top">
							        <tr>
								        <td align="right" width="150">类别名称：
								        </td>
								        <td><asp:textbox id="txtCategoryName" runat="server" Width="200px"></asp:textbox><font color="red">*</font></td>
							        </tr>
							        <tr>
								        <td align="right" width="150">类别说明：
								        </td>
								        <td><asp:textbox id="txtCategoryDesc" runat="server" Width="300px" TextMode="MultiLine" Height="60px"></asp:textbox><font color="red">*</font></td>
							        </tr>
							        <tr>
								        <td align="center" colSpan="2"><asp:button id="btnSave" runat="server" Text="保存"></asp:button><FONT face="宋体">&nbsp;</FONT>
									        <asp:button id="btnBack" runat="server" Text="返回"></asp:button></td>
							        </tr>
						        </table>
					        </td>
				        </tr>
			        </table>
			        <%}%>
		        </div>
	        </div>
		</form>
		</div>
		</div>
		</div>
	</body>
</HTML>
