<%@  language="jscript" src="dbx.aspx.js" Inherits="dbx" %>
<HTML>
	<HEAD>
		<meta name="vs_targetSchema" content="Internet Explorer 5.0">
		<title>Database Explorer</title>
		<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
		<meta name="GENERATOR" Content="Microsoft Visual Studio.NET 7.0">
		<style>
			BODY { color: #000000; font-family: verdana,arial,sans serif; }
		</style>
	</HEAD>
	<body>
		<form runat="server" ID="Form1">
			<table class="top" width="100%" height="40" cellpadding="10" cellspacing="0">
				<tr>
					<td bgcolor="#000666">
						<b><font size="5" color="white">Database Explorer</b></FONT>
						<br>
						<input value="Inne bazy danych" type="button" onclick="jsvascript:window.location='default.aspx';">
					</td>
				</tr>
			</table>
			<table width="100%" height="700" cellpadding="5" cellspacing="0" border="1">
				<tr>
					<td width="25%" bgcolor="#ccccff" valign="top">
						<asp:DataGrid id="tableList" runat="server" AutoGenerateColumns="False" BorderWidth="0" CellPadding="0" ItemStyle-Font-Size="12pt" HeaderStyle-Font-Size="18pt" GridLines="None">
							<HeaderStyle Font-Size="18pt"></HeaderStyle>
							<ItemStyle Font-Size="12pt"></ItemStyle>
							<Columns>
								<asp:HyperLinkColumn DataNavigateUrlField="TABLE_NAME" DataNavigateUrlFormatString="dbx.aspx?tableName={0}" DataTextField="TABLE_NAME" HeaderText="Nazwy tabel">
									<HeaderStyle Height="80px">
									</HeaderStyle>
									<ItemStyle ForeColor="Black">
									</ItemStyle>
								</asp:HyperLinkColumn>
							</Columns>
						</asp:DataGrid>
					</td>
					<td valign="top">
						<table class="main" width="100%" border="0">
							<tr>
								<td class="main_header">
									<span id="CHeader" visible="false" style="TEXT-INDENT:8px"><b><font size="4" color="#000666">
												Kolumny tabeli :
												<%= this.selectedTable %></b></FONT></span>
								</td>
							</tr>
							<tr>
								<td align="left" valign="top">
									<asp:DataList EnableViewState="false" runat="server" id="tableSchema" RepeatColumns="1" GridLines="Both" borderstyle="solid" borderwidth="1" BorderColor="Black" ItemStyle-Wrap="false">
										<ItemTemplate>
											<asp:HyperLink runat="server" text='<%# Container.DataItem["column_name"] %>' ID="Hyperlink1" />
										</ItemTemplate>
									</asp:DataList>
								</td>
							</tr>
							<tr>
								<td>
									<br>
									<a href="dbx.aspx?tableName=<%=this.selectedTable%>&amp;getData=1">Wyświetl pięć początkowych wierszy 
										</a>
								</td>
							</tr>
							<TR>
								<TD>
									<TABLE>
										<TR>
											<TD>
												<BR>
												<asp:DataGrid id="tableData" runat="server" HeaderStyle-Font-Size="10pt" ItemStyle-Font-Size="10pt" CellPadding="2" BorderWidth="1" AutoGenerateColumns="true" BorderStyle="Solid" OnEditCommand="OnEditCommandTitlesGrid" OnUpdateCommand="OnUpdateCommandTitlesGrid" OnCancelCommand="OnCancelCommandTitlesGrid" ItemStyle-Wrap="false">
													<HeaderStyle Font-Bold="True" HorizontalAlign="Right"></HeaderStyle>
													<ItemStyle HorizontalAlign="Right"></ItemStyle>
													<Columns>
														<asp:EditCommandColumn EditText="Zmień" CancelText="Anuluj" UpdateText="Wprowadź" runat="server" />
													</Columns>
												</asp:DataGrid>
											</TD>
										</TR>
									</TABLE>
								</TD>
							</TR>
						</table>
					</td>
				</tr>
			</table>
		</form>
	</body>
</HTML>
