<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="Tags.aspx.cs" Inherits="Aspx1.Admin.Tags" Title="无标题页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="tableBorder" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <th colspan="6" class="ym12_bti">
                标签管理
            </th>
        </tr>
        <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
            <HeaderTemplate>
                <tr style="text-align: center;">
                    <td width="100" class="td2">
                        标签名称
                    </td>
                    <td width="100" class="td2">
                        类别
                    </td>
                    <td width="100" class="td2">
                        商品数量
                    </td>
                    <td width="100" class="td2">
                        添加时间
                    </td>
                    <td width="100" class="td2">
                        更新时间
                    </td>
                    <td class="td2" style="text-align: left">
                        相关操作
                    </td>
                </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr style="text-align: center;">
                    <td class="td1">
                        <a href="/Tags.aspx?i=<%#Eval("tagid") %>" target="_blank">
                            <%#Eval("tagname")%></a>
                        <input id="Hidden1" type="hidden" runat="server" value='<%#Eval("tagid") %>' />
                    </td>
                    <td class="td1">
                        <%# (Eval("tagstate").ToString()=="1")?"系统":"用户"%>
                    </td>
                    <td class="td1">
                        <%#Eval("tagNum") %>
                    </td>
                    <td class="td1">
                        <%#Eval("addtime") %>
                    </td>
                    <td class="td1">
                        <%#Eval("updatetime") %>
                    </td>
                    <td class="td1" style="text-align: left">
                        <asp:LinkButton ID="LinkButton2" CommandArgument="1" runat="server" CausesValidation="false"
                            OnClientClick="return confirm('您将删除这个标签!!?删除后不可回复');">删除</asp:LinkButton>
                    </td>
                </tr>
                <tr>
                    <td colspan="6" class="td1" style="padding-left: 100px;">
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                <tr style="text-align: center;">
                    <td colspan="6" class="td1" style="text-align: right; padding-left: 10px;">
                        <asp:LinkButton ID="LinkButton1" CommandArgument="2" runat="server" CausesValidation="false"
                            Font-Bold="true">添加标签</asp:LinkButton>
                    </td>
                </tr>
            </FooterTemplate>
        </asp:Repeater>
        <tr>
            <th colspan="8" style="text-align: center;">
                <div id="tnt_pagination">
                    <%= PageStr%></div>
            </th>
        </tr>
        <tr style="text-align: center;" runat="server" visible="false" id="trAdd">
            <td class="td1" colspan="2">
                <asp:TextBox ID="txtTagName" ForeColor=" #999" runat="server" onfocus="if(this.value=='标签名称')this.value='';"
                    Text="标签名称"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Display="Dynamic"
                    ErrorMessage="不能为空！" ControlToValidate="txtTagName"></asp:RequiredFieldValidator>
            </td>
            <td class="td1" colspan="2">
                <asp:RadioButtonList ID="rblState" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Text="系统标签" Selected="True" Value="1"></asp:ListItem>
                    <asp:ListItem Text="用户标签" Value="0"></asp:ListItem>
                </asp:RadioButtonList>
            </td>
            <td class="td1" style="text-align: left" colspan="2">
                <asp:Button ID="Button1" runat="server" Text=" 添 加 " OnClick="Button1_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
