<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="YC_NewsClass_List.aspx.cs"
    Inherits="YCHR.Web.admin.News.YC_NewsClass_List" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>资讯管理</title>
<link rel="stylesheet" type="text/css" href="../images/style.css" />
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/jquery.validate.min.js"></script>
<script type="text/javascript" src="../js/messages_cn.js"></script>
<script type="text/javascript" src="../js/jquery.form.js"></script>
<script type="text/javascript" src="../js/cursorfocus.js"></script>
<script type="text/javascript">
        $(function () {
            //表单验证JS
            $("#form1").validate({
                //出错时添加的标签
                errorElement: "span",
                success: function (label) {
                    //正确时的样式
                    label.text(" ").addClass("success");
                }
            });
        });

        $(function () {
            $(".msgtable tr:nth-child(odd)").addClass("tr_bg"); //隔行变色
            $(".msgtable tr").hover(
			    function () {
			        $(this).addClass("tr_hover_col");
			    },
			    function () {
			        $(this).removeClass("tr_hover_col");
			    }
		    );
        });
    </script>
</head>
<body style="padding: 10px;">
<form id="form1" runat="server">
  <div class="navigation"> <span class="add"></span><b>您当前的位置：首页 &gt; 资讯管理 &gt; 资讯列表</b></div>
  <div class="spClear"> </div>
  <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1">
    <tr>
      <td height="25" class="pl20"><b>管理选项： <a href="YC_NewsClass_Add.aspx">新增栏目</a>| <a href="YC_NewsClass_List.aspx"> 栏目管理</a>| <a href="YC_News_Add.aspx">添加资讯</a> | <a href="YC_News_List.aspx">资讯管理</a> |[<a href="javascript:location.reload()">刷新页面</a>]</b></td>
    </tr>
  </table>
  <div class="spClear"> </div>
  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
    <tr>
      <th width="10%" align="center"> 编号 </th>
      <th width="30%" align="center"> 栏目名称 </th>
      <th width="30%" align="center"> 所属频道 </th>
      <th width="9%" align="center"> 排序 </th>
      <th width="21%" align="center"> 操作 </th>
    </tr>
    <asp:Repeater ID="repNewsClassList" runat="server" OnItemCommand="repNewsClassList_ItemCommand">
      <ItemTemplate>
        <tr>
          <td align="center"><%#Eval("id") %>
            <asp:HiddenField ID="txtid" Value='<%#Eval("id") %>' runat="server" />
            <asp:HiddenField ID="txtparentid" Value='<%#Eval("parentid") %>' runat="server" /></td>
          <td align="center"><%#Eval("cname") %></td>
          <td align="center"><font color="green"><b> <%#getchannelname(Eval("parentid"))%></b></font></td>
          <td align="center"><%#Eval("orderid") %></td>
          <td align="center"><asp:ImageButton ID="imgedit" Visible='<%#Eval("parentid").ToString()=="0"?false:true %>'
                            CommandName="imgedit" ImageUrl="../images/white_edit.png" AlternateText="编辑该分类"
                            runat="server" />
            &nbsp;&nbsp;
            <asp:ImageButton ID="imglook" CommandName="imglook" ImageUrl="../images/organisation.png"
                            runat="server" />
            &nbsp; &nbsp;
            <asp:ImageButton ID="imgdel" Visible='<%#Eval("parentid").ToString()=="0"?false:true %>'
                            OnClientClick="return confirm( '删除此分类将删除此分类下的所有内容,如果有子分类请先删除子分类，否则可能会出错,确定要删除吗？ ');"
                            CommandName="imgdel" ImageUrl="../images/white_delete.png" runat="server" /></td>
        </tr>
      </ItemTemplate>
    </asp:Repeater>
  </table>
</form>
</body>
</html>
