<%@ Page Language="c#" Inherits="Web.User.manageReview" CodeBehind="manageReview.aspx.cs" %>
<%@ Register Src="~/Module/pageNavi.ascx" TagPrefix="uc1" TagName="pageNavi" %>
<!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/head.htm"-->
</head>
<body>
    <div class="page-content">
        <div class="row">
            <div class="col-xs-12">
                <!-- PAGE CONTENT BEGINS -->
                <form method="post" runat="server">
                    <div class="list-func-box func-box">
                        <div class="hd">
                            评论管理
                        </div>
                        <div class="bd">
                            <asp:GridView ID="GridView1" runat="server" OnRowCommand="GridView1_RowCommand"  EmptyDataText="暂无数据…"
                                AutoGenerateColumns="False" class="table table-striped table-bordered table-hover table-sorting">
                                <Columns>
                                    <asp:BoundField DataField="pkId" HeaderText="ID" HeaderStyle-CssClass="title" />
                                    <asp:BoundField DataField="title" HeaderText="评论主题" HeaderStyle-CssClass="title" />
                                    <asp:BoundField DataField="name" HeaderText="用户名" HeaderStyle-CssClass="title" />
                                    <asp:BoundField DataField="content" HeaderText="评论内容" HeaderStyle-CssClass="title" />
                                    <asp:TemplateField HeaderText="审核" HeaderStyle-CssClass="title" ItemStyle-Width="200px">
                                        <ItemTemplate>
                                            <asp:DropDownList ID="pass" runat="server" SelectedValue='<%# Eval("passed") %>'>
                                                <asp:ListItem Value="0" Selected="True">未审核</asp:ListItem>
                                                <asp:ListItem Value="1">已审核</asp:ListItem>
                                            </asp:DropDownList>
                                            &nbsp;
                                           <asp:Button ID="saveCheck" runat="server" Text="保 存" CommandName="saveCheck" CssClass="btn btn-sm btn-primary" CommandArgument='<%# Eval("pkId") %>'></asp:Button>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="updateTime" HeaderText="时间" HeaderStyle-CssClass="title" />
                                    <asp:BoundField DataField="ipAddress" HeaderText="IP地址" HeaderStyle-CssClass="title" />
                                    <asp:TemplateField HeaderText="管理" HeaderStyle-CssClass="title" ItemStyle-CssClass="td-a">
                                        <ItemTemplate>
                                            <div class="action-buttons">
                                                <asp:LinkButton ID="edit" runat="server" CommandName="editt" data-toggle="tooltip" data-placement="bottom" title="编辑"  CommandArgument='<%# Eval("pkId")+"&"+Eval("content") %>'><i class="ace-icon fa fa-pencil bigger-120 blue" ></i></asp:LinkButton>
                                                <asp:LinkButton ID="del" runat="server" CommandName="del" data-toggle="tooltip" data-placement="bottom" title="删除" OnClientClick="return confirm('您确认要删除本评论吗？');"  CommandArgument='<%# Eval("pkId")+"&"+Eval("content") %>'><i class="ace-icon fa fa-trash bigger-120 red" ></i></asp:LinkButton>
                                            </div>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                            <div class="grid-pager">
                                <uc1:pagenavi runat="server" id="pageNavi" datactlname="GridView1" />
                            </div>
                            <table class="edit-table" id="Table1">
                                <tr>
                                    <th>修改评论内容：
                                    </th>
                                    <td>
                                        <asp:TextBox ID="content" runat="server" Width="500px" TextMode="MultiLine" Height="120px"></asp:TextBox>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div class="ft">
                            <div class="action-field text-center">
                                <asp:Button ID="save" CssClass="btn btn-sm btn-primary" runat="server" Text="保 存" Enabled="False" OnClick="save_Click"></asp:Button>
                                &nbsp;
                <input type="button" class="btn btn-sm btn-primary" value="取 消" onclick="can();" />
                            </div>
                            <!--/action-field-->
                        </div>
                    </div>
                </form>
                <!-- PAGE CONTENT ENDS -->
            </div>
        </div>
    </div>
    <!--#include file="../Css/foot.htm"-->

    <script language="javascript" type="text/javascript">
        function can() {
            document.all.content.value = "";
            document.all.save.disabled = true;
            windowClose();
        }
        function windowClose() {
            window.close();
        }
    </script>
</body>
</html>
