<%@ Page Title="" Language="C#" ValidateRequest="false" MasterPageFile="~/BackCenter/Home/Index.master" AutoEventWireup="true" CodeFile="DataIndex.aspx.cs" Inherits="BackCenter_Data_DataIndex" %>
   
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<asp:Content ID="head" ContentPlaceHolderID="HeadContextPlaceHolder" runat="server">

</asp:Content>

<asp:Content ID="main" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <div class="r_top_line">
        <cite style="float: right">
            <img src="/App_Themes/BackCenter/images/right_tr.gif" /></cite></div>
    <div class="r_tit">
        <cite class="fr menu01"><a href='/BackCenter/Data/DataEdit.aspx?ClassId=<%=Request["ClassId"] %>'>新增数据</a></cite>
        <p class="home">
            位置：后台中心 >> 数据管理 >> <asp:Label ID="lab_ClassName1" runat="server" ></asp:Label>
        </p>
    </div>
    <div class="bd">
        <div class="search">
            <h2 class="search_tit">
                <span>查询</span></h2>
            <div class="search_list">
                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tab_style2">
                    <tr>
                        <td class="n1">标题：
                        </td>
                        <td class="n2">
                        <asp:TextBox ID="txt_Title" runat="server"></asp:TextBox>
                        </td>
                        <td class="n1">
                        </td>
                        <td class="n2">
                        </td>
                        <td class="n1">
                        </td>
                        <td class="n2">
                        </td>
                    </tr>
                </table>
                <div class="s_menu">
                <asp:Button ID="btnSearch" CssClass="menu_b" runat="server" Text="查询"  OnClick="btnSearch_Click" >
                    </asp:Button>     
                 </div>
            </div>
        </div>

        <div class="tit_xs">
            <h2>
                <asp:Label ID="lab_ClassName2" runat="server" ></asp:Label>列表 </h2>
        </div>
        
        <asp:GridView ID="GridView1" GridLines="None" runat="server" Width="100%"  
            DataKeyNames="Id" AutoGenerateColumns="False" CssClass="tab_style" >
        <Columns>
                <asp:BoundField DataField="Id" HeaderText="ID" 
                    ItemStyle-HorizontalAlign="Center"  HeaderStyle-Width="40px" > 
                
<HeaderStyle Width="40px"></HeaderStyle>

<ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundField>
                
                <asp:BoundField DataField="Title" HeaderText="标题" 
                    ItemStyle-HorizontalAlign="Center"  > 
<ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundField>
                <asp:BoundField DataField="AddTime" HeaderText="添加日期"  
                    DataFormatString="{0:yyyy-MM-dd}" ItemStyle-HorizontalAlign="Center"  > 
<ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundField>
                <asp:BoundField DataField="OrderNum" HeaderText="排序"  HeaderStyle-Width="40px" >
<HeaderStyle Width="40px"></HeaderStyle>
                </asp:BoundField>
                <asp:BoundField DataField="ClassId_Name" HeaderText="所属栏目" 
                    ItemStyle-HorizontalAlign="Center"  > 
                
<ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundField>
                
                <asp:TemplateField HeaderText="评论数"  HeaderStyle-Width="40px">
                    <ItemTemplate>    
                    <asp:LinkButton ID="btnVideo" CommandArgument='<%# Eval("Id") %>' runat="server" OnCommand="btnVideo_Command"><%#GetCount(Eval("id").ToString())%></asp:LinkButton>
                    </ItemTemplate>

<HeaderStyle Width="40px"></HeaderStyle>
                </asp:TemplateField> 
                
                <asp:TemplateField HeaderText="修改"  HeaderStyle-Width="40px">
                    <ItemTemplate>    
                    <asp:LinkButton ID="btnUpdate" CommandArgument='<%# Eval("Id") %>' CommandName='<%# Eval("ClassId") %>' runat="server" OnCommand="btnUpdate_Command">[修改]</asp:LinkButton>
                    </ItemTemplate>

