<%@ Page language="c#" Codebehind="Survey.aspx.cs" AutoEventWireup="true" Inherits="XpShop.Manage.Survey"  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 xmlns="http://www.w3.org/1999/xhtml">
	<head>
	    <!--#include file="inc/head.inc"-->
		<title>问卷调查</title>
	</head>
	<body>
	    <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" />问卷调查管理</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" CssClass="tableHeaderText"></asp:Label></div>
		            <div class="frame_content">
			            <%if(Request.QueryString["Action"] != "Manage") {%>
			            <table class="ptable" cellspacing="0" cellpadding="0">
				            <tr>
					            <th class="tl">调查主题：</th>
					            <td class="tr"><asp:TextBox id="txtTitle" runat="server" Columns="80" MaxLength="250"></asp:TextBox></td>
				            </tr>
				            <tr>
					            <th class="tl">描述信息：</th>
					            <td class="tr">
						            <FTB:FREETEXTBOX id="ftbContent" runat="Server" ImageGalleryPath="Upload/" ToolbarType="OfficeXP"
							            ButtonPath="images/ftb/officeXP/" ButtonDownImage="True" ButtonOverImage="True" Width="520" RemoveServerNameFromUrls="False"></FTB:FREETEXTBOX>
					            </td>
				            </tr>
				            <tr>
					            <th class="tl">发布：</th>
					            <td class="tr">
						            <asp:RadioButtonList id="rblPublish" runat="server" RepeatDirection="Horizontal" Enabled="False">
							            <asp:ListItem Value="1">发布</asp:ListItem>
							            <asp:ListItem Value="0" Selected="True">不发布</asp:ListItem>
						            </asp:RadioButtonList>
					            </td>
				            </tr>
				            <tr>
					            <th class="tl"></th>
					            <td class="tr">
						            <asp:Button id="btnSave" OnClick="btnSave_Click" runat="server" Text="保存" CssClass="inputbtn"></asp:Button>
						            <%if (Request.QueryString["Action"] == "Modify"){%>
						                <a href='SurveyItem.aspx?SurveyID=<%=Request.QueryString["ID"] %>'>查看调查项目</a>
						            <%} %>
						            <a href="Survey.aspx?Action=Manage">取消</a>
						        </td>
				            </tr>
			            </table>
			            <%}else{ %>
			            <table class="tableBorder" cellSpacing="0" cellPadding="0" width="95%" align="center" border="0">
			                <tr>
			                    <td>
			                        <asp:datagrid id="dgList" runat="server" AllowPaging="false" PageSize="15" PagerStyle-Mode="NumericPages"
							            AutoGenerateColumns="False" DataKeyField="SurveyID" Width="100%" HorizontalAlign="Center"
							            HeaderStyle-CssClass="summary-title">
							            <HeaderStyle Font-Bold="True"></HeaderStyle>
							            <Columns>
								            <asp:TemplateColumn HeaderText="主题">
									            <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
									            <ItemStyle HorizontalAlign="Left"></ItemStyle>
									            <ItemTemplate>
										            <%# DataBinder.Eval(Container.DataItem, "Title")%>
									            </ItemTemplate>
								            </asp:TemplateColumn>
								            <asp:TemplateColumn HeaderText="添加时间">
									            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									            <ItemStyle HorizontalAlign="Center"></ItemStyle>
									            <ItemTemplate>
										            <%# DataBinder.Eval(Container.DataItem, "AddTime") %>
									            </ItemTemplate>
								            </asp:TemplateColumn>
								            <asp:TemplateColumn HeaderText="发布">
									            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									            <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
									            <ItemTemplate>
										            <a href='Survey.aspx?Action=ChangeStatus&ID=<%# DataBinder.Eval(Container.DataItem, "SurveyID") %>&Status=<%# DataBinder.Eval(Container.DataItem, "Status") %>'>
										            <img src='images/publish_<%# DataBinder.Eval(Container.DataItem, "Status") %>.png' border="0" alt="" />
										            </a>
									            </ItemTemplate>
								            </asp:TemplateColumn>
								            <asp:TemplateColumn>
									            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									            <ItemStyle HorizontalAlign="Center" Width="100px"></ItemStyle>
									            <ItemTemplate>
										            <a href='SurveyItem.aspx?from=list&SurveyID=<%# DataBinder.Eval(Container.DataItem, "SurveyID") %>'>
											            查看问卷题目</a>
									            </ItemTemplate>
								            </asp:TemplateColumn>
								            <asp:TemplateColumn>
									            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									            <ItemStyle HorizontalAlign="Center" Width="100px"></ItemStyle>
									            <ItemTemplate>
										            <a href='SurveyStat.aspx?SID=<%# DataBinder.Eval(Container.DataItem, "SurveyID") %>'>
											            统计</a>
									            </ItemTemplate>
								            </asp:TemplateColumn>
								            <asp:TemplateColumn>
									            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									            <ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
									            <ItemTemplate>
										            <a href='Survey.aspx?Action=Modify&ID=<%# DataBinder.Eval(Container.DataItem, "SurveyID") %>'>
											            修改</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>
	        </form>
		</div>
		</div>
		</div>
		
	</body>
</html>
