<%@ Register TagPrefix="Title" TagName="TitleShow" Src="/aspnetdata/Title.ascx" %>
<html>
<head>
	<script language="C#" runat="server">
	void ClickSure(Object sender,EventArgs e){
		HtmlTableRow rw;
		HtmlTableCell cl;
		Span1.InnerHtml="选择内容：";
		rw = new HtmlTableRow();//建立新表格列
		cl=new HtmlTableCell();//建立新单元格
		cl.InnerHtml="书名";//输入数据至单元格
		rw.Cells.Add(cl);//加入单元格至表格行
		cl=new HtmlTableCell();
		cl.InnerHtml="本数";
		rw.Cells.Add(cl);
		cl=new HtmlTableCell();
		cl.InnerHtml="邮购价";
		rw.Cells.Add(cl);
		Table1.Rows.Add(rw);//加入表格行至表格
		int x=0;
		if(Convert.ToInt16(ac3.Value)>0){
			CTable("Access 2000 VBA研究大观",ac3.Value,"510");
			x+=Convert.ToInt16(ac3.Value)*510;
		}
		if(Convert.ToInt16(ac2.Value)>0){
			CTable("Access系统开发圣经",ac2.Value,"455");
			x+=Convert.ToInt16(ac2.Value)*455;
		}
		if(Convert.ToInt16(ac1.Value)>0){
			CTable("Access 2002学习指导",ac1.Value,"320");
			x+=Convert.ToInt16(ac1.Value)*320;
		}
		if(Convert.ToInt16(ac4.Value)>0){
			CTable("Access 2000实战问答集",ac4.Value,"390");
			x+=Convert.ToInt16(ac4.Value)*390;
		}
		if(Convert.ToInt16(vb6.Value)>0){
			CTable("VB 6.0与数据库开发圣经",vb6.Value,"320");
			x+=Convert.ToInt16(vb6.Value)*320;
		}
		Span2.InnerHtml="总价：" + x;
	}
	void CTable(string BName,string Unit,string Price){
		HtmlTableRow rw;
		HtmlTableCell cl;
		rw = new HtmlTableRow();
		cl=new HtmlTableCell();
		cl.InnerHtml=BName;
		rw.Cells.Add(cl);
		cl=new HtmlTableCell();
		cl.InnerHtml=Unit;
		rw.Cells.Add(cl);
		cl=new HtmlTableCell();
		cl.InnerHtml=Price;
		rw.Cells.Add(cl);
		Table1.Rows.Add(rw);
	}
	</script>
</head>
<body background="/aspnetdata/images/winback.gif">
<Title:TitleShow id="BookT" Runat="server" />
<form runat="server">
<p><font size="3">我要订购：(请在订购本数栏输入数字)</font></p>
  <table border="1" bordercolor="#FF0000" width="90%">
    <tr>
      <td align="center" width="30%"><strong>书名</strong></font></td>
      <td align="center" width="10%"><strong>售价</strong></font></td>
      <td align="center" bordercolor="#0000FF" width="13%"><strong>邮购价</strong></font></td>
      <td align="center" width="15%"><strong>折数</strong></font></td>
      <td align="center" width="15%"><strong>页数</strong></font></td>
      <td width="17%">
        <p align="center"><b>订购本数</b></font></p>
      </td>
    </tr>
    <tr>
      <td width="30%">Access 2000 VBA研究大观</td>                        
      <td align="right" width="10%">680</td>                    
      <td align="center" bordercolor="#0000FF" width="13%" bgcolor="#00FFFF"><font color="#FF0000"><b>510</b></font></td>                  
      <td align="center" width="15%">七</font></td>                  
      <td align="center" width="15%">840</font></td>                  
      <td align="center" width="17%"><input type="text" size="10"           
      id="ac3" value="0" runat="server"></font></td>           
    </tr>           
    <tr>
      <td width="30%">ACCESS系统开发圣经</td>                        
      <td align="right" width="10%">650</td>                    
      <td align="center" bordercolor="#0000FF" width="13%" bgcolor="#00FFFF"><font color="#FF0000"><b>455</b></font></td>      
      <td align="center" width="15%">七</font></td>                  
      <td align="center" width="15%">820</td>                  
      <td align="center" width="17%"><div align="left"><p align="center"><font size="3"><input type="text" size="10"          
      ID="ac2" value="0" runat="server"></font></p>             
      </div></td>             
    </tr>             
    <tr>    
      <td width="30%">ACCESS 2002学习指导</font></td>                        
      <td align="right" width="10%">480</font></td>                    
      <td align="center" bordercolor="#0000FF" width="13%" bgcolor="#00FFFF"><b><font size="3" color="#FF0000">320</font></b></td>                 
      <td align="center" width="15%">六五</font></td>                 
      <td align="center" width="15%">500</font></td>                 
      <td align="center" width="17%"><input type="text" size="10"             
      ID="ac1" value="0" runat="server"></font></td>             
    </tr>             
    <tr>             
      <td width="30%">ACCESS 2000实战问答集</a></td>                    
      <td align="right" width="10%">520</td>                    
      <td align="center" bordercolor="#0000FF" width="13%" bgcolor="#00FFFF"><b><font face="Times New Roman" size="3" color="#FF0000">390</font></b></td>                   
      <td align="center" width="15%">七五</font></td>                   
      <td align="center" width="15%"><font size="3" face="Times New Roman">610</font></td>                   
      </div></center></td>                    
      <td align="center" width="17%"><input type="text" size="10" ID="ac4" value="0" Runat="server"></font></td>              
    </tr>              
    <tr>              
      <td width="30%">VB 6.0与数据库开发圣经</td>                        
      <td align="right" width="10%">480</td>                    
      <td align="center" bordercolor="#0000FF" width="13%" bgcolor="#00FFFF"><b><font face="Times New Roman" size="3" color="#FF0000">320</font></b></td>                 
      <td align="center" width="15%">六五</font></td>                 
      <td align="center" width="15%">550</font></td>                 
      <td align="center" width="17%"><input type="text" size="10" ID="vb6" value="0" Runat="server"></td>             
    </tr>             
  </table>          
<input type="button" id="B3" onserverclick="ClickSure" value="确定" runat="server">
<hr>
<span id="Span1" style="color:red" runat=server></span>
<table id="Table1" CellPadding=5 CellSpacing=0 Border="1" runat="server" />
<span id="Span2" style="color:red" runat=server></span>
</form>
</body>