<%@ Page language="c#" Codebehind="Options.aspx.cs" AutoEventWireup="true" Inherits="XpShop.Manage.Options" validateRequest="false"%>
<%@ Register TagPrefix="ftb" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
<!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>Options</title>
		<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">
		<script language="javascript" src="../inc/overlib.js"></script>
	</HEAD>
	<body MS_POSITIONING="GridLayout">
	    <div class="container">
		<div class="sub_container">
		<div class="sub_container_title"><a href="<%=AdminDefault%>" target="_top">桌面</a><img src="images/admin_title.jpg" height=9px width=8px align="absmiddle" />
		    <%if (this.Request.QueryString["action"] != "Manage"){%>订阅选项添加<%}else{%>订阅选项列表<%}%>
	    </div>
		<div class="sub_container_content">
		<form id="Form1" method="post" runat="server">
		    <div class="frame">
		        <div class="frame_title"><asp:label id="lbTitle" Runat="server">订阅选项添加</asp:label></div>
		        <div class="frame_content">
		            <table class="tableBorder" cellSpacing="1" cellPadding="1" width="98%" align="center" border="0">
				        <tr>
					        <td class="forumRowHighlight">
						        <%if (this.Request.QueryString["action"] != "Manage"){%>
						        <table class="ptable" cellspacing="0" cellpadding="0">
							        <tr>
								        <th class="tl">订阅类型：</th>
								        <td class="tr"><asp:DropDownList ID="ddlSubscriptions" runat="server"></asp:DropDownList></td>
							        </tr>
                                    <tr>
								        <th class="tl">订阅选项名称：</th>
								        <td class="tr"><asp:textbox id="txtName" runat="server" Width="150px" MaxLength="50"></asp:textbox></td>
							        </tr>
							        <tr>
								        <th class="tl">&nbsp;</th>
									    <td class="tr">    <asp:button id="btnSave" OnClick="btnSave_Click" runat="server" Text="保存" CssClass="inputbtn"></asp:button>
									    <asp:button id="btnCancel" OnClick="btnCancel_Click" runat="server" Text="取消" CausesValidation="False" CssClass="inputbtn"></asp:button></td>
							        </tr>
						        </table>
						        <%}else{%>
						        <asp:datagrid id="dgList" runat="server" PageSize="15" PagerStyle-Mode="NumericPages" AutoGenerateColumns="False"
							        DataKeyField="SubscriptionsOptionsID" Width="100%" HorizontalAlign="Center" HeaderStyle-CssClass="summary-title">
							        <HeaderStyle Font-Bold="True" CssClass="summary-title"></HeaderStyle>
							        <Columns>
								        <asp:TemplateColumn HeaderText="ID">
									        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Left"></ItemStyle>
									        <ItemTemplate>
										        <%# DataBinder.Eval(Container.DataItem, "SubscriptionsOptionsID") %>
									        </ItemTemplate>
								        </asp:TemplateColumn>
                                        <asp:TemplateColumn HeaderText="选项名称">
									        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Left"></ItemStyle>
									        <ItemTemplate>
										        <%# DataBinder.Eval(Container.DataItem, "SubscriptionsOptionsName") %>
									        </ItemTemplate>
								        </asp:TemplateColumn>
										<asp:TemplateColumn HeaderText="类型名称">
									        <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Left"></ItemStyle>
									        <ItemTemplate>
										        <%# DataBinder.Eval(Container.DataItem, "SubscriptionsName") %>
									        </ItemTemplate>
								        </asp:TemplateColumn>
										
										<asp:TemplateColumn>
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
									        <ItemTemplate>
										        <a href='Options.aspx?Action=Modify&OptionsID=<%# DataBinder.Eval(Container.DataItem, "SubscriptionsOptionsID") %>'>
											        修改</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>
		        </div>
	        </div>
			<div id="overDiv" style="Z-INDEX: 1000; VISIBILITY: hidden; POSITION: absolute"></div>
		</form>
		</div>
		</div>
		</div>
	</body>
</HTML>
