<%@ page language="C#" autoeventwireup="true" inherits="Admin_Advertisement_List, GroupTGWeb_deploy" %>
<%@ Register assembly="ShopNum1.Control" namespace="ShopNum1.Control" tagprefix="cc1" %>
<%@ Register Src="UserControl/MessageShow.ascx" TagName="MessageShow" 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">
    <title>广告列表</title>
    <link type="text/css" rel="Stylesheet" href="css/index.css" />

    <script type="text/javascript" language="javascript" src="../js/CommonJS.js"></script>

</head>
<body style="padding: 0; background-image: url(images/Bg_right.gif); background-repeat: repeat;">
    <form id="form1" runat="server">
    <div class="navigator">
        【 广告列表 】</div>
    <div class="query">
        <table cellpadding="0" cellspacing="0" width="100%" border="0">
            <tr>
                <td align="right">
                    页面名：
                </td>
                <td>
                    <asp:TextBox ID="TextBoxAdPageName" runat="server" CssClass="input1"></asp:TextBox>
                </td>
                <td align="right">
                    文件名：
                </td>
                <td>
                    <asp:DropDownList ID="DropDownListFileName" runat="server">
                    </asp:DropDownList>
                </td>
                <td>
                    <asp:Button ID="ButtonSearch" runat="server" Text="查询" CssClass="bt2" 
                        onclick="ButtonSearch_Click" />
                </td>
            </tr>
        </table>
    </div>
    <cc1:Num1GridView ID="Num1GridViewShow" runat="server" AllowPaging="True" AddSequenceColumn="False"
        AllowMultiColumnSorting="False" AutoGenerateColumns="False" BorderColor="#CCDDEF"
        BorderStyle="Solid" BorderWidth="1px" CellPadding="4" DataSourceID="ObjectDataSourceData"
        Del="False" DeletePromptText="确实要删除指定的记录吗？" Edit="False" FixHeader="False" GridViewSortDirection="Ascending"
        PagingStyle="None" Style="margin-left: 2px;" TableName="" Width="99%" 
        AllowSorting="True">
        <HeaderStyle HorizontalAlign="Center" BackColor="#6699CC" Font-Bold="True" ForeColor="#FFFFFF">
        </HeaderStyle>
        <PagerStyle HorizontalAlign="Left" BackColor="#EEEEEE" ForeColor="#6699CC"></PagerStyle>
        <Columns>
            <asp:TemplateField>
                <HeaderTemplate>
                    <input id="checkboxAll" onclick="javascript:SelectAllCheckboxes(this);" type="checkbox" />
                </HeaderTemplate>
                <ItemTemplate>
                    <input id="checkboxItem" type="checkbox" value='<%# Eval("guid") %>' />
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" Width="30px" />
            </asp:TemplateField>
            <%--<asp:BoundField DataField="divid" HeaderText="广告ID" />--%>
            <asp:TemplateField >
               <ItemTemplate >
                  <a href ='<%#"Advertisement_Operate.aspx?Guid="+ Eval("Guid") %>'><%# Eval("divid") %></a>
               </ItemTemplate>            
            </asp:TemplateField>            
            <asp:BoundField DataField="pagename" HeaderText="页面名" />
            <asp:BoundField DataField="explain" HeaderText="说明" />
            <asp:BoundField DataField="filename" HeaderText="文件名" />
            <asp:TemplateField HeaderText="类型">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# AdType(Eval("type")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="href" HeaderText="链接地址" />
        </Columns>
    </cc1:Num1GridView>
    <div class="vote">
        <asp:Button ID="ButtonAdd" runat="server" CausesValidation="False" Text="添加" 
            CssClass="bt2" onclick="ButtonAdd_Click" />
        <asp:Button ID="ButtonEdit" runat="server" CausesValidation="False" Text="编辑" OnClientClick="return EditButton()"
            OnClick="ButtonEdit_Click" CssClass="bt2" />
        <asp:Button ID="ButtonDelete" runat="server" CausesValidation="False" Text="删除" OnClientClick="return DeleteButton()"
            OnClick="ButtonDelete_Click" CssClass="bt2" />
        <uc1:MessageShow ID="MessageShow" runat="server" Visible="False" />
    </div>
    <asp:HiddenField ID="CheckGuid" runat="server" Value="0" />
    <asp:ObjectDataSource ID="ObjectDataSourceData" runat="server" SelectMethod="Search"
        TypeName="GroupFlyTG.BusinessLogic.GroupFlyTG_Advertisement_Action" 
        OldValuesParameterFormatString="original_{0}">
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBoxAdPageName" Name="pagename" PropertyName="Text"
                Type="String" />
            <asp:ControlParameter ControlID="DropDownListFileName" Name="fileName" 
                PropertyName="SelectedValue" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
    </form>
</body>
</html>
