<%@ page language="C#" masterpagefile="~/SiteServer/MasterPage/PageTemplate.Master" autoeventwireup="true" inherits="SiteServer_Extension_Create_Content_list, v5star.Web" title="Untitled Page" theme="Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageBody" runat="Server">
    <aspx:HeadMenuWebControls ID="HeadMenuWebControls1" runat="server" HeadTitleTxt="生成管理-生成内容页">
    </aspx:HeadMenuWebControls>
    <aspx:TabOptionWebControls ID="TabOptionWebControls1" runat="server">
        <aspx:TabOptionItem ID="TabOptionItem1" runat="server" Tab_Name="全部信息">
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="100%"
                OnRowDataBound="GridView1_RowDataBound">
                <Columns>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <input id="Checkbox1" type="checkbox" onclick="CheckAll(this)" runat="server" /><label>全选</label>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:CheckBox ID="ItemCheckBox" runat="server" />
                        </ItemTemplate>
                        <HeaderStyle Width="60px" />
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="序号" />
                    <asp:BoundField DataField="Article_Title" HeaderText="标题">
                        <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="是否已生成">
                        <ItemTemplate>
                            <%# IsCreate(Eval("Article_Create"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <div>
                <div style="float: left; margin-left:20px;">
                    <asp:Button ID="Create" runat="server" Text="生成" CssClass="button_bak" OnClick="Create_Click" />
                </div>
                <div class="cutepage">
                    <aspx:CutePager ID="CutePager1" runat="server" AlwaysShow="True" CustomInfoTextAlign="Center"
                        HorizontalAlign="Center" ShowCustomInfoSection="Right" OnPageChanged="CutePager1_PageChanged">
                    </aspx:CutePager>
                </div>
            </div>
        </aspx:TabOptionItem>
    </aspx:TabOptionWebControls>

    <script type="text/javascript">
  //<![CDATA[
  function CheckAll(oCheckbox)
  {
   var GridView1 = document.getElementById("<%=GridView1.ClientID %>");
   for(i = 1;i < GridView1.rows.length; i++)
   {
    GridView1.rows[i].cells[0].getElementsByTagName("INPUT")[0].checked = oCheckbox.checked;
   }
  }  
  //]]>
    </script>

</asp:Content>
