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

<%@ 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/CAPicAdd.aspx?from=main&id=" + v_id, "添加广告位", 600, 450);
            }
            else {
                top.IndexNewWindow("Basic/CAPicAdd.aspx?from=main&id=" + v_id, "编辑广告位", 600, 450);

            }
        }
        </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:TemplateField HeaderText="图片" ItemStyle-HorizontalAlign="Center"  ItemStyle-Width="100">
<ItemTemplate>
<img src="<%#GetPic(Eval("PicUrl").ToString())%>" border="0" width="50" height="50" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="AdvName" HeaderText="位置名称" ItemStyle-Width="100"/>
<asp:HyperLinkField DataTextField="title"   ControlStyle-CssClass="bluelk"  DataNavigateUrlFields="linkUrl" DataNavigateUrlFormatString="{0}" HeaderText="Alt标题" Target="_blank" />
<asp:BoundField DataField="Width" HeaderText="宽度" ItemStyle-Width="60"/>
<asp:BoundField DataField="Height" HeaderText="高度" ItemStyle-Width="60"/>
<asp:BoundField DataField="Hits" HeaderText="点击量" ItemStyle-Width="60"/>
<asp:TemplateField HeaderText="是否显示"  ItemStyle-Width="60">
<ItemTemplate>
<%# Eval("IsShow").ToString()=="1"?"是":"否" %>
</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>                         
           
</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>
