<%@ Import Namespace="System.Data"%>
<%@ Import Namespace="System.Data.SqlClient"%>
<%@ Page CodeBehind="ad_editorder.aspx.cs" Language="c#" AutoEventWireup="false" Inherits="yn165.admin.ad_editorder" %>
<HTML>
	<HEAD>
		<TITLE>创库网络(昆明)后台管理系统</TITLE>
		<META content="text/html; charset=gb2312" http-equiv="Content-Type">
		<META content="no-cache" http-equiv="Pragma">
		<STYLE type="text/css">INPUT { FONT-SIZE: 9pt; FONT-FAMILY: "宋体"; TEXT-DECORATION: none }
	.big { FONT-SIZE: 10.5pt; FONT-FAMILY: "宋体"; TEXT-DECORATION: none }
	A:hover { COLOR: #ff6666; FONT-FAMILY: "宋体"; TEXT-DECORATION: none }
	A { FONT-FAMILY: "宋体"; TEXT-DECORATION: none }
	TD { FONT-SIZE: 9pt; FONT-FAMILY: "宋体", "Arial", "Times New Roman"; TEXT-DECORATION: none }
	.big2 { FONT-SIZE: 10.5pt; LINE-HEIGHT: 13pt; FONT-FAMILY: "宋体"; TEXT-DECORATION: none }
	.unnamed1 { FONT-SIZE: 7pt; TEXT-DECORATION: none }
	.unnamed2 { FONT-SIZE: 12pt; TEXT-DECORATION: none }
	</STYLE>
		<!--web design:zheng guiwen E-mail:guiwen@zheng.com.cn -->
		<META content="Microsoft FrontPage 4.0" name="GENERATOR">
		<base target="bottom">
	</HEAD>
	<BODY aLink="#000000" bgColor="#f0f0f0" link="#000000" text="#000000" vLink="#990000" leftmargin="0" topmargin="10" marginwidth="0" marginheight="0" onLoad="">
		<form runat="server" target=_self>
			<table width="100%" border="0" cellspacing="3" cellpadding="3">
				<tr>
					<td>
						<div align="center" class="unnamed2"><font color="#ff3300">定单管理（修改定单详细情况）</font></div>
					</td>
				</tr>
				<tr align="middle">
					<td>
						<table width="817" border="0" cellspacing="1" cellpadding="5" height="8" bgcolor="#cccccc">
							<tr bgcolor="#ffffff">
								<td width="101">定单号码：</td>
								<td width="691">&nbsp;
									<asp:Label id="order_number" runat="server" Width="154px">Label</asp:Label></td>
							</tr>
							<tr bgcolor="#ffffff">
								<td width="101">提交时间：</td>
								<td width="691">&nbsp;
									<asp:Label id="order_date" runat="server" Width="154px">Label</asp:Label></td>
							</tr>
							<tr bgcolor="#ffffff">
								<td width="101">提交人会员名：</td>
								<td width="691">&nbsp;
									<asp:Label id="account" runat="server" Width="154px">Label</asp:Label></td>
							</tr>
							<tr bgcolor="#ffffff">
								<td width="101"><font color="#ff3300">定单状态：</font></td>
								<td width="691"><font color="#ff3300">&nbsp;
										<asp:TextBox id="state" runat="server" Width="207px"></asp:TextBox></font></td>
							</tr>
							<tr bgcolor="#ffffff">
								<td width="101">付款方式：</td>
								<td width="691"><font color="#ff3300">&nbsp;
										<asp:TextBox id="way" runat="server" Width="207px"></asp:TextBox></font></td>
							</tr>
							<tr bgcolor="#ffffff">
								<td width="101">特殊说明：</td>
								<td width="691"><font color="#ff3300">&nbsp;
										<asp:TextBox id="explain" runat="server" Width="207px"></asp:TextBox></font></td>
							</tr>
							<tr bgcolor="#ffffff">
								<td width="101">捆绑的域名：</td>
								<td width="691"><font color="#ff3300">&nbsp;
										<asp:TextBox id="domain" runat="server" Width="207px"></asp:TextBox></font></td>
							</tr>
							<tr bgcolor="#ffffff">
								<td width="101">FTP帐号：</td>
								<td width="691"><font color="#ff3300">&nbsp;
										<asp:TextBox id="ftpname" runat="server" Width="207px"></asp:TextBox></font></td>
							</tr>
							<tr bgcolor="#ffffff">
								<td width="101">FTP密码：</td>
								<td width="691"><font color="#ff3300">&nbsp;
										<asp:TextBox id="ftppass" runat="server" Width="207px"></asp:TextBox></font></td>
							</tr>
							<tr bgcolor="#ffffff">
								<td width="101">订购内容：</td>
								<td width="691">
									<table border="0" cellspacing="1" bordercolor="#000000" width="693" cellpadding="4" bgcolor="#999999" align="left">
										<tr align="middle">
											<td height="2" width="72" bgcolor="#ffffff">商品编号</td>
											<td height="2" width="116" bgcolor="#ffffff">订购商品
											</td>
											<td height="2" width="229" bgcolor="#ffffff">说明
											</td>
											<td height="2" width="49" bgcolor="#ffffff">
												<div align="center">
													<center>
														单价
													</center>
												</div>
											</td>
											<td height="2" width="51" bgcolor="#ffffff">
												<div align="center">
													<center>
														单位
													</center>
												</div>
											</td>
											<td height="2" width="46" bgcolor="#ffffff">数量
											</td>
											<td height="2" width="53" bgcolor="#ffffff">操作</td>
										</tr>
										<%
int price=0,total=0;
SqlConnection conn = new SqlConnection("server=211.155.254.117;database=yn165;uid=yn165;pwd=159753");
conn.Open();
string sql = "select * from item where order_code='"+ Request["order_number"] + "'";

SqlCommand cmd = new SqlCommand(sql,conn);
SqlDataReader reader;
reader=cmd.ExecuteReader();
int index=0,count=0;
while (reader.Read()) {
count++;
}
reader.Close();
string[] id= new string[count];
string[] sp_code= new string[count];
string[] sum = new string[count];
reader=cmd.ExecuteReader();
count=0;

while (reader.Read()){
id[count]=reader.GetValue(0).ToString();
sp_code[count]=reader.GetValue(2).ToString();
sum[count]=reader.GetValue(3).ToString();
count++;
}
reader.Close();


for ( index=0;index<count;index++)
{
sql="select * from shangping where sp_code='" + sp_code[index] + "'";
cmd = new SqlCommand(sql,conn);
reader = cmd.ExecuteReader();
while (reader.Read()){

%>
										<tr align="middle">
											<td height="2" width="72" bgcolor="#ffffff"><% = reader.GetValue(1).ToString() %></td>
											<td height="2" width="116" bgcolor="#ffffff"><% = reader.GetValue(2).ToString() %>
											</td>
											<td height="2" width="229" bgcolor="#ffffff"><% = reader.GetValue(3).ToString() %></td>
											<td height="2" width="49" bgcolor="#ffffff"><% = reader.GetValue(4).ToString() %></td>
											<td height="2" width="51" bgcolor="#ffffff"><% = reader.GetValue(5).ToString() %>
											</td>
											<td height="2" width="46" bgcolor="#ffffff">
												<input type="text" value=<%=sum[index]%> size=3>
											</td>
											<td height="2" width="53" bgcolor="#ffffff">
												<% price=Convert.ToInt16(sum[index])*Convert.ToInt16(reader.GetValue(4));
															total += price;
															Response.Write(price.ToString());
															
											%>
											</td>
										</tr>
										<% }
										reader.Close();} %>
										<tr>
											<td align="right" colspan="7" height="22" bgcolor="#ffffff"><font color="#ff3300">商品总价值为:<%=total%>元</font></td>
										</tr>
										<tr>
											<td align="right" colspan="7" height="22" bgcolor="#ffffff">
												<asp:ImageButton id="ImageButton1" runat="server" ImageUrl="../img/003.gif"></asp:ImageButton></td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</form>
	</BODY>
</HTML>
