<%@ page language="C#" autoeventwireup="true" validaterequest="false" inherits="Admin_PollManage, App_Web_gqabgzwv" enableEventValidation="false" %>

<%@ Register Assembly="Validators" Namespace="Sample.Web.UI.Compatibility" TagPrefix="cc1" %>

<!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 runat="server">
    <title>调查管理</title>
    <link href="../css/style.css" rel="stylesheet" type="text/css" />
    <link href="../Admin/css/Layer.css" rel="stylesheet" type="text/css" />
    <link href="../Common/Calendar/CalendarControl.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../Common/Calendar/CalendarControl.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
            <div style="width:auto;">
            <table width="100%" height="94" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td align="right" background="images/diaocha1.jpg"><table width="671" height="94" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td align="left" background="images/diaocha.jpg"><table width="162" height="19" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td align="right" class="biaoti18">在线调查</td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
        </table>
                <table width="100%" border="0" cellpadding="1" cellspacing="1">
                    <tr>
                        <td align="right"><hr />
                               <img src="images/bu.gif" width="12" height="12">　
                            <asp:Button ID="Button1" runat="server" Text="添加调查主题" OnClick="Button1_Click" />
                        </td>
                    </tr>
                    <tr>
                    <td>
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="PollCategoryId" OnRowDeleting="GridView1_RowDeleting" OnRowEditing="GridView1_RowEditing" CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%">
                    <Columns>
                        <asp:HyperLinkField DataNavigateUrlFields="PollCategoryId" DataNavigateUrlFormatString="PollView.aspx?PollCategoryID={0}"
                            DataTextField="PollCategoryTitle" HeaderText="调查主题" >
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:HyperLinkField>
                        <asp:BoundField DataField="PollCategoryStartDate" HtmlEncode="False" DataFormatString="{0:yyyy-MM-dd}"
                            HeaderText="开始日期" >
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="PollCategoryEndDate" HtmlEncode="False" DataFormatString="{0:yyyy-MM-dd}"
                            HeaderText="结束日期" >
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="调查结果">
                            <ItemTemplate>
                                <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "pollresult.aspx?id="+Eval("PollCategoryId") %>'>查看统计结果</asp:HyperLink>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
                    </Columns>
                        <FooterStyle BackColor="#637991" Font-Bold="True" ForeColor="White" />
                        <RowStyle BackColor="#D9EBFF" ForeColor="#333333" />
                        <SelectedRowStyle BackColor="#637991" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#637991" ForeColor="White" HorizontalAlign="Center" />
                        <HeaderStyle BackColor="#4A6B84" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                     </td>
                    </tr>
                </table>

                <asp:Panel ID="Panel1" runat="server" Width="100%">
                <table width="100%" border="0" cellpadding="2"  cellspacing="1" bgcolor="#d9ebff">
                    <tr>
                        <td align="right" bgcolor="#ffffff">
                            调查主题：</td><td bgcolor="#ffffff">
                                <asp:HiddenField ID="hdPollCategoryID" runat="server" />
                            <asp:TextBox ID="txPollCategoryTitle" runat="server"></asp:TextBox>
                                <cc1:requiredfieldvalidator id="RequiredFieldValidator1" runat="server" controltovalidate="txPollCategoryTitle"
                                    display="None" errormessage="调查主题不能为空" setfocusonerror="True"></cc1:requiredfieldvalidator>
                            </td>
                    </tr>
                    <tr>
                        <td align="right" bgcolor="#ffffff">
                            开始日期：</td><td bgcolor="#ffffff">
                            <asp:TextBox ID="txPollCategoryStartDate" runat="server"></asp:TextBox>
                                <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/minical.gif" /></td>
                    </tr>
                    <tr>
                        <td align="right" bgcolor="#ffffff">
                            结束日期：</td><td bgcolor="#ffffff">
                            <asp:TextBox ID="txPollCategoryEndDate" runat="server"></asp:TextBox>
                                <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/Images/minical.gif" /></td>
                    </tr>
                    <tr>
                        <td align="right" bgcolor="#ffffff">
                            调查说明：</td><td bgcolor="#ffffff">
                            <asp:TextBox ID="txPollCategoryDesctiption" runat="server" TextMode="MultiLine"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td bgcolor="#ffffff"></td>
                        <td bgcolor="#ffffff">
                            <asp:Button ID="ButtonUpdate" runat="server" Text="保存新主题" OnClick="ButtonUpdate_Click" /></td>
                    </tr>
                </table>
                    <ajaxToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server"
                        TargetControlID="RequiredFieldValidator1">
                    </ajaxToolkit:ValidatorCalloutExtender>
                </asp:Panel>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>
