<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_PageLabel, WebApp_deploy" title="恒浪标签管理" validaterequest="false" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript">
    function runCode(id) {
        var obj=document.getElementById(id);
        var winname = window.open('', "_blank", '');
        winname.document.open('text/html', 'replace');
        winname.opener = null // 防止代码对页面修改
        winname.document.write(obj.value);
        winname.document.close();
    } 
</script>

   <table class="adminheading">
         <tr>
            <th class="templates">分页标签管理</th>                  
            <td align="right">
            <div style="width:100px"><a href="Admin_AddPageLabel.aspx">添加分页标签</a></div></td> 
            <td class="rtdw"></td>
         </tr>
   </table>
   
   <table class="nick" cellpadding="1" cellspacing="1">
        <tr><td class="tit" colspan="2">分页标签管理</td></tr>
        <tr><td class="ltd" style="text-align:center"><a href="Admin_PageLable.aspx">显示全部</a></td><td class="rtd"><asp:Literal ID="LableManage" runat="server" /></td></tr>
   </table>

    <asp:GridView ID="GridView1" DataKeyNames="ID" OnDataBound="GridView1_DataBound" runat="server" AllowPaging="True" AutoGenerateColumns="False"  
      CssClass="adminlist">
        <Columns>
            <asp:BoundField DataField="ID" HeaderText="编号" >
                <HeaderStyle Width="5%" />
            </asp:BoundField>                                  
            <asp:BoundField DataField="Name" HeaderText="名称">
                <HeaderStyle Width="45%" />
            </asp:BoundField>
            <asp:BoundField DataField="Type" HeaderText="分类" >
                <HeaderStyle Width="10%" />
            </asp:BoundField>
            <asp:BoundField DataField="UpdateTime" HeaderText="更新时间"  >
                <HeaderStyle Width="15%" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="操作" >
               <ItemTemplate >
                  <a href="Admin_AddPageLabel.aspx?action=modify&id=<%# Eval("ID") %>">修改</a> |
                  <asp:LinkButton ID="DeleteButton" runat="server" CommandArgument='<%# Eval("ID") %>' OnCommand="Delete_Click" CommandName='<%#PagelabelType %>' Text="删除" OnClientClick="return confirm('是否删除本标签？')" />|
                  <asp:LinkButton ID="CopyButton" runat="server"  Text="复制" CommandArgument='<%# Eval("ID") %>'  CommandName='<%#PagelabelType %>' OnCommand="CopyButton_OnCommodn" />|
               </ItemTemplate>
                <HeaderStyle Width="20%" />
            </asp:TemplateField>
        </Columns>          
    </asp:GridView>
    
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetPageLabelByType" TypeName="PageLabel" DeleteMethod="DeletePageLabel">
        <SelectParameters>                                                    
            <asp:QueryStringParameter Name="PageLabelType" QueryStringField="types" Type="String" />
        </SelectParameters>
        <DeleteParameters>
            <asp:Parameter Name="ID" Type="Int32" />
        </DeleteParameters>
    </asp:ObjectDataSource>

</asp:Content>

