<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="bigclass.aspx.cs" Inherits="jiaowu.news.bigclass" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title></title>
    <link href="../css/table.css" rel="stylesheet" type="text/css" />
		<script language="JavaScript" src="../js/common.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
     <div class="place">
        <asp:SiteMapPath ID="SiteMapPath1" runat="server" Height="27px" Width="325px">
        </asp:SiteMapPath>
        </div>
    <TABLE id="Table1" class="sys_grid" align="center"  cellSpacing="0" cellPadding="0" width="95%"
				border="0">
				<TR>
					<TD vAlign="middle" class="sys_grid_cell_label" height="25">
        <span class="center_title_1">	
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr align="right">
                <td  width="95%">
        </span>
        <img height="14" src="../images/001.gif" width="14" />
        <asp:LinkButton ID="lbadd" runat="server" PostBackUrl="bigclassadd.aspx" Text="新增" >新增</asp:LinkButton>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;</td>
            </tr>
        </table>
					 <asp:GridView ID="ParentGridView" 
                    OnRowDataBound="ParentGridView_RowDataBound"   runat="server" OnRowDeleting="ParentGridView_RowDeleting"
                    AutoGenerateColumns="False"  Font-Size="12px" Width="100%" AllowSorting="True" 
                    OnRowEditing="ParentGridView_RowEditing" 
                    OnRowCancelingEdit="ParentGridView_RowCancelingEdit" 
                CssClass="sys_grid">
          <Columns>
              <asp:BoundField DataField="bianhao" HeaderText="编号"  ReadOnly="True"/>
              <asp:BoundField DataField="classname" HeaderText="大类" ReadOnly="True"/>
              <asp:TemplateField HeaderText="所属小类">
                <ItemTemplate>
                    <asp:Button ID="ViewChild_Button" runat="server" Text="展开小类" CommandName="Edit"  />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:Button ID="CancelChild_Button" runat="server" Text="关闭小类" CommandName="Cancel" />
                    <asp:GridView ID="ChildGridView" runat="server"   AllowPaging="False" AllowSorting="True"  AutoGenerateColumns="False" OnRowEditing= "ChildGridView_RowEditing" OnRowDataBound="ChildGridView_RowDataBound" DataKeyNames="id" Width="100%" OnRowCancelingEdit="ChildGridView_RowCancelingEdit"   OnRowDeleting="ChildGridView_RowDeleting" CssClass="GridViewStyle">
                        <Columns>
                            <asp:BoundField DataField="bianhao" HeaderText="编号" ReadOnly="True"/>
                            <asp:BoundField DataField="smallclassname" HeaderText="项目名称" ReadOnly="True"/>
                            <asp:TemplateField HeaderText="编辑" ShowHeader="False">
                                            <ItemTemplate> 
                                            <a href='smallclassadd.aspx?id=<%# Eval("id") %>'>编辑</a>
                                            </ItemTemplate>
                                            </asp:TemplateField>
                            <asp:CommandField HeaderText="删除" ShowDeleteButton="True" DeleteText="&lt;div id=&quot;des&quot; onclick=&quot;JavaScript:return confirm('确定删除该小类吗？无法恢复！')&quot;&gt;删除&lt;/div&gt; "/>
                        </Columns>  
                       <HeaderStyle CssClass="HeaderStyle" />
                       <PagerStyle CssClass="PagerStyle" />
                       <RowStyle CssClass="RowStyle" />
                       <PagerSettings Visible="false" />
                    </asp:GridView>
                </EditItemTemplate>
            </asp:TemplateField>
              <asp:TemplateField HeaderText="编辑" ShowHeader="False">
              <ItemTemplate> 
              <a href='bigclassadd.aspx?id=<%# Eval("id") %>'>编辑</a>
               </ItemTemplate>
             </asp:TemplateField>  
             <asp:TemplateField HeaderText="操作" ShowHeader="False">  
              <ItemTemplate> 
              <a href='smallclassadd.aspx?bigclass=<%# Eval("classname") %>'>添加小类</a>
               </ItemTemplate>               
              </asp:TemplateField>
              <asp:CommandField HeaderText="删除" ShowDeleteButton="True" 
                  DeleteText="&lt;div id=&quot;de&quot; onclick=&quot;JavaScript:return confirm('确定删除大类吗？无法恢复！')&quot;&gt;删除&lt;/div&gt; "/>
          </Columns>
          <HeaderStyle CssClass="HeaderStyle" />
          <PagerStyle CssClass="PagerStyle" />
          <RowStyle CssClass="RowStyle" />
          <PagerSettings Visible="false" />
        </asp:GridView>
                    </TD>
				</TR>
				<TR>
					<TD vAlign="top">
                    </TD>
				</TR>
			</TABLE>
    </div>
    </form>
</body>
</html>
