<%@ Import Namespace="System.Data" %>
<html><head>
<script language="vb" runat="server">
	sub Page_Load(sender as Object, e as EventArgs)
		dim n as string
		n="<div  id=plan style=""position: relative ; z-index:1; display:  ""><img border=0 src=""images\CB\Lpic\Type\UB-TYPE01.jpg"" >"
		dim t as DataTable=Ctype(Session("NowUserData"),DataTable)
		Dim NowRow as DataRow
		for each NowRow in t.Rows
			n=n & "<div id=" & NowRow("PartID") & " style=""position: absolute; left: " & NowRow("LocLeft") & "; top:" & NowRow("LocTop") & "; z-index:" & NowRow("LocZindex") & ";display:""><img border=0 src=""" & NowRow("Photo") & """></div>"
		next
		Level5.DataSource=t.DefaultView
		Level5.DataBind()
		NowSelect.DataSource=t.DefaultView
		NowSelect.DataBind()
		n+= "</div>"
		s1.InnerHtml= n
	end sub
	ReadOnly Property Total() As Double
        Get
			Dim NowRow as DataRow
			dim m as double
			For Each NowRow In session("NowUserData").Rows
				m=m + Convert.ToDouble(NowRow("UpricePart"))
			Next
			Return m
        End Get
	End Property
	Sub h2_onClick(sender As Object, e As ImageClickEventArgs)
		response.redirect("Login.aspx")
	end sub
</script>
</head>

<body background="../../images/winback.gif">
<form runat="server"><center>
<asp:hyperlink text="回首页" NavigateUrl="Default.aspx" runat="server" />
	</span>
	<span ID="s1" RUNAT="SERVER" />
	<table><TBODY><tr><td>
		<ASP:DataGrid id="NowSelect" runat="server"
			BorderColor="black"
			BorderWidth="1"
			columns="2"
			GridLines="Both"
			CellPadding="3"
			CellSpacing="0"
			Font-Name="Verdana"
			AutoGenerateColumns="false"                   
			Font-Size="8pt"
			HeaderStyle-BackColor="#aaaadd"
			ShowFooter="True">
			<Columns>
                <asp:BoundColumn HeaderText="细项名称" DataField="PartName" />                   
                <asp:BoundColumn HeaderText="细项型号" DataField="Model"/>                   
                <asp:BoundColumn HeaderText="颜色" DataField="Color"/>
				<asp:TemplateColumn ItemStyle-HorizontalAlign="right">
            		<HeaderTemplate>
					    		价格           
					</HeaderTemplate>
					<ItemTemplate>           
						<asp:Label runat="server"  Text='<%# DataBinder.Eval(Container.DataItem, "UpricePart" ,"{0:C0}") %>' />           
					</ItemTemplate>           
					<FooterTemplate>           
						Total:<asp:label text='<%# Total.ToString("NT$#,###") %>' runat=server/>
					</FooterTemplate>           
            	</asp:TemplateColumn>                                                   
			</Columns>
		</ASP:DataGrid>
</TD></TR></TBODY></TABLE>

<table><tr><td align="middle">
	<asp:Label id="NowPrice" Runat="Server" visible="False"/>	    
	      <ASP:DataGrid id="Level5" runat="server"    
	        BorderColor="black"
	        BorderWidth="1"
			columns="2"
	        GridLines="Both"
	        CellPadding="3"
	        CellSpacing="0"
	        Font-Name="Verdana"
	        Font-Size="8pt"
	        HeaderStyle-BackColor="#aaaadd"
	        Visible=False /> 
</td></tr> </table>
</center>
</form>
</BODY>
</html>
