<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Vote_Edit.aspx.cs" Inherits="TotCms.Web.Admin.Vote_Edit" %>

<%@ Register src="UI/main_top.ascx" tagname="main_top" tagprefix="uc1" %>

<!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 id="Head1" runat="server">
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>修改投票</title>
    <link href="style/global.css" rel="stylesheet" type="text/css" />
    <link href="js/calendar.css" rel="stylesheet" type="text/css" />
    <script src="js/common.js" type="text/javascript"></script>
    <script src="js/calendar.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
      <uc1:main_top ID="main_top1" runat="server" />
    
    </div>
    
    <table style="width:100%;" border="0" cellpadding="0" cellspacing="1" 
      class="black_border" id="table_1" runat="server">
      <tr class="suphead">
        <td colspan="2">
                                                                                修改投票</td>
    </tr>
    <tr>
      <td class="fields_text">
        投票名称：</td>
      <td class="fields_input">
        <asp:TextBox ID="Title" runat="server" CssClass="input_middle"></asp:TextBox>
          <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
          ControlToValidate="Title" ErrorMessage="投票名称不能为空"></asp:RequiredFieldValidator>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
        选项个数：</td>
      <td class="fields_input">
        <asp:TextBox ID="OptionNum" runat="server" CssClass="input_mini">4</asp:TextBox>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
        类型：</td>
      <td class="fields_input">      
              
        <asp:RadioButtonList ID="OptionType" runat="server" 
          RepeatDirection="Horizontal" RepeatLayout="Flow">
          <asp:ListItem Value="0" Selected="True">单选</asp:ListItem>
          <asp:ListItem Value="1">复选</asp:ListItem>
        </asp:RadioButtonList>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
        截止日期：</td>
      <td class="fields_input">      
              
        <asp:TextBox ID="ExpiresTime" runat="server"></asp:TextBox>
        <input name="button" type="button" onclick="displayCalendar(document.forms[0].ExpiresTime,'yyyy-mm-dd',this)" value="..." />
          </td>
    </tr>
    <tr>
      <td class="fields_text">
        投票选项：</td>
      <td class="fields_input">      
       
        <asp:GridView ID="GridView1" runat="server" DataKeyNames="id"
                            AutoGenerateColumns="False"  OnRowCancelingEdit="GridView1_RowCancelingEdit"
                            OnRowEditing="GridView1_RowEditing" 
          OnRowUpdating="GridView1_RowUpdating" OnRowDeleting="GridView1_RowDeleting" 
          GridLines="None">
                            <Columns>
                                <asp:TemplateField HeaderText="ID">
                                    <ItemTemplate>
                                        <asp:Label runat="server" Text='<%#Eval("id") %>' ID="Label0"></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="选项">
                                    <ItemTemplate>
                                        <%# Eval("ItemName")%>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="ItemName" Text='<%# Eval("ItemName") %>' runat="server" Width="140px" />
                                    </EditItemTemplate>
                                    <ItemStyle Width="150px" />
                                </asp:TemplateField>                                
                                <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" HeaderText="操作" 
                                  CancelText="取消" DeleteText="删除" EditText="修改" InsertText="加入" SelectText="选择" 
                                  UpdateText="更新" />
                            </Columns>
                            <PagerSettings FirstPageText="" LastPageText="" NextPageText="" PreviousPageText="" />
                            <RowStyle Height="20px" BackColor="#F7F6F3" ForeColor="#333333" />
                            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                            <EditRowStyle BackColor="#f5f5f5" />
                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                        </asp:GridView>
       
      </td>
    </tr>
    <tr>
      <td colspan="2" align="center">
        <asp:Button ID="Button1" runat="server" Text="修改投票" onclick="Button1_Click" />
        <input id="Button2" type="reset" value="取 消" /></td>
    </tr>
  </table>
  <div class="info">
      <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
      <iframe runat="server" height="0" width="0" id="sendframe"></iframe>
    </div>
    </form>
</body>
</html>
