<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AdvertisementList.aspx.cs" Inherits="Admin" %>

<%@ Register Src="../../Control/PageNo.ascx" TagName="PageNo" TagPrefix="uc1" %>

<!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 runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>广告管理</title>
<link rel="stylesheet" href="../skin/style.css" type="text/css" />
 <script type="text/javascript" src="../../js/jquery.js"></script>
<script type="text/javascript" src="../js/jquery-1.2.5.js"></script>
<script type="text/javascript">
     $(function(){
$("span.hao123 :checkbox").click(function(){
var r=$("span.hao123 :checkbox").attr("checked");
if(r)
{
$(":checkbox").attr("checked","checked");
}
else
{
$(":checkbox").removeAttr("checked","checked");
}

})
});

function did()
{
 var a=confirm("你确定要删除吗？");
 return a;
}

</script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="itemtitle">
	<h3>
		快捷选项</h3>
</div>
<div class="itemtitle_tect">
<p>
广告名称：
  <asp:TextBox ID="TxB_Name" runat="server" Width="180px"></asp:TextBox>
&nbsp;
   广告类型：
   <asp:TextBox ID="TxB_Type" runat="server" Width="180px"></asp:TextBox><asp:Button ID="Button5" runat="server" Text="立即查询" OnClick="Button5_Click" CssClass="i_button" />
</p>
</div>
<div class="clr"></div>
<div class="talbe_border">
        <asp:GridView ID="GridView1" runat="server" AllowPaging="false" AutoGenerateColumns="false" OnRowCommand="GridView1_RowCommand" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" GridLines="None" CssClass="talbe_list" OnRowDataBound="GridView1_RowDataBound">
        <Columns>
        <asp:TemplateField>
        <ItemTemplate>
            <asp:CheckBox ID="ckb_Ad" runat="server"/>
        </ItemTemplate>
		<HeaderStyle CssClass="th20 tou" />
        <ItemStyle CssClass="nolet" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="广告位ID" Visible="false">
        <ItemTemplate>
        <asp:Label ID="Lb_ID" runat="server" Text='<%#Eval("T_ID")%>'></asp:Label>
        </ItemTemplate>
        </asp:TemplateField>
          <asp:TemplateField HeaderText="广告名称">
        <ItemTemplate>
        <asp:Label ID="Lb_Name" runat="server" Text='<%#Eval("Ad_MemberInfoName") %>'></asp:Label>
        </ItemTemplate>
		<ItemStyle CssClass="left2" />
        </asp:TemplateField>
          <asp:TemplateField HeaderText="所属广告位">
        <ItemTemplate>
            <asp:Label ID="Lb_page" runat="server" Text='<%#Eval("Ad_Name")%>'></asp:Label>
        </ItemTemplate>
		<HeaderStyle CssClass="th80" />
        </asp:TemplateField>
          <asp:TemplateField HeaderText="投放天数">
        <ItemTemplate>
        <asp:Label ID="Lb_Day" runat="server" Text='<%#Eval("Ad_Day")%>'></asp:Label>
        </ItemTemplate>
		<HeaderStyle CssClass="th80" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="用户名称">
        <ItemTemplate>
            <asp:Label ID="Lb_User" runat="server" Text='<%#Eval("LoginName")%>'></asp:Label>
        </ItemTemplate>
		<HeaderStyle CssClass="th80" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="图片链接地址" Visible="false">
        <ItemTemplate>
            <asp:Label ID="Lb_ImagAdres" runat="server" Text='<%#Eval("Ad_ImageAdrees")%>'></asp:Label>
        </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="操作选项">
        <ItemTemplate>
        <a href='MangerEditAd.aspx?mid=<%#Eval("M_ID")%>&adname=<%#Eval("Ad_Name")%>'>编辑</a> | 
        <asp:LinkButton ID="btn_delet" runat="server" Text="删除"  OnClientClick="return did();" CommandArgument='<%#Eval("M_ID")%>' CommandName="select"></asp:LinkButton> | 
        <asp:LinkButton ID="btn_shenhe" runat="server" Text='<%#Eval("Ad_Auditing")%>' CommandName='<%#Eval("Ad_Auditing")%>' CommandArgument='<%#Eval("M_ID")%>'></asp:LinkButton>
        </ItemTemplate>
		<HeaderStyle CssClass="th180" />
        </asp:TemplateField>
       <asp:TemplateField Visible="false">
        <ItemTemplate>
        <asp:Label ID="Lb_mid" runat="server" Text='<%#Eval("M_ID")%>' Visible="false"></asp:Label>
        </ItemTemplate>
       </asp:TemplateField>
        </Columns>
		<HeaderStyle CssClass="header" />
        </asp:GridView>
        <asp:Label ID="lblMessage" runat="server" Visible="false"></asp:Label>
         <div class="Paging">
		 <p>
             <uc1:PageNo ID="PageNo1" runat="server" />
		  </p>
			  <asp:CheckBox ID="ckAd" runat="server" CssClass="hao123" Text="全选"/>
			  <asp:Button ID="likbtnAllDelete" runat="server" Text="批量删除" OnClick="AllDelete_Click" OnClientClick="return did();" CssClass="i_button"></asp:Button>
    </div>
    </div>
    </form>
</body>
</html>
