<%@ page language="C#" autoeventwireup="true" inherits="Admin_Article_List, ShopNum1Deploy" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ShopNum1" %>
<%@ 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 id="Head1" runat="server">
    <title>Untitled Page</title>
    <link href="../css/Num1GridView.css" rel="stylesheet" type="text/css">
    <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 width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="right" style="width:15%">文章标题：</td>
    <td  style="width:25%"><asp:TextBox ID="TextBoxTitle" runat="server" CssClass="input1"></asp:TextBox></td>
    <td align="right"> 文章类别：</td>
    <td><asp:DropDownList ID="DropDownListArticleCategoryID" runat="server" CssClass="select1"></asp:DropDownList></td>
    <td align="right">前台是否显示：</td>
    <td><asp:DropDownList ID="DropDownListIsShow" runat="server" CssClass="select1"></asp:DropDownList></td>
  </tr>
  <tr>
    <td align="right">作者/发布人：</td>
    <td><asp:TextBox ID="TextBoxPublisher" runat="server" CssClass="input1"></asp:TextBox></td>
    <td align="right">是否头条：</td>
    <td><asp:DropDownList ID="DropDownListIsHead" runat="server" CssClass="select1"></asp:DropDownList></td>
    <td align="right">是否允许评论：</td>
    <td><asp:DropDownList ID="DropDownListIsAllowComment" runat="server" CssClass="select1"></asp:DropDownList></td>
  </tr>
  <tr>
    <td align="right">发布时间：</td>
    <td><asp:TextBox ID="textBoxStartDate" runat="server" CssClass="input1"></asp:TextBox>
                         <ShopNum1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" 
        EnableScriptGlobalization="True" EnableScriptLocalization="True">    </ShopNum1:ToolkitScriptManager>
    <img id="imgCalendarStartTime" alt="" src="../images/Calendar.png" 
        style="width: 16px; height: 18px;" />
      <ShopNum1:CalendarExtender 
        ID="CalendarExtender1" runat="server" TargetControlID="textBoxStartDate" 
        PopupButtonID="imgCalendarStartTime" CssClass="ajax__calendar">    </ShopNum1:CalendarExtender></td>
    <td align="right">是否推荐：</td>
    <td ><asp:DropDownList ID="DropDownListIsRecommend" runat="server" CssClass="select1"></asp:DropDownList></td>
    <td align="right">是否热点：</td>
    <td><asp:DropDownList ID="DropDownListIsHot" runat="server" CssClass="select1"></asp:DropDownList></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="right"></td>
    <td><asp:TextBox ID="textBoxEndDate" runat="server"  CssClass="input1"></asp:TextBox>
    <img id="imgCalendarEndTime" alt="" src="../images/Calendar.png" 
        style="width: 16px; height: 18px;" />
      <ShopNum1:CalendarExtender 
        ID="CalendarExtender2" runat="server" TargetControlID="textBoxEndDate" 
        PopupButtonID="imgCalendarEndTime" CssClass="ajax__calendar">    </ShopNum1:CalendarExtender></td>
    <td>&nbsp;</td>
    <td><asp:Button ID="ButtonSearch" runat="server" Text="查询" 
            onclick="ButtonSearch_Click" CssClass="bt2"  /></td>
    <td>&nbsp;</td>
  </tr>
</table>
</div>
        
        
        <div style="height: 424px" >
            <cc1:Num1GridView ID="Num1GridViewShow" runat="server" 
                AutoGenerateColumns="False" 
                AllowPaging="True" AllowSorting="True" AscendingImageUrl="~/images/SortAsc.gif" 
                DescendingImageUrl="~/images/SortDesc.gif" Width="100%" 
                AddSequenceColumn="False" AllowMultiColumnSorting="False" BorderColor="#CCDDEF" 
                BorderStyle="Solid" BorderWidth="1px" CellPadding="4" Del="False" 
                DeletePromptText="确实要删除指定的记录吗？" Edit="False" FixHeader="False" 
                Font-Size="Small" GridViewSortDirection="Ascending" PagingStyle="None" 
                style="margin-left: 2px;" TableName="" DataSourceID="ObjectDataSourceData" 
                >          
<HeaderStyle HorizontalAlign="Center" BackColor="#6699CC" Font-Bold="True" ForeColor="White"></HeaderStyle>

<PagerStyle HorizontalAlign="center" BackColor="#EEEEEE" ForeColor="#6699CC"></PagerStyle>
                <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                       <input id="checkboxAll" onclick="javascript:SelectAllCheckboxes(this);" 
                            type="checkbox"  />
                    </HeaderTemplate>
                    <ItemTemplate>
