<%@ Page Title="" Language="C#" MasterPageFile="~/Management/SiteManage.Master" AutoEventWireup="true" CodeBehind="NonStaticUrl.aspx.cs" Inherits="BingoWebsiteCollector.Web.Management.NonStaticUrl" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <div class="right" style="text-align: center; margin-top: 10px;">
        <table width="100%" border="0" cellspacing="1" cellpadding="1" class="edit">
            <tr>
                <td class="title_edit">
                    <h1 style="float: left">
                        非静态化页面设置</h1>
                </td>
            </tr>
            <tr>
                <td class="edit_main">
                            <table width="100%" border="0" cellspacing="1" cellpadding="1" class="table_list">
                                <tr class="tr1">
                                    <td colspan="2">
                                        <asp:Label ID="laTitle" runat="server" Text="添加非静态化页面"></asp:Label><br />
                                        <asp:Label ID="laErrorInfo" runat="server" ForeColor="Red"></asp:Label>
                                        <asp:Label ID="laSuccessInfo" runat="server" ForeColor="Green"></asp:Label>
                                    </td>
                                        </tr>
                                 <tr>
                                    <td width="20%">
                                        <div align="right">
                                            名称标识<font color="red">*</font>：</div>
                                    </td>
                                    <td align="left">
                                        <asp:TextBox ID="tbName" runat="server" CausesValidation="True"
                                            EnableViewState="False" Wrap="False" 
                                            ValidationGroup="checkAdd" />
                                        <validation targetid="<%=tbName.ClientID%>" targetname="名称" type="text" />
                                    </td>
                                </tr>
                                <tr>
                                    <td width="20%">
                                        <div align="right">
                                            目标网站网址<font color="red">*</font>：</div>
                                    </td>
                                    <td align="left">
                                        <asp:TextBox ID="tbUrl" runat="server" CausesValidation="True"
                                            EnableViewState="False" Width="100%" Wrap="False" 
                                            ValidationGroup="checkAdd" />
                                        <validation targetid="<%=tbUrl.ClientID%>" targetname="目标网站网址" type="text" />
                                     
                                        这里输入的是目标站网址，一般搜索页都需要添加到不生成静态的列表中。
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <div align="right">
                                            选项：</div>
                                    </td>
                                    <td align="left">
                                        <asp:CheckBox ID="cbIsEnable" CssClass="checkbox" runat="server" 
                                            Text="是否激活" Checked="True" />
                                        </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <asp:LinkButton ID="lbSubmit" runat="server" 
                                            Text="【提交】" onclick="lbSubmit_Click"  OnClientClick="return validateForm()" />
                                        &nbsp;<asp:LinkButton ID="lbCancel" runat="server" Text="【取消】" onclick="lbCancel_Click"/>
                                    </td>
                                </tr>
                            </table>
                </td>
            </tr>
        </table>
    </div>
    <div class="clear">
    </div>
        <div class="right" style="text-align: center; margin-top: 10px;">
        <div class="clear">
        </div>
        <table width="100%" border="0" cellspacing="1" cellpadding="1" class="edit">
            <tr>
                <td class="title_edit">
                    <h1 style="float: left">
                        非静态化页面列表</h1>
                </td>
            </tr>
            <tr>
                <td class="edit_main">
                    <asp:GridView ID="gvNonStaticUrls" runat="server" AutoGenerateColumns="False" 
                        GridLines="None" CssClass="table_list" Width="100%" 
                        EnableModelValidation="True">
                        <Columns>
                            <asp:TemplateField HeaderText="操作" ShowHeader="False">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lbEdit" runat="server" CausesValidation="False"
                                        Text="【编辑】" CommandArgument='<%# Bind("UrlId") %>' onclick="lbEdit_Click"></asp:LinkButton>
                                    &nbsp;<asp:LinkButton ID="lbDelete" runat="server" CausesValidation="False" CommandArgument='<%# Bind("UrlId") %>'
                                        Text="【删除】" onclick="lbDelete_Click" OnClientClick="if(confirm('确认删除记录?')){eval(this.attributes['href'].value)}else{return false}"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="UrlId" HeaderText="编号" 
                                SortExpression="UrlId" />
                        <asp:CheckBoxField DataField="IsEnable" HeaderText="是否激活" SortExpression="IsEnable" />
                        <asp:BoundField DataField="Name" HeaderText="名称" SortExpression="Name" />
                        <asp:BoundField DataField="Url" HeaderText="目标站网址" SortExpression="Url" />
                        <asp:BoundField DataField="CreatedOn" HeaderText="创建日期" 
                                SortExpression="CreatedOn" />
                        </Columns>
                        <HeaderStyle CssClass="tr1" />
                        <RowStyle CssClass="tr_a" />
                        <AlternatingRowStyle CssClass="tr_b" />
                        <EmptyDataTemplate>
                            没有数据，请先添加！
                        </EmptyDataTemplate>
                        <FooterStyle CssClass="dg_header" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
    </div>
    <div class="clear" style="margin-top: 10px;">
    </div>

</asp:Content>
