<%@ Page Language="C#" AutoEventWireup="true" Inherits="EoyooCMS.ManageCode.Data_SqlQuery" %>

<!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>
    <title>Sql查询</title>
    <meta name="Author" content="EoyooCMS" />
    <meta name="Copyright" content="eoyoo.com" />
    <script type="text/javascript" src="Script/Jquery.js"></script>
    <script type="text/javascript" src="Script/Common.js"></script>
    <link href="Style/Iframe.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="Script/Eoyoo.FormControl.js"></script>
    <script src="Script/Data_SqlQuery.js" type="text/javascript"></script>
</head>
<body>
    <form id="FormControl" action="<%=getFormUrl %>" method="post" enctype="multipart/form-data">
    <div class="wrapper-div">
	    <!-- 添加栏目 -->
    	    <div class="title1">
        	    <div class="right">
            	    <span class="title-ico f_right titico3 X"> ctrl + s 快捷保存</span>
            	    <span class="title-ico titico5 F B">Sql语句查询</span>
                </div>
            </div>
        
            <!-- 表单 -->
            <div class="tbox_form">
                <p>
                    <label class="name">Sql语句:</label>
                    <textarea name="sql_text" id="sql_text" class="input400 isNull" tabindex="1" cols="" rows=""><%=_sql%></textarea>

                    <span class="point ico-remind V">查询语句</span>
                </p>
                <hr />
                <label class="name">&nbsp;</label>
                <input type="submit" class="bule-btn W" value="开始查询" />
                <span></span>
            </div>
            <!-- end 表单 -->

            <%if (_sqlDat.Rows.Count > 0) %>
            <%{ %>
                    <div class="clear-8"></div>
                    <!-- 通用table -->
                    <table class="table-1">
                        <thead>
                            <tr>
                                <%for (int i = 0; i < _sqlDat.Columns.Count; i++)  %>
                                <%{ %>
                                    <th class="text_left"><%=_sqlDat.Columns[i].ColumnName%></th>
                                <%} %>
                            </tr>
                        </thead>
                        <tbody id="Jquery_Tbody">
                        <%for (int i = 0; i < _sqlDat.Rows.Count; i++)  %>
                        <%{ %>
                            <tr>
                                <%for (int j = 0; j < _sqlDat.Columns.Count; j++)  %>
                                <%{ %>
                                    <td class="text_left"><%=_sqlDat.Rows[i][_sqlDat.Columns[j].ColumnName].ToString()%></td>
                                <%} %>
                            </tr>
                        <%} %>
                        </tbody>
                    </table>
                    <!-- end 通用table -->
                    <div class="clear-8">

            <%} %>

        <!-- end 添加栏目 -->
    </div>

    </form>
</body>
</html>
