<%@ page language="C#" autoeventwireup="true" inherits="HL_Admin_Admin_AddSpace, HoWaveVGO" enableEventValidation="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>修改空间</title>
    <link href="Css/StyleSheet.css" type="text/css" rel="stylesheet" />
    <base target=_self></base>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:FormView ID="FormView1" runat="server" DataSourceID="ObjectDataSource1" DefaultMode="Edit" Width="100%" OnItemInserted="FormView1_ItemInserted" OnItemUpdated="FormView1_ItemUpdated" >
          <EditItemTemplate>
              <table class="tableadd"> 
               <tr>
                  <th colspan="2" style="font-weight:bold;">新增聚合空间</th>
               </tr>
               <tr>
                  <td width="20%" align="right" class="tdbg1"> 栏目ID:</td>
                  <td width="80%" class="tdbg2"><asp:Literal ID="ID" runat="server" Text='<%# Bind("ID") %>' /></td>
               </tr>
               <tr>
                  <td width="20%" align="right" class="tdbg1"> 会员:</td>
                  <td width="80%" class="tdbg2">
                      <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="ObjectDataSource3"
                          DataTextField="UserName" DataValueField="UserID" SelectedValue='<%# Bind("UserID") %>'
                          Width="130px">
                      </asp:DropDownList><asp:ObjectDataSource ID="ObjectDataSource3" runat="server" SelectMethod="GetAllUsers"
                          TypeName="UserBLL"></asp:ObjectDataSource>
                  </td>
                </tr>
              
                <tr>
                  <td width="20%" align="right" class="tdbg1"> 栏目名称:</td>
                  <td width="80%" class="tdbg2"><asp:TextBox ID="ClassName" runat="server" Text='<%# Bind("ClassName") %>' /></td>
                </tr>
                <tr>
                  <td width="20%" align="right" class="tdbg1">栏目类别:</td>
                  <td width="80%" class="tdbg2">
                     <asp:DropDownList ID="ClassID" runat="server" SelectedValue='<%# Bind("ClassID") %>' >
                        <asp:ListItem Text="Rss" Value="1" />
                     </asp:DropDownList>
                   </td>
                </tr>
                <tr>
                  <td width="20%" align="right" class="tdbg1"> 来源RSS地址</td>
                  <td width="80%" class="tdbg2"><asp:TextBox ID="Literal1" runat="server" Text='<%# Bind("RssUrl") %>' Width="80%"/><a href='#' onclick="">测试来源页</a></td>
                </tr>
                 <tr>
                   <td width="20%" align="right" class="tdbg1">显示条数</td>
                   <td width="80%" class="tdbg2"><asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("RssNum") %>'/></td>
                </tr>
                 <tr>
                   <td width="20%" align="right" class="tdbg1">所在列行</td>
                   <td width="80%" class="tdbg2"><asp:TextBox ID="OrderNum" runat="server" Text='<%# Bind("OrderNum") %>'/>第一列第二行表示为12,第二列第三行表示为23</td>
                </tr>
                 <tr>
                   <td width="20%" align="right" class="tdbg1">通过审核</td>
                   <td width="80%" class="tdbg2"><asp:CheckBox ID="Passed"  Checked='<%#Bind("Passed") %>' runat="server" /></td>
                </tr>
                 <tr>
                   <td width="20%" align="right" class="tdbg1">首页显示</td>
                   <td width="80%" class="tdbg2"><asp:CheckBox ID="onTop" Checked='<%#Bind("onTop") %>' runat="server" /></td>
                </tr>
                <tr>
                   <td colspan="2" align="center">
                       <asp:Button ID="UpdateBtn" runat="server" Text="确定" CommandName="update" />
                       <asp:Button ID="CancleBtn" runat="server" Text="重置" CommandName="cancle" />
                   </td> 
                </tr> 
            </table>
          </EditItemTemplate>
          <InsertItemTemplate>
              <table class="tableadd"> 
               <tr>
                  <th colspan="2" style="font-weight:bold;">修改聚合空间</th>
               </tr>
               <tr>
                  <td width="20%" align="right" class="tdbg1"> 会员:</td>
                  <td width="80%" class="tdbg2">
                      <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="ObjectDataSource3"
                          DataTextField="UserName" DataValueField="UserID" SelectedValue='<%# Bind("UserID") %>'
                          Width="130px">
                      </asp:DropDownList><asp:ObjectDataSource ID="ObjectDataSource3" runat="server" SelectMethod="GetAllUsers"
                          TypeName="UserBLL"></asp:ObjectDataSource>
                  </td>
                </tr>
                <tr>
                  <td width="20%" align="right" class="tdbg1"> 栏目名称:</td>
                  <td width="80%" class="tdbg2"><asp:TextBox ID="ClassName" runat="server" Text='<%# Bind("ClassName") %>'/></td>
                </tr>
                 <tr>
                  <td width="20%" align="right" class="tdbg1">栏目类别:</td>
                  <td width="80%" class="tdbg2">
                     <asp:DropDownList ID="ClassID" runat="server" SelectedValue='<%# Bind("ClassID") %>' >
                        <asp:ListItem Text="Rss" Value="1" />
                     </asp:DropDownList>
                   </td>
                </tr>
                <tr>
                  <td width="20%" align="right" class="tdbg1"> 来源RSS地址</td>
                  <td width="80%" class="tdbg2"><asp:TextBox ID="Literal1" runat="server" Text='<%# Bind("RssUrl") %>' Width="80%"/></td>
                </tr>
                 <tr>
                   <td width="20%" align="right" class="tdbg1">显示条数</td>
                   <td width="80%" class="tdbg2"><asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("RssNum") %>'/></td>
                </tr>
                 <tr>
                   <td width="20%" align="right" class="tdbg1">所在列行</td>
                   <td width="80%" class="tdbg2"><asp:TextBox ID="OrderNum" runat="server" Text='<%# Bind("OrderNum") %>'/>第一列第二行表示为12,第二列第三行表示为23</td>
                </tr>
                 <tr>
                   <td width="20%" align="right" class="tdbg1">通过审核</td>
                   <td width="80%" class="tdbg2"><asp:CheckBox ID="Passed"  Checked='<%#Bind("Passed") %>' runat="server" /></td>
                </tr>
                 <tr>
                   <td width="20%" align="right" class="tdbg1">首页显示</td>
                   <td width="80%" class="tdbg2"><asp:CheckBox ID="onTop" Checked='<%#Bind("onTop") %>' runat="server" /></td>
                </tr>
                <tr>
                   <td colspan="2" align="center">
                       <asp:Button ID="UpdateBtn" runat="server" Text="确定" CommandName="insert" />
                       <asp:Button ID="CancleBtn" runat="server" Text="重置" CommandName="cancle" />
                   </td> 
                </tr> 
            </table>
          </InsertItemTemplate>
        </asp:FormView>
    
    </div>
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" InsertMethod="AddRss"
            SelectMethod="GetRssByID" TypeName="MySpace" UpdateMethod="UpdateRss" OnInit="ObjectDataSource1_Init">
            <UpdateParameters>
                <asp:Parameter Name="ID" Type="Int32" />
                <asp:Parameter Name="ClassName" Type="String" />
                <asp:Parameter Name="RssURl" Type="String" />
                <asp:Parameter Name="UserID" Type="Int32"  />
                <asp:Parameter Name="RssNum" Type="Int32" />
                <asp:Parameter Name="ClassID" Type="Int32" />
                <asp:Parameter Name="OrderNum" Type="Int32" />
                <asp:Parameter Name="Passed" Type="Boolean" />
                <asp:Parameter Name="onTop" Type="Boolean" />
            </UpdateParameters>
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
            </SelectParameters>
            <InsertParameters>
                <asp:Parameter Name="UserID" Type="Int32"  />
                <asp:Parameter Name="RssURl" Type="String" />
                <asp:Parameter Name="ClassName" Type="String" />
                <asp:Parameter Name="RssNum" Type="Int32" />
                <asp:Parameter Name="ClassID" Type="Int32" />
                <asp:Parameter Name="OrderNum" Type="Int32" />
                <asp:Parameter Name="Passed" Type="Boolean" />
                <asp:Parameter Name="onTop" Type="Boolean" />
            </InsertParameters>
        </asp:ObjectDataSource>
    </form>
</body>
</html>
