<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_ManageSpace, HoWaveVGO" title="Untitled Page" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript">
function ShowModal(url,idname,idvalue,action,boxwidth,boxheight,reload){
  var recdata=false;
  recdata=showModalDialog(''+url+'?Action='+action+'&'+idname+'='+idvalue+'','','dialogWidth:'+boxwidth+'px; dialogHeight:'+boxheight+'px; help: yes; scroll: yes; status: no');
       //判断对应的返回值
  if(recdata==true&&reload==true)
  {
     // 刷新当前窗口
     window.location.reload();       
  } 
   
}
</script>
    <table class="adminheading" width="100%">
         <tr>
            <th class="credits" align="left">会员空间管理</th>
            <td align="right"><a href="javascript:void(0)" onclick="ShowModal('Admin_AddSpace.aspx','ID','0','Add','600','400',true)">新增首页栏目</a></td> 
            <td class="rtdw"></td>
          </tr>
     </table>
       
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="adminlist" DataSourceID="ObjectDataSource1" HorizontalAlign="Center" DataKeyNames="ID"  RowStyle-HorizontalAlign="Center" OnDataBound="GridView1_DataBound">
        <Columns>
            <asp:TemplateField HeaderText="选中">
             <ItemTemplate><input type="checkbox" /></ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField HeaderText="序号"  DataField="ID"/>       
            <asp:BoundField HeaderText="名称" DataField="ClassName" />
            <asp:TemplateField HeaderText="状态">
               <ItemTemplate>
                  <asp:Literal ID="Passed" runat="server" Text='<%# Convert.ToBoolean(Eval("Passed"))?"审核通过":"不通过" %>' />                     
               </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="首页显示">
               <ItemTemplate>
                  <asp:Literal ID="Passed" runat="server" Text='<%# Convert.ToBoolean(Eval("onTop"))?"是":"否" %>' />                     
               </ItemTemplate>
            </asp:TemplateField>          
            <asp:BoundField HeaderText="所属会员"  DataField="UserName"/>
            <asp:TemplateField HeaderText="操作">
               <ItemTemplate>
                 <a href="javascript:void(0)" onclick="ShowModal('Admin_AddSpace.aspx','ID','<%# Eval("ID") %>','Modify','600','400',true)">修改</a>               
               </ItemTemplate>
            </asp:TemplateField>
            <asp:CommandField ShowDeleteButton="True"  HeaderText="删除"/>
        </Columns>
        <RowStyle HorizontalAlign="Center" />
    </asp:GridView>
    
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetAllRssContenUserName"
        TypeName="MySpace" DeleteMethod="DeleteRssByID" OldValuesParameterFormatString="{0}">
        <DeleteParameters>
            <asp:Parameter Name="ID" Type="Int32" />
        </DeleteParameters>
    </asp:ObjectDataSource>
</asp:Content>

