<%@ page language="C#" autoeventwireup="true" inherits="admin_form_setvote, DianCMS" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<!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 id="CssName" rel="stylesheet" type="text/css" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <table class="dh" cellpadding="0" cellspacing="0" border="0" align="center">
        <tr>
            <td>
                <asp:Image ID="P_Go" runat="server" ImageAlign="AbsMiddle" />
                您现在的位置：<a href="../info.aspx">后台管理</a> >> <a href="votelist.aspx">投票列表</a> >> 设置投票
            </td>
        </tr>
    </table>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <table class="border" cellspacing="1" cellpadding="0" width="99%" border="0" align="center">
        <tr>
            <td class="bqleft">
                投票名称：
            </td>
            <td class="bqright">
                <asp:TextBox ID="txtName" Columns="50" runat="server" CssClass="in1"></asp:TextBox><font
                    color="#ff0066">*</font>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                投票类型：
            </td>
            <td class="bqright">
                <asp:RadioButtonList ID="RadioType" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Value="1" Selected="True">单选</asp:ListItem>
                    <asp:ListItem Value="2">多选</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                投票选项：
            </td>
            <td class="bqright">
                <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                    <ContentTemplate>
                        <table width="100%" cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtContent" runat="server" style="display:none"></asp:TextBox>
                                    <asp:TextBox ID="txtoldContent" runat="server" style="display:none"></asp:TextBox>
                                    <asp:GridView ID="GridView1" HeaderStyle-CssClass="title" runat="server" AutoGenerateColumns="False"
                                        CssClass="border" DataKeyNames="Id" RowStyle-CssClass="tdMoveTr" HorizontalAlign="Center"
                                        OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowDeleting="GridView1_RowDeleting"
                                        OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating">
                                        <RowStyle CssClass="tdMoveTr" />
                                        <Columns>
                                            <asp:TemplateField HeaderText="选项标题">
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="txtTitle" CssClass="in1" Columns="20" runat="server" Text='<%# Bind("Title") %>'></asp:TextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("Title") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="选项样式">
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="txtStyle" CssClass="in1" Columns="20" runat="server" Text='<%# Bind("Style") %>'></asp:TextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("Style") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="投票数">
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="txtNumber" CssClass="in1" Columns="10" runat="server" Text='<%# Bind("Number") %>'></asp:TextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("Number") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="排序值">
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="txtOrderId" CssClass="in1" Columns="10" runat="server" Text='<%# Bind("OrderId") %>'></asp:TextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("OrderId") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:CommandField HeaderText="操作" ShowEditButton="True" />
                                            <asp:CommandField HeaderText="删除" ShowDeleteButton="True" />
                                        </Columns>
                                        <HeaderStyle CssClass="title" Font-Bold="True" />
                                        <EmptyDataTemplate>
                                            <tr class="title">
                                                <td>
                                                    选项标题
                                                </td>
                                                <td>
                                                    选项样式
                                                </td>
                                                <td>
                                                    投票数
                                                </td>
                                                <td>
                                                    排序值
                                                </td>
                                                <td>
                                                    操作
                                                </td>
                                                <td>
                                                    删除
                                                </td>
                                            </tr>
                                        </EmptyDataTemplate>
                                    </asp:GridView>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <table class="border" cellspacing="1" cellpadding="0" border="0" align="center" style="margin-bottom: 10px;
                                        margin-top: 10px;">
                                        <tr>
                                            <td class="bqleft" colspan="2">
                                                <b>创建一组投票选项</b>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="bqleft">
                                                选项标题：
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtTitle" runat="server" CssClass="in1"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="bqleft">
                                                选项样式：
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtStyle" runat="server" CssClass="in1" Text="#003399"></asp:TextBox>如：样式名称：voteimg1 或者 #FF9966 <font color=red>颜色值必须以#开始</font>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="bqleft">
                                                投票数：
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtNumber" runat="server" CssClass="in1" Text="0"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="bqleft">
                                                排序值：
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtOrderId" runat="server" CssClass="in1"></asp:TextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="bqleft">
                                            </td>
                                            <td height="40">
                                                <asp:Button ID="Button1" runat="server" Text=" 创建选项 " CssClass="btn" OnClick="Button1_Click" />
                                                创建、编辑或删除一组投票选项后，需要点击【确认】按钮才能生效
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                投票方案：
            </td>
            <td class="bqright">
                <asp:DropDownList ID="DropVoteLimit" runat="server">
                    <asp:ListItem Value="0">请选择投票限制方案</asp:ListItem>
                </asp:DropDownList>
                <a href="../other/SetVoteLimit.aspx">创建一个新方案</a>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
                描述：
            </td>
            <td class="bqright">
                <asp:TextBox ID="txtDes" runat="server" TextMode="MultiLine" Rows="4" Columns="40"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="bqleft">
            </td>
            <td class="bqright" height="50">
                <asp:Button ID="Button2" runat="server" Text=" 确认 " CssClass="btn radius30 pad_0_30" OnClick="Button2_Click" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
