<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_Lable, HoWaveVGO" 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_AddLabel.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"><a href="Admin_Lable.aspx">显示全部</a></td><td class="rtd"><asp:Literal ID="LableManage" runat="server" /></td></tr>
   </table>
 <br />
    <asp:GridView ID="GridView1" DataKeyNames="ID" runat="server" AllowPaging="True" AutoGenerateColumns="False"  
      CssClass="adminlist" DataSourceID="ObjectDataSource1"  PageSize="20" OnDataBound="GridView1_DataBound">
        <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_AddLabel.aspx?action=modify&id=<%# Eval("ID") %>">修改</a> |
                  <asp:LinkButton ID="DeleteButton" runat="server" CommandName="delete" Text="删除" OnClientClick="return confirm('是否删除本标签？')" />  | 
                  <asp:LinkButton ID="CopyButton" runat="server"  Text="复制"  CommandName=<%# Eval("ID") %> OnCommand="CopyButton_OnCommodn" />
               </ItemTemplate>
                <HeaderStyle Width="20%" />
            </asp:TemplateField>
        </Columns>          
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetLabelByType" TypeName="LableBll" DeleteMethod="DeleteLabel">
        <SelectParameters>
            <asp:QueryStringParameter Name="LabelType" QueryStringField="type" Type="String" />
        </SelectParameters>
        <DeleteParameters>
            <asp:Parameter Name="ID" Type="Int32" />
        </DeleteParameters>
    </asp:ObjectDataSource>

</asp:Content>

