<%@ Page Title="过滤关键词管理" Language="C#" MasterPageFile="~/Others/AdminMasterPage.Master" AutoEventWireup="true" CodeBehind="BadWordManage.aspx.cs" Inherits="Web.Admin.Contents.BadWordManage" %>

<%@ Register Assembly="BX.Common" Namespace="Common" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="AdminContentHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="AdminContentCenter" runat="server">
    <form id="form1" runat="server">
        <asp:ObjectDataSource ID="ObjectDataSourceArticle" runat="server" EnablePaging="True"
            SelectMethod="BadWordList" TypeName="Logic.ClientBehavior" SelectCountMethod="BadWordCount" DeleteMethod="DeleteBadWord">
            <DeleteParameters>
                <asp:Parameter Type="Int32" Name="WordID"  /> 
            </DeleteParameters>
        </asp:ObjectDataSource>
        <div class="DivRightCenter">
            <div class="listdiv">
                <div class="grid-title">
                    <div class="grid-title-text">
                        <h4>
                            <span>过滤关键词管理</span>
                        </h4>
                    </div>
                </div>
                <div class="grid-list">
                    <cc1:ExtendedGridView ID="ExtendedGridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="WordID"
                        CssClass="grid" PageSize="20" DataSourceID="ObjectDataSourceArticle" EnableTheming="False" ItemName="过滤关键词管理" CheckBox="False" CheckBoxDataIndex="0">
                        <Columns>
                            <asp:BoundField DataField="Word" HeaderText="不良词语" />
                            <asp:TemplateField HeaderText="过滤动作">
                                <ItemTemplate>
                                    <%# DataBinder.Eval(Container.DataItem, "Action").Equals(1)?"替换":"禁止"%>
                                    <%#DataBinder.Eval(Container.DataItem, "Action").Equals(1)?Eval("ReplaceWord"):"" %>
                                </ItemTemplate>
                                <ItemStyle Width="100px" Wrap="False" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="操作">
                                <ItemTemplate>
                                    <asp:LinkButton ID="btnDelete" runat="server" CommandName="Delete" OnClientClick='javascript:return confirm("确定删除？")' Text="删除" CausesValidation="false"></asp:LinkButton>
                                </ItemTemplate>
                                <ItemStyle Width="100px" Wrap="False" />
                            </asp:TemplateField>
                        </Columns>
                    </cc1:ExtendedGridView>
                </div>
            </div>
            <br />
            <div class="FormButtonArea">
                <asp:Button ID="Button1" runat="server" UseSubmitBehavior="false" OnClientClick="document.location.href='BadWordEdit.aspx';return false;" Text="新增" />

            </div>
            <br />
            <br />
        </div>
    </form>
</asp:Content>
