<%@ Page Title="" Language="C#" MasterPageFile="admin.Master" AutoEventWireup="true" CodeBehind="PhotoCategory.aspx.cs" Inherits="Portal.Admin.PhotoCategory" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">



<div class="result-wrap">

    <div class="result-title">
                <h1>图像类别管理</h1>
            </div>
          
             <table class="table">
         <tr>
         <th width=150px>类别名称</th>
         <td>
               <asp:TextBox ID="catname" Width="300px" CssClass="form-control"  runat="server"></asp:TextBox>
        
         </td>
        </tr>


         <tr>
         <th width=150px>类别顺序</th>
         <td>
          <asp:TextBox ID="orderid" Text="0"  Width="300px" CssClass="form-control" runat="server"></asp:TextBox> 
         </td>
        </tr>




         <tr>
        <td colspan="2">
        
        <div class="btnc">
        

       <asp:Button ID="Button1" runat="server" Text="添加" onclick="Button1_Click" CssClass="btn btn-primary"/>
       <asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text="返回" CssClass="btn"/>


        </div>
        </td>
        
        </tr>

        </table>





         
    <asp:GridView 
 GridLines="None" CssClass="table" 
      ID="GridView1" AutoGenerateColumns="false"  DataKeyNames="catid" runat="server" 
       DataSourceID="ObjectDataSource1">
    
    <Columns>
   
    <asp:BoundField DataField="catid" ItemStyle-Width="90px"   HeaderText="catid" />
       <asp:BoundField DataField="catname"   HeaderText="类别名" />
    <asp:BoundField DataField="orderid"   HeaderText="顺序ID"   />
     
              <asp:CommandField HeaderText="操作" EditText="编辑" DeleteText="<span onclick=&quot;JavaScript:return confirm('确定删除吗？')&quot;>删除</span> "  UpdateText="更新"  CancelText="取消" ShowDeleteButton="True" ShowEditButton="True" />
   
    </Columns>
   
    </asp:GridView>



    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
     TypeName="Portal.BLL.PhotoHelper"
     SelectMethod="GetPhotoCategory"
     DeleteMethod="DeletePhotoCategory"
     UpdateMethod="UpdatePhotoCategory"  
         
         OnUpdating="ObjectDataSource1_Updating"   
    >
    
    <SelectParameters>
    <asp:QueryStringParameter   QueryStringField="mid" Name="moduleid" />
    <asp:Parameter DefaultValue="-1" Name="uid" Type="Int32" />
    </SelectParameters>
    
    
   
   <UpdateParameters>
       <asp:Parameter   Name="catid" Type="Int32" />
        

       <asp:Parameter   Name="catname" Type="String" />
        <asp:Parameter   Name="orderid" Type="String" />
   </UpdateParameters>
   
    
    
    <DeleteParameters>
    <asp:Parameter Name="catid" Type="Int32"  />
    </DeleteParameters>
    
    </asp:ObjectDataSource>








</asp:Content>
