<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Admin.Shop.Admin_DataTable" Title="查看所有数据表记录" Codebehind="KS.Data.Table.aspx.cs" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.BLL" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" Runat="Server">

<asp:Panel ID="listPanel" runat="server" Width="100%">
     <div id="manage_top" class="toptitle menu_top_fixed">
          <ul class="titleTab">
              <li><a href="KS.DataReplace.aspx">数据库字段替换</a></li>
              <li><a href="KS.DataBack.aspx">在线备份数据库</a></li>
              <li><a href="KS.ExeSQL.aspx">在线执行SQL语句</a></li>
              <li class="curr"><a href="KS.Data.Table.aspx">查看数据库里所有数据表</a></li>
              <li><a href="KS.FieldManage.aspx">数据表字段增减</a></li>
           </ul>
    </div>
    <div class="menu_top_fixed_height"></div> 
   <div class="content-area">
         <div class="myTitle">
              查看数据库里所有数据表
   		</div>
    <div>
      <script>
          function view(tablename) {
              parent.openWin('查看表['+tablename+']的字段', 'System/KS.Data.Table.aspx?tablename=' + tablename, false);
          } 
      </script>
        <KS:KSGV ID="TableListView" cssclass="CTable" runat="server" AutoGenerateColumns="False"  GridLines="None"
            OnRowDataBound="FieldListView_RowDataBound" PagerType="CustomNumeric" Width="99%" EnableTheming="True" HorizontalAlign="Center" EmptyDataText="没有数据表!">
            <Columns>
              <asp:TemplateField HeaderText="序号">
                <itemstyle horizontalalign="Center" width="50px" />
                <itemtemplate>
                    <%#Container.DataItemIndex+1%>        
                </itemtemplate>
              </asp:TemplateField>
            
                 <asp:TemplateField HeaderText="数据表">
                  <itemstyle/>
                <ItemTemplate>
                <%# Eval("TableName")%>
                
                </ItemTemplate>  
                </asp:TemplateField>
               
               <asp:TemplateField HeaderText="数据量">
                  <itemstyle horizontalalign="Center" />
                <ItemTemplate>
                <span class="greenFont"><%# Eval("num") %></span> 条
                </ItemTemplate>  
                </asp:TemplateField>
               <asp:TemplateField HeaderText="字段">
                  <itemstyle horizontalalign="Center" />
                <ItemTemplate>
                 <a href="javascript:;" onclick="view('<%# Eval("TableName")%>')" class="greenFont">查看</a>
                </ItemTemplate>  
                </asp:TemplateField>
        
            </Columns>
            <HeaderStyle CssClass="CTitle" />
            <EmptyDataRowStyle CssClass="emptycss" />
        </KS:KSGV>

        </div>
        <script type="text/javascript">
		showtips('<span class="state"><strong>说明：</strong><br /></span>这里列出数据库的所有表，及数据表里的记录数!');
		</script>
		

     </asp:Panel>
     
     <asp:Panel ID="PanShow" runat="server" Visible="false">
     
     <KS:KSGV ID="FieldListView"  cssclass="CTable" runat="server" AutoGenerateColumns="False"  GridLines="None"
            OnRowDataBound="FieldListView_RowDataBound" PagerType="CustomNumeric" Width="99%" EnableTheming="True" HorizontalAlign="Center" EmptyDataText="没有数据表!">
            <Columns>
              <asp:TemplateField HeaderText="序号">
                <itemstyle horizontalalign="Center" width="50px" />
                <itemtemplate>
                    <%#Container.DataItemIndex+1%>        
                </itemtemplate>
              </asp:TemplateField>
            
                 <asp:TemplateField HeaderText="字段名称">
                  <itemstyle/>
                <ItemTemplate>
                <%# Eval("COLUMN_NAME")%>
                
                </ItemTemplate>  
                </asp:TemplateField>
             
            </Columns>
            <HeaderStyle CssClass="CTitle" />
            <EmptyDataRowStyle CssClass="emptycss" />
        </KS:KSGV>
        
     </asp:Panel>
  </div>
</asp:Content>