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


<div class="result-wrap">


 
            <div class="result-title">
                <h1>模块定义</h1>
            </div>
 
   
     <asp:ObjectDataSource ID="ModuleDefinitionDataSource"  runat="server" TypeName="Portal.BLL.TabHelper"
                        SelectMethod="GetModuleDefinition" 
                        DeleteMethod="DeleteModuleDefinition" 
                        UpdateMethod="UpdateModuleDefinition" 
                        InsertMethod="InsertModuleDefinition"
                        
                        OldValuesParameterFormatString="{0}"
                        >
                        <DeleteParameters>
                            <asp:Parameter Name="Id" Type="Int32" />
                        </DeleteParameters>
                        
                        <UpdateParameters>
                            <asp:Parameter Name="Id" Type="Int32" />
                            <asp:Parameter Name="moduledefid" Type="Int32" />
                            <asp:Parameter Name="friendlyname" Type="String" />
                            <asp:Parameter Name="sourcefile" Type="String" />
                            <asp:Parameter Name="intro" Type="String" />
                            <asp:Parameter Name="cachetime" Type="int32" DefaultValue="0" />
                        </UpdateParameters>
                        
                        <InsertParameters>
                       
                            <asp:Parameter Name="moduledefid" Type="Int32" />
                            <asp:Parameter Name="friendlyname" Type="String" />
                            <asp:Parameter Name="sourcefile" Type="String" />
                            <asp:Parameter Name="intro" Type="String" />
                            <asp:Parameter Name="cachetime" Type="int32" DefaultValue="0" />
                        
                        </InsertParameters>
                    </asp:ObjectDataSource>
              
   
   
   
   
   
   
   
    <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
        DataKeyNames="id" DataSourceID="ModuleDefinitionDataSource" DefaultMode="Insert" 
        Height="60px" Width="600px" BorderWidth=0px 
        >
        <Fields>
            <asp:BoundField   DataField="id" HeaderText="id" InsertVisible="False" 
                ReadOnly="True" SortExpression="id" />
             <asp:BoundField DataField="moduledefid" HeaderText="moduledefid" 
                SortExpression="moduledefid"  Visible="false" />
           
             <asp:TemplateField>
           <HeaderTemplate>唯一数字编号</HeaderTemplate>
           <ItemTemplate>
           <asp:TextBox runat="server" ID="moduledefid" Width="300px"   Text=<%#Bind("moduledefid") %> ></asp:TextBox>
           </ItemTemplate>
           
           </asp:TemplateField>
           
           
           <asp:TemplateField>
           <HeaderTemplate>模板名称</HeaderTemplate>
           <ItemTemplate>
           <asp:TextBox runat="server" ID="friendlyname"    Width="300px" Text=<%#Bind("friendlyname") %> ></asp:TextBox>
           </ItemTemplate>
           
           </asp:TemplateField>
           
           
             
           
            <asp:TemplateField>
           <HeaderTemplate>模板URL</HeaderTemplate>
           <ItemTemplate>
           <asp:TextBox ID="sourcefile" runat="server"    Width="300px"  Text=<%#Bind("sourcefile") %> ></asp:TextBox>
           </ItemTemplate>
           
           </asp:TemplateField>
         
           
             <asp:TemplateField>
           <HeaderTemplate>缓存时间</HeaderTemplate>
           <ItemTemplate>
           <asp:TextBox ID="cachetime" runat="server"    Width="300px"   Text=<%#Bind("cachetime") %> ></asp:TextBox>
           </ItemTemplate>
           
           </asp:TemplateField>
           
           
           
            
             <asp:TemplateField>
           <HeaderTemplate>简介</HeaderTemplate>
           <ItemTemplate>
           <asp:TextBox ID="intro"   runat="server" TextMode="MultiLine"   Width="300px" Text=<%#Bind("intro") %> ></asp:TextBox>
           </ItemTemplate>
           
           </asp:TemplateField>
           
            <asp:CommandField ShowInsertButton="True"  ItemStyle-Width="400px"  ItemStyle-HorizontalAlign="Center"   InsertText="添加"  CancelText="取消" />
            
            
        </Fields>
    </asp:DetailsView>
   
   
   
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="id" SkinID="gvSkin" Width="650px"  Height="500px" DataSourceID="ModuleDefinitionDataSource"
        >
        <Columns>
            <asp:CommandField ValidationGroup="gv" ShowDeleteButton="True" ShowEditButton="True" />
            <asp:BoundField DataField="id" HeaderText="编号" InsertVisible="False" 
                ReadOnly="True" SortExpression="id" Visible="false" />
            <asp:BoundField DataField="moduledefid" HeaderText="模板编号" 
                SortExpression="moduledefid" />
            <asp:BoundField DataField="friendlyname" HeaderText="模板名称" 
                SortExpression="friendlyname" />
                  <asp:BoundField DataField="cachetime" HeaderText="缓存时间" 
                SortExpression="cachetime" />
            <asp:BoundField DataField="sourcefile" HeaderText="模板URL" 
                SortExpression="sourcefile" />
            <asp:BoundField DataField="intro" HeaderText="英文简写" SortExpression="intro" />
        </Columns>
    </asp:GridView>
  
  
   </div>
  
  
 
</asp:Content>
