<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<%@ Register TagPrefix="Hersh" TagName="nav" Src="nav.ascx" %>
<html>
<script language="VB" runat="server">
Dim ConnStr      As String
Dim SQL          As String
Sub Page_Load(Source As Object, E As EventArgs) 
	ConnStr = "Provider=SQLOLEDB; Data Source=(local); Initial Catalog=ASPNET;User ID=sa;"
	if NOT (isPostBack)
		rebind
	end if	
End Sub
Sub ReBind()
	Dim t As New NameSpaceHersh.SQLService
	Dim ds as DataSet 	   
	'设置DataSetCommand
	sql = "SELECT * from stock_master  "
	ds = t.Populate(ConnStr, SQL)
	Grid1.DataSource=ds.Tables("vTable").DefaultView
	Grid1.DataBind()
End Sub
</script>
<head>
<style>
	a	{	color:black;
			text-decoration:none;}
	a:hover	{	color:red;
		text-decoration:underline;}
</style>
</head>
<body style="font: 10pt verdana; background-color:ivory">
<!---- 导航条 开始-------------->
      <Hersh:nav id="menu" runat = server 
      vGridlines = Both
      vBorderColor = "Black"
      vCellPadding = 7 />
<!---- 导航条 结束-------------->
<h3><font face="Verdana">Inventory Balances </font></h3>
<br> 
<asp:DataGrid id="Grid1" runat="server"
	AutoGenerateColumns="false"
	BackColor="White"
	BorderWidth="1px" BorderStyle="Solid" BorderColor="Tan"
	CellPadding="2" CellSpacing="0"
	Font-Name="Verdana" Font-Size="8pt">

	<Columns>
	<asp:BoundColumn HeaderText="Account" DataField="code_display" >
		<HeaderStyle Width="150px"/>
	</asp:BoundColumn>
	<asp:BoundColumn HeaderText="Units" DataField="uom">
		<HeaderStyle  Width="150px"/>
	</asp:BoundColumn>
	<asp:BoundColumn HeaderText="Opening Balance" DataField="opening">
		<HeaderStyle  Width="150px"/>
	</asp:BoundColumn>
	<asp:BoundColumn HeaderText="Period Closing Balance" DataField="closing">
		<HeaderStyle  Width="150px"/>
	</asp:BoundColumn>
	</Columns>

	<HeaderStyle BackColor="teal" ForeColor="white" Font-Bold="true"/>
	<ItemStyle ForeColor="DarkSlateBlue"/>
	<AlternatingItemStyle BackColor="Beige"/>
</asp:DataGrid>
</form>
</body>
</html>
