<%@ Page Language="c#" Inherits="Web.User.manageResear" CodeBehind="manageResear.aspx.cs" %>
<!DOCTYPE html>
<!--[if lt IE 9]><html class="lte-ie8"><![endif]-->
<!--[if gt IE 8]><!-->
<html>
<!--<![endif]-->
<head>
    <title>网站调查</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--#include file="../Css/userCssList.htm"-->
    <script type="text/javascript" src="../Js/jquery.js"></script>
    <script type="text/javascript">
    function checktitle(){
        //验证
        var dctitle = document.getElementById("title").value;
        if(dctitle=="")
        {
            alert("调查主题不能为空！");
            return false ;
        }
        return true ;
    }
    function checkall(){
    
        //验证
        var dctitle = document.getElementById("title").value;
        if(dctitle=="")
        {
            alert("调查主题不能为空！");
            return false ;
        }
        var dcname = document.getElementById("name").value;
        if(dcname=="")
        {
            alert("调查选项不能为空！");
            return false ;
        }
        return true ;
    }
    </script>
</head>
<body>
    <form id="newsMange" method="post" runat="server">
    <div class="list-func-box func-box">
        <div class="hd">
            <div class="breadcrumb">
                <asp:PlaceHolder ID="placeHead" runat="server"></asp:PlaceHolder>
            </div>
            <!--/breadcrumb-->
            <div class="user-service">
                <a class="help" href="#" title="小提示：网站调查栏目和问卷调查栏目是有区别的，当前是网站调查栏目，只有一个主题，主题就是调查的问题。">帮助</a></div>
            <!--/user-service-->
        </div>
        <div class="bd">
            <div class="function-hd">
                <div class="search-box fr">
                调查选项：
                <asp:TextBox ID="name" class="input-txt" runat="server"></asp:TextBox>
                <asp:Button ID="ok" class="btn" runat="server" Text="添 加" OnClientClick="return checkall()" OnClick="ok_Click"></asp:Button>
                </div><!--/search-box-->
                <div class="action-field">
                <asp:Button ID="add" class="btn" runat="server" Text="保存主题" CausesValidation="False" OnClick="add_Click" OnClientClick="return checktitle()"></asp:Button>
                调查主题：
                <asp:TextBox ID="title" runat="server" class="input-txt input-txt3"></asp:TextBox>
                <asp:Label ID="lbMsg" runat="server" Text=""></asp:Label>
                </div><!--/action-field-->
            </div>
        <div class="function-bd" style="height: 592px; overflow: auto;">
            <asp:DataGrid ID="linkGrid" runat="server" class="list-table" AutoGenerateColumns="False" AllowSorting="True" onitemcommand="linkGrid_ItemCommand">
                <Columns>
                    <asp:BoundColumn DataField="pkId" HeaderText="ID号" HeaderStyle-CssClass="title">
                    </asp:BoundColumn>
                    <asp:BoundColumn DataField="name" HeaderText="调查选项" HeaderStyle-CssClass="title"></asp:BoundColumn>
                    <asp:BoundColumn DataField="counter" HeaderText="得票数" HeaderStyle-CssClass="title">
                    </asp:BoundColumn>
                    <asp:TemplateColumn HeaderText="管理" HeaderStyle-CssClass="title" ItemStyle-CssClass="td-a">
                        <ItemTemplate>
                            <asp:LinkButton ID="edit" runat="server" CommandName="edit" CausesValidation="False">编辑</asp:LinkButton>
                            &nbsp;&nbsp;
                            <asp:LinkButton ID="del" runat="server" CommandName="del" CausesValidation="False" OnClientClick="return confirm('确认要删除本项吗？')">删除</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                </Columns>
            </asp:DataGrid>
        </div>
        </div>
        <div class="ft">
            <div class="action-field txt-c">
            </div>
            <!--/action-field-->
        </div>
    </div>
    </form>
</body>
</html>