<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_ManagePage, HoWaveVGO" title="Untitled Page" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <table class="adminheading">                       
          <tr>
            <th>自定义页面管理</th>
            <td align="right">
            <div style="width:500px">
               <b>管理导航：</b>&nbsp;
                <a href="Admin_ManagePage.aspx">自定义页面管理首页</a>&nbsp;|&nbsp;
                <a href="Admin_ManagePage.aspx?Action=AddPageClass">添加自定义页面分类</a>&nbsp;|&nbsp;
                <a href="Admin_Page.aspx">添加自定义页面</a>
            </div>
            </td>
            <td class="rtdw"></td>
          </tr>                        
    </table> 
  

    <asp:Panel ID="panel1" runat="server" CssClass="textAlign">
        <%fillClass(); %>
    </asp:Panel>
    <asp:Panel ID="panel2" runat="server" Visible="false" Width="100%">      
        <asp:FormView ID="FormView1" runat="server" DataSourceID="ObjectDataSource1" Width="100%">
          <EditItemTemplate>
              <table width="100%" class="nick" cellpadding="1" cellspacing="1" border="0">
                  <tr>
                    <td class="tit" colspan="2">
                        <strong>自定义页面分类</strong>
                    </td>
                  </tr>
                  <tr>
                     <td class="ltd"><div style="width:70px;">分类名称：</div></td>
                     <td class="rtd"><asp:TextBox ID="ClassName" runat="server" Text='<%#Bind("ClassName") %>'/></td>
                  </tr>
                  <tr>
                     <td class="ltd">分类介绍：</td>
                     <td class="rtd"><asp:TextBox ID="ClassIntro" runat="server" Text='<%#Bind("ClassIntro") %>' TextMode="MultiLine" Width="300px" Height="50px"/></td>
                  </tr>
                  </table>
                  <div class="div_btm"><asp:Button ID="inputButton" Text="确定" runat="server" CommandName="Update" CausesValidation="true" />&nbsp;&nbsp;<asp:Button ID="CancelButton" Text="取消" runat="server"  CommandName="Cancle" CausesValidation="false"/></td>
                  </div>
          </EditItemTemplate>
          <InsertItemTemplate>
               <table width="100%" class="nick" cellpadding="1" cellspacing="1" border="0">
                  <tr>
                    <td class="tit" colspan="2">
                        <strong>新添自定义页面分类</strong>
                    </td>
                  </tr>
                  <tr>
                     <td class="ltd"><div style="width:70px;">分类名称：</div></td>
                     <td class="rtd"><asp:TextBox ID="ClassName" runat="server"  Text='<%#Bind("ClassName") %>'/></td>
                  </tr>
                  <tr>
                     <td class="ltd">分类介绍：</td>
                     <td class="rtd"><asp:TextBox ID="ClassIntro" runat="server"  TextMode="MultiLine" Width="300px" Height="50px" Text='<%#Bind("ClassIntro") %>'/></td>
                  </tr>
                  </table>
                  <table>
                  <tr>
                     <td colspan="2" style="text-align:center;"><asp:Button ID="inputButton" Text="确定" runat="server" CommandName="insert" CausesValidation="true" />&nbsp;&nbsp;<asp:Button ID="CancelButton" Text="取消" runat="server"  CommandName="Cancle" CausesValidation="false"/></td>
                  </tr>
                  </table>         
          </InsertItemTemplate>
        </asp:FormView>
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="DeletePageClass"
            InsertMethod="AddPageClass" SelectMethod="GetPageClass" TypeName="HowavePageClass"
            UpdateMethod="UpdatePageClass">
            <DeleteParameters>
                <asp:Parameter Name="PageClassID" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:QueryStringParameter Name="PageClassID" QueryStringField="PageClassID" Type="Int32" />
                <asp:Parameter Name="ClassName" Type="String" />
                <asp:Parameter Name="ClassIntro" Type="String" />
            </UpdateParameters>
            <InsertParameters>               
                <asp:Parameter Name="ClassName" Type="String" />
                <asp:Parameter Name="ClassIntro" Type="String" />
            </InsertParameters>
            <SelectParameters>
                <asp:QueryStringParameter Name="PageClassID" QueryStringField="PageClassID" Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </asp:Panel>

</asp:Content>