<HeaderStyle Width="40px"></HeaderStyle>
                </asp:TemplateField> 
                <asp:TemplateField HeaderText="属性"  HeaderStyle-Width="40px">
                    <ItemTemplate>    
                    <asp:LinkButton ID="btnSetPropertyValue" CommandArgument='<%# Eval("Id") %>' CommandName='<%# Eval("ClassId") %>' runat="server" OnCommand="btnSetPropertyValue_Command">[属性]</asp:LinkButton>
                    </ItemTemplate>

<HeaderStyle Width="40px"></HeaderStyle>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="内容"  HeaderStyle-Width="40px">
                    <ItemTemplate>    
                    <asp:LinkButton ID="btnSetContent" CommandArgument='<%# Eval("Id") %>' CommandName='<%# Eval("ClassId") %>' runat="server" OnCommand="btnSetContent_Command">[内容]</asp:LinkButton>
                    </ItemTemplate>

<HeaderStyle Width="40px"></HeaderStyle>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="图片"  HeaderStyle-Width="40px">
                    <ItemTemplate>    
                    <asp:LinkButton ID="btnSetPicture" CommandArgument='<%# Eval("Id") %>' CommandName='<%# Eval("ClassId") %>' runat="server" OnCommand="btnSetPicture_Command">[图片]</asp:LinkButton>
                    </ItemTemplate>

<HeaderStyle Width="40px"></HeaderStyle>
                </asp:TemplateField>
                
                 <asp:TemplateField HeaderText="附件"  HeaderStyle-Width="40px">
                    <ItemTemplate>    
                    <asp:LinkButton ID="btnSetFile" CommandArgument='<%# Eval("Id") %>' CommandName='<%# Eval("ClassId") %>' runat="server" OnCommand="btnSetFile_Command">[附件]</asp:LinkButton>
                     </ItemTemplate>

<HeaderStyle Width="40px"></HeaderStyle>
                </asp:TemplateField>
                
                <asp:TemplateField HeaderText="组合"  HeaderStyle-Width="40px">
                    <ItemTemplate>    
                    <asp:LinkButton ID="btnSetGroup" CommandArgument='<%# Eval("Id") %>' CommandName='<%# Eval("ClassId") %>' runat="server" OnCommand="btnSetGroup_Command">[组合]</asp:LinkButton>
                    </ItemTemplate>

<HeaderStyle Width="40px"></HeaderStyle>
                </asp:TemplateField>

               <asp:TemplateField HeaderText="删除" HeaderStyle-Width="40px">
                    <ItemTemplate>
                    <asp:LinkButton ID="btnDelete" CommandArgument='<%# Eval("Id") %>' runat="server" OnCommand="btnDelete_Command" Text="<div class=&quot;bluelk&quot; id=&quot;de&quot; onclick=&quot;JavaScript:return confirm('确定要删除该记录吗？')&quot;>[删除]</div>"></asp:LinkButton>
                    </ItemTemplate>

<HeaderStyle Width="40px"></HeaderStyle>
                </asp:TemplateField>
            </Columns>
            <EmptyDataTemplate>
                暂无相关数据!
            </EmptyDataTemplate>
        </asp:GridView>
                
        <div class="sabrosus">
        <webdiyer:AspNetPager ID="AspNetPager1" PageSize="10" HorizontalAlign="Center" Font-Bold="true"
                    CssClass="" runat="server" Width="100%" CenterCurrentPageButton="True"
                    OnPageChanging="AspNetPager1_PageChanging" ShowPageIndexBox="Never" FirstPageText="首页"
                    PrevPageText="上一页" NextPageText="下一页" LastPageText="尾页" PageIndexBoxType="TextBox"
                    CurrentPageButtonTextFormatString="{0:[0]}" AlwaysShow="false" ShowNavigationToolTip="True"
                    CustomInfoHTML="记录总数：%RecordCount%" ShowCustomInfoSection="Left">
                </webdiyer:AspNetPager>
        </div>
    </div>
</asp:Content>

