<%@ Register TagPrefix="Title" TagName="TitleShow" Src="/aspnetdata/Title.ascx" %>
<%@Page Debug=True %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Web" %>
<html>
<head>
	<script language="vb" runat="server">
	Dim Source as SqlConnection
	Dim d as string ="SELECT * from Customers"
	sub Page_load(sender as object,e as EventArgs)
		Source = Ctype(Session("NowSTKSQL"),SqlConnection)
		if IsPostBack=false then
			bindNew(true)
		end if
	end sub
	sub bindNew(tag as Boolean)
		if tag=true then
			Dim DS as DataSet = new DataSet()
			Dim NComm as SqlDataAdapter = new SqlDataAdapter(d, Source)
			NComm.Fill(DS, "Customers")
			Session("NowDS")=DS
			AllCustomer.DataSource=DS.Tables("Customers").DefaultView
			AllCustomer.DataBind()
		else
			Dim DS as DataSet =Ctype(Session("NowDS"),DataSet)
			AllCustomer.DataSource=DS.Tables("Customers").DefaultView
			AllCustomer.DataBind()
		end if
	end sub
	</script>
</head>
<body background="/aspnetdata/images/winback.gif">
<Title:TitleShow id="BookT" Runat="server" />
<form runat="server">
<asp:DataList id="AllCustomer" runat="server"
	BorderColor="black"	BorderWidth="1"
	GridLines="Both"	CellPadding="3"
	CellSpacing="0"		Font-Name="Verdana"
	Font-Size="8pt"		RepeatColumns="3"
	Width="500px"	HeaderStyle-BackColor="#C0FFFF"
	AlternatingItemStyle-BackColor="Gainsboro"
	>
	<HeaderTemplate>
		客户基本资料
	</HeaderTemplate>
	<ItemTemplate>
		客户编号：<%# DataBinder.Eval(Container.DataItem,"CusID")  %><br>
		公司名称：<%# DataBinder.Eval(Container.DataItem,"CusLongName")  %><br>
		连络人：<%# DataBinder.Eval(Container.DataItem,"Contact") %><br>
	</ItemTemplate>
</asp:DataList>
</form>
</body>