<%@ page language="C#" validaterequest="false" enableeventvalidation="false" masterpagefile="~/HL_Admin/AdminIndexMaster.master" autoeventwireup="true" inherits="Passport_ManageAdZone, HoWaveIMSV5.0" title="广告模板管理" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script src="Js/Function.js" type="text/javascript"></script> 
    <div style="width:100%; padding:5px;">
          <a href="Admin_Channel.aspx" >频道管理</a>&nbsp;|&nbsp;<a href="Admin_manageadzone.aspx">管理广告版位</a>&nbsp;|&nbsp;
          <a href="Admin_updateadzone.aspx?add=1">增加广告版位</a>&nbsp;|&nbsp;<a href="Admin_managead.aspx">管理广告</a>&nbsp;|&nbsp;
          <a href="Admin_updateAd.aspx">添加新广告</a>&nbsp;|&nbsp;
          <a  href="Admin_Managejs.aspx">js模板管理</a>&nbsp;|&nbsp;<a href="Admin_ManageUploadFile.aspx">广告上传文件管理</a><br />                
      </div>
    <fieldset style="margin:5px; width:98%">
      <legend>广告模板管理</legend>
      
      <div style="width:100%;">
        快速查找--> 版位名称：<asp:TextBox ID="TextBox1" runat="server" AutoPostBack="True"/>
         版位描述：<asp:TextBox ID="TextBox2" runat="server" AutoPostBack="True" Width="100px"/>
      </div>
      <div>
         <asp:GridView  EmptyDataText="对不起，没有找到符合你查询条件的数据" ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
              DataSourceID="AdZoneDatasource" Width="100%" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" OnDataBound="GridView1_DataBound" 
              DataKeyNames="zoneid" CssClass="adminlist" EnableViewState="false">
                    <Columns>
                        <asp:TemplateField HeaderText="选择">
                            <ItemTemplate>
                                <asp:CheckBox ID="CheckBox1" runat="server" Text='<%# Eval("ZoneID") %>' />
                            </ItemTemplate>
                            <HeaderTemplate>
                               <input id="chkAll" onclick="SelectAllCheckboxes(this);" runat="server" type="checkbox" /> 全选
                            </HeaderTemplate>
                        </asp:TemplateField>                        
                        <asp:BoundField DataField="ZoneID" HeaderText="ID" />
                        <asp:BoundField DataField="Zonename" HeaderText="名称" />
                        <asp:BoundField DataField="Zonetype" HeaderText="类型" />
                        <asp:BoundField DataField="ChannelName" HeaderText="频道" />
                        <asp:BoundField DataField="ShowType" HeaderText="显示" />
                        <asp:BoundField DataField="zoneWidth" HeaderText="长" />
                        <asp:BoundField DataField="zoneHeight" HeaderText="宽" />
                        <asp:BoundField DataField="Active" HeaderText="活动" />
                        <asp:CommandField HeaderText="删除" SelectText="删除" ShowSelectButton="True" />
                        <asp:HyperLinkField DataNavigateUrlFields="ZoneID" DataNavigateUrlFormatString="Admin_UpdateAdzone.aspx?UpdateZoneID={0}"
                            HeaderText="更改" Text="更改" />
                        <asp:HyperLinkField DataNavigateUrlFields="zoneid" DataNavigateUrlFormatString="?zoneid={0}"
                            HeaderText="调用代码" Text="调用代码" />
                        <asp:TemplateField HeaderText="预览">
                            <ItemTemplate> 
                            <asp:HyperLink ID="PreviewAD" runat="server" NavigateUrl='<%#"admin_adprevrew.aspx?js="+Eval("zoneJSName") %>' Text='预览' target="_blank"/>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>              
            <div style="padding:10px; width:100%; text-align:center;">               
                <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="反选" />
                <asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="全删" />
                &nbsp;<asp:Button ID="Button4" runat="server" OnClick="Button4_Click" Text="设为活动版位" />
                &nbsp;
                <asp:Button ID="Button7" runat="server" OnClick="Button7_Click" Text="设为暂停版位" />
                <asp:Button ID="Button6" runat="server" OnClick="Button6_Click" Text="移动频道" />=&gt;<asp:DropDownList ID="ChannelID" runat="server" DataSourceID="ObjectDataSource1"
                    DataTextField="channelname" DataValueField="channelid" Width="112px">
                </asp:DropDownList>            
            </div>
            <asp:Panel ID="Panel1" runat="server" Height="89px" Visible="False" Width="100%">
                <asp:TextBox ID="TxtCode" runat="server" Height="72px" Width="100%"/>
                <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="Admin_ManageAdZone.aspx" Text="关闭" />
             </asp:Panel>
      </div>   
     </fieldset> 
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"  SelectMethod="GetChannels" TypeName="ChannelBLL"/> 
    <asp:ObjectDataSource ID="AdZoneDatasource" runat="server" DeleteMethod="DelectAdZone"
        SelectMethod="GetAdZoneByNameIntro" TypeName="AdZone" UpdateMethod="GetAdZoneByNameIntro" OldValuesParameterFormatString="original_{0}">
        <DeleteParameters>
            <asp:Parameter Name="AdZoneID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="ZoneName" Type="String" />
            <asp:Parameter Name="ZoneIntro" Type="String" />
        </UpdateParameters>
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBox1" Name="ZoneName" PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBox2" Name="ZoneIntro" PropertyName="Text" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>    
</asp:Content>

