<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChannelList.aspx.cs" Inherits="WstWeb.Admin.Basic.ChannelList" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!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>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <link rel="stylesheet" type="text/css" href="../css/style.css" />
   <script src="../Js/jquery-1.6.min.js" type="text/javascript"></script>
   <script src="../Js/easyui/jquery.easyui.min.js" type="text/javascript"></script>
   <script src="../Js/easyui/easyui-lang-zh_CN.js" type="text/javascript"></script>
    <script src="../Js/PublicComm.js" type="text/javascript"></script>
    <script src="../Js/WinFuns.js" type="text/javascript"></script>
    <script src="../Js/pageloader.js" type="text/javascript"></script>
    <script type="text/javascript">
        //刷新
        var RefreshPage = function(v_istop) {
            if (v_istop) $("#hdnIsTop").val("1");
            else $("#hdnIsTop").val("0");
            __doPostBack("lbtnRefresh", "");
        }
        var CloseChildPage = function(v_istop) {
            new WinFuns().CloseNewWindow("wincomm");
            setTimeout(function() { RefreshPage(v_istop); }, 200);
        }
         var EditInfo = function(v_id) {
            if (v_id == "-1") {
                top.IndexNewWindow("basic/ChannelAdd.aspx?from=main&id=" + v_id, "添加栏目", 450, 450);
            }
            else {
                top.IndexNewWindow("basic/ChannelAdd.aspx?from=main&id=" + v_id, "编辑栏目", 450, 450);

            }
        }
        $(function() {
            //top.ResizeIFrame();
        });
        </script>
</head>
<body>
    <form id="form1" runat="server">
  <div class="ctright">
   <div class="map"><h3><strong class="left">栏目管理</strong><strong class="right search_icon"><a href="JavaScript:void(0)" onclick="EditInfo(-1)"> 添加</a></strong></h3></div>
    <div class="clear"></div>
  <div class="form" style="margin-top:10px;">
<asp:GridView ID="GridView1"  runat="server" AutoGenerateColumns="False"  CssClass="gridView" CellPadding="0" CellSpacing="0">
<Columns>
<asp:BoundField DataField="ChannelNo" HeaderText="栏目排序" ItemStyle-Width="80"/>
<asp:BoundField DataField="ChannelName" HeaderText="栏目名称"/>
<asp:BoundField DataField="ChannelUrl" HeaderText="栏目地址" ItemStyle-Width="250"/>
<asp:TemplateField HeaderText="链接类型" ItemStyle-Width="80">
<ItemTemplate>
<%#Eval("ChannelType").ToString()=="1"?"内部":"外部" %>
</ItemTemplate>
</asp:TemplateField>
    <asp:TemplateField HeaderText="栏目状态" ItemStyle-Width="80px">
        <ItemTemplate>
            <asp:LinkButton ID="lbtn_offer" CommandArgument='<%# Eval("id") %>' CommandName='<%# Eval("ChannelStatus") %>'
                CssClass="bluelk" runat="server" OnCommand="lbtn_offer_Command"><%# Eval("ChannelStatus").ToString() == "1" ? "[取消显示]" : "[设为显示]"%></asp:LinkButton>
        </ItemTemplate>
    </asp:TemplateField>
<asp:TemplateField HeaderText="修改"  ItemStyle-Width="60">
<ItemTemplate>
<a href="javascript:void(0)" class="bluelk" onclick="EditInfo(<%# Eval("Id") %>);">[修改]</a>
</ItemTemplate>
</asp:TemplateField>                         
<asp:TemplateField HeaderText="删除"  ItemStyle-Width="60">
<ItemTemplate>
<asp:LinkButton ID="lbtn_sc"  CssClass="bluelk" CommandArgument='<%# Eval("Id") %>' Text="<div class=&quot;bluelk&quot; id=&quot;de&quot; onclick=&quot;JavaScript:return confirm('确定要删除该记录吗？')&quot;>[删除]</div>" runat="server" OnCommand="lbtn_sc_Command"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>            
</Columns>
</asp:GridView>
<div class="page-fenye">
<webdiyer:AspNetPager id="AspNetPager1" HorizontalAlign="Center" Font-Bold="true" runat="server" Width="100%" CenterCurrentPageButton="True"
OnPageChanging="AspNetPager1_PageChanging" ShowPageIndexBox="Always"
FirstPageText="首页" PrevPageText="上一页" NextPageText="下一页" LastPageText="尾页" 
PageIndexBoxType="TextBox"  CurrentPageButtonTextFormatString="{0:[0]}" 
AlwaysShow="True" ShowNavigationToolTip="True" PageSize="20"
CustomInfoHTML="记录总数：%RecordCount%" CustomInfoSectionWidth="200px" 
ShowCustomInfoSection="Left"   CustomInfoStyle="text-valign:middle;margin-right:0px;" CustomInfoClass="bluelk">
</webdiyer:AspNetPager>
</div>
        </div>
    </div> 
    <input type="hidden" id="hdnIsTop" runat="server" value="0" />
    <asp:LinkButton ID="lbtnRefresh" runat="server" onclick="lbtnRefresh_Click"></asp:LinkButton>
    </form>
</body>
</html>