<%--<input ID="checkboxItem"   onclick="GetItmeValue(this)" type="checkbox" />--%>
                        <input id="checkboxItem"   value='<%# Eval("Guid") %>'  type="checkbox" />
               		</ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                    <asp:BoundField DataField="Guid" HeaderText="Guid" Visible="False" 
                        SortExpression="Guid" >
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Title" HeaderText="标题" SortExpression="Title" />
                    <asp:BoundField DataField="Publisher" HeaderText="作者/发布人" 
                        SortExpression="Publisher" />
                    <asp:BoundField DataField="Name" HeaderText="所属类型" 
                        SortExpression="Name" />
                    <asp:BoundField HeaderText="排序号" DataField="OrderID" SortExpression="OrderID" >
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField HeaderText="来源" DataField="Source" SortExpression="Source" >
                        <HeaderStyle CssClass="hidden" />
                        <ItemStyle CssClass="hidden" />
                    </asp:BoundField>
                    <asp:BoundField HeaderText="发布时间" DataField="CreateTime" 
                        SortExpression="CreateTime" >
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="是否显示" SortExpression="IsShow">
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# ChangeIsShow(DataBinder.Eval(Container, "DataItem(IsShow)","{0}")) %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="是否热点" SortExpression="IsHot">
                        <ItemTemplate>
                            <asp:Label ID="Label4" runat="server" Text='<%# ChangeIsHot(DataBinder.Eval(Container, "DataItem(IsHot)","{0}")) %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="是否推荐" SortExpression="IsRecommend">
                        <ItemTemplate>
                            <asp:Label ID="Label3" runat="server" Text='<%# ChangeIsRecommend(DataBinder.Eval(Container, "DataItem(IsRecommend)","{0}")) %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="是否头条" SortExpression="IsHead">
                        <ItemTemplate>
                            <asp:Label ID="Label2" runat="server" Text='<%# ChangeIsHead(DataBinder.Eval(Container, "DataItem(IsHead)","{0}")) %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                </Columns>
            </cc1:Num1GridView>
           <div class="vote">
            <asp:Button ID="ButtonAdd" runat="server" Text="添加" 
                onclick="ButtonAdd_Click" CausesValidation="False"  CssClass="bt2"/>
            <asp:Button ID="ButtonEdit" runat="server" CausesValidation="False" Text="编辑" 
                onclientclick="return EditButton()" onclick="ButtonEdit_Click" CssClass="bt2"/>
             <asp:Button ID="ButtonUp" runat="server" Text="向上" CssClass="bt2" />
             <asp:Button ID="ButtonDown" runat="server" Text="向下" CssClass="bt2"/>
            <asp:Button ID="ButtonDelete" runat="server" CausesValidation="False" 
                Text="删除" onclientclick="return DeleteButton()" 
               onclick="ButtonDelete_Click" CssClass="bt2"/>
           <asp:Button ID="ButtonShow" runat="server" Text="前台显示" CssClass="bt3"/>
            <asp:Button ID="ButtonHidden" runat="server" Text="前台隐藏" CssClass="bt3"/>
            <asp:Button ID="ButtonBrowse" runat="server" Text="前台预览" CssClass="bt3"/>
            <asp:Button ID="ButtonViewComment" runat="server" Text="查看评论" CssClass="bt3" 
                   onclick="ButtonViewComment_Click" onclientclick="return EditButton()"/>
            <uc1:MessageShow ID="MessageShow" runat="server" Visible="False" />
       </div>
    </div>
    
    <asp:HiddenField ID="CheckGuid" runat="server" Value="0" />
 <%--<input ID="checkboxItem"   onclick="GetItmeValue(this)" type="checkbox" />--%>
        
    <asp:ObjectDataSource ID="ObjectDataSourceData" runat="server" 
        SelectMethod="Search" TypeName="ShopNum1.BusinessLogic.ShopNum1_Article_Action" 
        >
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBoxTitle" Name="title" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxPublisher" 
                Name="publisher" PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="DropDownListArticleCategoryID" 
                Name="articlecategoryid" PropertyName="SelectedValue" Type="Int32" />
            <asp:ControlParameter ControlID="textBoxStartDate" Name="startdate" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="textBoxEndDate" Name="enddate" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="DropDownListIsShow" Name="isshow" 
                PropertyName="SelectedValue" Type="Int32" />
            <asp:ControlParameter ControlID="DropDownListIsHot" Name="ishot" 
                PropertyName="SelectedValue" Type="Int32" />
            <asp:ControlParameter ControlID="DropDownListIsRecommend" Name="isrecommand" 
                PropertyName="SelectedValue" Type="Int32" />
            <asp:ControlParameter ControlID="DropDownListIsHead" Name="ishead" 
                PropertyName="SelectedValue" Type="Int32" />
            <asp:ControlParameter ControlID="DropDownListIsAllowComment" Name="isallowcomment" 
                PropertyName="SelectedValue" Type="Int32" />
            <asp:Parameter Name="isDeleted" Type="Int32" DefaultValue="0" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <br />
    </form>
</body>
</html>
