<%@ page language="C#" masterpagefile="~/HL_Admin/AdminIndexMaster.master" autoeventwireup="true" inherits="Passport_ManageAd, HoWaveIMSV5.0" title="广告管理" debug="true" %>
<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_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" Width="100px"/>
         广告描述：<asp:TextBox ID="TextBox2" runat="server" AutoPostBack="True" Width="100px"/>
      </div>
      <div style="width:100%">
          <asp:GridView ID="GridView1" runat="server"  AutoGenerateColumns="False" DataSourceID="AdDatasource" OnDataBound="GridView1_DataBound" 
          Width="100%"　EmptyDataText="对不起，没有找到符合你查询条件的数据"  AllowPaging="True" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
           CssClass="adminlist" EnableViewState="false">
        <Columns>
           <asp:TemplateField HeaderText="选择">
                <ItemTemplate>
                    <asp:CheckBox ID="CheckBox1" runat="server" Text="" />
                </ItemTemplate>
                <HeaderTemplate>
                   <input id="chkAll" onclick="SelectAllCheckboxes(this);" runat="server" type="checkbox" /> 全选
                </HeaderTemplate>
            </asp:TemplateField>            
            <asp:BoundField DataField="ADID" HeaderText="ID" />
            <asp:BoundField DataField="adname" HeaderText="名称" />
            <asp:BoundField DataField="adtype" HeaderText="类型" />
            <asp:BoundField DataField="priority" HeaderText="权重" />
            <asp:BoundField DataField="Views" HeaderText="浏览次数" />
            <asp:BoundField DataField="clicks" HeaderText="点击次数" />
            <asp:BoundField HeaderText="点击率" />
            <asp:BoundField DataField="EndTime" HeaderText="关闭时间" />
            <asp:CheckBoxField DataField="passed" HeaderText="审核状态" ReadOnly="True" />
            <asp:CommandField HeaderText="删除" SelectText="删除" ShowSelectButton="True" />
            <asp:HyperLinkField DataNavigateUrlFields="ADID" DataNavigateUrlFormatString="Admin_UpdateAd.aspx?UpdateAdID={0}"
                HeaderText="更改" Text="更改" />
        </Columns>
    </asp:GridView>
      </div>
      <div style="text-align:center; padding-top:20px; padding-bottom:10px;">       
         <asp:Button ID="Button1" runat="server" Text="审核" OnClick="Button1_Click" />
         <asp:Button ID="Button2" runat="server" Text="反审核" OnClick="Button2_Click" />&nbsp;
         <asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="删除" />
      </div>
    </fieldset>    
    <asp:ObjectDataSource ID="AdDatasource" runat="server" DeleteMethod="DeleteAd" SelectMethod="GetAdByNameIntro"
        TypeName="Ad" UpdateMethod="GetAdByNameIntro" OldValuesParameterFormatString="original_{0}">
        <DeleteParameters>
            <asp:Parameter Name="ADID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="AdName" Type="String" />
            <asp:Parameter Name="AdIntro" Type="String" />
        </UpdateParameters>
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBox1" Name="AdName" PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBox2" Name="AdIntro" PropertyName="Text" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>

