<%@ Page Title="" Language="C#" MasterPageFile="Admin.Master" AutoEventWireup="true" CodeBehind="Shenhephoto.aspx.cs" Inherits="Portal.Admin.Shenhephoto" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div id="sm">审核图片</div>



 <script>
    
    function SelectAll(aControl) 
       { 
            var tempControl=aControl; 
            var isChecked=tempControl.checked;

            elem=aControl.form.elements; 
            for(i=0;i<elem.length;i++) 
            if(elem[i].type=="checkbox" && elem[i].id!=tempControl.id) 
             { 
                  if(elem[i].checked!=isChecked) 
                        elem[i].click(); 
            } 
        }

          </script>
    

        <asp:Button ID="Button1" runat="server" Text="审核通过" onclick="Button1_Click" />
    <asp:Button ID="Button2" runat="server" Text="删除" onclick="Button2_Click" />
              <asp:GridView  DataSourceID="SqlDataSource1"  ID="GridView1" runat="server" CssClass="table_1" Width="100%" 
                        AutoGenerateColumns="False" EmptyDataText="没有数据"> 
                                            <Columns> 
                        <asp:TemplateField HeaderText="管理"> 
                            <HeaderTemplate> 
<asp:CheckBox ID="chk_SelectedHeader" runat="server" AutoPostBack="False" onclick="javascript:SelectAll(this);" 
                            Text="全选" /> 
                            </HeaderTemplate> 
                            <ItemTemplate> 
                                <asp:CheckBox ID="CheckBox1" runat="server" /> 
                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("itemid") %>' 
                                     style="display:none"></asp:Label> 
                            </ItemTemplate> 
                        </asp:TemplateField> 
                        
                        <asp:CommandField ShowEditButton="true" />
                        
                          <asp:TemplateField HeaderText="缩略图"> 
                          <ItemTemplate>
                          <img src=<%#Eval("thumpath") %>  width="50px"/>
                          </ItemTemplate>
                        </asp:TemplateField>
                        
                            <asp:BoundField DataField="title" HeaderText="主题" /> 
                           <asp:BoundField DataField="Url" HeaderText="Url" /> 
                         <asp:BoundField DataField="itemid" ReadOnly="true" HeaderText="ItemID" /> 
                          <asp:BoundField DataField="groupid" HeaderText="活动组ID"  ReadOnly="true"  /> 
                        </Columns> 
                    </asp:GridView>

    <asp:SqlDataSource ID="SqlDataSource1" 
        ConnectionString="<%$ ConnectionStrings:connectionstring %>" runat="server" 
        DeleteCommand="DELETE FROM [portal_photoes] WHERE [itemid] = @itemid" 
  
  
        ProviderName="System.Data.SqlClient" 
        SelectCommand="SELECT thumpath,url, [itemid], [title], [createdate], [groupid] FROM [portal_photoes] WHERE ([ispass] = @ispass) order by groupid asc " 
        UpdateCommand="UPDATE [portal_photoes] SET [title] = @title, url=@url WHERE [itemid] = @itemid">
        <SelectParameters>
            <asp:Parameter DefaultValue="0" Name="ispass" Type="Int32" />
        </SelectParameters>
        <DeleteParameters>
            <asp:Parameter Name="itemid" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="title" Type="String" />
           <asp:Parameter Name="url" Type="String" />
            <asp:Parameter Name="itemid" Type="Int32" />
        </UpdateParameters>
        
    </asp:SqlDataSource>

</asp:Content>
